texlive[67762] Build/source/texk/web2c: [CWEB] Syntactic sugar.

commits+ascherer at tug.org commits+ascherer at tug.org
Sat Jul 29 19:38:44 CEST 2023


Revision: 67762
          http://tug.org/svn/texlive?view=revision&revision=67762
Author:   ascherer
Date:     2023-07-29 19:38:44 +0200 (Sat, 29 Jul 2023)
Log Message:
-----------
[CWEB] Syntactic sugar.

See 'too_long()' macro in common.w.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ctangleboot.cin
    trunk/Build/source/texk/web2c/cwebboot.cin
    trunk/Build/source/texk/web2c/cwebdir/ChangeLog
    trunk/Build/source/texk/web2c/cwebdir/comm-bs.ch
    trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
    trunk/Build/source/texk/web2c/cwebdir/common.c
    trunk/Build/source/texk/web2c/cwebdir/common.h
    trunk/Build/source/texk/web2c/cwebdir/common.w
    trunk/Build/source/texk/web2c/cwebdir/ctang-bs.ch
    trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/ctangle.c
    trunk/Build/source/texk/web2c/cwebdir/ctangle.w
    trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch
    trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweave.w

Modified: trunk/Build/source/texk/web2c/ctangleboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/ctangleboot.cin	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/ctangleboot.cin	2023-07-29 17:38:44 UTC (rev 67762)
@@ -83,8 +83,8 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless if(history==spotless) history= harmless_message
-#define mark_error history= error_message
+#define mark_harmless() if(history==spotless) history= harmless_message
+#define mark_error() history= error_message
 #define confusion(s) fatal(_("! This can't happen: ") ,s)  \
  \
 
@@ -95,8 +95,8 @@
 #define make_xrefs flags['x']
 #define check_for_change flags['c'] \
 
-#define update_terminal fflush(stdout) 
-#define new_line putchar('\n') 
+#define update_terminal() fflush(stdout) 
+#define new_line() putchar('\n') 
 #define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
 #define buf_size 1000
@@ -693,7 +693,7 @@
 if(cur_line%100==0&&show_progress){
 putchar('.');
 if(cur_line%500==0)printf("%d",cur_line);
-update_terminal;
+update_terminal();
 }
 cur_line++;
 }
@@ -726,7 +726,7 @@
 
 if(text_info->text_link==macro&&cur_out_file==end_output_files){
 #line 97 "cwebdir/ctang-w2c.ch"
-fputs(_("\n! No program text was specified."),stdout);mark_harmless;
+fputs(_("\n! No program text was specified."),stdout);mark_harmless();
 #line 519 "cwebdir/ctangle.w"
 
 }
@@ -736,7 +736,7 @@
 #line 103 "cwebdir/ctang-w2c.ch"
 printf(_("\nWriting the output file (%s):"),C_file_name);
 #line 525 "cwebdir/ctangle.w"
-update_terminal;
+update_terminal();
 }
 }
 else{
@@ -746,7 +746,7 @@
 #line 531 "cwebdir/ctangle.w"
 
 printf(" (%s)",C_file_name);
-update_terminal;
+update_terminal();
 }
 if(text_info->text_link==macro)goto writeloop;
 }
@@ -833,7 +833,7 @@
 fatal(_("! Cannot open output file "),output_file_name);
 
 }
-if(show_progress){printf("\n(%s)",output_file_name);update_terminal;}
+if(show_progress){printf("\n(%s)",output_file_name);update_terminal();}
 cur_line= 1;
 stack_ptr= stack+1;
 cur_name= *an_output_file;
@@ -1012,7 +1012,7 @@
 #line 539 "cwebdir/ctangle.w"
 
 if(show_happiness){
-if(show_progress)new_line;
+if(show_progress)new_line();
 #line 115 "cwebdir/ctang-w2c.ch"
 fputs(_("Done."),stdout);
 #line 543 "cwebdir/ctangle.w"
@@ -1451,7 +1451,7 @@
 #line 1123 "cwebdir/ctangle.w"
 
 term_write(section_text+1,25);
-printf("...");mark_harmless;
+printf("...");mark_harmless();
 }
 if(*k==' '&&k> section_text)k--;
 
