* Rename _PDCLIB_wctype_t -> _PDCLIB_wcinfo_t in order to avoid conflict with wctype_t in <wctype.h>.
* Add testdriver to generated _PDCLIB_unicodedata.c
* in Exhibit 1 of the Unicode Terms of Use, found at\r
* http://www.unicode.org/copyright.html#Exhibit1\r
*/\r
+ #ifndef REGTEST\r
#include <_PDCLIB_locale.h>\r
\r
- _PDCLIB_wctype_t _PDCLIB_wctype[] = {\r
+ _PDCLIB_wcinfo_t _PDCLIB_wcinfo[] = {\r
// { value,\tflags,\tlower,\tupper\t}, // name\r
""")\r
for line in in_file:\r
out_file.write(" { 0x%X,\t0x%X,\t0x%X,\t0x%X }, // %s\n" % (\r
num, bits, lower_case, upper_case, name))\r
out_file.write('};\n\n')\r
- out_file.write('size_t _PDCLIB_wctype_size = sizeof(_PDCLIB_wctype) / sizeof(_PDCLIB_wctype[0]);\n\n')\r
+ out_file.write("""\r
+size_t _PDCLIB_wcinfo_size = sizeof(_PDCLIB_wcinfo) / sizeof(_PDCLIB_wcinfo[0]);\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+int main( void )\r
+{\r
+ return TEST_RESULTS;\r
+}\r
+#endif\r
+\r
+""")\r
except:\r
in_file.close()\r
out_file.close()\r
* in Exhibit 1 of the Unicode Terms of Use, found at\r
* http://www.unicode.org/copyright.html#Exhibit1\r
*/\r
+ #ifndef REGTEST\r
#include <_PDCLIB_locale.h>\r
\r
- _PDCLIB_wctype_t _PDCLIB_wctype[] = {\r
+ _PDCLIB_wcinfo_t _PDCLIB_wcinfo[] = {\r
// { value, flags, lower, upper }, // name\r
{ 0x0, 0x4, 0x0, 0x0 }, // <control>\r
{ 0x1, 0x4, 0x1, 0x1 }, // <control>\r
{ 0x10FFFD, 0x0, 0x10FFFD, 0x10FFFD }, // <Plane 16 Private Use, Last>\r
};\r
\r
-size_t _PDCLIB_wctype_size = sizeof(_PDCLIB_wctype) / sizeof(_PDCLIB_wctype[0]);\r
+\r
+size_t _PDCLIB_wcinfo_size = sizeof(_PDCLIB_wcinfo) / sizeof(_PDCLIB_wcinfo[0]);\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+int main( void )\r
+{\r
+ return TEST_RESULTS;\r
+}\r
+#endif\r
\r
unsigned char collation;
} _PDCLIB_ctype_t;
-typedef struct _PDCLIB_wctype
+typedef struct _PDCLIB_wcinfo
{
_PDCLIB_uint32_t num;
_PDCLIB_uint16_t flags;
_PDCLIB_uint32_t lower;
_PDCLIB_uint32_t upper;
-} _PDCLIB_wctype_t;
+} _PDCLIB_wcinfo_t;
struct _PDCLIB_locale {
_PDCLIB_charcodec_t _Codec;