texlive[65488] Build/source/texk/web2c: [CWEB] C++17 has removed

commits+ascherer at tug.org commits+ascherer at tug.org
Sun Jan 8 13:16:23 CET 2023


Revision: 65488
          http://tug.org/svn/texlive?view=revision&revision=65488
Author:   ascherer
Date:     2023-01-08 13:16:22 +0100 (Sun, 08 Jan 2023)
Log Message:
-----------
[CWEB] C++17 has removed 'register' storage class.

Locally, I compile CWEB amd other C sources with 'g++'. Recently, I
upgraded to Kubuntu 22.04.1 LTS that ships with g++ 11.3.0. This seems
to default to the C++17 standard.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ChangeLog
    trunk/Build/source/texk/web2c/cwebboot.cin
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/comm-mac.ch
    trunk/Build/source/texk/web2c/cwebdir/common.c
    trunk/Build/source/texk/web2c/cwebdir/common.w
    trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/refsort.ch
    trunk/Build/source/texk/web2c/cwebdir/twinx.ch

Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/ChangeLog	2023-01-08 12:16:22 UTC (rev 65488)
@@ -1,3 +1,7 @@
+2023-01-08  Andreas Scherer  <https://ascherer.github.io>
+
+	* cwebboot.cin: C++ has removed 'register' storage class.
+
 2022-12-28  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* tests/fn-generate.perl, tests/fn-{utf8,euc,sjis}.txt,

Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebboot.cin	2023-01-08 12:16:22 UTC (rev 65488)
@@ -621,8 +621,8 @@
 static boolean input_ln(
 FILE*fp)
 {
-register int c= EOF;
-register char*k;
+int c= EOF;
+char*k;
 if(feof(fp))return false;
 limit= k= buffer;
 while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
@@ -1412,7 +1412,7 @@
 {
 char*dot_pos;
 char*name_pos;
-register char*s;
+char*s;
 boolean found_web= false,found_change= false,found_out= false;
 
 

Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-01-08 12:16:22 UTC (rev 65488)
@@ -1,3 +1,12 @@
+2023-01-08  Andreas Scherer  <https://ascherer.github.io>
+
+	* comm-mac.ch,
+	* common.c,
+	* common.w,
+	* ctwill-w2c.ch,
+	* refsort.ch,
+	* twinx.ch: C++17 has removed 'register' storage class.
+
 2022-11-22  Andreas Scherer  <https://ascherer.github.io>
 
 	* cwebmac.tex: Fix border case 'reflect.w'.

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-mac.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-mac.ch	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-mac.ch	2023-01-08 12:16:22 UTC (rev 65488)
@@ -18,8 +18,8 @@
 static boolean input_ln( /* copies a line into |buffer| or returns |false| */
 FILE *fp) /* what file to read from */
 {
-  register int c=EOF; /* character read; initialized so some compilers won't complain */
-  register char *k; /* where next character goes */
+  int c=EOF; /* character read; initialized so some compilers won't complain */
+  char *k; /* where next character goes */
   if (feof(fp)) return false; /* we have hit end-of-file */
   limit = k = buffer; /* beginning of buffer */
   while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n')
@@ -46,8 +46,8 @@
 static boolean input_ln( /* copies a line into |buffer| or returns |false| */
 FILE *fp) /* what file to read from */
 {
-  register int  c=EOF; /* character read; initialized so some compilers won't complain */
-  register char *k; /* where next character goes */
+  int  c=EOF; /* character read; initialized so some compilers won't complain */
+  char *k; /* where next character goes */
   if (feof(fp)) return false; /* we have hit end-of-file */
   limit = k = buffer; /* beginning of buffer */
   while (true) {

Modified: trunk/Build/source/texk/web2c/cwebdir/common.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.c	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/common.c	2023-01-08 12:16:22 UTC (rev 65488)
@@ -453,8 +453,8 @@
 static boolean input_ln(
 FILE*fp)
 {
-register int c= EOF;
-register char*k;
+int c= EOF;
+char*k;
 if(feof(fp))return false;
 limit= k= buffer;
 while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
@@ -1169,7 +1169,7 @@
 {
 char*dot_pos;
 char*name_pos;
-register char*s;
+char*s;
 boolean found_web= false,found_change= false,found_out= false;
 
 

Modified: trunk/Build/source/texk/web2c/cwebdir/common.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.w	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/common.w	2023-01-08 12:16:22 UTC (rev 65488)
@@ -157,8 +157,8 @@
 static boolean input_ln( /* copies a line into |buffer| or returns |false| */
 FILE *fp) /* what file to read from */
 {
-  register int c=EOF; /* character read; initialized so some compilers won't complain */
-  register char *k; /* where next character goes */
+  int c=EOF; /* character read; initialized so some compilers won't complain */
+  char *k; /* where next character goes */
   if (feof(fp)) return false; /* we have hit end-of-file */
   limit = k = buffer; /* beginning of buffer */
   while (k<=buffer_end && (c=getc(fp)) != EOF && c!='\n')
@@ -1160,7 +1160,7 @@
 {
   char *dot_pos; /* position of |'.'| in the argument */
   char *name_pos; /* file name beginning, sans directory */
-  register char *s; /* register for scanning strings */
+  char *s; /* pointer for scanning strings */
   boolean found_web=false,found_change=false,found_out=false;
              /* have these names been seen? */
 

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-01-08 12:16:22 UTC (rev 65488)
@@ -1918,7 +1918,7 @@
 @c static sixteen_bits title_lookup(void)
 {
   char *first=loc,*last; /* boundaries */
-  register name_pointer *p;
+  name_pointer *p;
   if (*loc=='"') {
     while (++loc<=limit && *loc!='"') if (*loc=='\\') loc++;
   } else if (*loc=='{') {

Modified: trunk/Build/source/texk/web2c/cwebdir/refsort.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/refsort.ch	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/refsort.ch	2023-01-08 12:16:22 UTC (rev 65488)
@@ -27,6 +27,16 @@
 int main()
 @z
 
+ at x 'register' removed in C++17.
+  register char *p,*q;
+  register int n; /* current number of items */
+  register item *x, **y;
+ at y
+  char *p,*q;
+  int n; /* current number of items */
+  item *x, **y;
+ at z
+
 @x variable not used
 { register int k;
 @y
@@ -33,6 +43,18 @@
 {
 @z
 
+ at x 'register' removed in C++17
+{ register int toggle=0;
+ at y
+{ int toggle=0;
+ at z
+
+ at x 'register' removed in C++17
+{ register int toggle=0;
+ at y
+{ int toggle=0;
+ at z
+
 @x add 'Index.' section
   for (;*p;p++) *q++=*p;
 }

Modified: trunk/Build/source/texk/web2c/cwebdir/twinx.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/twinx.ch	2023-01-08 00:51:11 UTC (rev 65487)
+++ trunk/Build/source/texk/web2c/cwebdir/twinx.ch	2023-01-08 12:16:22 UTC (rev 65488)
@@ -60,6 +60,12 @@
 @<Scan file |f|...@>=
 @z
 
+ at x l.56 C++17 removed 'register' storage class.
+  if (strncmp(buf,"\\def\\title\{",11)==0) {@+register char *p,*q;
+ at y
+  if (strncmp(buf,"\\def\\title\{",11)==0) {@+char *p,*q;
+ at z
+
 @x l.57 FIX: Fetch only the first word from the '\title'.
     for (p=buf+11,q=title;*p && *p!='}';p++) *q++=*p;
 @y
@@ -92,6 +98,12 @@
   char *s)
 @z
 
+ at x l.118 C++17 removed 'register' storage class.
+  register char *p,*q; register int l;
+ at y
+  char *p,*q; int l;
+ at z
+
 Section 6.
 
 @x l.145
@@ -100,6 +112,24 @@
 node *new_node(void)
 @z
 
+ at x l.181 C++17 removed 'register' storage class.
+register node* main_node; /* current end of main list */
+ at y
+node* main_node; /* current end of main list */
+ at z
+
+ at x l.195 C++17 removed 'register' storage class.
+while (1) {@+register node *cur_node;
+ at y
+while (1) {@+node *cur_node;
+ at z
+
+ at x l.213 C++17 removed 'register' storage class.
+{@+register char *p,*q;@+register int bal=1;
+ at y
+{@+char *p,*q;@+int bal=1;
+ at z
+
 Section 11.
 
 @x l.216 FIX: Don't count masked braces.
@@ -113,6 +143,23 @@
     }
 @z
 
+ at x l.289 C++17 removed 'register' storage class.
+while (1) {@+register node *p,*q,*r,*s,*t;
+ at y
+while (1) {@+node *p,*q,*r,*s,*t;
+ at z
+
+ at x l.308 C++17 removed 'register' storage class.
+do at +{@+register int d;
+ at y
+do at +{@+int d;
+ at z
+
+ at x l.323 C++17 removed 'register' storage class.
+do at +{@+register int d;
+ at y
+do at +{@+int d;
+ at z
 Section 17.
 
 @x l.347
@@ -123,8 +170,21 @@
   node *p, node *q)
 @z
 
+
+ at x l.349 C++17 removed 'register' storage class.
+{@+register unsigned char *pp,*qq;
+ at y
+{@+unsigned char *pp,*qq;
+ at z
+
 Section 19.
 
+ at x l.378 C++17 removed 'register' storage class.
+{@+register int j;
+ at y
+{@+int j;
+ at z
+
 @x l.379 Compiler warning.
   for (j=1;collate[j];j++) ord[collate[j]]=j;
 @y
@@ -141,12 +201,24 @@
   node *p, node *q)
 @z
 
+ at x l.392 C++17 removed 'register' storage class.
+{@+register node *x;
+ at y
+{@+node *x;
+ at z
+
+ at x l.403 C++17 removed 'register' storage class.
+{@+register node *x;
+ at y
+{@+node *x;
+ at z
+
 Section 22.
 
 @x l.414 Compiler warning.
 {@+register char *p=x->id;
 @y
-{@+register const char *p=x->id;
+{@+const char *p=x->id;
 @z
 
 @x l.434 FIX: Don't mask already masked underscore.
@@ -154,3 +226,11 @@
 @y
     if (*p=='_'&&*(p-1)!='\\') putchar('\\');
 @z
+
+ at x l.441 C++17 removed 'register' storage class.
+{@+register node *y=x->data.n,*z=NULL;
+  while (y) {@+register node *w;
+ at y
+{@+node *y=x->data.n,*z=NULL;
+  while (y) {@+node *w;
+ at z



More information about the tex-live-commits mailing list.