@@ -1809,7 +1809,7 @@
 sixteen_bits a;
 section_count++;no_where= true;
 if(*(loc-1)=='*'&&show_progress){
-printf("*%d",(int)section_count);update_terminal;
+printf("*%d",(int)section_count);update_terminal();
 }
 next_control= ignore;
 while(true){

Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebboot.cin	2023-07-29 17:38:44 UTC (rev 67762)
@@ -107,8 +107,8 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless if(history==spotless) history= harmless_message
-#define mark_error history= error_message
+#define mark_harmless() if(history==spotless) history= harmless_message
+#define mark_error() history= error_message
 #define confusion(s) fatal(_("! This can't happen: ") ,s)  \
  \
 
@@ -119,8 +119,8 @@
 #define make_xrefs flags['x']
 #define check_for_change flags['c'] \
 
-#define update_terminal fflush(stdout) 
-#define new_line putchar('\n') 
+#define update_terminal() fflush(stdout) 
+#define new_line() putchar('\n') 
 #define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
 #define buf_size 1000
@@ -1326,7 +1326,7 @@
 for(k= buffer;k<l;k++)
 if(*k=='\t')putchar(' ');
 else putchar(*k);
-new_line;
+new_line();
 for(k= buffer;k<l;k++)putchar(' ');
 }
 for(k= l;k<limit;k++)putchar(*k);
@@ -1337,7 +1337,7 @@
 /*:67*/
 #line 1019 "cwebdir/common.w"
 
-update_terminal;mark_error;
+update_terminal();mark_error();
 }
 
 /*:66*//*68:*/
@@ -1344,7 +1344,7 @@
 #line 1065 "cwebdir/common.w"
 
 int wrap_up(void){
-if(show_progress)new_line;
+if(show_progress)new_line();
 if(show_stats)
 print_stats();
 #line 400 "cwebdir/comm-w2c.ch"

Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog	2023-07-29 17:38:44 UTC (rev 67762)
@@ -1,3 +1,19 @@
+2023-07-29  Andreas Scherer  <https://ascherer.github.io>
+
+	* comm-bs.ch,
+	* comm-w2c.h,
+	* common.c,
+	* common.h,
+	* common.w,
+	* ctang-bs.ch,
+	* ctang-w2c.ch,
+	* ctangle.c,
+	* ctangle.w,
+	* ctwill-w2c.ch,
+	* cweav-bs.ch,
+	* cweav-w2c.ch,
+	* cweave.w: Syntactic sugar.
+
 2023-07-28  Andreas Scherer  <https://ascherer.github.io>
 
 	* comm-w2c.h,

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-bs.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-bs.ch	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-bs.ch	2023-07-29 17:38:44 UTC (rev 67762)
@@ -25,7 +25,7 @@
   union {
     struct name_info *Rlink; /* right link in binary search tree for section
       names */
-    char Ilk; /* used by identifiers in \.{CWEAVE} only */
+    eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
   } dummy;
   void *equiv_or_xref; /* info corresponding to names */
 } name_info; /* contains information about an identifier or section name */
@@ -45,7 +45,7 @@
   union {
     struct name_info *Rlink; /* right link in binary search tree for section
       names */
-    char Ilk; /* used by identifiers in \.{CWEAVE} only */
+    eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
   } dummy;
   union {
     void huge* equiv_member;

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h	2023-07-29 17:38:44 UTC (rev 67762)
@@ -208,8 +208,8 @@
 @d harmless_message 1 /* |history| value when non-serious info was printed */
 @d error_message 2 /* |history| value when an error was noted */
 @d fatal_message 3 /* |history| value when we had to stop prematurely */
- at d mark_harmless if (history==spotless) history=harmless_message
- at d mark_error history=error_message
+ at d mark_harmless() if (history==spotless) history=harmless_message
+ at d mark_error() history=error_message
 @d confusion(s) fatal(_("! This can't happen: "),s)
 @.This can't happen@>
 
@@ -242,8 +242,8 @@
 extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */
 
 @ Code related to output:
- at d update_terminal fflush(stdout) /* empty the terminal output buffer */
- at d new_line putchar('\n')
+ at d update_terminal() fflush(stdout) /* empty the terminal output buffer */
+ at d new_line() putchar('\n')
 @d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout)
 
 @<Common code...@>=

Modified: trunk/Build/source/texk/web2c/cwebdir/common.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.c	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/common.c	2023-07-29 17:38:44 UTC (rev 67762)
@@ -68,8 +68,8 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless if(history==spotless) history= harmless_message
-#define mark_error history= error_message
+#define mark_harmless() if(history==spotless) history= harmless_message
+#define mark_error() history= error_message
 #define confusion(s) fatal("! This can't happen: ",s)  \
  \
 
@@ -79,8 +79,8 @@
 #define show_stats flags['s']
 #define make_xrefs flags['x'] \
 
-#define update_terminal fflush(stdout) 
-#define new_line putchar('\n') 
+#define update_terminal() fflush(stdout) 
+#define new_line() putchar('\n') 
 #define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
 #define buf_size 200
@@ -1101,7 +1101,7 @@
 for(k= buffer;k<l;k++)
 if(*k=='\t')putchar(' ');
 else putchar(*k);
