This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] C99 initializer changes for iconvdata


Hi.

Here are three patches for modifying files in iconvdata. These patches
modify scripts that output header files in the build directory. Some
of the source files in this directory have old-style initializers, but
they will be dealt with in a later patch.

Art Haas

2002-12-15  Art Haas  <ahaas@airmail.net>

	* iconvdata/gap.awk: Output C99 initializers.
	* iconvdata/gen-8bit-gap-1.sh: Same.
	* iconvdata/gen-8bit-gap.sh: Same.

Index: iconvdata/gap.awk
===================================================================
RCS file: /cvs/glibc/libc/iconvdata/gap.awk,v
retrieving revision 1.1
diff -u -r1.1 gap.awk
--- iconvdata/gap.awk	15 Jun 1998 18:08:29 -0000	1.1
+++ iconvdata/gap.awk	16 Dec 2002 01:11:16 -0000
@@ -26,7 +26,7 @@
     {
       if (last)
 	{
-	  printf ("  { start: 0x%04x, end: 0x%04x, idx: %5d },\n",
+	  printf ("  { .start = 0x%04x, .end = 0x%04x, .idx = %5d },\n",
 		  first, last, idx);
 	  idx -= u - last - 1;
 	}
@@ -35,5 +35,5 @@
   last = u;
 }
 
-END { printf ("  { start: 0x%04x, end: 0x%04x, idx: %5d },\n",
+END { printf ("  { .start = 0x%04x, .end = 0x%04x, .idx = %5d },\n",
 	      first, last, idx); }
Index: iconvdata/gen-8bit-gap-1.sh
===================================================================
RCS file: /cvs/glibc/libc/iconvdata/gen-8bit-gap-1.sh,v
retrieving revision 1.4
diff -u -r1.4 gen-8bit-gap-1.sh
--- iconvdata/gen-8bit-gap-1.sh	24 Sep 2000 19:43:53 -0000	1.4
+++ iconvdata/gen-8bit-gap-1.sh	16 Dec 2002 01:11:17 -0000
@@ -7,7 +7,7 @@
 echo "static const struct gap from_idx[] = {"
 sed -ne 's/^<U\(....\)>[[:space:]]*.x[A-Fa-f]..*/\1/p' \
     "$@" | sort -u | $AWK -f gap.awk
-echo "  { start: 0xffff, end: 0xffff, idx:     0 }"
+echo "  { .start = 0xffff, .end = 0xffff, .idx =     0 }"
 echo "};"
 echo "static const char iso88597_from_ucs4[] = {"
 sed -ne 's/^<U\(....\)>[[:space:]]*.x\([A-Fa-f].\).*/0x\1 0x\2/p' \
Index: iconvdata/gen-8bit-gap.sh
===================================================================
RCS file: /cvs/glibc/libc/iconvdata/gen-8bit-gap.sh,v
retrieving revision 1.3
diff -u -r1.3 gen-8bit-gap.sh
--- iconvdata/gen-8bit-gap.sh	26 Jun 2000 00:24:51 -0000	1.3
+++ iconvdata/gen-8bit-gap.sh	16 Dec 2002 01:11:17 -0000
@@ -7,7 +7,7 @@
 echo "static const struct gap from_idx[] = {"
 sed -ne 's/^<U\(....\).*/\1/p' \
     "$@" | sort -u | $AWK -f gap.awk
-echo "  { start: 0xffff, end: 0xffff, idx:     0 }"
+echo "  { .start = 0xffff, .end = 0xffff, .idx =     0 }"
 echo "};"
 echo "static const char from_ucs4[] = {"
 sed -ne 's/^<U\(....\)>[[:space:]]*.x\(..\).*/\1 \2/p' \
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]