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 initializers for stdlib/random.c


Hi.

Another C99 conversion patch.

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

	* stdlib/random.c: Convert to C99 initializers.

Index: stdlib/random.c
===================================================================
RCS file: /cvs/glibc/libc/stdlib/random.c,v
retrieving revision 1.17
diff -u -r1.17 random.c
--- stdlib/random.c	6 Jul 2002 06:35:55 -0000	1.17
+++ stdlib/random.c	16 Dec 2002 01:35:59 -0000
@@ -170,8 +170,8 @@
    in the initialization of randtbl) because the state table pointer is set
    to point to randtbl[1] (as explained below).)  */
 
-    fptr : &randtbl[SEP_3 + 1],
-    rptr : &randtbl[1],
+    .fptr = &randtbl[SEP_3 + 1],
+    .rptr = &randtbl[1],
 
 /* The following things are the pointer to the state information table,
    the type of the current generator, the degree of the current polynomial
@@ -183,13 +183,13 @@
    indexing every time to find the address of the last element to see if
    the front and rear pointers have wrapped.  */
 
-    state : &randtbl[1],
+    .state = &randtbl[1],
 
-    rand_type : TYPE_3,
-    rand_deg : DEG_3,
-    rand_sep : SEP_3,
+    .rand_type = TYPE_3,
+    .rand_deg = DEG_3,
+    .rand_sep = SEP_3,
 
-    end_ptr : &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
+    .end_ptr = &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
 };
 
 /* POSIX.1c requires that there is mutual exclusion for the `rand' and
-- 
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]