-new_line;
+new_line();
 for(k= buffer;k<l;k++)putchar(' ');
 }
 for(k= l;k<limit;k++)putchar(*k);
@@ -1112,7 +1112,7 @@
 /*:67*/
 #line 1019 "common.w"
 
-update_terminal;mark_error;
+update_terminal();mark_error();
 }
 
 /*:66*//*68:*/
@@ -1119,7 +1119,7 @@
 #line 1065 "common.w"
 
 int wrap_up(void){
-if(show_progress)new_line;
+if(show_progress)new_line();
 if(show_stats)
 print_stats();
 /*69:*/

Modified: trunk/Build/source/texk/web2c/cwebdir/common.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.h	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/common.h	2023-07-29 17:38:44 UTC (rev 67762)
@@ -186,8 +186,8 @@
 @d harmless_message 1 /* |history| value when non-serious info was printed */
 @d error_message 2 /* |history| value when an error was noted */
 @d fatal_message 3 /* |history| value when we had to stop prematurely */
- at d mark_harmless if (history==spotless) history=harmless_message
- at d mark_error history=error_message
+ at d mark_harmless() if (history==spotless) history=harmless_message
+ at d mark_error() history=error_message
 @d confusion(s) fatal("! This can't happen: ",s)
 @.This can't happen@>
 
@@ -217,8 +217,8 @@
 extern boolean flags[]; /* an option for each 7-bit code */
 
 @ Code related to output:
- at d update_terminal fflush(stdout) /* empty the terminal output buffer */
- at d new_line putchar('\n')
+ at d update_terminal() fflush(stdout) /* empty the terminal output buffer */
+ at d new_line() putchar('\n')
 @d term_write(a,b) fflush(stdout),fwrite(a,sizeof(char),b,stdout)
 
 @<Common code...@>=

Modified: trunk/Build/source/texk/web2c/cwebdir/common.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.w	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/common.w	2023-07-29 17:38:44 UTC (rev 67762)
@@ -1017,7 +1017,7 @@
 {
   *s=='!'? printf("\n%s",s) : printf("%s",s);
   if (web_file_open) @<Print error location based on input buffer@>@;
-  update_terminal; mark_error;
+  update_terminal(); mark_error();
 }
 
 @ The error locations can be indicated by using the global variables
@@ -1040,7 +1040,7 @@
   for (k=buffer; k<l; k++)
     if (*k=='\t') putchar(' ');
     else putchar(*k); /* print the characters already read */
-  new_line;
+  new_line();
   for (k=buffer; k<l; k++) putchar(' '); /* space out the next line */
 }
 for (k=l; k<limit; k++) putchar(*k); /* print the part not yet read */
@@ -1064,7 +1064,7 @@
 
 @c
 int wrap_up(void) {
-  if (show_progress) new_line;
+  if (show_progress) new_line();
   if (show_stats)
     print_stats(); /* print statistics about memory usage */
   @<Print the job |history|@>@;

Modified: trunk/Build/source/texk/web2c/cwebdir/ctang-bs.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctang-bs.ch	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/ctang-bs.ch	2023-07-29 17:38:44 UTC (rev 67762)
@@ -27,7 +27,7 @@
 
 
 @x Section 10.
-  for section names */
+ at d ilk dummy.Ilk /* used by \.{CWEAVE} only */
 
 @<Common code...@>=
 typedef struct name_info {
@@ -36,7 +36,7 @@
   union {
     struct name_info *Rlink; /* right link in binary search tree for section
       names */
-    char Ilk; /* used by identifiers in \.{CWEAVE} only */
+    eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
   } dummy;
   void *equiv_or_xref; /* info corresponding to names */
 } name_info; /* contains information about an identifier or section name */
@@ -52,7 +52,7 @@
 extern hash_pointer hash_end; /* end of |hash| */
 extern hash_pointer h; /* index into hash-head array */
 @y
-  for section names */
+ at d ilk dummy.Ilk /* used by \.{CWEAVE} only */
 
 @f huge extern
 
@@ -63,7 +63,7 @@
   union {
     struct name_info *Rlink; /* right link in binary search tree for section
       names */
-    char Ilk; /* used by identifiers in \.{CWEAVE} only */
+    eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
   } dummy;
   union {
     char *equiv_member;

Modified: trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch	2023-07-29 17:38:44 UTC (rev 67762)
@@ -92,9 +92,9 @@
 @z
 
 @x
-    fputs("\n! No program text was specified.",stdout); mark_harmless;
+    fputs("\n! No program text was specified.",stdout); mark_harmless();
 @y
-    fputs(_("\n! No program text was specified."),stdout); mark_harmless;
+    fputs(_("\n! No program text was specified."),stdout); mark_harmless();
 @z
 
 @x
@@ -124,7 +124,7 @@
     if ((C_file=fopen(output_file_name,"wb"))==NULL)
       fatal("! Cannot open output file ",output_file_name);
 @.Cannot open output file@>
-    if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
+    if (show_progress) { printf("\n(%s)",output_file_name); update_terminal(); }
     cur_line=1;
     stack_ptr=stack+1;
     cur_name=*an_output_file;
@@ -149,7 +149,7 @@
       fatal(_("! Cannot open output file "),output_file_name);
 @.Cannot open output file@>
   }
-  if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
+  if (show_progress) { printf("\n(%s)",output_file_name); update_terminal(); }
   cur_line=1;
   stack_ptr=stack+1;
   cur_name=*an_output_file;

Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.c	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.c	2023-07-29 17:38:44 UTC (rev 67762)
@@ -70,8 +70,8 @@
 #define harmless_message 1
 #define error_message 2
 #define fatal_message 3
-#define mark_harmless if(history==spotless) history= harmless_message
-#define mark_error history= error_message
+#define mark_harmless() if(history==spotless) history= harmless_message
+#define mark_error() history= error_message
 #define confusion(s) fatal("! This can't happen: ",s)  \
  \
 
@@ -81,8 +81,8 @@
 #define show_stats flags['s']
 #define make_xrefs flags['x'] \
 
-#define update_terminal fflush(stdout) 
-#define new_line putchar('\n') 
+#define update_terminal() fflush(stdout) 
+#define new_line() putchar('\n') 
 #define term_write(a,b) fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)  \
 
 #define buf_size 200
@@ -647,7 +647,7 @@
 if(cur_line%100==0&&show_progress){
 putchar('.');
 if(cur_line%500==0)printf("%d",cur_line);
-update_terminal;
+update_terminal();
 }
 cur_line++;
 }
