]> granicus.if.org Git - icu/commitdiff
ICU-12141 checking layout, layoutex, tools & tests now too; added some includes;...
authorMarkus Scherer <markus.icu@gmail.com>
Mon, 7 Mar 2016 20:26:37 +0000 (20:26 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Mon, 7 Mar 2016 20:26:37 +0000 (20:26 +0000)
X-SVN-Rev: 38500

18 files changed:
icu4c/source/layout/ContextualGlyphSubstProc2.cpp
icu4c/source/layout/ContextualGlyphSubstitution.h
icu4c/source/layout/KhmerLayoutEngine.h
icu4c/source/layout/LookupProcessor.h
icu4c/source/layout/LookupTables.h
icu4c/source/layout/NonContextualGlyphSubst.h
icu4c/source/layout/StateTableProcessor2.cpp
icu4c/source/layout/StateTableProcessor2.h
icu4c/source/layout/StateTables.h
icu4c/source/layout/TibetanLayoutEngine.h
icu4c/source/layout/TibetanReordering.h
icu4c/source/test/hdrtst/testinternalheaders.sh
icu4c/source/test/intltest/rbbitst.h
icu4c/source/tools/genrb/errmsg.h
icu4c/source/tools/genrb/prscmnts.h
icu4c/source/tools/genrb/rbutil.h
icu4c/source/tools/toolutil/pkg_icu.h
icu4c/source/tools/toolutil/pkg_imp.h

index ba7bd36f916411730ce195b7f8871ac9f00c0d84..5aea8ec97d7f92aceff2d2ea74565194032a520f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp.  and others 1998-2016 - All Rights Reserved
  *
  */
 
@@ -77,7 +77,7 @@ TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyp
 {
     TTGlyphID newGlyph = 0xFFFF;
     if(LE_FAILURE(success))  return newGlyph;
-    LEReferenceTo<LookupTable> lookupTable(perGlyphTable, success, offset);
+    LEReferenceTo<LookupTableBase> lookupTable(perGlyphTable, success, offset);
     if(LE_FAILURE(success))  return newGlyph;
     le_int16 format = SWAPW(lookupTable->format);
 
index 4ecc8ade8a9ae9107b891fa976d9026cc28390df..be3a00af667e1d486fac0cac8f6bcdaa002d4e03 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2016 - All Rights Reserved
  *
  */
 
@@ -14,8 +14,9 @@
 
 #include "LETypes.h"
 #include "LayoutTables.h"
-#include "StateTables.h"
+#include "MorphStateTables.h"
 #include "MorphTables.h"
+#include "StateTables.h"
 
 U_NAMESPACE_BEGIN
 
index 28023a81d566f21178046ee639dd92ca1394ea03..3626b70bd7c01a7f2bb57f0ba1c23fc6fe52409d 100644 (file)
@@ -1,7 +1,6 @@
-
 /*
  *
- * (C) Copyright IBM Corp. 1998-2014 - All Rights Reserved 
+ * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved 
  *
  * This file is a modification of the ICU file IndicLayoutEngine.h
  * by Jens Herden and Javier Sola for Khmer language 
 #ifndef __KHMERLAYOUTENGINE_H
 #define __KHMERLAYOUTENGINE_H
 
-// #include "LETypes.h"
-// #include "LEFontInstance.h"
-// #include "LEGlyphFilter.h"
-// #include "LayoutEngine.h"
-// #include "OpenTypeLayoutEngine.h"
+#include "LETypes.h"
+#include "LEFontInstance.h"
+#include "LEGlyphFilter.h"
+#include "LayoutEngine.h"
+#include "OpenTypeLayoutEngine.h"
 
-// #include "GlyphSubstitutionTables.h"
-// #include "GlyphDefinitionTables.h"
-// #include "GlyphPositioningTables.h"
+#include "GlyphSubstitutionTables.h"
+#include "GlyphDefinitionTables.h"
+#include "GlyphPositioningTables.h"
 
 U_NAMESPACE_BEGIN
 
-// class MPreFixups;
-// class LEGlyphStorage;
+class MPreFixups;
+class LEGlyphStorage;
 
 /**
  * This class implements OpenType layout for Khmer OpenType fonts, as
@@ -128,4 +127,3 @@ protected:
 
 U_NAMESPACE_END
 #endif
-
index 11bc9c36e5542e3deba295efe5554c294d72a040..a9c5ab480df59c959d6522258b1b27d016244bfd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * %W% %E%
  *
- * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved
  *
  */
 
@@ -17,8 +17,7 @@
 #include "LEFontInstance.h"
 #include "OpenTypeTables.h"
 #include "LETableReference.h"
-//#include "Lookups.h"
-//#include "Features.h"
+#include "Lookups.h"
 
 U_NAMESPACE_BEGIN
 
@@ -30,7 +29,6 @@ struct FeatureTable;
 struct FeatureListTable;
 struct GlyphDefinitionTableHeader;
 struct LookupSubtable;
-struct LookupTable;
 
 class LookupProcessor : public UMemory {
 public:
index 4d810756b37c78cd526161630f53fe8bfe7916cb..2054740c9ff996c8548e9cf59e9a192da5533e12 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved
  *
  */
 
@@ -15,6 +15,7 @@
 #include "LETypes.h"
 #include "LayoutTables.h"
 #include "LETableReference.h"
+#include "Lookups.h"
 
 U_NAMESPACE_BEGIN
 
@@ -29,7 +30,8 @@ enum LookupTableFormat
 
 typedef le_int16 LookupValue;
 
-struct LookupTable
+// Different from struct LookupTable in Lookups.h.
+struct LookupTableBase
 {
     le_int16 format;
 };
@@ -47,7 +49,7 @@ struct LookupSingle
     LookupValue value;
 };
 
-struct BinarySearchLookupTable : LookupTable
+struct BinarySearchLookupTable : LookupTableBase
 {
     le_int16 unitSize;
     le_int16 nUnits;
@@ -60,7 +62,7 @@ struct BinarySearchLookupTable : LookupTable
     const LookupSingle *lookupSingle(const LETableReference &base, const LookupSingle *entries, LEGlyphID glyph, LEErrorCode &success) const;
 };
 
-struct SimpleArrayLookupTable : LookupTable
+struct SimpleArrayLookupTable : LookupTableBase
 {
     LookupValue valueArray[ANY_NUMBER];
 };
@@ -84,7 +86,7 @@ struct SingleTableLookupTable : BinarySearchLookupTable
 };
 LE_VAR_ARRAY(SingleTableLookupTable, entries)
 
-struct TrimmedArrayLookupTable : LookupTable
+struct TrimmedArrayLookupTable : LookupTableBase
 {
     TTGlyphID   firstGlyph;
     TTGlyphID   glyphCount;
index 2a8285079b3105a2383a957f0dd949a4b66a47ac..82ba57040b811eeced5d4192c609b622a6953d52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2016 - All Rights Reserved
  *
  */
 
@@ -20,14 +20,13 @@ U_NAMESPACE_BEGIN
 
 struct NonContextualGlyphSubstitutionHeader : MorphSubtableHeader
 {
-    LookupTable table;
+    LookupTableBase table;
 };
 
 struct NonContextualGlyphSubstitutionHeader2 : MorphSubtableHeader2
 {
-    LookupTable table;
+    LookupTableBase table;
 };
 
 U_NAMESPACE_END
 #endif
-
index 88621f374f47fbf391b1521d05bd24a3f7ee9293..df94aedbc57acb51ef8161544f9a3a1601114d9d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp.  and others 1998-2014 - All Rights Reserved
+ * (C) Copyright IBM Corp.  and others 1998-2016 - All Rights Reserved
  *
  */
 
@@ -41,7 +41,7 @@ StateTableProcessor2::StateTableProcessor2(const LEReferenceTo<MorphSubtableHead
   stateArrayOffset = SWAPL(stHeader->stateArrayOffset);
   entryTableOffset = SWAPL(stHeader->entryTableOffset);
   
-  classTable = LEReferenceTo<LookupTable>(stHeader, success, classTableOffset);
+  classTable = LEReferenceTo<LookupTableBase>(stHeader, success, classTableOffset);
   format = SWAPW(classTable->format);
   
   stateArray = LEReferenceToArrayOf<EntryTableIndex2>(stHeader, success, stateArrayOffset, LE_UNBOUNDED_ARRAY);
index 4f967455509c113b320e6cf3bbfe0925f8efa966..13e5445ef95e09aff783b35c0b03ef39ebbe6402 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp.  and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp.  and others 1998-2016 - All Rights Reserved
  *
  */
 
@@ -46,7 +46,7 @@ protected:
     le_uint32 stateArrayOffset;
     le_uint32 entryTableOffset;
 
-    LEReferenceTo<LookupTable> classTable;
+    LEReferenceTo<LookupTableBase> classTable;
     LEReferenceToArrayOf<EntryTableIndex2> stateArray;
     LEReferenceTo<MorphStateTableHeader2> stateTableHeader;
     LEReferenceTo<StateTableHeader2> stHeader; // for convenience
index 5f00a5b71639404b88bfc5c4c1750f83c5019c3c..8635d1dcdee3c8e0fcf700cfeeac7c40826b5762 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 1998-2016 - All Rights Reserved
  *
  */
 
@@ -14,6 +14,7 @@
 
 #include "LETypes.h"
 #include "LayoutTables.h"
+#include "LETableReference.h"
 
 U_NAMESPACE_BEGIN
 
index cf7d1fa728a8ec1e46f5f4a7481cec78f635bd8d..3ca9918fc68e7748037a78f25cca2b3bce3f6e3e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved 
+ * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved 
  *
  * Developed at DIT - Government of Bhutan
  *
 #ifndef __TIBETANLAYOUTENGINE_H
 #define __TIBETANLAYOUTENGINE_H
 
-// #include "LETypes.h"
-// #include "LEFontInstance.h"
-// #include "LEGlyphFilter.h"
-// #include "LayoutEngine.h"
-// #include "OpenTypeLayoutEngine.h"
+#include "LETypes.h"
+#include "LEFontInstance.h"
+#include "LEGlyphFilter.h"
+#include "LayoutEngine.h"
+#include "OpenTypeLayoutEngine.h"
 
-// #include "GlyphSubstitutionTables.h"
-// #include "GlyphDefinitionTables.h"
-// #include "GlyphPositioningTables.h"
+#include "GlyphSubstitutionTables.h"
+#include "GlyphDefinitionTables.h"
+#include "GlyphPositioningTables.h"
 
 U_NAMESPACE_BEGIN
 
-// class MPreFixups;
-// class LEGlyphStorage;
+class MPreFixups;
+class LEGlyphStorage;
 
 /**
  * This class implements OpenType layout for Dzongkha and Tibetan OpenType fonts
@@ -128,4 +128,3 @@ protected:
 
 U_NAMESPACE_END
 #endif
-
index 246db5947b2b30fe48ca340c3f0635b67a218b02..6e68b8fa865346df4e17f119302e059125295d92 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved 
+ * (C) Copyright IBM Corp. 1998-2016 - All Rights Reserved 
  *
  * Developed at DIT - Government of Bhutan
  *
@@ -21,8 +21,8 @@
  * \internal
  */
 
-// #include "LETypes.h"
-// #include "OpenTypeTables.h"
+#include "LETypes.h"
+#include "OpenTypeTables.h"
 
 U_NAMESPACE_BEGIN
 
index d267edcd11d8c523f6352ccf3a4b655f24b5f6c4..db24056d8afa4b50992a48286f05c02f30da47a7 100755 (executable)
@@ -2,9 +2,13 @@
 # and others. All rights reserved.
 #
 # Run this script from $ICU_ROOT/src/source/
+# ~/svn.icu/trunk/src/source$  test/hdrtst/testinternalheaders.sh
 
+CC=clang
 CXX=clang++
 
+# Runtime libraries
+
 for file in `ls common/*.h`; do
     echo $file
     echo '#include "'$file'"' > ht_temp.cpp ;
@@ -26,4 +30,80 @@ for file in `ls io/*.h`; do
     $CXX -c -I common -I i18n -I io -O0 ht_temp.cpp ;
 done ;
 
+# layout is deprecated, but layoutex is not.
+
+for file in `ls layout/*.h`; do
+    echo $file
+    echo '#include "'$file'"' > ht_temp.cpp ;
+    echo 'void noop() {}' >> ht_temp.cpp ;
+    $CXX -c -I common -I i18n -I io -O0 ht_temp.cpp ;
+done ;
+
+# -I .  for includes of layout/*.h
+for file in `ls layoutex/*.h`; do
+    echo $file
+    echo '#include "'$file'"' > ht_temp.cpp ;
+    echo 'void noop() {}' >> ht_temp.cpp ;
+    $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -O0 ht_temp.cpp ;
+done ;
+
+# Tools
+
+for file in `ls tools/toolutil/*.h`; do
+    echo $file
+    echo '#include "'$file'"' > ht_temp.cpp ;
+    echo 'void noop() {}' >> ht_temp.cpp ;
+    $CXX -c -I common -I i18n -I io -I tools/toolutil -O0 ht_temp.cpp ;
+done ;
+
+# Exclude tzcode: tools/tzcode/private.h uses an argument "new" in a function declaration.
+# Markus sent an email to the tz list on 20160307 requesting that it be renamed.
+# We don't want to patch it, and don't want to spend the time for this script here
+# to know about C-only header files.
+
+for tool in genccode gencmn gencolusb gennorm2 genren gentest icupkg icuswap pkgdata \
+        genbrk gencfu gencnval gendict genrb gensprep icuinfo makeconv memcheck; do
+    for file in `ls tools/$tool/*.h`; do
+        echo $file
+        echo '#include "'$file'"' > ht_temp.cpp ;
+        echo 'void noop() {}' >> ht_temp.cpp ;
+        $CXX -c -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ;
+    done ;
+done ;
+
+# Tests
+
+for file in `ls tools/ctestfw/unicode/*.h`; do
+    echo $file
+    echo '#include "'$file'"' > ht_temp.cpp ;
+    echo 'void noop() {}' >> ht_temp.cpp ;
+    $CXX -c -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ;
+done ;
+
+# C not C++ for cintltst
+for file in `ls tools/cintltst/*.h`; do
+    echo $file
+    echo '#include "'$file'"' > ht_temp.cpp ;
+    echo 'void noop() {}' >> ht_temp.cpp ;
+    $CC -c -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/cintltst -O0 ht_temp.cpp ;
+done ;
+
+for test in intltest iotest testmap thaitest; do
+    for file in `ls test/$test/*.h`; do
+        echo $file
+        echo '#include "'$file'"' > ht_temp.cpp ;
+        echo 'void noop() {}' >> ht_temp.cpp ;
+        $CXX -c -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/$test -O0 ht_temp.cpp ;
+    done ;
+done ;
+
+for file in `ls test/letest/*.h`; do
+    echo $file
+    echo '#include "'$file'"' > ht_temp.cpp ;
+    echo 'void noop() {}' >> ht_temp.cpp ;
+    $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -I tools/toolutil -I tools/ctestfw -I test/letest -O0 ht_temp.cpp ;
+done ;
+
+# TODO: perf/*/*.h
+
 rm ht_temp.cpp ht_temp.o
index a05bef377a2ce9facbda98f046809e94ad7d4011..48b4aa2199f487f70db274bc013e44a7c19c08fc 100644 (file)
@@ -1,5 +1,5 @@
 /*************************************************************************
- * Copyright (c) 1999-2014, International Business Machines
+ * Copyright (c) 1999-2016, International Business Machines
  * Corporation and others. All Rights Reserved.
  *************************************************************************
  *   Date        Name        Description
@@ -17,7 +17,7 @@
 
 #include "intltest.h"
 #include "unicode/brkiter.h"
-
+#include "unicode/rbbi.h"
 
 class  Enumeration;
 class  BITestData;
index 190a61ebe179dfbd407517a08b20c63f5b3a1c24..19dfee8d858792fedbfa085dc6d3722a64a82af0 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2011, International Business Machines
+*   Copyright (C) 1998-2016, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -18,6 +18,8 @@
 #ifndef ERROR_H
 #define ERROR_H 1
 
+#include "unicode/utypes.h"
+
 U_CDECL_BEGIN
 
 extern const char *gCurrentFileName;
index c4f270545675e172f7c2ab9895fd809a9001a42a..35dd9e92d2961d392f09cdb05f6e0574f721cd0d 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2003, International Business Machines
+*   Copyright (C) 1998-2016, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -19,6 +19,8 @@
 #ifndef PRSCMNTS_H
 #define PRSCMNTS_H 1
 
+#include "unicode/utypes.h"
+
 #if UCONFIG_NO_REGULAR_EXPRESSIONS==0 /* donot compile when no RegularExpressions are available */
 
 enum UParseCommentsOption {
index b059bfa00d4fbeb0b9a84472ba114c7873bfce05..3f055a848c89e0567940e29afa3cb5dc589be3a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2005, International Business Machines
+*   Copyright (C) 1998-2016, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
 #ifndef UTIL_H
 #define UTIL_H 1
 
+#include "unicode/utypes.h"
+
 U_CDECL_BEGIN
 
 void get_dirname(char *dirname, const char *filename);
 void get_basename(char *basename, const char *filename);
 int32_t itostr(char * buffer, int32_t i, uint32_t radix, int32_t pad);
+
 U_CDECL_END
-#endif /* ! UTIL_H */
 
+#endif /* ! UTIL_H */
index 8451f8d550fbe922e690bdd841ab0b73b446d43f..50f3f51c96dfceb89ad7c74d2d980ec29290e597 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- *   Copyright (C) 2008-2012, International Business Machines
+ *   Copyright (C) 2008-2016, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *******************************************************************************
  */
@@ -8,6 +8,7 @@
 #define __PKG_ICU_H__
 
 #include "unicode/utypes.h"
+#include "package.h"
 
 #define U_PKG_RESERVED_CHARS "\"%&'()*+,-./:;<=>?_"
 
index 0b0c2b740f8d58710e309ce9d936f3e019e8da6b..45ddc4c0912844386d1bb78238920fcf83dbcf4a 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2005, International Business Machines
+*   Copyright (C) 2005-2016, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -20,6 +20,7 @@
 #define __PKG_IMP_H__
 
 #include "unicode/utypes.h"
+#include "unicode/udata.h"
 
 /*
  * Read an ICU data item with any platform type,