summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-17 23:07:49 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-06-17 23:07:49 +0000
commit22e44d10af1ed3bdc37fa092272a7fb1627599bf (patch)
treed8303a51f3609dd0d899bd887f169e0eaff5f98b
parent037d03127e6ec621e2299b5d5ead74bcf9a732a6 (diff)
downloadATCD-22e44d10af1ed3bdc37fa092272a7fb1627599bf.tar.gz
.
-rw-r--r--ChangeLog-99b5
-rw-r--r--ace/OS.h12
-rw-r--r--apps/gperf/ChangeLog22
-rw-r--r--apps/gperf/src/Gen_Perf.cpp6
-rw-r--r--apps/gperf/src/Key_List.cpp107
-rw-r--r--apps/gperf/src/Key_List.h2
-rw-r--r--apps/gperf/src/Vectors.cpp4
-rw-r--r--apps/gperf/src/Vectors.h9
-rw-r--r--apps/gperf/tests/test-1.exp57
-rw-r--r--apps/gperf/tests/test-2.exp111
-rw-r--r--apps/gperf/tests/test-3.exp79
-rw-r--r--apps/gperf/tests/test-4.exp33
-rw-r--r--apps/gperf/tests/test-5.exp37
13 files changed, 371 insertions, 113 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b
index 7c308b05099..3f14f575202 100644
--- a/ChangeLog-99b
+++ b/ChangeLog-99b
@@ -1,5 +1,10 @@
Thu Jun 17 12:46:30 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+ * ace/OS.h: Added an automatic test to check if we're running on
+ an EBCDIC character set, and if so, set
+ ACE_STANDARD_CHARACTER_SET_SIZE to 256 rather than 128. Thanks
+ to Jim Rogers for this suggestion.
+
* performance-tests/TTCP/Makefile: Zapped the Orbix and ORBeline
directories from the Makefile. These are *way* out of date and
have been superceeded by the versions in
diff --git a/ace/OS.h b/ace/OS.h
index a2882666c3f..8fab8142e83 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -27,6 +27,18 @@
# pragma once
# endif /* ACE_LACKS_PRAGMA_ONCE */
+// Do not change these values wantonly since GPERF depends on them..
+#define ACE_ASCII_SIZE 128
+#define ACE_EBCDIC_SIZE 256
+
+#if 'a' < 'A'
+#define ACE_HAS_EBCDIC
+#define ACE_STANDARD_CHARACTER_SET_SIZE 256
+#else
+#define ACE_HAS_ASCII
+#define ACE_STANDARD_CHARACTER_SET_SIZE 128
+#endif /* 'a' < 'A' */
+
// Get OS.h to compile on some of the platforms without DIR info yet.
# if !defined (ACE_HAS_DIRENT)
typedef int DIR;
diff --git a/apps/gperf/ChangeLog b/apps/gperf/ChangeLog
index 3530d89efa2..c74380c5aea 100644
--- a/apps/gperf/ChangeLog
+++ b/apps/gperf/ChangeLog
@@ -1,8 +1,26 @@
+Thu Jun 17 18:04:30 1999 Douglas C. Schmidt <schmidt@mambo.cs.wustl.edu>
+
+ * tests/test-[1-5].exp: Fixed all the tests to account for the new
+ EBCDIC output.
+
+Thu Jun 17 17:25:00 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * src/Key_List.cpp (output_hash_function): Generate an asso_values
+ table that will have the appropriate values for both EBCDIC or
+ ASCII, depending on the platform.
+
+ * src/Key_List.cpp (output_hash_function),
+ src/Gen_Perf.cpp (Gen_Perf),
+ src/Vectors.h: Replaced the use of ALPHA_SIZE with
+ ACE_STANDARD_CHARACTER_SET_SIZE, which works correctly for
+ EBCDIC platforms, as well as ASCII ones. Thanks to
+ Jim Rogers <jrogers@viasoft.com> for this suggestion.
+
Wed Jun 16 19:08:01 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
* src/Key_List.cpp: Fixed the key_word table generation so that it
- generates the "default fill" string for the null entries in the
- table. Thanks to Irfan and Naga for helping in this.
+ generates the "default fill" string for the null entries in the
+ table. Thanks to Irfan and Naga for helping in this.
Sun Jun 6 15:47:23 1999 Douglas C. Schmidt <schmidt@danzon.cs.wustl.edu>
diff --git a/apps/gperf/src/Gen_Perf.cpp b/apps/gperf/src/Gen_Perf.cpp
index b237d626fa5..81458b44397 100644
--- a/apps/gperf/src/Gen_Perf.cpp
+++ b/apps/gperf/src/Gen_Perf.cpp
@@ -250,7 +250,7 @@ Gen_Perf::open (void)
{
ACE_OS::srand (ACE_OS::time (0));
- for (int i = 0; i < Vectors::ALPHA_SIZE; i++)
+ for (int i = 0; i < ACE_STANDARD_CHARACTER_SET_SIZE; i++)
Vectors::asso_values[i] = (ACE_OS::rand () & asso_value_max - 1);
}
else
@@ -259,7 +259,7 @@ Gen_Perf::open (void)
// Initialize array if user requests non-zero default.
if (asso_value)
- for (int i = Vectors::ALPHA_SIZE - 1; i >= 0; i--)
+ for (int i = ACE_STANDARD_CHARACTER_SET_SIZE - 1; i >= 0; i--)
Vectors::asso_values[i] = asso_value & option.asso_max () - 1;
}
@@ -436,7 +436,7 @@ Gen_Perf::~Gen_Perf (void)
{
ACE_DEBUG ((LM_DEBUG,
"\ndumping occurrence and associated values tables\n"));
- for (int i = 0; i < Vectors::ALPHA_SIZE; i++)
+ for (int i = 0; i < ACE_STANDARD_CHARACTER_SET_SIZE; i++)
if (Vectors::occurrences[i])
ACE_DEBUG ((LM_DEBUG,
"Vectors::asso_values[%c] = %6d, Vectors::occurrences[%c] = %6d\n",
diff --git a/apps/gperf/src/Key_List.cpp b/apps/gperf/src/Key_List.cpp
index 7f4e10c7514..2a99f4d2ef0 100644
--- a/apps/gperf/src/Key_List.cpp
+++ b/apps/gperf/src/Key_List.cpp
@@ -39,7 +39,7 @@ const char *const Key_List::default_return_type = "char *";
// How wide the printed field width must be to contain the maximum
// hash value.
int Key_List::field_width = 0;
-int Key_List::determined_[Vectors::ALPHA_SIZE];
+int Key_List::determined_[ACE_STANDARD_CHARACTER_SET_SIZE];
// Destructor dumps diagnostics during debugging.
@@ -1066,6 +1066,32 @@ Key_List::output_hash_function (void)
const int max_column = 10;
int count = max_hash_value;
+ // Lookup table for converting ASCII to EBCDIC.
+ static const int ascii_to_ebcdic[ACE_ASCII_SIZE] =
+ {
+ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F,
+ 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+ 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26,
+ 0x18, 0x19, 0x3F, 0x27, 0x22, 0x1D, 0x1E, 0x1F,
+
+ 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D,
+ 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61,
+ 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0x7A, 0x5E, 0x4C, 0x7E, 0x6E, 0x6F,
+
+ 0x7C, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
+ 0xC8, 0xC9, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6,
+ 0xD7, 0xD8, 0xD9, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6,
+ 0xE7, 0xE8, 0xE9, 0xAD, 0xE0, 0xBD, 0x5F, 0x6D,
+
+ 0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,
+ 0x97, 0x98, 0x99, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
+ 0xA7, 0xA8, 0xA9, 0xC0, 0x6A, 0xD0, 0xA1, 0x07};
+
+ int ebcdic_to_ascii[ACE_EBCDIC_SIZE];
+ int target;
+
// Calculate maximum number of digits required for MAX_HASH_VALUE.
for (Key_List::field_width = 2;
@@ -1082,21 +1108,78 @@ Key_List::output_hash_function (void)
if (option[CPLUSPLUS])
ACE_OS::printf ("%s::", option.class_name ());
- ACE_OS::printf (option[ANSI]
- ? "%s (const char *str, unsigned int len)\n{\n static %sunsigned %s asso_values[] =\n {"
- : "%s (str, len)\n char *str;\n unsigned int len;\n{\n static %sunsigned %s asso_values[] =\n {",
- option.hash_name (), option[CONSTANT] ? "const " : "",
- max_hash_value <= UCHAR_MAX ? "char" : (max_hash_value <= USHRT_MAX ? "short" : "int"));
+ ACE_OS::printf (option[ANSI]
+ ? "%s (const char *str, unsigned int len)\n{\n"
+ : "%s (str, len)\n char *str;\n unsigned int len;\n{\n",
+ option.hash_name ());
+
+ // Generate the asso_values table.
+ ACE_OS::printf (" static %sunsigned %s asso_values[] =\n {",
+ option[CONSTANT] ? "const " : "",
+ max_hash_value <= UCHAR_MAX ? "char" : (max_hash_value <= USHRT_MAX ? "short" : "int"));
+
+ ACE_OS::printf ("\n#if defined (ACE_MVS)");
+ if (ACE_STANDARD_CHARACTER_SET_SIZE == ACE_EBCDIC_SIZE)
+ {
+ // We are running in EBCDIC environment.
+ for (count = 0; count < ACE_EBCDIC_SIZE; ++count)
+ {
+ if (!(count % max_column))
+ ACE_OS::printf ("\n ");
+
+ ACE_OS::printf ("%*d,",
+ Key_List::field_width,
+ Vectors::occurrences[count] ? Vectors::asso_values[count] : max_hash_value + 1);
+ }
- for (count = 0; count < Vectors::ALPHA_SIZE; ++count)
+ ACE_OS::printf ("\n#else");
+
+ for (count = 0; count < ACE_ASCII_SIZE; ++count)
+ {
+ if (!(count % max_column))
+ ACE_OS::printf ("\n ");
+
+ target = ascii_to_ebcdic[count];
+ ACE_OS::printf ("%*d,",
+ Key_List::field_width,
+ Vectors::occurrences[target] ? Vectors::asso_values[target] : max_hash_value + 1);
+ }
+ }
+ else
{
- if (!(count % max_column))
- ACE_OS::printf ("\n ");
+ // We are running in ASCII environment.
+ for (count = 0; count < ACE_EBCDIC_SIZE; ++count)
+ ebcdic_to_ascii[count] = 0;
- ACE_OS::printf ("%*d,",
- Key_List::field_width,
- Vectors::occurrences[count] ? Vectors::asso_values[count] : max_hash_value + 1);
+ for (count = 0; count < ACE_ASCII_SIZE; ++count)
+ {
+ target = ascii_to_ebcdic[count];
+ ebcdic_to_ascii[target] = count;
+ }
+
+ for (count = 0; count < ACE_EBCDIC_SIZE; ++count)
+ {
+ if (!(count % max_column))
+ ACE_OS::printf ("\n ");
+
+ target = ebcdic_to_ascii[count];
+ ACE_OS::printf ("%*d,",
+ Key_List::field_width,
+ Vectors::occurrences[target] ? Vectors::asso_values[target] : max_hash_value + 1);
+ }
+ ACE_OS::printf ("\n#else");
+
+ for (count = 0; count < ACE_ASCII_SIZE; ++count)
+ {
+ if (!(count % max_column))
+ ACE_OS::printf ("\n ");
+
+ ACE_OS::printf ("%*d,",
+ Key_List::field_width,
+ Vectors::occurrences[count] ? Vectors::asso_values[count] : max_hash_value + 1);
+ }
}
+ ACE_OS::printf ("\n#endif /* ACE_MVS */");
// Optimize special case of ``-k 1,$''
if (option[DEFAULTCHARS])
diff --git a/apps/gperf/src/Key_List.h b/apps/gperf/src/Key_List.h
index 29e559934be..34f8e2c05bf 100644
--- a/apps/gperf/src/Key_List.h
+++ b/apps/gperf/src/Key_List.h
@@ -164,7 +164,7 @@ private:
// How wide the printed field width must be to contain the maximum
// hash value.
- static int determined_[Vectors::ALPHA_SIZE];
+ static int determined_[ACE_STANDARD_CHARACTER_SET_SIZE];
// Sets the slot location for all keysig characters that are now
// determined.
};
diff --git a/apps/gperf/src/Vectors.cpp b/apps/gperf/src/Vectors.cpp
index ce7fac91fb8..95706725549 100644
--- a/apps/gperf/src/Vectors.cpp
+++ b/apps/gperf/src/Vectors.cpp
@@ -28,9 +28,9 @@ ACE_RCSID(src, Vectors, "$Id$")
#if defined (ACE_HAS_GPERF)
// Counts occurrences of each key set character.
-int Vectors::occurrences[Vectors::ALPHA_SIZE];
+int Vectors::occurrences[ACE_STANDARD_CHARACTER_SET_SIZE];
// Value associated with each character.
-int Vectors::asso_values[Vectors::ALPHA_SIZE];
+int Vectors::asso_values[ACE_STANDARD_CHARACTER_SET_SIZE];
#endif /* ACE_HAS_GPERF */
diff --git a/apps/gperf/src/Vectors.h b/apps/gperf/src/Vectors.h
index b0a7be80e18..e6eec45d355 100644
--- a/apps/gperf/src/Vectors.h
+++ b/apps/gperf/src/Vectors.h
@@ -38,15 +38,10 @@ class Vectors
// Static class data members that are shared between several
// classes via inheritance.
public:
- enum
- {
- ALPHA_SIZE = 128
- };
-
- static int occurrences[ALPHA_SIZE];
+ static int occurrences[ACE_STANDARD_CHARACTER_SET_SIZE];
// Counts occurrences of each key set character.
- static int asso_values[ALPHA_SIZE];
+ static int asso_values[ACE_STANDARD_CHARACTER_SET_SIZE];
// Value associated with each character.
};
diff --git a/apps/gperf/tests/test-1.exp b/apps/gperf/tests/test-1.exp
index 7417f4a92f9..46fcc4e57d0 100644
--- a/apps/gperf/tests/test-1.exp
+++ b/apps/gperf/tests/test-1.exp
@@ -1,6 +1,6 @@
/* C code produced by gperf version 2.8 (ACE version) */
/* Command-line: ../src/gperf -p -j1 -o -t -N is_reserved_word -k1,3,$ */
-/* Command-line: gperf -p -j1 -i 1 -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
+/* Command-line: gperf -p -j1 -i 1 -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
#include <string.h>
struct resword { const char *name; short token; enum rid rid; };
@@ -19,6 +19,34 @@ hash (str, len)
{
static unsigned char asso_values[] =
{
+#if defined (ACE_MVS)
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 0,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 1,
+ 2, 34, 19, 6, 11, 29, 0, 17, 83, 83,
+ 83, 83, 83, 83, 83, 83, 0, 23, 28, 26,
+ 30, 31, 83, 15, 83, 83, 83, 83, 83, 83,
+ 83, 83, 1, 0, 28, 13, 4, 83, 83, 5,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83,
+#else
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
@@ -32,6 +60,7 @@ hash (str, len)
19, 6, 11, 29, 0, 17, 83, 0, 23, 28,
26, 30, 31, 83, 15, 1, 0, 28, 13, 4,
83, 83, 5, 83, 83, 83, 83, 83,
+#endif /* ACE_MVS */
};
unsigned int hval = len;
@@ -52,17 +81,17 @@ is_reserved_word (str, len)
char *str;
unsigned int len;
{
- static struct resword wordlist[] =
+ static struct resword wordlist[] =
{
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
{"__asm__", ASM, NORID},
- {"",},
+ {"",},
{"__typeof__", TYPEOF, NORID},
{"__signed__", TYPESPEC, RID_SIGNED},
{"__alignof__", ALIGNOF, NORID},
{"break", BREAK, NORID},
{"__attribute__", ATTRIBUTE, NORID},
- {"",}, {"",},
+ {"",},{"",},
{"else", ELSE, NORID},
{"__attribute", ATTRIBUTE, NORID},
{"__typeof", TYPEOF, NORID},
@@ -72,20 +101,20 @@ is_reserved_word (str, len)
{"sizeof", SIZEOF, NORID},
{"switch", SWITCH, NORID},
{"__volatile__", TYPE_QUAL, RID_VOLATILE},
- {"",},
+ {"",},
{"__inline__", SCSPEC, RID_INLINE},
{"__signed", TYPESPEC, RID_SIGNED},
{"__volatile", TYPE_QUAL, RID_VOLATILE},
{"if", IF, NORID},
{"__inline", SCSPEC, RID_INLINE},
{"while", WHILE, NORID},
- {"",},
+ {"",},
{"__asm", ASM, NORID},
{"auto", SCSPEC, RID_AUTO},
{"short", TYPESPEC, RID_SHORT},
{"default", DEFAULT, NORID},
{"extern", SCSPEC, RID_EXTERN},
- {"",}, {"",},
+ {"",},{"",},
{"__const", TYPE_QUAL, RID_CONST},
{"static", SCSPEC, RID_STATIC},
{"__const__", TYPE_QUAL, RID_CONST},
@@ -102,20 +131,20 @@ is_reserved_word (str, len)
{"char", TYPESPEC, RID_CHAR},
{"signed", TYPESPEC, RID_SIGNED},
{"unsigned", TYPESPEC, RID_UNSIGNED},
- {"",}, {"",},
+ {"",},{"",},
{"double", TYPESPEC, RID_DOUBLE},
{"asm", ASM, NORID},
- {"",}, {"",},
+ {"",},{"",},
{"goto", GOTO, NORID},
- {"",},
+ {"",},
{"const", TYPE_QUAL, RID_CONST},
{"enum", ENUM, NORID},
{"register", SCSPEC, RID_REGISTER},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},
{"continue", CONTINUE, NORID},
- {"",},
+ {"",},
{"union", UNION, NORID},
- {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},
{"long", TYPESPEC, RID_LONG},
};
diff --git a/apps/gperf/tests/test-2.exp b/apps/gperf/tests/test-2.exp
index f39d00ba088..d4e765f1c6d 100644
--- a/apps/gperf/tests/test-2.exp
+++ b/apps/gperf/tests/test-2.exp
@@ -1,5 +1,5 @@
/* C code produced by gperf version 2.8 (ACE version) */
-/* Command-line: ../src/gperf -n -k1-8 -l */
+/* Command-line: ../src/gperf -n -k1-8 -l */
#include <string.h>
#define TOTAL_KEYWORDS 40
@@ -17,6 +17,34 @@ hash (str, len)
{
static unsigned short asso_values[] =
{
+#if defined (ACE_MVS)
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 25, 30, 35, 21, 0, 30, 15,
+ 30, 45, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 0, 5, 45, 0, 10, 0, 1, 257, 257,
+ 257, 257, 257, 257, 257, 257, 20, 25, 15, 30,
+ 40, 15, 5, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
+ 257, 257, 257, 257, 257, 257,
+#else
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
@@ -30,6 +58,7 @@ hash (str, len)
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
257, 257, 257, 257, 257, 257, 257, 257,
+#endif /* ACE_MVS */
};
unsigned int hval = 0;
@@ -86,84 +115,84 @@ in_word_set (str, len)
};
static const char *wordlist[] =
{
- "",
+ "",
"OR",
- "", "", "", "", "", "", "", "",
+ "","","","","","","","",
"LOOP",
- "", "", "", "", "", "", "", "", "",
+ "","","","","","","","","",
"ELSE",
"DO",
- "", "", "",
+ "","","",
"TO",
"MOD",
- "", "", "",
+ "","","",
"OF",
"FOR",
- "", "", "",
+ "","","",
"BY",
"FROM",
- "", "", "",
+ "","","",
"TYPE",
"MODULE",
- "", "", "",
+ "","","",
"SET",
- "", "", "", "", "",
+ "","","","","",
"EXPORT",
- "", "", "", "",
+ "","","","",
"VAR",
"ARRAY",
"RECORD",
- "", "",
+ "","",
"REPEAT",
- "", "", "", "",
+ "","","","",
"END",
- "", "", "",
+ "","","",
"NOT",
- "", "", "", "",
+ "","","","",
"IF",
- "", "", "", "",
+ "","","","",
"CASE",
- "", "",
+ "","",
"PROCEDURE",
- "",
+ "",
"EXIT",
"IMPORT",
"RETURN",
- "", "",
+ "","",
"IN",
"AND",
- "", "", "",
+ "","","",
"ELSIF",
"DIV",
- "", "", "",
+ "","","",
"THEN",
- "", "", "", "", "", "", "", "", "",
+ "","","","","","","","","",
"IMPLEMENTATION",
- "", "", "", "",
+ "","","","",
"WHILE",
- "", "", "", "", "", "", "", "", "",
+ "","","","","","","","","",
"CONST",
"POINTER",
- "", "", "",
+ "","","",
"UNTIL",
- "", "", "", "",
+ "","","","",
"BEGIN",
- "", "", "", "",
+ "","","","",
"WITH",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "QUALIFIED",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "", "",
- "", "", "", "", "",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","QUALIFIED",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","","","","","",
+ "","","","","",
"DEFINITION",
};
diff --git a/apps/gperf/tests/test-3.exp b/apps/gperf/tests/test-3.exp
index 03f379ebc84..9ad750df816 100644
--- a/apps/gperf/tests/test-3.exp
+++ b/apps/gperf/tests/test-3.exp
@@ -18,6 +18,34 @@ hash (const char *str, unsigned int len)
{
static const unsigned char asso_values[] =
{
+#if defined (ACE_MVS)
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 0,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 19,
+ 6, 27, 37, 0, 12, 1, 15, 63, 148, 148,
+ 148, 148, 148, 148, 148, 148, 4, 0, 56, 20,
+ 15, 42, 148, 31, 148, 148, 148, 148, 148, 148,
+ 148, 148, 5, 26, 39, 32, 10, 148, 40, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148,
+#else
148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
@@ -31,6 +59,7 @@ hash (const char *str, unsigned int len)
37, 0, 12, 1, 15, 63, 148, 4, 0, 56,
20, 15, 42, 148, 31, 5, 26, 39, 32, 10,
148, 40, 148, 148, 148, 148, 148, 148,
+#endif /* ACE_MVS */
};
unsigned int hval = len;
@@ -51,18 +80,18 @@ inline
const struct resword *
in_word_set (const char *str, unsigned int len)
{
- static const struct resword wordlist[] =
+ static const struct resword wordlist[] =
{
- {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},
{"else", ELSE, NORID,},
- {"",},
+ {"",},
{"long", TYPESPEC, RID_LONG,},
- {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},
{"__alignof__", ALIGNOF, NORID},
{"__asm__", ASM, NORID},
- {"",}, {"",},
+ {"",},{"",},
{"while", WHILE, NORID,},
- {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},
{"__alignof", ALIGNOF, NORID},
{"all", ALL, NORID /* Extension */,},
{"sizeof", SIZEOF, NORID,},
@@ -78,9 +107,9 @@ in_word_set (const char *str, unsigned int len)
{"new", NEW, NORID,},
{"break", BREAK, NORID,},
{"goto", GOTO, NORID,},
- {"",},
+ {"",},
{"__attribute", ATTRIBUTE, NORID},
- {"",},
+ {"",},
{"__attribute__", ATTRIBUTE, NORID},
{"this", THIS, NORID,},
{"raise", RAISE, NORID /* Extension */,},
@@ -93,14 +122,14 @@ in_word_set (const char *str, unsigned int len)
{"__const", TYPE_QUAL, RID_CONST},
{"double", TYPESPEC, RID_DOUBLE,},
{"__typeof__", TYPEOF, NORID},
- {"",},
+ {"",},
{"switch", SWITCH, NORID,},
{"auto", SCSPEC, RID_AUTO,},
{"do", DO, NORID,},
{"friend", SCSPEC, RID_FRIEND,},
- {"",},
+ {"",},
{"reraise", RERAISE, NORID /* Extension */,},
- {"",},
+ {"",},
{"volatile", TYPE_QUAL, RID_VOLATILE,},
{"__typeof", TYPEOF, NORID},
{"continue", CONTINUE, NORID,},
@@ -112,7 +141,7 @@ in_word_set (const char *str, unsigned int len)
{"short", TYPESPEC, RID_SHORT,},
{"signed", TYPESPEC, RID_SIGNED,},
{"try", TRY, NORID /* Extension */,},
- {"",}, {"",}, {"",},
+ {"",},{"",},{"",},
{"__signed__", TYPESPEC, RID_SIGNED},
{"catch", CATCH, NORID,},
{"public", PUBLIC, NORID,},
@@ -120,33 +149,33 @@ in_word_set (const char *str, unsigned int len)
{"if", IF, NORID,},
{"asm", ASM, NORID,},
{"union", AGGR, RID_UNION,},
- {"",},
+ {"",},
{"private", PRIVATE, NORID,},
- {"",}, {"",}, {"",},
+ {"",},{"",},{"",},
{"operator", OPERATOR, NORID,},
- {"",}, {"",}, {"",},
+ {"",},{"",},{"",},
{"default", DEFAULT, NORID,},
{"dynamic", DYNAMIC, NORID,},
{"overload", OVERLOAD, NORID,},
{"int", TYPESPEC, RID_INT,},
{"char", TYPESPEC, RID_CHAR,},
- {"",}, {"",},
+ {"",},{"",},
{"return", RETURN, NORID,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
+ {"",},{"",},
{"__signed", TYPESPEC, RID_SIGNED},
- {"",},
+ {"",},
{"void", TYPESPEC, RID_VOID,},
- {"",}, {"",}, {"",},
+ {"",},{"",},{"",},
{"protected", PROTECTED, NORID,},
- {"",},
+ {"",},
{"enum", ENUM, NORID,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},
{"inline", SCSPEC, RID_INLINE,},
{"register", SCSPEC, RID_REGISTER,},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
- {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},{"",},
+ {"",},{"",},{"",},{"",},
{"unsigned", TYPESPEC, RID_UNSIGNED,},
};
diff --git a/apps/gperf/tests/test-4.exp b/apps/gperf/tests/test-4.exp
index 124abb90585..ff604581721 100644
--- a/apps/gperf/tests/test-4.exp
+++ b/apps/gperf/tests/test-4.exp
@@ -1,6 +1,6 @@
/* C code produced by gperf version 2.8 (ACE version) */
/* Command-line: ../src/gperf -D -p -t */
-/* Command-line: gperf -p -j1 -i 1 -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
+/* Command-line: gperf -p -j1 -i 1 -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
#include <string.h>
struct resword { const char *name; short token; enum rid rid; };
@@ -19,6 +19,34 @@ hash (str, len)
{
static unsigned char asso_values[] =
{
+#if defined (ACE_MVS)
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 0,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 40,
+ 20, 50, 25, 10, 30, 0, 0, 50, 83, 83,
+ 83, 83, 83, 83, 83, 83, 0, 15, 0, 35,
+ 0, 83, 83, 20, 83, 83, 83, 83, 83, 83,
+ 83, 83, 0, 10, 40, 5, 15, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83,
+#else
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
@@ -32,6 +60,7 @@ hash (str, len)
25, 10, 30, 0, 0, 50, 83, 0, 15, 0,
35, 0, 83, 83, 20, 0, 10, 40, 5, 15,
83, 83, 83, 83, 83, 83, 83, 83,
+#endif /* ACE_MVS */
};
return len + asso_values[str[len - 1]] + asso_values[str[0]];
}
@@ -43,7 +72,7 @@ in_word_set (str, len)
{
static struct resword wordlist[] =
{
- {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},
{"goto", GOTO, NORID},
{"__asm", ASM, NORID},
{"switch", SWITCH, NORID},
diff --git a/apps/gperf/tests/test-5.exp b/apps/gperf/tests/test-5.exp
index 21b86d7bb96..5e7156350bb 100644
--- a/apps/gperf/tests/test-5.exp
+++ b/apps/gperf/tests/test-5.exp
@@ -28,6 +28,34 @@ hash (str, len)
{
static unsigned char asso_values[] =
{
+#if defined (ACE_MVS)
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 0, 0, 13, 44, 30, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 0, 25, 1,
+ 0, 44, 44, 0, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 1, 44, 25, 44, 44, 0, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 18, 29, 14, 6, 7, 10, 20,
+ 44, 28, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 28, 19, 22, 15, 0, 44, 9, 44, 44,
+ 44, 44, 44, 44, 44, 44, 23, 0, 23, 26,
+ 2, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44,
+#else
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
@@ -41,6 +69,7 @@ hash (str, len)
0, 0, 13, 44, 30, 44, 44, 44, 0, 25,
1, 0, 44, 44, 0, 44, 1, 44, 25, 44,
44, 0, 44, 44, 44, 44, 44, 44,
+#endif /* ACE_MVS */
};
return len + asso_values[str[len - 1]] + asso_values[str[0]];
}
@@ -51,11 +80,11 @@ is_reserved_word (str, len)
char *str;
unsigned int len;
{
- static struct resword wordlist[] =
+ static struct resword wordlist[] =
{
- {"",}, {"",},
+ {"",},{"",},
{"To", TO, PASCAL_ISO},
- {"",},
+ {"",},
{"Type", TYPE, PASCAL_ISO},
{"Then", THEN, PASCAL_ISO},
{"Packed", PACKED, PASCAL_ISO},
@@ -89,7 +118,7 @@ is_reserved_word (str, len)
{"Div", DIV, PASCAL_ISO},
{"Begin", BEGIN_, PASCAL_ISO},
{"With", WITH, PASCAL_ISO},
- {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
+ {"",},{"",},{"",},{"",},{"",},{"",},
{"If", IF, PASCAL_ISO},
};