@@ -679,7 +679,7 @@
 #line 516 "ctangle.w"
 
 if(text_info->text_link==macro&&cur_out_file==end_output_files){
-fputs("\n! No program text was specified.",stdout);mark_harmless;
+fputs("\n! No program text was specified.",stdout);mark_harmless();
 
 }
 else{
@@ -686,7 +686,7 @@
 if(cur_out_file==end_output_files){
 if(show_progress){
 printf("\nWriting the output file (%s):",C_file_name);
-update_terminal;
+update_terminal();
 }
 }
 else{
@@ -694,7 +694,7 @@
 fputs("\nWriting the output files:",stdout);
 
 printf(" (%s)",C_file_name);
-update_terminal;
+update_terminal();
 }
 if(text_info->text_link==macro)goto writeloop;
 }
@@ -710,7 +710,7 @@
 if((C_file= fopen(output_file_name,"wb"))==NULL)
 fatal("! Cannot open output file ",output_file_name);
 
-if(show_progress){printf("\n(%s)",output_file_name);update_terminal;}
+if(show_progress){printf("\n(%s)",output_file_name);update_terminal();}
 cur_line= 1;
 stack_ptr= stack+1;
 cur_name= *an_output_file;
@@ -724,7 +724,7 @@
 #line 539 "ctangle.w"
 
 if(show_happiness){
-if(show_progress)new_line;
+if(show_progress)new_line();
 fputs("Done.",stdout);
 }
 }
@@ -1127,7 +1127,7 @@
 fputs("\n! Section name too long: ",stdout);
 
 term_write(section_text+1,25);
-printf("...");mark_harmless;
+printf("...");mark_harmless();
 }
 if(*k==' '&&k> section_text)k--;
 
@@ -1465,7 +1465,7 @@
 sixteen_bits a;
 section_count++;no_where= true;
 if(*(loc-1)=='*'&&show_progress){
-printf("*%d",(int)section_count);update_terminal;
+printf("*%d",(int)section_count);update_terminal();
 }
 next_control= ignore;
 while(true){

Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.w	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.w	2023-07-29 17:38:44 UTC (rev 67762)
@@ -462,7 +462,7 @@
   if (cur_line % 100 == 0 && show_progress) {
     putchar('.');
     if (cur_line % 500 == 0) printf("%d",cur_line);
-    update_terminal; /* progress report */
+    update_terminal(); /* progress report */
   }
   cur_line++;
 }
@@ -515,7 +515,7 @@
   @<Initialize the output stacks@>@;
   @<Output macro definitions if appropriate@>@;
   if (text_info->text_link==macro && cur_out_file==end_output_files) {
-    fputs("\n! No program text was specified.",stdout); mark_harmless;
+    fputs("\n! No program text was specified.",stdout); mark_harmless();
 @.No program text...@>
   }
   else {
@@ -522,7 +522,7 @@
     if (cur_out_file==end_output_files) {
       if (show_progress) {
         printf("\nWriting the output file (%s):",C_file_name);
-        update_terminal;
+        update_terminal();
       }
     }
     else {
@@ -530,7 +530,7 @@
         fputs("\nWriting the output files:",stdout);
 @.Writing the output...@>
         printf(" (%s)",C_file_name);
-        update_terminal;
+        update_terminal();
       }
       if (text_info->text_link==macro) goto writeloop;
     }
