From ff780b0d8077be0f93a9dd9ced5943d2aeed840c Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 12 Oct 2011 22:58:30 +0000 Subject: [PATCH] ICU-7752 library: rename generated *_props_data.c files to .h and add #ifndef guard X-SVN-Rev: 30817 --- icu4c/source/common/ubidi_props.c | 7 ++++--- .../common/{ubidi_props_data.c => ubidi_props_data.h} | 10 +++++++--- icu4c/source/common/ucase.cpp | 5 +++-- .../common/{ucase_props_data.c => ucase_props_data.h} | 10 +++++++--- icu4c/source/common/uchar.c | 5 +++-- .../common/{uchar_props_data.c => uchar_props_data.h} | 8 ++++++-- 6 files changed, 30 insertions(+), 15 deletions(-) rename icu4c/source/common/{ubidi_props_data.c => ubidi_props_data.h} (99%) rename icu4c/source/common/{ucase_props_data.c => ucase_props_data.h} (99%) rename icu4c/source/common/{uchar_props_data.c => uchar_props_data.h} (99%) diff --git a/icu4c/source/common/ubidi_props.c b/icu4c/source/common/ubidi_props.c index 55cc7cffc2a..6fca5a34074 100644 --- a/icu4c/source/common/ubidi_props.c +++ b/icu4c/source/common/ubidi_props.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2004-2010, International Business Machines +* Copyright (C) 2004-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -38,8 +38,9 @@ struct UBiDiProps { uint8_t formatVersion[4]; }; -/* ubidi_props_data.c is machine-generated by genbidi --csource */ -#include "ubidi_props_data.c" +/* ubidi_props_data.h is machine-generated by genbidi --csource */ +#define INCLUDED_FROM_UBIDI_PROPS_C +#include "ubidi_props_data.h" /* UBiDiProps singleton ----------------------------------------------------- */ diff --git a/icu4c/source/common/ubidi_props_data.c b/icu4c/source/common/ubidi_props_data.h similarity index 99% rename from icu4c/source/common/ubidi_props_data.c rename to icu4c/source/common/ubidi_props_data.h index eeec97b3c55..415468d64ae 100644 --- a/icu4c/source/common/ubidi_props_data.c +++ b/icu4c/source/common/ubidi_props_data.h @@ -1,12 +1,16 @@ /* - * Copyright (C) 1999-2010, International Business Machines + * Copyright (C) 1999-2011, International Business Machines * Corporation and others. All Rights Reserved. * - * file name: ubidi_props_data.c + * file name: ubidi_props_data.h * - * machine-generated on: 2010-09-19 + * machine-generated on: 2011-10-12 */ +#ifndef INCLUDED_FROM_UBIDI_PROPS_C +# error This file must be #included from ubidi_props.c only. +#endif + static const UVersionInfo ubidi_props_dataVersion={6,0,0,0}; static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x4fa0,0x4d98,0x1a,0x620,0x780,0,0,0,0,0,0,0,0,0,0x3800b2}; diff --git a/icu4c/source/common/ucase.cpp b/icu4c/source/common/ucase.cpp index ebac5153e7b..3763e1e6514 100644 --- a/icu4c/source/common/ucase.cpp +++ b/icu4c/source/common/ucase.cpp @@ -40,8 +40,9 @@ struct UCaseProps { uint8_t formatVersion[4]; }; -/* ucase_props_data.c is machine-generated by gencase --csource */ -#include "ucase_props_data.c" +/* ucase_props_data.h is machine-generated by gencase --csource */ +#define INCLUDED_FROM_UCASE_CPP +#include "ucase_props_data.h" /* UCaseProps singleton ----------------------------------------------------- */ diff --git a/icu4c/source/common/ucase_props_data.c b/icu4c/source/common/ucase_props_data.h similarity index 99% rename from icu4c/source/common/ucase_props_data.c rename to icu4c/source/common/ucase_props_data.h index db35d0a55ef..24762cd5aa6 100644 --- a/icu4c/source/common/ucase_props_data.c +++ b/icu4c/source/common/ucase_props_data.h @@ -1,12 +1,16 @@ /* - * Copyright (C) 1999-2010, International Business Machines + * Copyright (C) 1999-2011, International Business Machines * Corporation and others. All Rights Reserved. * - * file name: ucase_props_data.c + * file name: ucase_props_data.h * - * machine-generated on: 2010-09-19 + * machine-generated on: 2011-10-12 */ +#ifndef INCLUDED_FROM_UCASE_CPP +# error This file must be #included from ucase.cpp only. +#endif + static const UVersionInfo ucase_props_dataVersion={6,0,0,0}; static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x5654,0x4918,0x50c,0x172,0,0,0,0,0,0,0,0,0,0,3}; diff --git a/icu4c/source/common/uchar.c b/icu4c/source/common/uchar.c index d56ab121d06..a49e1a383dc 100644 --- a/icu4c/source/common/uchar.c +++ b/icu4c/source/common/uchar.c @@ -34,8 +34,9 @@ #define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) -/* uchar_props_data.c is machine-generated by genprops --csource */ -#include "uchar_props_data.c" +/* uchar_props_data.h is machine-generated by genprops --csource */ +#define INCLUDED_FROM_UCHAR_C +#include "uchar_props_data.h" /* constants and macros for access to the data ------------------------------ */ diff --git a/icu4c/source/common/uchar_props_data.c b/icu4c/source/common/uchar_props_data.h similarity index 99% rename from icu4c/source/common/uchar_props_data.c rename to icu4c/source/common/uchar_props_data.h index 3bb98a66ee7..cd72ae28caa 100644 --- a/icu4c/source/common/uchar_props_data.c +++ b/icu4c/source/common/uchar_props_data.h @@ -2,11 +2,15 @@ * Copyright (C) 1999-2011, International Business Machines * Corporation and others. All Rights Reserved. * - * file name: uchar_props_data.c + * file name: uchar_props_data.h * - * machine-generated on: 2011-05-10 + * machine-generated on: 2011-10-12 */ +#ifndef INCLUDED_FROM_UCHAR_C +# error This file must be #included from uchar.c only. +#endif + static const UVersionInfo dataVersion={6,0,0,0}; static const uint16_t propsTrie_index[17204]={