NetBSD Problem Report #1859

From gnats  Tue Dec 26 04:33:47 1995
Received: from ppp-jhi.eis.cs.tu-bs.de by pain.lcs.mit.edu (8.6.12/8.6.9) with ESMTP id EAA20784 for <gnats-bugs@gnats.netbsd.org>; Tue, 26 Dec 1995 04:17:34 -0500
Message-Id: <199512260908.KAA02130@ ppp-jhi.eis.cs.tu-bs.de>
Date: Tue, 26 Dec 1995 10:08:46 +0100
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
Reply-To: hannken@eis.cs.tu-bs.de
To: gnats-bugs@gnats.netbsd.org
Subject: make groff/libg++ compile with gcc-2.7.2
X-Send-Pr-Version: 3.95

>Number:         1859
>Category:       bin
>Synopsis:       make groff/libg++ compile with gcc-2.7.2
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 26 04:35:03 +0000 1995
>Closed-Date:    Sat Dec 30 03:30:56 +0000 1995
>Last-Modified:  Sat Dec 30 03:33:13 +0000 1995
>Originator:     Juergen Hannken-Illjes
>Release:        NetBSD-current as of Dec 22.
>Organization:

TU Braunschweig; Abt. EIS; Germany
>Environment:

System: NetBSD home 1.1A NetBSD 1.1A (CUSTOM) #0: Tue Dec 26 00:45:40 MET 1995 hannken@home:/usr/src/sys/arch/i386/compile/CUSTOM i386
>Description:

Many files from groff and libg++ fail with gcc 2.7.2. Most failures are from
the scope change of variables in for loops as in
  for (int i...) ; i =
>How-To-Repeat:

groff and libg++ dont compile
>Fix:

I changed all these occurences to the original scoping. Most changes are like
  for (int i... => int i; for(i...

--- /usr/src/gnu/lib/libg++/libg++/Obstack.cc.orig	Sat Oct 14 01:07:06 1995
+++ /usr/src/gnu/lib/libg++/libg++/Obstack.cc	Sun Dec 24 18:23:49 1995
@@ -84,9 +84,9 @@
 }

 int Obstack::contains(void* obj) // true if obj somewhere in Obstack
 {
-  for (_obstack_chunk* ch = chunk; 
+  _obstack_chunk* ch; for (ch = chunk; 
        ch != 0 && (obj < (void*)ch || obj >= (void*)(ch->limit)); 
        ch = ch->prev);

   return ch != 0;
--- /usr/src/gnu/lib/libg++/libg++/String.cc.orig	Sat Oct 14 01:07:18 1995
+++ /usr/src/gnu/lib/libg++/libg++/String.cc	Sun Dec 24 19:14:56 1995
@@ -964,9 +964,9 @@
 String join(String src[], int n, const String& separator) return x;
 {
   String sep = separator;
   int xlen = 0;
-  for (int i = 0; i < n; ++i)
+  int i; for (i = 0; i < n; ++i)
     xlen += src[i].length();
   xlen += (n - 1) * sep.length();

   x.alloc(xlen);
@@ -1116,9 +1116,9 @@
   const char* ss = xs;
   const char* topx = &(xchars[x.length()]);
   const char* ys = &(ychars[startpos]);
   const char* topy = &(ychars[y.length()]);
-  for (int l = 0; xs < topx && ys < topy && *xs++ == *ys++; ++l);
+  int l; for (l = 0; xs < topx && ys < topy && *xs++ == *ys++; ++l);
   r.rep = Salloc(r.rep, ss, l, l);
 }

 String common_suffix(const String& x, const String& y, int startpos) return r;
@@ -1128,9 +1128,9 @@
   const char* xs = &(xchars[x.length() + startpos]);
   const char* botx = xchars;
   const char* ys = &(ychars[y.length() + startpos]);
   const char* boty = ychars;
-  for (int l = 0; xs >= botx && ys >= boty && *xs == *ys ; --xs, --ys, ++l);
+  int l; for (l = 0; xs >= botx && ys >= boty && *xs == *ys ; --xs, --ys, ++l);
   r.rep = Salloc(r.rep, ++xs, l, l);
 }

 #else
--- /usr/src/gnu/lib/libg++/libg++/Integer.cc.orig	Sat Oct 14 01:07:05 1995
+++ /usr/src/gnu/lib/libg++/libg++/Integer.cc	Sun Dec 24 19:15:30 1995
@@ -1881,9 +1881,9 @@

   long k = 0;
   int l = (ul <= vl)? ul : vl;
   int cont = 1;
-  for (int i = 0;  i < l && cont; ++i)
+  int i; for (i = 0;  i < l && cont; ++i)
   {
     unsigned long a =  (i < ul)? u->s[i] : 0;
     unsigned long b =  (i < vl)? v->s[i] : 0;
     for (int j = 0; j < I_SHIFT; ++j)
--- /usr/src/gnu/lib/libg++/libg++/ACG.cc.orig	Sat Oct 14 01:06:44 1995
+++ /usr/src/gnu/lib/libg++/libg++/ACG.cc	Sun Dec 24 19:16:15 1995
@@ -187,9 +187,9 @@
     //
     //	Determine the size of the state table
     //

-    for (register int l = 0;
+    register int l; for (l = 0;
 	 randomStateTable[l][0] != -1 && randomStateTable[l][1] < size;
 	 l++);

     if (randomStateTable[l][1] == -1) {
--- /usr/src/gnu/lib/libg++/libg++/Fix.cc.orig	Sun Dec 24 19:16:26 1995
+++ /usr/src/gnu/lib/libg++/libg++/Fix.cc	Sun Dec 24 19:51:08 1995
@@ -224,9 +224,9 @@
   else
     longer = y, shorter = x;
   if ( r == NULL )
     r = new_Fix(longer->len);
-  for ( int i=r->siz-1; i >= longer->siz; i-- )
+  int i; for ( i=r->siz-1; i >= longer->siz; i-- )
     r->s[i] = 0;
   for ( ; i >= shorter->siz; i-- )
     r->s[i] = longer->s[i];
   uint32 sum = 0, carry = 0;
@@ -250,9 +250,9 @@
   else
     longer = y, shorter = x;
   if ( r == NULL )
     r = new_Fix(longer->len);
-  for ( int i=r->siz-1; i >= longer->siz; i-- )
+  int i; for ( i=r->siz-1; i >= longer->siz; i-- )
     r->s[i] = 0;
   for ( ; i >= shorter->siz; i-- )
     r->s[i] = (longer == x ? x->s[i] : -y->s[i]);
   int16 carry = 0;
@@ -278,9 +278,9 @@
   if ( xsign )
     x = negate(x,X.rep);
   if ( ysign )
     y = negate(y,Y.rep);
-  for ( int i=0; i < r->siz; i++ )
+  int i; for ( i=0; i < r->siz; i++ )
     r->s[i] = 0;
   for ( i=x->siz-1; i >= 0; i-- )
   {
     uint32 carry = 0;
@@ -309,9 +309,9 @@
   if ( y != (int16 )y )
     (*Fix_range_error_handler)("multiply by int -- int too large");
   if ( r == NULL )
     r = new_Fix(x->len);
-  for ( int i=r->siz-1; i >= x->siz; i-- )
+  int i; for ( i=r->siz-1; i >= x->siz; i-- )
     r->s[i] = 0;
   int32 a, carry = 0;
   for ( ; i > 0; i-- )
   {
@@ -417,9 +417,9 @@
   }

   int xr = 16 - xl;
   uint16 xrmask = 0xffffL >> xr;
-  for ( int i=0; i < ilow; i++, rs+=u, xsl+=u, xsr+=u )
+  int i; for ( i=0; i < ilow; i++, rs+=u, xsl+=u, xsr+=u )
     *rs = 0;
   for ( ; i < ihigh; i++, rs+=u, xsl+=u, xsr+=u )
     *rs = (*xsl << xl) + ((*xsr >> xr) & xrmask);
   *rs = (y > 0 ? (*xsl << xl) : ((*xsr >> xr) & xrmask));
@@ -433,9 +433,9 @@
 {
   if ( r == NULL )
     r = new_Fix(x->len);
   uint32 carry = 1;
-  for ( int i=r->siz-1; i >= x->siz; i-- )
+  int i; for ( i=r->siz-1; i >= x->siz; i-- )
     r->s[i] = 0;
   for ( ; i >= 0; i-- )
   {
     uint32 a = (uint16 )~x->s[i] + carry;	// bug work-around
--- /usr/src/gnu/lib/libg++/libg++/dtoa.cc.orig	Sat Oct 14 01:07:20 1995
+++ /usr/src/gnu/lib/libg++/libg++/dtoa.cc	Sun Dec 24 19:18:37 1995
@@ -178,9 +178,9 @@
           *f = 0;
           if (ch > '5') // properly round: unavoidable propagation
           {
             int carry = 1;
-            for (char* p = f - 1; p >= fwork && carry; --p)
+            char *p; for (p = f - 1; p >= fwork && carry; --p)
             {
               ++*p;
               if (*p > '9')
                 *p = '0';
@@ -312,9 +312,9 @@

   char* fmtbase = (char *) _libgxx_fmtq.alloc(fmtwidth + pad + 1);
   char* fmt = fmtbase;

-  for (int i = 0; i < pad; ++i) *fmt++ = ' ';
+  int i; for (i = 0; i < pad; ++i) *fmt++ = ' ';

   if (is_neg) *fmt++ = '-';

   for (i = 0; i < iwidth; ++i) *fmt++ = *iw++;
--- /usr/src/gnu/lib/libg++/libg++/Fix.h.orig	Sat Oct 14 01:06:55 1995
+++ /usr/src/gnu/lib/libg++/libg++/Fix.h	Sun Dec 24 19:59:15 1995
@@ -62,9 +62,9 @@
                   Fix(int, const _Fix);

                   ~Fix();

-  Fix             operator =  (Fix&);
+  Fix             operator =  (const Fix&);
   Fix             operator =  (double);

   friend int      operator == (const Fix&, const Fix& );
   friend int      operator != (const Fix&, const Fix&);
@@ -198,9 +198,9 @@
 inline _Fix copy(const _Fix from, _Fix to)
 {
   uint16 *ts = to->s, *fs = from->s;
   int ilim = to->siz < from->siz ? to->siz : from->siz;
-  for ( int i=0; i < ilim; i++ )
+  int i; for ( i=0; i < ilim; i++ )
     *ts++ = *fs++;
   for ( ; i < to->siz; i++ )
     *ts++ = 0;
   mask(to);
@@ -259,9 +259,9 @@
 {
   if ( --rep->ref <= 0 ) delete rep;
 }

-inline Fix  Fix::operator = (Fix&  y)
+inline Fix  Fix::operator = (const Fix&  y)
 {
   if ( rep->len == y.rep->len ) {
     ++y.rep->ref;
     if ( --rep->ref <= 0 ) delete rep;
--- /usr/src/gnu/lib/libg++/libg++/Fix16.h.orig	Sat Oct 14 01:06:56 1995
+++ /usr/src/gnu/lib/libg++/libg++/Fix16.h	Sun Dec 24 20:05:39 1995
@@ -241,8 +241,10 @@


 inline Fix16::~Fix16() {}

+inline Fix32::~Fix32() {}
+
 inline short Fix16::round(double d)
 { 
   return short( (d >= 0)? d + 0.5 : d - 0.5); 
 }
@@ -496,10 +498,8 @@
 inline Fix16& Fix16::operator*=(int g)
 {
   return *this = *this * g;
 }
-
-inline Fix32::~Fix32() {}

 inline long Fix32::round(double d)
 { 
   return long( (d >= 0)? d + 0.5 : d - 0.5);
--- /usr/src/gnu/lib/libg++/libg++/Fix24.h.orig	Sat Oct 14 01:06:57 1995
+++ /usr/src/gnu/lib/libg++/libg++/Fix24.h	Sun Dec 24 20:10:19 1995
@@ -243,8 +243,10 @@


 inline Fix24::~Fix24() {}

+inline Fix48::~Fix48() {}
+
 inline Fix24::Fix24(long i)		
 { 
   m = i; 
 }
@@ -354,9 +356,9 @@
 }

 inline Fix24 operator>>(const Fix24& a, int b) 	
 { 
-  return (a.m >> b) & 0xffffff00L; 
+  return (a.m >> b) & ~0xff; 
 }

 inline  Fix24&  Fix24:: operator+=(const Fix24&  f)
 {
@@ -434,10 +436,8 @@
 inline ostream&  operator<<(ostream& s, const Fix24&  f)
 { 
   return s << double(f);
 }
-
-inline Fix48::~Fix48() {}

 inline Fix48::Fix48(twolongs i)		
 { 
   m = i;
--- /usr/src/gnu/lib/libg++/libg++/error.cc.orig	Sat Oct 14 01:07:20 1995
+++ /usr/src/gnu/lib/libg++/libg++/error.cc	Sun Dec 24 20:12:37 1995
@@ -19,10 +19,8 @@
 #pragma implementation
 #endif
 #include <builtin.h>

-extern "C" _VOLATILE_VOID abort();
-
 _VOLATILE_VOID default_one_arg_error_handler(const char* msg)
 {
   fputs("Error: ", stderr);
   fputs(msg, stderr);
--- /usr/src/gnu/lib/libg++/iostream/strstream.C.orig	Sat Oct 14 01:06:39 1995
+++ /usr/src/gnu/lib/libg++/iostream/strstream.C	Sun Dec 24 19:19:45 1995
@@ -143,9 +143,9 @@
 	// Try increasing powers of 2, as long as we don't wrap around.
 	// This can lose in pathological cases (ptr near the end
 	// of the address space).  A better solution might be to
 	// adjust the size on underflow/overflow.  FIXME.
-	for (int s; s = 2*size, s > 0 && ptr + s > ptr && s < 0x4000000L; )
+	int s; for (s; s = 2*size, s > 0 && ptr + s > ptr && s < 0x4000000L; )
 	    size = s;
 	size = s;
 #else
 	// The following semi-portable kludge assumes that
--- /usr/src/gnu/lib/libg++/iostream/indstream.C.orig	Sat Oct 14 01:06:27 1995
+++ /usr/src/gnu/lib/libg++/iostream/indstream.C	Sun Dec 24 20:15:31 1995
@@ -61,10 +61,10 @@
 streampos indirectbuf::seekoff(streamoff off, _seek_dir dir, int mode)
 {
     int ret_val = 0;
     int select = mode == 0 ? (ios::in|ios::out) : mode;
-    streambuf *gbuf = (select & ios::in) ? get_stream() : NULL;
-    streambuf *pbuf = (select & ios::out) ? put_stream() : NULL;
+    streambuf *gbuf = (select & ios::in) ? get_stream() : (streambuf *)NULL;
+    streambuf *pbuf = (select & ios::out) ? put_stream() : (streambuf *)NULL;
     if (gbuf == pbuf)
 	ret_val = gbuf->seekoff(off, dir, mode);
     else {
 	if (gbuf)
@@ -78,10 +78,10 @@
 streampos indirectbuf::seekpos(streampos pos, int mode)
 {
     int ret_val = EOF;
     int select = mode == 0 ? (ios::in|ios::out) : mode;
-    streambuf *gbuf = (select & ios::in) ? get_stream() : NULL;
-    streambuf *pbuf = (select & ios::out) ? put_stream() : NULL;
+    streambuf *gbuf = (select & ios::in) ? get_stream() : (streambuf *)NULL;
+    streambuf *pbuf = (select & ios::out) ? put_stream() : (streambuf *)NULL;
     if (gbuf == pbuf)
 	ret_val = gbuf->seekpos(pos, mode);
     else {
 	if (gbuf)
--- /usr/src/gnu/usr.bin/groff/eqn/lex.cc.orig	Sat Oct 14 01:27:48 1995
+++ /usr/src/gnu/usr.bin/groff/eqn/lex.cc	Sun Dec 24 13:08:10 1995
@@ -250,9 +250,9 @@
 };  

 void init_table(const char *device)
 {
-  for (int i = 0; i < sizeof(token_table)/sizeof(token_table[0]); i++) {
+  int i; for (i = 0; i < sizeof(token_table)/sizeof(token_table[0]); i++) {
     definition *def = new definition;
     def->is_macro = 0;
     def->tok = token_table[i].token;
     macro_table.define(token_table[i].name, def);
@@ -471,9 +471,9 @@
 argument_macro_input::argument_macro_input(const char *body, int ac, 
 					   char **av, input *x)
 : input(x), argc(ac), ap(0)
 {
-  for (int i = 0; i < argc; i++)
+  int i; for (i = 0; i < argc; i++)
     argv[i] = av[i];
   p = s = strsave(body);
   int j = 0;
   for (i = 0; s[i] != '\0'; i++)
@@ -686,9 +686,9 @@
 void interpolate_macro_with_args(const char *body)
 {
   char *argv[9];
   int argc = 0;
-  for (int i = 0; i < 9; i++)
+  int i; for (i = 0; i < 9; i++)
     argv[i] = 0;
   int level = 0;
   int c;
   do {
--- /usr/src/gnu/usr.bin/groff/eqn/list.cc.orig	Sat Oct 14 01:27:48 1995
+++ /usr/src/gnu/usr.bin/groff/eqn/list.cc	Sun Dec 24 13:09:58 1995
@@ -158,9 +158,9 @@
   for (i = 0; i < list.len && !have_simple; i++)
     have_simple = list.p[i]->is_simple();
   if (have_simple) {
     printf(".nr " WIDTH_FORMAT " +\\w" DELIMITER_CHAR, uid);
-    for (int i = 0; i < list.len; i++)
+    for (i = 0; i < list.len; i++)
       if (list.p[i]->is_simple())
 	list.p[i]->output();
     printf(DELIMITER_CHAR "\n");
     printf(".nr " HEIGHT_FORMAT " \\n[rst]>?\\n[" HEIGHT_FORMAT "]\n",
@@ -173,9 +173,9 @@

 void list_box::compute_sublist_width(int n)
 {
   int total_spacing = 0;
-  for (int i = 1; i < n + 1 && i < list.len; i++)
+  int i; for (i = 1; i < n + 1 && i < list.len; i++)
     total_spacing += compute_spacing(is_script, list.p[i-1]->spacing_type,
 				     list.p[i]->spacing_type);
   printf(".nr " TEMP_REG " %dM", total_spacing);
   for (i = 0; i < n; i++)
@@ -185,9 +185,9 @@
   for (i = 0; i < n && !have_simple; i++)
     have_simple = list.p[i]->is_simple();
   if (have_simple) {
     printf("+\\w" DELIMITER_CHAR);
-    for (int i = 0; i < n; i++)
+    for (i = 0; i < n; i++)
       if (list.p[i]->is_simple())
 	list.p[i]->output();
     printf(DELIMITER_CHAR);
   }
--- /usr/src/gnu/usr.bin/groff/eqn/delim.cc.orig	Sat Oct 14 01:27:44 1995
+++ /usr/src/gnu/usr.bin/groff/eqn/delim.cc	Sun Dec 24 13:07:35 1995
@@ -275,9 +275,9 @@
 {
   printf(".ds " DELIM_STRING "\n");
   delimiter *d = delim_table;
   int delim_len = strlen(delim);
-  for (int i = 0; i < DELIM_TABLE_SIZE; i++, d++)
+  int i; for (i = 0; i < DELIM_TABLE_SIZE; i++, d++)
     if (strncmp(delim, d->name, delim_len) == 0 
 	&& (left_or_right & d->flags) != 0)
       break;
   if (i >= DELIM_TABLE_SIZE) {
--- /usr/src/gnu/usr.bin/groff/addftinfo/addftinfo.cc.orig	Sat Oct 14 01:25:29 1995
+++ /usr/src/gnu/usr.bin/groff/addftinfo/addftinfo.cc	Sun Dec 24 13:30:43 1995
@@ -88,16 +88,16 @@
   param.cap_height = DEFAULT_CAP_HEIGHT;
   param.comma_depth = DEFAULT_COMMA_DEPTH;
   param.desc_depth = DEFAULT_DESC_DEPTH;
   param.body_depth = DEFAULT_BODY_DEPTH;
-  for (int i = 1; i < argc && argv[i][0] == '-'; i++) {
+  int i; for (i = 1; i < argc && argv[i][0] == '-'; i++) {
     if (argv[i][1] == '-' && argv[i][2] == '\0') {
       i++;
       break;
     }
     if (i + 1 >= argc)
       usage();
-    for (int j = 0;; j++) {
+    int j; for (j = 0;; j++) {
       if (j >= sizeof(param_table)/sizeof(param_table[0]))
 	fatal("parameter `%1' not recognized", argv[i] + 1);
       if (strcmp(param_table[j].name, argv[i] + 1) == 0)
 	break;
--- /usr/src/gnu/usr.bin/groff/troff/env.cc.orig	Sat Oct 14 01:31:14 1995
+++ /usr/src/gnu/usr.bin/groff/troff/env.cc	Sun Dec 24 12:28:02 1995
@@ -135,9 +135,9 @@
 #endif /* WIDOW_CONTROL */
       )
     curdiv->output(nd, no_fill, vs, ls, width);
   else {
-    for (pending_output_line **p = &pending_lines; *p; p = &(*p)->next)
+    pending_output_line **p; for (p = &pending_lines; *p; p = &(*p)->next)
       ;
     *p = new pending_output_line(nd, no_fill, vs, ls, width);
   }
 }
@@ -1585,9 +1585,9 @@
 {
   if (line == 0)
     return;
   hyphenation_type prev_type = line->get_hyphenation_type();
-  for (node **startp = &line->next; *startp != 0; startp = &(*startp)->next) {
+  node **startp; for (startp = &line->next; *startp != 0; startp = &(*startp)->next) {
     hyphenation_type this_type = (*startp)->get_hyphenation_type();
     if (prev_type == HYPHEN_BOUNDARY && this_type == HYPHEN_MIDDLE)
       break;
     prev_type = this_type;
@@ -1704,9 +1704,9 @@
     delete bp;
     space_total = 0;
     width_total = 0;
     node *first_non_discardable = 0;
-    for (node *tem = line; tem != 0; tem = tem->next)
+    node *tem; for (tem = line; tem != 0; tem = tem->next)
       if (!tem->discardable())
 	first_non_discardable = tem;
     node *to_be_discarded;
     if (first_non_discardable) {
@@ -2024,9 +2024,9 @@

 tab_type tab_stops::distance_to_next_tab(hunits curpos, hunits *distance)
 {
   hunits lastpos = 0;
-  for (tab *tem = initial_list; tem && tem->pos <= curpos; tem = tem->next)
+  tab *tem; for (tem = initial_list; tem && tem->pos <= curpos; tem = tem->next)
     lastpos = tem->pos;
   if (tem) {
     *distance = tem->pos - curpos;
     return tem->type;
@@ -2052,9 +2052,9 @@
   static char *buf = 0;
   static int buf_size = 0;
   // figure out a maximum on the amount of space we can need
   int count = 0;
-  for (tab *p = initial_list; p; p = p->next)
+  tab *p; for (p = initial_list; p; p = p->next)
     ++count;
   for (p = repeated_list; p; p = p->next)
     ++count;
   // (10 for digits + 1 for u + 1 for 'C' or 'R') + 2 for ' &' + 1 for '\0'
@@ -2148,9 +2148,9 @@
 }

 void tab_stops::add_tab(hunits pos, tab_type type, int repeated)
 {
-  for (tab **p = repeated ? &repeated_list : &initial_list; *p; p = &(*p)->next)
+  tab **p; for (p = repeated ? &repeated_list : &initial_list; *p; p = &(*p)->next)
     ;
   *p = new tab(pos, type);
 }

@@ -2281,9 +2281,9 @@
     field_distance -= tab_amount;
     field_spaces += tab_field_spaces;
   }
   if (tab_contents != 0) {
-    for (node *tem = tab_contents; tem->next != 0; tem = tem->next)
+    node *tem; for (tem = tab_contents; tem->next != 0; tem = tem->next)
       ;
     tem->next = line;
     line = tab_contents;
   }
@@ -2389,9 +2389,9 @@
 	    width_total += tab_distance;
 	    current_tab = TAB_NONE;
 	  }
 	  if (tab_contents != 0) {
-	    for (node *tem = tab_contents; tem->next != 0; tem = tem->next)
+	    node *tem; for (tem = tab_contents; tem->next != 0; tem = tem->next)
 	      ;
 	    tem->next = line;
 	    line = tab_contents;
 	    tab_contents = 0;
@@ -2900,9 +2900,9 @@
 }

 void hyphen_trie::hyphenate(const char *word, int len, int *hyphens)
 {
-  for (int j = 0; j < len+1; j++)
+  int j; for (j = 0; j < len+1; j++)
     hyphens[j] = 0;
   for (j = 0; j < len - 1; j++) {
     h = hyphens + j;
     find(word + j, len - j);
@@ -2985,9 +2985,9 @@
     h = h->next;
   int len = 0;
   char hbuf[WORD_MAX+2];
   char *buf = hbuf + 1;
-  for (hyphen_list *tem = h; tem && len < WORD_MAX; tem = tem->next) {
+  hyphen_list *tem; for (tem = h; tem && len < WORD_MAX; tem = tem->next) {
     if (tem->hyphenation_code != 0)
       buf[len++] = tem->hyphenation_code;
     else
       break;
--- /usr/src/gnu/usr.bin/groff/troff/node.cc.orig	Sat Oct 14 01:31:20 1995
+++ /usr/src/gnu/usr.bin/groff/troff/node.cc	Sun Dec 24 12:29:48 1995
@@ -609,9 +609,9 @@
 {
   next = tfont_list;
   tfont_list = this;
   tfont_spec plain_spec = plain();
-  for (tfont *p = tfont_list; p; p = p->next)
+  tfont *p; for (p = tfont_list; p; p = p->next)
     if (*p == plain_spec) {
       plain_version = p;
       break;
     }
@@ -2373,9 +2373,9 @@
     return;
   hunits w = n->width();
   if (w > max_width)
     max_width = w;
-  for (node **p = &list; *p; p = &(*p)->next)
+  node **p; for (p = &list; *p; p = &(*p)->next)
     ;
   n->next = 0;
   *p = n;
 }
@@ -2967,9 +2967,9 @@
     post = 0;
     if (pre == 0)
       *prep = next;
     else {
-      for (node *tem = pre; tem->next != 0; tem = tem->next)
+      node *tem; for (tem = pre; tem->next != 0; tem = tem->next)
 	;
       tem->next = next;
       *prep = pre;
     }
@@ -3518,9 +3518,9 @@
 {
   if (list == 0)
     return;
   int npieces = 0;
-  for (node *tem = list; tem; tem = tem->next)
+  node *tem; for (tem = list; tem; tem = tem->next)
     ++npieces;
   vunits h = list->size();
   vunits totalh = h*npieces;
   vunits y = (totalh - h)/2;
@@ -4551,9 +4551,9 @@
 }

 int next_available_font_position()
 {
-  for (int i = 1; i < font_table_size && font_table[i] != 0; i++)
+  int i; for (i = 1; i < font_table_size && font_table[i] != 0; i++)
     ;
   return i;
 }

--- /usr/src/gnu/usr.bin/groff/troff/input.cc.orig	Sat Oct 14 01:31:18 1995
+++ /usr/src/gnu/usr.bin/groff/troff/input.cc	Sun Dec 24 12:31:36 1995
@@ -512,9 +512,9 @@
 }

 void input_stack::next_file(FILE *fp, const char *s)
 {
-  for (input_iterator **pp = &top; *pp != &nil_iterator; pp = &(*pp)->next)
+  input_iterator **pp; for (pp = &top; *pp != &nil_iterator; pp = &(*pp)->next)
     if ((*pp)->next_file(fp, s))
       return;
   if (++level > limit && limit > 0)
     fatal("input stack limit exceeded");
@@ -1399,9 +1399,9 @@
 	{
 	  symbol s = read_escape_name();
 	  if (s.is_null())
 	    break;
-	  for (const char *p = s.contents(); *p != '\0'; p++)
+	  const char *p; for (p = s.contents(); *p != '\0'; p++)
 	    if (!csdigit(*p))
 	      break;
 	  if (*p)
 	    curenv->set_font(s);
@@ -2729,9 +2729,9 @@
 }

 void macro_iterator::add_arg(const macro &m)
 {
-  for (arg_list **p = &args; *p; p = &((*p)->next))
+  arg_list **p; for (p = &args; *p; p = &((*p)->next))
     ;
   *p = new arg_list(m);
   ++argc;
 }
@@ -3106,9 +3106,9 @@
       input_stack::push(make_temp_iterator(i == 1 ? "\"" : " \""));
     }
   }
   else {
-    for (const char *p = s; *p && csdigit(*p); p++)
+    const char *p; for (p = s; *p && csdigit(*p); p++)
       ;
     if (*p)
       error("bad argument name `%1'", s);
     else
@@ -3244,9 +3244,9 @@
     if (bol && c == '.') {
       const char *s = term.contents();
       int d;
       // see if it matches term
-      for (int i = 0; s[i] != 0; i++) {
+      int i; for (i = 0; s[i] != 0; i++) {
 	d = get_copy(&n);
 	if ((unsigned char)s[i] != d)
 	  break;
       }
--- /usr/src/gnu/usr.bin/groff/troff/div.cc.orig	Sat Oct 14 01:31:12 1995
+++ /usr/src/gnu/usr.bin/groff/troff/div.cc	Sun Dec 24 12:31:59 1995
@@ -445,9 +445,9 @@

 void top_level_diversion::add_trap(symbol nm, vunits pos)
 {
   trap *first_free_slot = 0;
-  for (trap **p = &page_trap_list; *p; p = &(*p)->next) {
+  trap **p; for (p = &page_trap_list; *p; p = &(*p)->next) {
     if ((*p)->nm.is_null()) {
       if (first_free_slot == 0)
 	first_free_slot = *p;
     }
--- /usr/src/gnu/usr.bin/groff/troff/symbol.cc.orig	Sat Oct 14 01:31:21 1995
+++ /usr/src/gnu/usr.bin/groff/troff/symbol.cc	Sun Dec 24 12:32:45 1995
@@ -81,9 +81,9 @@
       table[i] = 0;
     table_used = 0;
   }
   unsigned int hc = hash_string(p);
-  for (const char **pp  = table + hc % table_size; 
+  const char **pp; for (pp  = table + hc % table_size; 
        *pp != 0; 
        (pp == table ? pp = table + table_size - 1 : --pp))
     if (strcmp(p, *pp) == 0) {
       s = *pp;
@@ -95,9 +95,9 @@
   }
   if (table_used  >= table_size - 1 || table_used >= table_size*FULL_MAX) {
     const char **old_table = table;
     unsigned int old_table_size = table_size;
-    for (int i = 1; table_sizes[i] <= old_table_size; i++)
+    int i; for (i = 1; table_sizes[i] <= old_table_size; i++)
       if (table_sizes[i] == 0)
 	fatal("too many symbols");
     table_size = table_sizes[i];
     table_used = 0;
--- /usr/src/gnu/usr.bin/groff/troff/dictionary.cc.orig	Sat Oct 14 01:31:11 1995
+++ /usr/src/gnu/usr.bin/groff/troff/dictionary.cc	Sun Dec 24 12:33:51 1995
@@ -27,9 +27,9 @@

 static int is_good_size(int p)
 {
   const int SMALL = 10;
-  for (unsigned i = 2; i <= p/2; i++)
+  unsigned i; for (i = 2; i <= p/2; i++)
     if (p % i == 0)
       return 0;
   for (i = 0x100; i != 0; i <<= 8)
     if (i % p <= SMALL || i % p > p - SMALL)
@@ -48,9 +48,9 @@
 // we can't use double-hashing because we want a remove function

 void *dictionary::lookup(symbol s, void *v)
 {
-  for (int i = int(s.hash() % size); 
+  int i; for (i = int(s.hash() % size); 
        table[i].v != 0;
        i == 0 ? i = size - 1: --i)
     if (s == table[i].s) {
       if (v != 0) {
@@ -95,9 +95,9 @@

 void *dictionary::remove(symbol s)
 {
   // this relies on the fact that we are using linear probing
-  for (int i = int(s.hash() % size);
+  int i; for (i = int(s.hash() % size);
        table[i].v != 0 && s != table[i].s;
        i == 0 ? i = size - 1: --i)
     ;
   void *p = table[i].v;
--- /usr/src/gnu/usr.bin/groff/tfmtodit/tfmtodit.cc.orig	Sat Oct 14 01:30:50 1995
+++ /usr/src/gnu/usr.bin/groff/tfmtodit/tfmtodit.cc	Sun Dec 24 13:29:41 1995
@@ -824,12 +824,12 @@
       m[3] = t.get_italic(i);
       m[4] = g.get_left_adjustment(i);
       m[5] = g.get_right_adjustment(i);
       printf("%s\t%d", p->ch, m[0]*MULTIPLIER);
-      for (int j = int(sizeof(m)/sizeof(m[0])) - 1; j > 0; j--)
+      int j; for (j = int(sizeof(m)/sizeof(m[0])) - 1; j > 0; j--)
 	if (m[j] != 0)
 	  break;
-      for (int k = 1; k <= j; k++)
+      for (k = 1; k <= j; k++)
 	printf(",%d", m[k]*MULTIPLIER);
       int type = 0;
       if (m[2] > 0)
 	type = 1;
--- /usr/src/gnu/usr.bin/groff/refer/ref.cc.orig	Sat Oct 14 01:30:33 1995
+++ /usr/src/gnu/usr.bin/groff/refer/ref.cc	Sun Dec 24 13:19:29 1995
@@ -53,9 +53,9 @@
 reference::reference(const char *start, int len, reference_id *ridp)
 : no(-1), field(0), nfields(0), h(0), merged(0), label_ptr(0),
   computed_authors(0), last_needed_author(-1), nauthors(-1)
 {
-  for (int i = 0; i < 256; i++)
+  int i; for (i = 0; i < 256; i++)
     field_index[i] = NULL_FIELD_INDEX;
   if (ridp)
     rid = *ridp;
   if (start == 0)
@@ -198,9 +198,9 @@
   assert(field_index[c] == NULL_FIELD_INDEX);
   string *old_field = field;
   field = new string[nfields + 1];
   int pos = 0;
-  for (int i = 0; i < int(c); i++)
+  int i; for (i = 0; i < int(c); i++)
     if (field_index[i] != NULL_FIELD_INDEX)
       pos++;
   for (i = 0; i < pos; i++)
     field[i].move(old_field[i]);
@@ -221,9 +221,9 @@
   if (field_index[c] == NULL_FIELD_INDEX)
     return;
   string *old_field = field;
   field = new string[nfields - 1];
-  for (int i = 0; i < int(field_index[c]); i++)
+  int i; for (i = 0; i < int(field_index[c]); i++)
     field[i].move(old_field[i]);
   for (i = field_index[c]; i < nfields - 1; i++)
     field[i].move(old_field[i + 1]);
   if (nfields > 0)
@@ -329,9 +329,9 @@
     for (const char *a = articles.contents();
 	 a < ae;
 	 a = strchr(a, '\0') + 1)
       if (first_word_len == strlen(a)) {
-	for (int j = 0; j < first_word_len; j++)
+	int j; for (j = 0; j < first_word_len; j++)
 	  if (a[j] != cmlower(s[j]))
 	    break;
 	if (j >= first_word_len) {
 	  s = ptr;
@@ -394,9 +394,9 @@
 void sortify_label(const char *s, int len, string &key)
 {
   const char *end = s + len;
   for (;;) {
-    for (const char *ptr = s;
+    const char *ptr; for (ptr = s;
 	 ptr < end && *ptr != SORT_SUB_SEP && *ptr != SORT_SUB_SUB_SEP;
 	 ptr++)
       ;
     if (ptr > s)
@@ -691,9 +691,9 @@
 {
   const char *ptr = f.contents();
   int len = f.length();
   int nfield_seps = 0;
-  for (int j = 0; j < len; j++)
+  int j; for (j = 0; j < len; j++)
     if (ptr[j] == FIELD_SEPARATOR)
       nfield_seps++;
   if (nfield_seps == 0)
     return 0;
--- /usr/src/gnu/usr.bin/groff/refer/refer.cc.orig	Sat Oct 14 01:30:34 1995
+++ /usr/src/gnu/usr.bin/groff/refer/refer.cc	Sun Dec 24 13:21:36 1995
@@ -178,9 +178,9 @@
 	  else {
 	    num = opt;
 	    opt = 0;
 	  }
-	  for (const char *ptr = num; *ptr; ptr++)
+	  const char *ptr; for (ptr = num; *ptr; ptr++)
 	    if (!csdigit(*ptr)) {
 	      error("bad character `%1' in argument to -f option", *ptr);
 	      break;
 	    }
@@ -226,9 +226,9 @@
 	}
 	break;
       case 'a':
 	{
-	  for (const char *ptr = ++opt; *ptr; ptr++)
+	  const char *ptr; for (ptr = ++opt; *ptr; ptr++)
 	    if (!csdigit(*ptr)) {
 	      error("argument to `a' option not a number");
 	      break;
 	    }
@@ -696,9 +696,9 @@
   unsigned flags;
   reference *ref = make_reference(str, &flags);
   ref->compute_hash_code();
   unsigned h = ref->hash();
-  for (reference **ptr = reference_hash_table + (h % hash_table_size);
+  reference **ptr; for (ptr = reference_hash_table + (h % hash_table_size);
        *ptr != 0;
        ((ptr == reference_hash_table)
 	? (ptr = reference_hash_table + hash_table_size - 1)
 	: --ptr))
@@ -726,9 +726,9 @@
       for (i = 0; i < hash_table_size; i++)
 	reference_hash_table[i] = 0;
       for (i = 0; i < old_size; i++)
 	if (old_table[i]) {
-	  for (reference **p = (reference_hash_table
+	  reference **p; for (p = (reference_hash_table
 				+ (old_table[i]->hash() % hash_table_size));
 	       *p;
 	       ((p == reference_hash_table)
 		? (p = reference_hash_table + hash_table_size - 1)
@@ -784,9 +784,9 @@
     // Do an insertion sort.  Usually n will be very small.
     for (int i = 1; i < n; i++) {
       int num = v[i]->get_number();
       reference *temp = v[i];
-      for (int j = i - 1; j >= 0 && v[j]->get_number() > num; j--)
+      int j; for (j = i - 1; j >= 0 && v[j]->get_number() > num; j--)
 	v[j + 1] = v[j];
       v[j + 1] = temp;
     }
   }
@@ -1212,9 +1212,9 @@
     80021, 160001, 500009, 1000003, 2000003, 4000037, 8000009,
     16000057, 32000011, 64000031, 128000003, 0 
   };

-  for (const int *p = table_sizes; *p <= n && *p != 0; p++)
+  const int *p; for (p = table_sizes; *p <= n && *p != 0; p++)
     ;
   assert(*p != 0);
   return *p;
 }
--- /usr/src/gnu/usr.bin/groff/refer/token.cc.orig	Sat Oct 14 01:30:35 1995
+++ /usr/src/gnu/usr.bin/groff/refer/token.cc	Sun Dec 24 13:22:28 1995
@@ -189,9 +189,9 @@
 }

 static void init_ascii()
 {
-  for (const char *p = "abcdefghijklmnopqrstuvwxyz"; *p; p++) {
+  const char *p; for (p = "abcdefghijklmnopqrstuvwxyz"; *p; p++) {
     char buf[2];
     buf[0] = *p;
     buf[1] = '\0';
     store_token(strsave(buf), TOKEN_LOWER);
@@ -295,9 +295,9 @@
 }

 static void init_special_chars()
 {
-  for (const char *p = "':^`~"; *p; p++)
+  const char *p; for (p = "':^`~"; *p; p++)
     for (const char *q = "aeiouy"; *q; q++) {
       // Use a variable to work around bug in gcc 2.0
       char c = cmupper(*q);
       init_two_char_letter(*p, *q, *p, c);
--- /usr/src/gnu/usr.bin/groff/refer/label.y.orig	Sun Dec 24 13:22:37 1995
+++ /usr/src/gnu/usr.bin/groff/refer/label.y	Sun Dec 24 13:23:51 1995
@@ -871,9 +871,9 @@
   // Only merge three or more labels.
   if (v[0]->get_number() != num + 1
       || v[1]->get_number() != num + 2)
     return 0;
-  for (int i = 2; i < n; i++)
+  int i; for (i = 2; i < n; i++)
     if (v[i]->get_number() != num + i + 1)
       break;
   result = get_label(type);
   result += label_range_indicator;
@@ -944,9 +944,9 @@
     for (int i = 0; i < 17; i++)
       label_table[i] = 0;
   }
   unsigned h = hash_string(label.contents(), label.length()) % label_table_size;
-  for (label_info **ptr = label_table + h;
+  label_info **ptr; for (ptr = label_table + h;
        *ptr != 0;
        (ptr == label_table)
        ? (ptr = label_table + label_table_size - 1)
        : ptr--)
@@ -969,9 +969,9 @@
     for (i = 0; i < old_size; i++)
       if (old_table[i]) {
 	unsigned h = hash_string(label_pool.contents() + old_table[i]->start,
 				 old_table[i]->length);
-	for (label_info **p = label_table + (h % label_table_size);
+	label_info **p; for (p = label_table + (h % label_table_size);
 	     *p != 0;
 	     (p == label_table)
 	     ? (p = label_table + label_table_size - 1)
 	     : --p)
@@ -1164,9 +1164,9 @@
 int reference::get_nauthors() const
 {
   if (nauthors < 0) {
     const char *dummy;
-    for (int na = 0; get_author(na, &dummy) != 0; na++)
+    int na; for (na = 0; get_author(na, &dummy) != 0; na++)
       ;
     ((reference *)this)->nauthors = na;
   }
   return nauthors;
--- /usr/src/gnu/usr.bin/groff/pic/lex.cc.orig	Sat Oct 14 01:30:17 1995
+++ /usr/src/gnu/usr.bin/groff/pic/lex.cc	Sun Dec 24 12:52:47 1995
@@ -360,9 +360,9 @@
 void interpolate_macro_with_args(const char *body)
 {
   char *argv[9];
   int argc = 0;
-  for (int i = 0; i < 9; i++)
+  int i; for (i = 0; i < 9; i++)
     argv[i] = 0;
   int level = 0;
   int c;
   enum { NORMAL, IN_STRING, IN_STRING_QUOTED } state = NORMAL;
--- /usr/src/gnu/usr.bin/groff/pic/object.cc.orig	Sat Oct 14 01:30:18 1995
+++ /usr/src/gnu/usr.bin/groff/pic/object.cc	Sun Dec 24 12:54:08 1995
@@ -511,9 +511,9 @@
 }

 void object_list::wrap_up_block(object_list *ol)
 {
-  for (object *p = tail; p && p->type() != MARK_OBJECT; p = p->prev)
+  object *p; for (p = tail; p && p->type() != MARK_OBJECT; p = p->prev)
     ;
   assert(p != 0);
   ol->head = p->next;
   if (ol->head) {
@@ -594,9 +594,9 @@
 void graphic_object::add_text(text_item *t, int a)
 {
   aligned = a;
   int len = 0;
-  for (text_item *p = t; p; p = p->next)
+  text_item *p; for (p = t; p; p = p->next)
     len++;
   if (len == 0)
     text = 0;
   else {
@@ -1340,9 +1340,9 @@
   }
   // Absolutise all movements
   position endpos = startpos;
   int nsegments = 0;
-  for (segment *s = segment_list; s; s = s->next, nsegments++)
+  segment *s; for (s = segment_list; s; s = s->next, nsegments++)
     if (s->is_absolute)
       endpos = s->pos;
     else {
       endpos += s->pos;
@@ -1766,9 +1766,9 @@
 }

 void path::append(char *s)
 {
-  for (string_list **p = &label_list; *p; p = &(*p)->next)
+  string_list **p; for (p = &label_list; *p; p = &(*p)->next)
     ;
   *p = new string_list(s);
 }

--- /usr/src/gnu/usr.bin/groff/pic/pic.y.orig	Sat Oct 14 01:30:20 1995
+++ /usr/src/gnu/usr.bin/groff/pic/pic.y	Sun Dec 24 12:56:41 1995
@@ -939,44 +939,44 @@
 		}
 	| object_spec text   %prec TEXT
 		{
 		  $$ = $1;
-		  for (text_item **p = & $$->text; *p; p = &(*p)->next)
+		  text_item **p; for (p = & $$->text; *p; p = &(*p)->next)
 		    ;
 		  *p = new text_item($2.str, $2.filename, $2.lineno);
 		}
 	| object_spec LJUST
 		{
 		  $$ = $1;
 		  if ($$->text) {
-		    for (text_item *p = $$->text; p->next; p = p->next)
+		    text_item *p; for (p = $$->text; p->next; p = p->next)
 		      ;
 		    p->adj.h = LEFT_ADJUST;
 		  }
 		}
 	| object_spec RJUST
 		{
 		  $$ = $1;
 		  if ($$->text) {
-		    for (text_item *p = $$->text; p->next; p = p->next)
+		    text_item *p; for (p = $$->text; p->next; p = p->next)
 		      ;
 		    p->adj.h = RIGHT_ADJUST;
 		  }
 		}
 	| object_spec ABOVE
 		{
 		  $$ = $1;
 		  if ($$->text) {
-		    for (text_item *p = $$->text; p->next; p = p->next)
+		    text_item *p; for (p = $$->text; p->next; p = p->next)
 		      ;
 		    p->adj.v = ABOVE_ADJUST;
 		  }
 		}
 	| object_spec BELOW
 		{
 		  $$ = $1;
 		  if ($$->text) {
-		    for (text_item *p = $$->text; p->next; p = p->next)
+		    text_item *p; for (p = $$->text; p->next; p = p->next)
 		      ;
 		    p->adj.v = BELOW_ADJUST;
 		  }
 		}
@@ -1161,9 +1161,9 @@
 nth_primitive:
 	ordinal object_type
 		{
 		  int count = 0;
-		  for (object *p = olist.head; p != 0; p = p->next)
+		  object *p; for (p = olist.head; p != 0; p = p->next)
 		    if (p->type() == $2 && ++count == $1) {
 		      $$ = p;
 		      break;
 		    }
@@ -1175,9 +1175,9 @@
 		}
 	| optional_ordinal_last object_type
 		{
 		  int count = 0;
-		  for (object *p = olist.tail; p != 0; p = p->prev)
+		  object *p; for (p = olist.tail; p != 0; p = p->prev)
 		    if (p->type() == $2 && ++count == $1) {
 		      $$ = p;
 		      break;
 		    }
--- /usr/src/gnu/usr.bin/groff/grodvi/dvi.cc.orig	Sat Oct 14 01:28:02 1995
+++ /usr/src/gnu/usr.bin/groff/grodvi/dvi.cc	Sun Dec 24 13:17:43 1995
@@ -304,9 +304,9 @@
   int code = f->get_code(index);
   if (env->size != cur_point_size || f != cur_font) {
     cur_font = f;
     cur_point_size = env->size;
-    for (int i = 0;; i++) {
+    int i; for (i = 0;; i++) {
       if (i >= FONTS_MAX) {
 	fatal("too many output fonts required");
       }
       if (output_font_table[i].f == 0) {
--- /usr/src/gnu/usr.bin/groff/groff/groff.cc.orig	Sat Oct 14 01:28:06 1995
+++ /usr/src/gnu/usr.bin/groff/groff/groff.cc	Sun Dec 24 12:22:17 1995
@@ -283,9 +283,9 @@
   }
   commands[TROFF_INDEX].append_arg("-T", device);
   commands[EQN_INDEX].append_arg("-T", device);

-  for (int first_index = 0; first_index < TROFF_INDEX; first_index++)
+  int first_index; for (first_index = 0; first_index < TROFF_INDEX; first_index++)
     if (commands[first_index].get_name() != 0)
       break;
   if (optind < argc) {
     if (argv[optind][0] == '-' && argv[optind][1] != '\0')
@@ -351,9 +351,9 @@
 }

 void print_commands()
 {
-  for (int last = SPOOL_INDEX; last >= 0; last--)
+  int last; for (last = SPOOL_INDEX; last >= 0; last--)
     if (commands[last].get_name() != 0)
       break;
   for (int i = 0; i <= last; i++)
     if (commands[i].get_name() != 0)
@@ -465,9 +465,9 @@
 {
   str += ' ';
   int needs_quoting = 0;
   int contains_single_quote = 0;
-  for (const char *p = arg; *p != '\0'; p++)
+  const char *p; for (p = arg; *p != '\0'; p++)
     switch (*p) {
     case ';':
     case '&':
     case '(':
--- /usr/src/gnu/usr.bin/groff/grops/ps.cc.orig	Sat Oct 14 01:28:20 1995
+++ /usr/src/gnu/usr.bin/groff/grops/ps.cc	Sun Dec 24 13:12:05 1995
@@ -171,9 +171,9 @@

 ps_output &ps_output::put_string(const char *s, int n)
 {
   int len = 0;
-  for (int i = 0; i < n; i++) {
+  int i; for (i = 0; i < n; i++) {
     char c = s[i];
     if (isascii(c) && isprint(c)) {
       if (c == '(' || c == ')' || c == '\\')
 	len += 2;
@@ -645,9 +645,9 @@

 void ps_printer::define_encoding(const char *encoding, int encoding_index)
 {
   char *vec[256];
-  for (int i = 0; i < 256; i++)
+  int i; for (i = 0; i < 256; i++)
     vec[i] = 0;
   char *path;
   FILE *fp = font::open_file(encoding, &path);
   if (fp == 0)
@@ -1192,9 +1192,9 @@
     "file", &ps_printer::do_file,
     "invis", &ps_printer::do_invis,
     "endinvis", &ps_printer::do_endinvis,
   };
-  for (char *p = arg; *p == ' ' || *p == '\n'; p++)
+  char *p; for (p = arg; *p == ' ' || *p == '\n'; p++)
     ;
   char *tag = p;
   for (; *p != '\0' && *p != ':' && *p != ' ' && *p != '\n'; p++)
     ;
@@ -1339,9 +1339,9 @@
 {
   flush_sbuf();
   while (*arg == ' ' || *arg == '\n')
     arg++;
-  for (char *p = arg; *p != '\0' && *p != ' ' && *p != '\n'; p++)
+  char *p; for (p = arg; *p != '\0' && *p != ' ' && *p != '\n'; p++)
     ;
   if (*p != '\0')
     *p++ = '\0';
   int parms[6];
--- /usr/src/gnu/usr.bin/groff/grops/psrm.cc.orig	Sat Oct 14 01:28:23 1995
+++ /usr/src/gnu/usr.bin/groff/grops/psrm.cc	Sun Dec 24 13:15:55 1995
@@ -120,9 +120,9 @@
 					    string &name,
 					    string &version,
 					    unsigned revision)
 {
-  for (resource *r = resource_list; r; r = r->next)
+  resource *r; for (r = resource_list; r; r = r->next)
     if (r->type == type
 	&& r->name == name
 	&& r->version == version
 	&& r->revision == revision)
@@ -136,9 +136,9 @@
 // Just a specialized version of lookup_resource().

 resource *resource_manager::lookup_font(const char *name)
 {
-  for (resource *r = resource_list; r; r = r->next)
+  resource *r; for (r = resource_list; r; r = r->next)
     if (r->type == RESOURCE_FONT
 	&& strlen(name) == r->name.length()
 	&& memcmp(name, r->name.contents(), r->name.length()) == 0)
       return r;
@@ -158,16 +158,16 @@

 void resource_manager::document_setup(ps_output &out)
 {
   int nranks = 0;
-  for (resource *r = resource_list; r; r = r->next)
+  resource *r; for (r = resource_list; r; r = r->next)
     if (r->rank >= nranks)
       nranks = r->rank + 1;
   if (nranks > 0) {
     // Sort resource_list in reverse order of rank.
     Presource *head = new Presource[nranks + 1];
     Presource **tail = new Presource *[nranks + 1];
-    for (int i = 0; i < nranks + 1; i++) {
+    int i; for (i = 0; i < nranks + 1; i++) {
       head[i] = 0;
       tail[i] = &head[i];
     }
     for (r = resource_list; r; r = r->next) {
@@ -509,9 +509,9 @@
   if (name == *ptr) {
     error("missing resource type");
     return 0;
   }
-  for (int ri = 0; ri < NRESOURCES; ri++)
+  int ri; for (ri = 0; ri < NRESOURCES; ri++)
     if (strlen(resource_table[ri]) == *ptr - name
 	&& memcmp(resource_table[ri], name, *ptr - name) == 0)
       break;
   if (ri >= NRESOURCES) {
@@ -832,9 +832,9 @@
     const char *name = ptr;
     do {
       ++ptr;
     } while (*ptr != '\0' && !white_space(*ptr));
-    for (int i = 0; i < NEXTENSIONS; i++)
+    int i; for (i = 0; i < NEXTENSIONS; i++)
       if (strlen(extension_table[i]) == ptr - name
 	  && memcmp(extension_table[i], name, ptr - name) == 0) {
 	flags |= (1 << i);
 	break;
@@ -931,9 +931,9 @@
       int copy_this_line = 1;
       if (buf[0] == '%') {
 	if (buf[1] == '%') {
 	  const char *ptr;
-	  for (int i = 0; i < NCOMMENTS; i++)
+	  int i; for (i = 0; i < NCOMMENTS; i++)
 	    if (ptr = matches_comment(buf, comment_table[i].name)) {
 	      copy_this_line
 		= (this->*(comment_table[i].proc))(ptr, rank, fp, outfp);
 	      break;
@@ -954,9 +954,9 @@
 		language_level = ll;
 	      had_language_level_comment = 1;
 	    }
 	    else {
-	      for (int i = 0; i < NHEADER_COMMENTS; i++)
+	      for (i = 0; i < NHEADER_COMMENTS; i++)
 		if (matches_comment(buf, header_comment_table[i])) {
 		  interesting = 1;
 		  break;
 		}
@@ -1027,9 +1027,9 @@
     put_string(s, outfp);
     return;
   }
   int level = 0;
-  for (int i = 0; i < len; i++)
+  int i; for (i = 0; i < len; i++)
     if (str[i] == '(')
       level++;
     else if (str[i] == ')' && --level < 0)
       break;
--- /usr/src/gnu/usr.bin/groff/grotty/tty.cc.orig	Sat Oct 14 01:28:29 1995
+++ /usr/src/gnu/usr.bin/groff/grotty/tty.cc	Sun Dec 24 13:17:02 1995
@@ -217,9 +217,9 @@
   // increasing order of hpos, with HDRAW characters before VDRAW
   // characters before normal characters at each hpos, and otherwise
   // in order of occurrence.

-  for (glyph **pp = lines + (vpos - 1); *pp; pp = &(*pp)->next)
+  glyph **pp; for (pp = lines + (vpos - 1); *pp; pp = &(*pp)->next)
     if (int((*pp)->hpos) < hpos
 	|| ((*pp)->hpos == hpos && (*pp)->draw_mode() >= g->draw_mode()))
       break;

@@ -269,9 +269,9 @@
 {
   if (page_length % font::vert != 0)
     error("vertical position at end of page not multiple of vertical resolution");
   int lines_per_page = page_length / font::vert;
-  for (int last_line = nlines; last_line > 0; last_line--)
+  int last_line; for (last_line = nlines; last_line > 0; last_line--)
     if (lines[last_line - 1])
       break;
 #if 0
   if (last_line > lines_per_page) {
--- /usr/src/gnu/usr.bin/groff/include/ptable.h.orig	Sat Oct 14 01:28:41 1995
+++ /usr/src/gnu/usr.bin/groff/include/ptable.h	Sun Dec 24 12:14:12 1995
@@ -95,9 +95,9 @@
 void PTABLE(T)::define(const char *key, T *val)				      \
 {									      \
   assert(key != 0);							      \
   unsigned long h = hash_string(key);					      \
-  for (unsigned n = unsigned(h % size);					      \
+  unsigned n; for (n = unsigned(h % size);				      \
        v[n].key != 0;							      \
        n = (n == 0 ? size - 1 : n - 1))					      \
     if (strcmp(v[n].key, key) == 0) {					      \
       delete v[n].val;							      \
@@ -115,9 +115,9 @@
       if (oldv[i].key != 0) {						      \
 	if (oldv[i].val == 0)						      \
 	  a_delete oldv[i].key;						      \
 	else {								      \
-	  for (unsigned j = unsigned(hash_string(oldv[i].key) % size);	      \
+	  unsigned j; for (j = unsigned(hash_string(oldv[i].key) % size);     \
 	       v[j].key != 0;						      \
 	       j = (j == 0 ? size - 1 : j - 1))				      \
 		 ;							      \
 	  v[j].key = oldv[i].key;					      \
--- /usr/src/gnu/usr.bin/groff/indxbib/indxbib.cc.orig	Sat Oct 14 01:28:50 1995
+++ /usr/src/gnu/usr.bin/groff/indxbib/indxbib.cc	Sun Dec 24 13:26:56 1995
@@ -241,9 +241,9 @@
     }
     string path;
     int lineno = 1;
     for (;;) {
-      for (int c = getc(fp); c != '\n' && c != EOF; c = getc(fp)) {
+      int c; for (c = getc(fp); c != '\n' && c != EOF; c = getc(fp)) {
 	if (c == '\0')
 	  error_with_file_and_line(foption, lineno,
 				   "nul character in pathname ignored");
 	else
--- /usr/src/gnu/usr.bin/groff/libbib/index.cc.orig	Sat Oct 14 01:29:00 1995
+++ /usr/src/gnu/usr.bin/groff/libbib/index.cc	Sun Dec 24 12:18:22 1995
@@ -505,9 +505,9 @@
   if (!second_list)
     return first_list;
   if (*second_list < 0)
     return second_list;
-  for (const int *p = first_list; *p >= 0; p++)
+  const int *p; for (p = first_list; *p >= 0; p++)
     ;
   int len = p - first_list;
   for (p = second_list; *p >= 0; p++)
     ;
@@ -585,9 +585,9 @@

 void index_search_item::add_out_of_date_file(int fd, const char *filename,
 					     int fid)
 {
-  for (search_item **pp = &out_of_date_files; *pp; pp = &(*pp)->next)
+  search_item **pp; for (pp = &out_of_date_files; *pp; pp = &(*pp)->next)
     if ((*pp)->is_named(filename))
       return;
   *pp = make_linear_search_item(fd, filename, fid);
   warning("`%1' modified since `%2' created", filename, name);
--- /usr/src/gnu/usr.bin/groff/libbib/linear.cc.orig	Sat Oct 14 01:29:01 1995
+++ /usr/src/gnu/usr.bin/groff/libbib/linear.cc	Sun Dec 24 12:19:48 1995
@@ -57,9 +57,9 @@
 static map_init the_map_init;

 map_init::map_init()
 {
-  for (int i = 0; i < 256; i++)
+  int i; for (i = 0; i < 256; i++)
     map[i] = csalnum(i) ? cmlower(i) : '\0';
   for (i = 0; i < 256; i++) {
     if (cslower(i)) {
       inv_map[i][0] = i;
@@ -174,9 +174,9 @@
   for (;;)
     if (*p++ == '\n') {
       if (p == end || *p == '%')
 	break;
-      for (const char *q = p; *q == ' ' || *q == '\t'; q++)
+      const char *q; for (q = p; *q == ' ' || *q == '\t'; q++)
 	;
       if (*q == '\n')
 	break;
       p = q + 1;
@@ -189,9 +189,9 @@
   for (;;)
     if (*p++ == '\n') {
       if (p == bufend)
 	break;
-      for (const char *q = p; *q == ' ' || *q == '\t'; q++)
+      const char *q; for (q = p; *q == ' ' || *q == '\t'; q++)
 	;
       if (*q == '\n')
 	break;
       p = q + 1;
@@ -261,9 +261,9 @@
 	if (start)
 	  *start = p + 1;
 	return 1;
       }
-      for (const char *q = p - 1; *q == ' ' || *q == '\t'; q--)
+      const char *q; for (q = p - 1; *q == ' ' || *q == '\t'; q--)
 	;
       if (*q == '\n') {
 	if (start)
 	  *start = p + 1;
@@ -391,9 +391,9 @@
     const char *found = search_and_check(keys[0], buffer, bufend, &refstart);
     if (!found)
       break;
     const char *refend = find_end(bufend, found + keys[0]->length());
-    for (int i = 1; i < nkeys; i++)
+    int i; for (i = 1; i < nkeys; i++)
       if (!search_and_check(keys[i], refstart, refend))
 	break;
     if (i >= nkeys) {
       *startp = refstart;
--- /usr/src/gnu/usr.bin/groff/libbib/search.cc.orig	Sat Oct 14 01:29:01 1995
+++ /usr/src/gnu/usr.bin/groff/libbib/search.cc	Sun Dec 24 12:20:07 1995
@@ -61,9 +61,9 @@
     else
       p = make_linear_search_item(fd, filename, next_fid);
   }
   if (p) {
-    for (search_item **pp = &list; *pp; pp = &(*pp)->next)
+    search_item **pp; for (pp = &list; *pp; pp = &(*pp)->next)
       ;
     *pp = p;
     next_fid = p->next_filename_id();
   }
--- /usr/src/gnu/usr.bin/groff/libdriver/input.cc.orig	Sat Oct 14 01:29:07 1995
+++ /usr/src/gnu/usr.bin/groff/libdriver/input.cc	Sun Dec 24 12:15:58 1995
@@ -267,9 +267,9 @@
 	  ;
 	int n;
 	int *p = 0;
 	int szp = 0;
-	for (int np = 0; possibly_get_integer(&n); np++) {
+	int np; for (np = 0; possibly_get_integer(&n); np++) {
 	  if (np >= szp) {
 	    if (szp == 0) {
 	      szp = 16;
 	      p = new int[szp];
@@ -289,9 +289,9 @@
 	  if (np > 0)
 	    env.hpos += p[0];
 	}
 	else { 
-	  for (int i = 0; i < np/2; i++) {
+	  int i; for (i = 0; i < np/2; i++) {
 	    env.hpos += p[i*2];
 	    env.vpos += p[i*2 + 1];
 	  }
 	  // there might be an odd number of characters
--- /usr/src/gnu/usr.bin/groff/libdriver/printer.cc.orig	Sat Oct 14 01:29:07 1995
+++ /usr/src/gnu/usr.bin/groff/libdriver/printer.cc	Sun Dec 24 12:16:15 1995
@@ -63,9 +63,9 @@
       nfonts *= 2;
       if (n >= nfonts)
 	nfonts = n + 1;
       font_table = new font *[nfonts];
-      for (int i = 0; i < old_nfonts; i++)
+      int i; for (i = 0; i < old_nfonts; i++)
 	font_table[i] = old_font_table[i];
       for (i = old_nfonts; i < nfonts; i++)
 	font_table[i] = 0;
       a_delete old_font_table;
--- /usr/src/gnu/usr.bin/groff/libgroff/lf.cc.orig	Sat Oct 14 01:29:24 1995
+++ /usr/src/gnu/usr.bin/groff/libgroff/lf.cc	Sun Dec 24 12:07:44 1995
@@ -44,9 +44,9 @@
   if (*p == '\0' || *p == '\n')  {
     change_lineno(ln);
     return 1;
   }
-  for (const char *q = p;
+  const char *q; for (q = p;
        *q != '\0' && *q != ' ' && *q != '\n' && *q != '\\';
        q++)
     ;
   string tem(p, q - p);
--- /usr/src/gnu/usr.bin/groff/libgroff/font.cc.orig	Sat Oct 14 01:29:22 1995
+++ /usr/src/gnu/usr.bin/groff/libgroff/font.cc	Sun Dec 24 12:11:01 1995
@@ -245,9 +245,9 @@

   if (!widths_cache)
     widths_cache = new font_widths_cache(point_size, ch_size);
   else if (widths_cache->point_size != point_size) {
-    for (font_widths_cache **p = &widths_cache; *p; p = &(*p)->next)
+    font_widths_cache **p; for (p = &widths_cache; *p; p = &(*p)->next)
       if ((*p)->point_size == point_size)
 	break;
     if (*p) {
       font_widths_cache *tem = *p;
@@ -397,9 +397,9 @@
 }

 void font::compact()
 {
-  for (int i = nindices - 1; i >= 0; i--)
+  int i; for (i = nindices - 1; i >= 0; i--)
     if (ch_index[i] >= 0)
       break;
   i++;
   if (i < nindices) {
@@ -727,9 +727,9 @@
   res = 0;
   while (t.next()) {
     char *p = strtok(t.buf, WS);
     int found = 0;
-    for (int i = 0; !found && i < sizeof(table)/sizeof(table[0]); i++)
+    int i; for (i = 0; !found && i < sizeof(table)/sizeof(table[0]); i++)
       if (strcmp(table[i].command, p) == 0)
 	found = 1;
     if (found) {
       char *q = strtok(0, WS);
@@ -763,9 +763,9 @@
 	t.error("bad number of fonts `%1'", p);
 	return 0;
       }
       font_name_table = (const char **)new char *[nfonts+1]; 
-      for (int i = 0; i < nfonts; i++) {
+      for (i = 0; i < nfonts; i++) {
 	p = strtok(0, WS);
 	while (p == 0) {
 	  if (!t.next()) {
 	    t.error("end of file while reading list of fonts");
@@ -829,9 +829,9 @@
     }
     else if (strcmp("styles", p) == 0) {
       int style_table_size = 5;
       style_table = (const char **)new char *[style_table_size];
-      for (int j = 0; j < style_table_size; j++)
+      int j; for (j = 0; j < style_table_size; j++)
 	style_table[j] = 0;
       int i = 0;
       for (;;) {
 	p = strtok(0, WS);
--- /usr/src/gnu/usr.bin/groff/libgroff/nametoindex.cc.orig	Sat Oct 14 01:29:26 1995
+++ /usr/src/gnu/usr.bin/groff/libgroff/nametoindex.cc	Sun Dec 24 12:08:37 1995
@@ -50,9 +50,9 @@

 character_indexer::character_indexer()
 : next_index(0)
 {
-  for (int i = 0; i < 256; i++)
+  int i; for (i = 0; i < 256; i++)
     ascii_index[i] = -1;
   for (i = 0; i < NSMALL; i++)
     small_number_index[i] = -1;
 }
--- /usr/src/gnu/usr.bin/groff/libgroff/ptable.cc.orig	Sat Oct 14 01:29:27 1995
+++ /usr/src/gnu/usr.bin/groff/libgroff/ptable.cc	Sun Dec 24 12:08:59 1995
@@ -43,9 +43,9 @@
 };

 unsigned next_ptable_size(unsigned n)
 {
-  for (const unsigned *p = table_sizes; *p <= n; p++)
+  const unsigned *p; for (p = table_sizes; *p <= n; p++)
     if (*p == 0)
       fatal("cannot expand table");
   return *p;
 }
--- /usr/src/gnu/usr.bin/groff/libgroff/string.cc.orig	Sat Oct 14 01:29:28 1995
+++ /usr/src/gnu/usr.bin/groff/libgroff/string.cc	Sun Dec 24 12:09:23 1995
@@ -280,9 +280,9 @@
 {
   char *p = ptr;
   int n = len;
   int nnuls = 0;
-  for (int i = 0; i < n; i++)
+  int i; for (i = 0; i < n; i++)
     if (p[i] == '\0')
       nnuls++;
   char *q = new char[n + 1 - nnuls];
   char *r = q;
--- /usr/src/gnu/usr.bin/groff/lkbib/lkbib.cc.orig	Sat Oct 14 01:29:34 1995
+++ /usr/src/gnu/usr.bin/groff/lkbib/lkbib.cc	Sun Dec 24 13:27:46 1995
@@ -95,9 +95,9 @@
     list.add_file(DEFAULT_INDEX, 1);
   if (list.nfiles() == 0)
     fatal("no databases");
   int total_len = 0;
-  for (int i = optind; i < argc; i++)
+  int i; for (i = optind; i < argc; i++)
     total_len += strlen(argv[i]);
   total_len += argc - optind - 1 + 1; // for spaces and '\0'
   char *buffer = new char[total_len];
   char *ptr = buffer;
@@ -109,9 +109,9 @@
   }
   search_list_iterator iter(&list, buffer);
   const char *start;
   int len;
-  for (int count = 0; iter.next(&start, &len); count++) {
+  int count; for (count = 0; iter.next(&start, &len); count++) {
     if (fwrite(start, 1, len, stdout) != len)
       fatal("write error on stdout: %1", strerror(errno));
     // Can happen for last reference in file.
     if (start[len - 1] != '\n')
--- /usr/src/gnu/usr.bin/groff/lookbib/lookbib.cc.orig	Sat Oct 14 01:29:40 1995
+++ /usr/src/gnu/usr.bin/groff/lookbib/lookbib.cc	Sun Dec 24 13:25:42 1995
@@ -105,9 +105,9 @@
       continue;
     search_list_iterator iter(&list, line);
     const char *start;
     int len;
-    for (int count = 0; iter.next(&start, &len); count++) {
+    int count; for (count = 0; iter.next(&start, &len); count++) {
       if (fwrite(start, 1, len, stdout) != len)
 	fatal("write error on stdout: %1", strerror(errno));
       // Can happen for last reference in file.
       if (start[len - 1] != '\n')
--- /usr/src/gnu/usr.bin/groff/tbl/main.cc.orig	Sat Oct 14 01:30:45 1995
+++ /usr/src/gnu/usr.bin/groff/tbl/main.cc	Sun Dec 24 12:39:47 1995
@@ -689,9 +689,9 @@
 }

 void input_entry_format::debug_print()
 {
-  for (int i = 0; i < pre_vline; i++)
+  int i; for (i = 0; i < pre_vline; i++)
     putc('|', stderr);
   entry_format::debug_print();
   if (!width.empty()) {
     putc('w', stderr);
@@ -1173,9 +1173,9 @@
 	if (format_index >= f->nrows)
 	  format_index = f->nrows - 1;
 	// A format row that is all lines doesn't use up a data line.
 	while (format_index < f->nrows - 1) {
-	  for (int c = 0; c < ncolumns; c++) {
+	  for (c = 0; c < ncolumns; c++) {
 	    entry_format *e = f->entry[format_index] + c;
 	    if (e->type != FORMAT_HLINE
 		&& e->type != FORMAT_DOUBLE_HLINE
 		// Unfortunately tbl treats a span as needing data.
@@ -1392,9 +1392,9 @@
     return 0;
   }
   // Do this here rather than at the beginning in case continued formats
   // change it.
-  for (int i = 0; i < ncolumns - 1; i++)
+  int i; for (i = 0; i < ncolumns - 1; i++)
     if (f->separation[i] >= 0)
       tbl->set_column_separation(i, f->separation[i]);
   for (i = 0; i < ncolumns; i++)
     if (!f->width[i].empty())
--- /usr/src/gnu/usr.bin/groff/tbl/table.cc.orig	Sat Oct 14 01:30:47 1995
+++ /usr/src/gnu/usr.bin/groff/tbl/table.cc	Sun Dec 24 12:48:09 1995
@@ -662,14 +662,14 @@
   printfs(".di %1\n", block_diversion_name(start_row, start_col));
   prints(".if \\n[" SAVED_FILL_REG "] .fi\n"
 	 ".in 0\n");
   prints(".ll ");
-  for (int i = start_col; i <= end_col; i++)
+  int i; for (i = start_col; i <= end_col; i++)
     if (mw[i].empty())
       break;
   if (i > end_col) {
     // Every column spanned by this entry has a minimum width.
-    for (int i = start_col; i <= end_col; i++) {
+    for (i = start_col; i <= end_col; i++) {
       if (i > start_col) {
 	if (sep)
 	  printfs("+%1n", as_string(sep[i - 1]));
 	prints('+');
@@ -1273,9 +1273,9 @@
 }

 void table::add_stuff(stuff *p)
 {
-  for (stuff **pp = &stuff_list; *pp; pp = &(*pp)->next)
+  stuff **pp; for (pp = &stuff_list; *pp; pp = &(*pp)->next)
     ;
   *pp = p;
 }

@@ -1323,9 +1323,9 @@
     }
     assert(allocated_rows > r);
     while (nrows <= r) {
       entry[nrows] = new table_entry*[ncolumns];
-      for (int i = 0; i < ncolumns; i++)
+      int i; for (i = 0; i < ncolumns; i++)
 	entry[nrows][i] = 0;
       vline[nrows] = new char[ncolumns+1];
       for (i = 0; i < ncolumns+1; i++)
 	vline[nrows][i] = 0;
@@ -1589,9 +1589,9 @@
       e->input_lineno = ln;
       e->input_filename = fn;
       e->start_row = e->end_row = r;
       e->start_col = e->end_col = c;
-      for (table_entry **p = &entry_list; *p; p = &(*p)->next)
+      table_entry **p; for (p = &entry_list; *p; p = &(*p)->next)
 	;
       *p = e;
       entry[r][c] = e;
     }
@@ -1923,9 +1923,9 @@
   assert(end_col > start_col);
   printfs(".nr " NEEDED_REG " \\n[%1]-(\\n[%2]", 
 	  span_width_reg(start_col, end_col),
 	  span_width_reg(start_col, start_col));
-  for (int i = start_col + 1; i <= end_col; i++) {
+  int i; for (i = start_col + 1; i <= end_col; i++) {
     // The column separation may shrink with the expand option.
     if (!(flags & EXPAND))
       printfs("+%1n", as_string(column_separation[i - 1]));
     printfs("+\\n[%1]", span_width_reg(i, i));
@@ -1974,9 +1974,9 @@
   span_list = 0;
   table_entry *p = entry_list;
   while (p) {
     if (p->end_col != p->start_col) {
-      for (horizontal_span *q = span_list; q; q = q->next)
+      horizontal_span *q; for (q = span_list; q; q = q->next)
 	if (q->start_col == p->start_col
 	    && q->end_col == p->end_col)
 	  break;
       if (!q)
@@ -1989,9 +1989,9 @@
   // spans using the order in span_list, we will get reasonable results.
   horizontal_span *unsorted = span_list;
   span_list = 0;
   while (unsorted) {
-    for (horizontal_span **pp = &span_list; *pp; pp = &(*pp)->next)
+    horizontal_span **pp; for (pp = &span_list; *pp; pp = &(*pp)->next)
       if (unsorted->end_col < (*pp)->end_col
 	  || (unsorted->end_col == (*pp)->end_col
 	      && (unsorted->start_col > (*pp)->start_col)))
 	break;
@@ -2016,9 +2016,9 @@
     }
   }
   if (flags & EXPAND) {
     int total_sep = left_separation + right_separation;
-    for (int i = 0; i < ncolumns - 1; i++)
+    int i; for (i = 0; i < ncolumns - 1; i++)
       total_sep += column_separation[i];
     if (total_sep != 0) {
       // Don't let the separation factor be negative.
       prints(".nr " SEPARATION_FACTOR_REG " \\n[.l]-\\n[.i]");
@@ -2034,9 +2034,9 @@
   printfs(".nr %1 0\n", column_divide_reg(0));
   printfs(".nr %1 %2*\\n[" SEPARATION_FACTOR_REG "]\n",
 	  column_start_reg(0),
 	  as_string(left_separation));
-  for (int i = 1;; i++) {
+  int i; for (i = 1;; i++) {
     printfs(".nr %1 \\n[%2]+\\n[%3]\n",
 	    column_end_reg(i-1),
 	    column_start_reg(i-1),
 	    span_width_reg(i-1, i-1));
@@ -2065,9 +2065,9 @@

 void table::make_columns_equal()
 {
   int first = -1;		// index of first equal column
-  for (int i = 0; i < ncolumns; i++)
+  int i; for (i = 0; i < ncolumns; i++)
     if (equal[i]) {
       if (first < 0) {
 	printfs(".nr %1 \\n[%1]", span_width_reg(i, i));
 	first = i;
@@ -2148,9 +2148,9 @@
       while (start_col < ncolumns 
 	     && entry[r][start_col] != 0
 	     && entry[r][start_col]->start_row != r)
 	start_col++;
-      for (int end_col = start_col;
+      int end_col; for (end_col = start_col;
 	   end_col < ncolumns
 	   && (entry[r][end_col] == 0
 	       || entry[r][end_col]->start_row == r);
 	   end_col++)
@@ -2196,9 +2196,9 @@
       while (start_col < ncolumns 
 	     && entry[r][start_col] != 0
 	     && entry[r][start_col]->start_row != r)
 	start_col++;
-      for (int end_col = start_col;
+      int end_col; for (end_col = start_col;
 	   end_col < ncolumns
 	   && (entry[r][end_col] == 0
 	       || entry[r][end_col]->start_row == r);
 	   end_col++)
@@ -2304,9 +2304,9 @@
     end_row--;
     result = "";
   }
   else {
-    for (stuff *p = stuff_list; p && p->row < end_row + 1; p = p->next)
+    stuff *p; for (p = stuff_list; p && p->row < end_row + 1; p = p->next)
       ;
     if (p && p->row == end_row + 1 && p->is_double_line()) {
       result = "-" DOUBLE_LINE_SEP;
       return;
@@ -2398,9 +2398,9 @@
 	  && !vline_spanned(end_row, col)
 	  && (end_row == nrows - 1 
 	      || vline[end_row+1][col] != vline[end_row][col]
 	      || vline_spanned(end_row+1, col))) {
-	for (int start_row = end_row - 1;
+	int start_row; for (start_row = end_row - 1;
 	     start_row >= 0
 	     && vline[start_row][col] == vline[end_row][col]
 	     && !vline_spanned(start_row, col);
 	     start_row--)
@@ -2497,9 +2497,9 @@
 {
   if (!(flags & NOKEEP) && row_begins_section(r))
     prints("." KEEP_MACRO_NAME "\n");
   int had_line = 0;
-  for (stuff *p = stuff_list; p && p->row < r; p = p->next)
+  stuff *p; for (p = stuff_list; p && p->row < r; p = p->next)
     ;
   for (stuff *p1 = p; p1 && p1->row == r; p1 = p1->next)
     if (!p1->printed && (p1->is_single_line() || p1->is_double_line())) {
       had_line = 1;
@@ -2636,15 +2636,15 @@
       prints("\\*[" TRANSPARENT_STRING_NAME "].nr " NEED_BOTTOM_RULE_REG
 	     " 0\n");
     }
     int printed_one = 0;
-    for (vertical_rule *p = vrule_list; p; p = p->next)
-      if (p->end_row == r) {
+    for (vertical_rule *vp = vrule_list; vp; vp = vp->next)
+      if (vp->end_row == r) {
 	if (!printed_one) {
 	  prints("." REPEATED_VPT_MACRO " 0\n");
 	  printed_one = 1;
 	}
-	p->print();
+	vp->print();
       }
     if (printed_one)
       prints("." REPEATED_VPT_MACRO " 1\n");
     if (!(flags & NOKEEP) && row_ends_section(r))
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: chopps 
State-Changed-When: Fri Dec 29 22:30:56 EST 1995 
State-Changed-Why:  
applied patch (groff) and fixed libg++ in a very similar way. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.49 2026/05/14 01:52:41 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.