@@ -538,7 +538,7 @@
     flush_buffer();
 writeloop:   @<Write all the named output files@>@;
     if (show_happiness) {
-      if (show_progress) new_line;
+      if (show_progress) new_line();
       fputs("Done.",stdout);
     }
   }
@@ -558,7 +558,7 @@
     if ((C_file=fopen(output_file_name,"wb"))==NULL)
       fatal("! Cannot open output file ",output_file_name);
 @.Cannot open output file@>
-    if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
+    if (show_progress) { printf("\n(%s)",output_file_name); update_terminal(); }
     cur_line=1;
     stack_ptr=stack+1;
     cur_name=*an_output_file;
@@ -1122,7 +1122,7 @@
   fputs("\n! Section name too long: ",stdout);
 @.Section name too long@>
   term_write(section_text+1,25);
-  printf("..."); mark_harmless;
+  printf("..."); mark_harmless();
 }
 if (*k==' ' && k>section_text) k--;
 
@@ -1374,7 +1374,7 @@
   sixteen_bits a; /* token for left-hand side of definition */
   section_count++; @+ no_where=true;
   if (*(loc-1)=='*' && show_progress) { /* starred section */
-    printf("*%d",(int)section_count); update_terminal;
+    printf("*%d",(int)section_count); update_terminal();
   }
   next_control=ignore;
   while (true) {

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-07-29 17:38:44 UTC (rev 67762)
@@ -446,18 +446,18 @@
 
 @x
       fputs("\n! Never defined: <",stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @y
       fputs(_("\n! Never defined: <"),stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @z
 
 @x
       fputs("\n! Never used: <",stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @y
       fputs(_("\n! Never used: <"),stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @z
 
 @x
@@ -618,9 +618,9 @@
 @z
 
 @x
-  update_terminal;
+  update_terminal();
 @y
-  puts("|"); update_terminal;
+  puts("|"); update_terminal();
 @z
 
 @x
@@ -883,9 +883,9 @@
 @z
 
 @x
-  printf("\nTracing after l. %d:\n",cur_line); mark_harmless;
+  printf("\nTracing after l. %d:\n",cur_line); mark_harmless();
 @y
-  printf(_("\nTracing after l. %d:\n"),cur_line); mark_harmless;
+  printf(_("\nTracing after l. %d:\n"),cur_line); mark_harmless();
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch	2023-07-29 17:38:44 UTC (rev 67762)
@@ -30,7 +30,7 @@
 
 
 @x Section 10.
-  for section names */
+ at d ilk dummy.Ilk /* used by \.{CWEAVE} only */
 
 @<Common code...@>=
 typedef struct name_info {
@@ -39,7 +39,7 @@
   union {
     struct name_info *Rlink; /* right link in binary search tree for section
       names */
-    char Ilk; /* used by identifiers in \.{CWEAVE} only */
+    eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
   } dummy;
   void *equiv_or_xref; /* info corresponding to names */
 } name_info; /* contains information about an identifier or section name */
@@ -55,7 +55,7 @@
 extern hash_pointer hash_end; /* end of |hash| */
 extern hash_pointer h; /* index into hash-head array */
 @y
-  for section names */
+ at d ilk dummy.Ilk /* used by \.{CWEAVE} only */
 
 @f huge extern
 
@@ -66,7 +66,7 @@
   union {
     struct name_info *Rlink; /* right link in binary search tree for section
       names */
-    char Ilk; /* used by identifiers in \.{CWEAVE} only */
+    eight_bits Ilk; /* used by identifiers in \.{CWEAVE} only */
   } dummy;
   union {
     char *equiv_member;

Modified: trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch	2023-07-29 17:38:44 UTC (rev 67762)
@@ -175,18 +175,18 @@
 
 @x
       fputs("\n! Never defined: <",stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @y
       fputs(_("\n! Never defined: <"),stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @z
 
 @x
       fputs("\n! Never used: <",stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @y
       fputs(_("\n! Never used: <"),stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @z
 
 @x
@@ -443,9 +443,9 @@
 @z
 
 @x
-  printf("\nTracing after l. %d:\n",cur_line); mark_harmless;
+  printf("\nTracing after l. %d:\n",cur_line); mark_harmless();
 @y
-  printf(_("\nTracing after l. %d:\n"),cur_line); mark_harmless;
+  printf(_("\nTracing after l. %d:\n"),cur_line); mark_harmless();
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-07-29 12:55:27 UTC (rev 67761)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-07-29 17:38:44 UTC (rev 67762)
@@ -100,7 +100,7 @@
   phase_one(); /* read all the user's text and store the cross-references */
   phase_two(); /* read all the text again and translate it to \TEX/ form */
   phase_three(); /* output the cross-reference index */
-  if (tracing==fully && !show_progress) new_line;
+  if (tracing==fully && !show_progress) new_line();
   return wrap_up(); /* and exit gracefully */
 }
 
@@ -914,7 +914,7 @@
     fputs("\n! String too long: ",stdout);
 @.String too long@>
     term_write(section_text+1,25);
-    printf("..."); mark_error;
+    printf("..."); mark_error();
   }
   id_loc++;
   return string;
@@ -984,7 +984,7 @@
   fputs("\n! Section name too long: ",stdout);
 @.Section name too long@>
   term_write(section_text+1,25);
-  printf("..."); mark_harmless;
+  printf("..."); mark_harmless();
 }
 if (*k==' ' && k>section_text) k--;
 
@@ -1078,7 +1078,7 @@
      /* it will become |true| if any line changes */
   if (*(loc-1)=='*' && show_progress) {
     printf("*%d",(int)section_count);
-    update_terminal; /* print a progress report */
+    update_terminal(); /* print a progress report */
   }
   @<Store cross-references in the \TEX/ part of a section@>@;
   @<Store cross-references in the definition part of a section@>@;
@@ -1303,13 +1303,13 @@
     if ((an_output=(cur_xref->num==file_flag))==true) cur_xref=cur_xref->xlink;
     if (cur_xref->num <def_flag) {
       fputs("\n! Never defined: <",stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @.Never defined: <section name>@>
     }
     while (cur_xref->num >=cite_flag) cur_xref=cur_xref->xlink;
     if (cur_xref==xmem && !an_output) {
       fputs("\n! Never used: <",stdout);
-      print_section_name(p); putchar('>'); mark_harmless;
+      print_section_name(p); putchar('>'); mark_harmless();
 @.Never used: <section name>@>
     }
     section_check(p->rlink);
@@ -1345,7 +1345,7 @@
 
 @d c_line_write(c) fflush(active_file),fwrite(out_buf+1,sizeof(char),c,active_file)
 @d tex_putc(c) putc(c,active_file)
- at d tex_new_line putc('\n',active_file)
+ at d tex_new_line() putc('\n',active_file)
 @d tex_printf(c) fprintf(active_file,"%s",c)
 @d tex_puts(c) fputs(c,active_file)
 
@@ -1364,7 +1364,7 @@
     while (j>out_buf && *j==' ') j--;
   c_line_write(j-out_buf);
   if (per_cent) tex_putc('%');
-  tex_new_line; out_line++;
+  tex_new_line(); out_line++;
   if (carryover)
     while (j>out_buf)
       if (*j--=='%' && (j==out_buf || *j!='\\')) {
@@ -1463,7 +1463,7 @@
   printf("\n! Line had to be broken (output l. %d):\n",out_line);
 @.Line had to be broken@>
   term_write(out_buf+1, out_ptr-out_buf-1);
-  new_line; mark_harmless;
+  new_line(); mark_harmless();
   flush_buffer(out_ptr-1,true,true); return;
 }
 
@@ -2236,7 +2236,7 @@
       default: @<Print token |r| in symbolic form@>@;
     }
   }
-  update_terminal;
+  update_terminal();
 }
 
 @ @<Predecl...@>=@+static void print_text(text_pointer p);
@@ -2352,9 +2352,9 @@
 understanding the format by comparing the code with the symbolic
 productions as they were listed earlier.
 
- at d begin_math if (cur_mathness==maybe_math) init_mathness=yes_math;
+ at d begin_math() if (cur_mathness==maybe_math) init_mathness=yes_math;
               else if (cur_mathness==no_math) app_str("${}")
- at d end_math   if (cur_mathness==maybe_math) init_mathness=no_math;
+ at d end_math() if (cur_mathness==maybe_math) init_mathness=no_math;
               else if (cur_mathness==yes_math) app_str("{}$")
 
 @c
@@ -2371,10 +2371,10 @@
 {
         if (a==' ' || (a>=big_cancel && a<=big_force) || a==dindent)
             /* non-math token */ {
-                end_math;
+                end_math();
                 cur_mathness=no_math;
         } else {
-                begin_math;
+                begin_math();
                 cur_mathness=yes_math;
         }
         app(a);
@@ -2386,11 +2386,11 @@
 {
   switch (a->mathness % 4) { /* left boundary */
   case (no_math):
-    end_math;
+    end_math();
     cur_mathness=a->mathness / 4; /* right boundary */
     break;
   case (yes_math):
-    begin_math;
+    begin_math();
     cur_mathness=a->mathness / 4; /* right boundary */
     break;
   case (maybe_math): /* no changes */ break;
@@ -3176,7 +3176,7 @@
 Note that |freeze_text| does not check to see that |text_ptr| hasn't gotten
 too large, since it is assumed that this test was done beforehand.
 
- at d freeze_text *(++text_ptr)=tok_ptr
+ at d freeze_text() *(++text_ptr)=tok_ptr
 
 @<Predecl...@>=
 static void reduce(scrap_pointer,short,eight_bits,short,short);@/
@@ -3197,7 +3197,7 @@
   if (k>0) {
     j->trans=text_ptr;
     j->mathness=4*cur_mathness+init_mathness;
-    freeze_text;
+    freeze_text();
   }
   if (k>1) {
     for (i=j+k, i1=j+1; i<=lo_ptr; i++, i1++) {
@@ -3340,13 +3340,13 @@
   if (j->mathness / 4 == yes_math) app('$');
   if (tok_ptr+6>tok_mem_end) overflow("token");
 }
-freeze_text; return text_ptr-1;
+freeze_text(); return text_ptr-1;
 
 @ @<If semi-tracing, show the irreducible scraps@>=
 if (lo_ptr>scrap_base && tracing==partly) {
   printf("\nIrreducible scrap sequence in section %d:",(int)section_count);
 @.Irreducible scrap sequence...@>
-  mark_harmless;
+  mark_harmless();
   for (j=scrap_base; j<=lo_ptr; j++) {
     putchar(' '); print_cat(j->cat);
   }
@@ -3354,7 +3354,7 @@
 
 @ @<If tracing,...@>=
 if (tracing==fully) {
-  printf("\nTracing after l. %d:\n",cur_line); mark_harmless;
+  printf("\nTracing after l. %d:\n",cur_line); mark_harmless();
 @.Tracing after...@>
   if (loc>buffer+50) {
     printf("...");
@@ -3399,7 +3399,7 @@
 @d app_scrap(c,b) {
   (++scrap_ptr)->cat=(c); scrap_ptr->trans=text_ptr;
   scrap_ptr->mathness=5*(b); /* no no, yes yes, or maybe maybe */
-  freeze_text;
+  freeze_text();
 }
 
 @ @<Append the scr...@>=
@@ -3697,7 +3697,7 @@
 @.\\SHC@>
       bal=copy_comment(is_long_comment,1); next_control=ignore;
       while (bal>0) {
-        p=text_ptr; freeze_text; q=C_translate();
+        p=text_ptr; freeze_text(); q=C_translate();
          /* at this point we have |tok_ptr+6<=max_toks| */
         app(tok_flag+(int)(p-tok_start));
         if (make_pb) app_str("\\PB{");
@@ -3772,7 +3772,7 @@
 @d cur_end cur_state.end_field /* current ending location in |tok_mem| */
 @d cur_tok cur_state.tok_field /* location of next output token in |tok_mem| */
 @d cur_mode cur_state.mode_field /* current mode of interpretation */
- at d init_stack stack_ptr=stack;cur_mode=outer /* initialize the stack */
+ at d init_stack() stack_ptr=stack;cur_mode=outer /* initialize the stack */
 
 @<Private...@>=
 static output_state stack[stack_size+1]; /* info for non-current levels */
@@ -3807,7 +3807,7 @@
 force when the current level was begun. This subroutine will never be
 called when |stack_ptr==1|. It is so simple, we declare it as a macro:
 
- at d pop_level cur_state = *(--stack_ptr)
+ at d pop_level() cur_state = *(--stack_ptr)
 
 @ The |get_output| function returns the next byte of output that is not a
 reference to a token list. It returns the values |identifier| or |res_word|
@@ -3833,7 +3833,7 @@
 get_output(void) /* returns the next token of output */
 {
   sixteen_bits a; /* current item read from |tok_mem| */
-  restart: while (cur_tok==cur_end) pop_level;
+  restart: while (cur_tok==cur_end) pop_level();
   a=*(cur_tok++);
   if (a>=0400) {
     cur_name=a % id_flag + name_dir;
@@ -3904,7 +3904,7 @@
   boolean save_mode; /* value of |cur_mode| before a sequence of breaks */
   boolean dindent_pending=false; /* should a |dindent| be output? */
   app(end_translation); /* append a sentinel */
-  freeze_text; push_level(text_ptr-1);
+  freeze_text(); push_level(text_ptr-1);
   while (true) {
     a=get_output();
     reswitch: switch(a) {
@@ -4120,7 +4120,7 @@
 if (*k++!='@@') {
   fputs("\n! Illegal control code in section name: <",stdout);
 @.Illegal control code...@>
-  print_section_name(cur_section_name); printf("> "); mark_error;
+  print_section_name(cur_section_name); printf("> "); mark_error();
 }
 
 @ The \CEE/ text enclosed in \pb\ should not contain `\.{\v}' characters,
@@ -4135,7 +4135,7 @@
   if (k>=k_limit) {
     fputs("\n! C text in section name didn't end: <",stdout);
 @.C text...didn't end@>
-    print_section_name(cur_section_name); printf("> "); mark_error; break;
+    print_section_name(cur_section_name); printf("> "); mark_error(); break;
   }
   b=*(k++);
   if (b=='@@' || (b=='\\' && delim!=0))
@@ -4186,8 +4186,8 @@
 change if a section is non-null, so the following macros `|save_position|'
 and `|emit_space_if_needed|' are able to handle the situation:
 
- at d save_position save_line=out_line; save_place=out_ptr
- at d emit_space_if_needed if (save_line!=out_line || save_place!=out_ptr)
+ at d save_position() save_line=out_line; save_place=out_ptr
+ at d emit_space_if_needed() if (save_line!=out_line || save_place!=out_ptr)
   out_str("\\Y");
   space_checked=true;
 @.\\Y@>
@@ -4204,7 +4204,7 @@
 @ @<Translate the current section@>= {
   section_count++;
   @<Output the code for the beginning of a new section@>@;
-  save_position;
+  save_position();
   @<Translate the \TEX/ part of the current section@>@;
   @<Translate the definition part of the current section@>@;
   @<Translate the \CEE/ part of the current section@>@;
@@ -4238,7 +4238,7 @@
 @.\\N@>
   {@+ char s[32];@+sprintf(s,"{%d}",sec_depth+1);@+out_str(s);@+}
   if (show_progress)
-  printf("*%d",(int)section_count); update_terminal; /* print a progress report */
+  printf("*%d",(int)section_count); update_terminal(); /* print a progress report */
 }
 out('{'); out_section(section_count); out('}');
 
@@ -4247,7 +4247,7 @@
 
 @<Translate the \T...@>= do
   switch (next_control=copy_TeX()) {
-    case '|': init_stack; output_C(); break;
+    case '|': init_stack(); output_C(); break;
     case '@@': out('@@'); break;
     case TeX_string: case noop:
     case xref_roman: case xref_wildcard: case xref_typewriter:
@@ -4270,7 +4270,7 @@
 @<Translate the d...@>=
 space_checked=false;
 while (next_control<=definition) { /* |format_code| or |definition| */
-  init_stack;
+  init_stack();
   if (next_control==definition) @<Start a macro definition@>@;
   else @<Start a format definition@>@;
   outer_parse(); finish_C(format_visible); format_visible=true;
@@ -4327,7 +4327,7 @@
 
 @<Start a macro...@>= {
   if (save_line!=out_line || save_place!=out_ptr || space_checked) app(backup);
-  if(!space_checked){emit_space_if_needed;save_position;}
+  if(!space_checked){emit_space_if_needed();save_position();}
   app_str("\\D"); /* this will produce `\#\&{define }' */
 @.\\D@>
   if ((next_control=get_next())!=identifier)
@@ -4357,7 +4357,7 @@
 @ @<Start a format...@>= {
   doing_format=true;
   if(*(loc-1)=='s' || *(loc-1)=='S') format_visible=false;
-  if(!space_checked){emit_space_if_needed;save_position;}
+  if(!space_checked){emit_space_if_needed();save_position();}
   app_str("\\F"); /* this will produce `\&{format }' */
 @.\\F@>
   next_control=get_next();
@@ -4385,7 +4385,7 @@
 @ @<Translate the \CEE/...@>=
 this_section=name_dir;
 if (next_control<=section_name) {
-  emit_space_if_needed; init_stack;
+  emit_space_if_needed(); init_stack();
   if (next_control==begin_C) next_control=get_next();
   else {
     this_section=cur_section;
@@ -4552,7 +4552,7 @@
   fclose(active_file);
 }
 if (show_happiness) {
-  if (show_progress) new_line;
+  if (show_progress) new_line();
   fputs("Done.",stdout);
 }
 check_complete(); /* was all of the change file used? */
@@ -4830,7 +4830,7 @@
   if (p) {
     section_print(p->llink); out_str("\\I");
 @.\\I@>
-    tok_ptr=tok_mem+1; text_ptr=tok_start+1; scrap_ptr=scrap_info; init_stack;
+    tok_ptr=tok_mem+1; text_ptr=tok_start+1; scrap_ptr=scrap_info; init_stack();
     app(section_flag+(int)(p-name_dir)); make_output();
     footnote(cite_flag);
     footnote(0); /* |cur_xref| was set by |make_output| */



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