texlive[68327] Build/source/texk/web2c: [CWEB] Factor out

commits+ascherer at tug.org commits+ascherer at tug.org
Wed Sep 20 12:24:51 CEST 2023


Revision: 68327
          https://tug.org/svn/texlive?view=revision&revision=68327
Author:   ascherer
Date:     2023-09-20 12:24:51 +0200 (Wed, 20 Sep 2023)
Log Message:
-----------
[CWEB] Factor out cwebacromac.tex.

Extract common macros from cwebmac.tex and the PDF variants of the
CTWILL macros. Update cwebman.tex accordingly.

Fixes in CWEB code:
- Consistent formatting of terminal output in cases of error
- Revert fputs back to printf
- Add curly braces for progress report (harmless glitch in CWEB 2.0)

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ctangleboot.cin
    trunk/Build/source/texk/web2c/cwebboot.cin
    trunk/Build/source/texk/web2c/cwebdir/Makefile
    trunk/Build/source/texk/web2c/cwebdir/README
    trunk/Build/source/texk/web2c/cwebdir/comm-ql.ch
    trunk/Build/source/texk/web2c/cwebdir/comm-w2c.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-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-proofsort
    trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweave.w
    trunk/Build/source/texk/web2c/cwebdir/cweb.1
    trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex
    trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cwebman.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex
    trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex

Modified: trunk/Build/source/texk/web2c/ctangleboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/ctangleboot.cin	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/ctangleboot.cin	2023-09-20 10:24:51 UTC (rev 68327)
@@ -665,7 +665,7 @@
 if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir);
 else if(a!=0){
 #line 85 "cwebdir/ctang-w2c.ch"
-fputs(_("\n! Not present: <"),stdout);
+printf("%s",_("\n! Not present: <"));
 #line 405 "cwebdir/ctangle.w"
 print_section_name(a+name_dir);err_print(">");
 
@@ -727,7 +727,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();
+printf("%s",_("\n! No program text was specified."));mark_harmless();
 #line 519 "cwebdir/ctangle.w"
 
 }
@@ -1007,7 +1007,7 @@
 if(show_happiness){
 if(show_progress)new_line();
 #line 111 "cwebdir/ctang-w2c.ch"
-fputs(_("Done."),stdout);
+printf("%s",_("Done."));
 #line 537 "cwebdir/ctangle.w"
 }
 }
@@ -1343,7 +1343,7 @@
 }
 if(id_loc>=section_text_end){
 #line 247 "cwebdir/ctang-w2c.ch"
-fputs(_("\n! String too long: "),stdout);
+printf("%s",_("\n! String too long: "));
 #line 1022 "cwebdir/ctangle.w"
 
 term_write(section_text+1,25);
@@ -1440,7 +1440,7 @@
 }
 if(k>=section_text_end){
 #line 283 "cwebdir/ctang-w2c.ch"
-fputs(_("\n! Section name too long: "),stdout);
+printf("%s",_("\n! Section name too long: "));
 #line 1117 "cwebdir/ctangle.w"
 
 term_write(section_text+1,25);

Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebboot.cin	2023-09-20 10:24:51 UTC (rev 68327)
@@ -389,7 +389,7 @@
 boolean flags[128];
 
 /*:73*//*83:*/
-#line 1266 "cwebdir/common.w"
+#line 1268 "cwebdir/common.w"
 
 FILE*C_file;
 FILE*tex_file;
@@ -398,7 +398,7 @@
 #line 582 "cwebdir/comm-w2c.ch"
 FILE*active_file;
 FILE*check_file;
-#line 1272 "cwebdir/common.w"
+#line 1274 "cwebdir/common.w"
 
 #line 599 "cwebdir/comm-w2c.ch"
 /*:83*//*86:*/
@@ -612,7 +612,7 @@
 else if((tex_file= fopen(tex_file_name,"wb"))==NULL)
 fatal(_("! Cannot open output file "),tex_file_name);
 }
-#line 1284 "cwebdir/common.w"
+#line 1286 "cwebdir/common.w"
 
 #line 617 "cwebdir/comm-w2c.ch"
 /*:84*/
@@ -1190,12 +1190,12 @@
 }else{
 if(r!=NULL){
 #line 333 "cwebdir/comm-w2c.ch"
-fputs(_("\n! Ambiguous prefix: matches <"),stdout);
+printf("%s",_("\n! Ambiguous prefix: matches <"));
 #line 887 "cwebdir/common.w"
 
 print_prefix_name(p);
 #line 339 "cwebdir/comm-w2c.ch"
-fputs(_(">\n and <"),stdout);
+printf("%s",_(">\n and <"));
 #line 890 "cwebdir/common.w"
 print_prefix_name(r);
 err_print(">");
@@ -1229,7 +1229,7 @@
 case prefix:
 if(!ispref){
 #line 345 "cwebdir/comm-w2c.ch"
-fputs(_("\n! New name is a prefix of <"),stdout);
+printf("%s",_("\n! New name is a prefix of <"));
 #line 916 "cwebdir/common.w"
 
 print_section_name(r);
@@ -1243,7 +1243,7 @@
 break;
 case bad_extension:
 #line 351 "cwebdir/comm-w2c.ch"
-fputs(_("\n! New name extends <"),stdout);
+printf("%s",_("\n! New name extends <"));
 #line 928 "cwebdir/common.w"
 
 print_section_name(r);
@@ -1251,12 +1251,12 @@
 break;
 default:
 #line 357 "cwebdir/comm-w2c.ch"
-fputs(_("\n! Section name incompatible with <"),stdout);
+printf("%s",_("\n! Section name incompatible with <"));
 #line 934 "cwebdir/common.w"
 
 print_prefix_name(r);
 #line 363 "cwebdir/comm-w2c.ch"
-fputs(_(">,\n which abbreviates <"),stdout);
+printf("%s",_(">,\n which abbreviates <"));
 #line 937 "cwebdir/common.w"
 print_section_name(r);
 err_print(">");
@@ -1309,7 +1309,7 @@
 err_print(
 const char*s)
 {
-*s=='!'?printf("\n%s",s):printf("%s",s);
+printf(*s=='!'?"\n%s":"%s",s);
 if(web_file_open)/*67:*/
 #line 1031 "cwebdir/common.w"
 
@@ -1343,7 +1343,7 @@
 #line 1064 "cwebdir/common.w"
 
 int wrap_up(void){
-if(show_progress)new_line();
+if(show_progress||show_happiness||history!=spotless)new_line();
 if(show_stats)
 print_stats();
 #line 401 "cwebdir/comm-w2c.ch"
@@ -1394,7 +1394,7 @@
 fatal(
 const char*s,const char*t)
 {
-if(*s)err_print(s);
+if(*s)printf("%s",s);
 err_print(t);
 history= fatal_message;exit(wrap_up());
 }
@@ -1438,7 +1438,7 @@
 #line 1167 "cwebdir/common.w"
  while(--argc> 0){
 if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1244 "cwebdir/common.w"
+#line 1246 "cwebdir/common.w"
 
 #line 525 "cwebdir/comm-w2c.ch"
 {
@@ -1483,7 +1483,7 @@
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
-#line 1259 "cwebdir/common.w"
+#line 1261 "cwebdir/common.w"
 
 #line 576 "cwebdir/comm-w2c.ch"
 /*:81*/
@@ -1498,7 +1498,7 @@
 break;
 }
 }
-#line 1247 "cwebdir/common.w"
+#line 1249 "cwebdir/common.w"
 
 #line 568 "cwebdir/comm-w2c.ch"
 /*:80*/
@@ -1522,7 +1522,7 @@
 /*82:*/
 #line 576 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
-#line 1261 "cwebdir/common.w"
+#line 1263 "cwebdir/common.w"
 
 
 /*:82*/
@@ -1536,8 +1536,10 @@
 }
 #line 1205 "cwebdir/common.w"
 sprintf(tex_file_name,"%s.tex",name_pos);
+if(make_xrefs){
 sprintf(idx_file_name,"%s.idx",name_pos);
 sprintf(scn_file_name,"%s.scn",name_pos);
+}
 sprintf(C_file_name,"%s.c",name_pos);
 found_web= true;
 }
@@ -1546,7 +1548,7 @@
 #line 1176 "cwebdir/common.w"
 
 else if(!found_change)/*78:*/
-#line 1212 "cwebdir/common.w"
+#line 1214 "cwebdir/common.w"
 
 {
 if(strcmp(*argv,"-")!=0){
@@ -1554,11 +1556,11 @@
 /*82:*/
 #line 576 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
-#line 1261 "cwebdir/common.w"
+#line 1263 "cwebdir/common.w"
 
 
 /*:82*/
-#line 1216 "cwebdir/common.w"
+#line 1218 "cwebdir/common.w"
 
 if(dot_pos==NULL)
 sprintf(change_file_name,"%s.ch",*argv);
@@ -1571,7 +1573,7 @@
 #line 1177 "cwebdir/common.w"
 
 else if(!found_out)/*79:*/
-#line 1224 "cwebdir/common.w"
+#line 1226 "cwebdir/common.w"
 
 {
 if(s-*argv> max_file_name_length-5)
@@ -1578,11 +1580,11 @@
 /*82:*/
 #line 576 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
-#line 1261 "cwebdir/common.w"
+#line 1263 "cwebdir/common.w"
 
 
 /*:82*/
-#line 1227 "cwebdir/common.w"
+#line 1229 "cwebdir/common.w"
 
 if(dot_pos==NULL){
 sprintf(tex_file_name,"%s.tex",*argv);
@@ -1607,7 +1609,7 @@
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
-#line 1259 "cwebdir/common.w"
+#line 1261 "cwebdir/common.w"
 
 #line 576 "cwebdir/comm-w2c.ch"
 /*:81*/
@@ -1620,7 +1622,7 @@
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
-#line 1259 "cwebdir/common.w"
+#line 1261 "cwebdir/common.w"
 
 #line 576 "cwebdir/comm-w2c.ch"
 /*:81*/

Modified: trunk/Build/source/texk/web2c/cwebdir/Makefile
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/Makefile	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/Makefile	2023-09-20 10:24:51 UTC (rev 68327)
@@ -77,13 +77,15 @@
 SOURCES = cweave.w common.w ctangle.w
 ALL =  common.w ctangle.w cweave.w prod.w \
 	Makefile README common.c common.h ctangle.c \
-	cwebman.tex cwebmac.tex comm-vms.ch ctang-vms.ch \
-	cweav-vms.ch comm-man.ch ctang-man.ch cweav-man.ch \
+	cwebman.tex cwebacromac.tex cwebmac.tex \
+	cweb.1 cweb.el c++lib.w iso_types.w \
+	comm-man.ch ctang-man.ch cweav-man.ch \
+	comm-bs.ch ctang-bs.ch cweav-bs.ch makefile.bs \
 	comm-pc.ch ctang-pc.ch cweav-pc.ch comm-amiga.ch \
-	comm-bs.ch ctang-bs.ch cweav-bs.ch makefile.bs \
 	comm-ql.ch ctang-ql.ch cweav-ql.ch readme.ql \
+	comm-vms.ch ctang-vms.ch cweav-vms.ch \
 	comm-w32.ch ctang-w32.ch cweav-w32.ch \
-	comm-os2.ch comm-mac.ch cweb.1 cweb.el c++lib.w iso_types.w
+	comm-os2.ch comm-mac.ch
 
 .SUFFIXES: .dvi .tex .w .pdf
 
@@ -178,6 +180,8 @@
 	$(CP) cweb.1 $(MANDIR)/cweb.$(MANEXT)
 	chmod 644 $(MANDIR)/cweb.$(MANEXT)
 	- mkdir $(MACROSDIR)
+	$(CP) cwebacromac.tex $(MACROSDIR)
+	chmod 644 $(MACROSDIR)/cwebacromac.tex
 	$(CP) cwebmac.tex $(MACROSDIR)
 	chmod 644 $(MACROSDIR)/cwebmac.tex
 	- mkdir $(EMACSDIR)

Modified: trunk/Build/source/texk/web2c/cwebdir/README
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/README	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/README	2023-09-20 10:24:51 UTC (rev 68327)
@@ -59,6 +59,7 @@
 cweave.w
 cweb.1
 cweb.el
+cwebacromac.tex
 cwebmac.tex
 cwebman.tex
 examples/

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-ql.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-ql.ch	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-ql.ch	2023-09-20 10:24:51 UTC (rev 68327)
@@ -152,8 +152,10 @@
   }
   sprintf(alt_web_file_name,"%s.web",*argv);
   sprintf(tex_file_name,"%s.tex",name_pos); /* strip off directory name */
-  sprintf(idx_file_name,"%s.idx",name_pos);
-  sprintf(scn_file_name,"%s.scn",name_pos);
+  if (make_xrefs) { /* indexes will be generated */
+    sprintf(idx_file_name,"%s.idx",name_pos);
+    sprintf(scn_file_name,"%s.scn",name_pos);
+  }
   sprintf(C_file_name,"%s.c",name_pos);
   found_web=true;
 }
@@ -170,8 +172,10 @@
   }
   sprintf(alt_web_file_name,"%s_web",*argv);
   sprintf(tex_file_name,"%s_tex",name_pos); /* strip off directory name */
-  sprintf(idx_file_name,"%s_idx",name_pos);
-  sprintf(scn_file_name,"%s_scn",name_pos);
+  if (make_xrefs) { /* indexes will be generated */
+    sprintf(idx_file_name,"%s_idx",name_pos);
+    sprintf(scn_file_name,"%s_scn",name_pos);
+  }
   sprintf(C_file_name,"%s_c",name_pos);
   found_web=true;
 }

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch	2023-09-20 10:24:51 UTC (rev 68327)
@@ -328,39 +328,39 @@
 @z
 
 @x
-      fputs("\n! Ambiguous prefix: matches <",stdout);
+      printf("%s","\n! Ambiguous prefix: matches <");
 @y
-      fputs(_("\n! Ambiguous prefix: matches <"),stdout);
+      printf("%s",_("\n! Ambiguous prefix: matches <"));
 @z
 
 @x
-      fputs(">\n and <",stdout);
+      printf("%s",">\n and <");
 @y
-      fputs(_(">\n and <"),stdout);
+      printf("%s",_(">\n and <"));
 @z
 
 @x
-      fputs("\n! New name is a prefix of <",stdout);
+      printf("%s","\n! New name is a prefix of <");
 @y
-      fputs(_("\n! New name is a prefix of <"),stdout);
+      printf("%s",_("\n! New name is a prefix of <"));
 @z
 
 @x
-      fputs("\n! New name extends <",stdout);
+      printf("%s","\n! New name extends <");
 @y
-      fputs(_("\n! New name extends <"),stdout);
+      printf("%s",_("\n! New name extends <"));
 @z
 
 @x
-    fputs("\n! Section name incompatible with <",stdout);
+    printf("%s","\n! Section name incompatible with <");
 @y
-    fputs(_("\n! Section name incompatible with <"),stdout);
+    printf("%s",_("\n! Section name incompatible with <"));
 @z
 
 @x
-    fputs(">,\n which abbreviates <",stdout);
+    printf("%s",">,\n which abbreviates <");
 @y
-    fputs(_(">,\n which abbreviates <"),stdout);
+    printf("%s",_(">,\n which abbreviates <"));
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.h	2023-09-20 10:24:51 UTC (rev 68327)
@@ -41,7 +41,7 @@
 
 @ The procedure that gets everything rolling:
 @<Predecl...@>=
-extern void common_init(void);@/
+extern void common_init(void);
 
 @ You may have noticed that almost all \.{"strings"} in the \.{CWEB} sources
 are placed in the context of the `|_|'~macro.  This is just a shortcut for the

Modified: trunk/Build/source/texk/web2c/cwebdir/common.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.c	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/common.c	2023-09-20 10:24:51 UTC (rev 68327)
@@ -323,7 +323,7 @@
 boolean flags[128];
 
 /*:73*//*83:*/
-#line 1266 "common.w"
+#line 1268 "common.w"
 
 FILE*C_file;
 FILE*tex_file;
@@ -432,7 +432,7 @@
 #line 100 "common.w"
 
 /*84:*/
-#line 1273 "common.w"
+#line 1275 "common.w"
 
 scan_args();
 if(program==ctangle){
@@ -979,10 +979,10 @@
 p= (c==less?p->llink:p->rlink);
 }else{
 if(r!=NULL){
-fputs("\n! Ambiguous prefix: matches <",stdout);
+printf("%s","\n! Ambiguous prefix: matches <");
 
 print_prefix_name(p);
-fputs(">\n and <",stdout);
+printf("%s",">\n and <");
 print_prefix_name(r);
 err_print(">");
 return name_dir;
@@ -1014,7 +1014,7 @@
 
 case prefix:
 if(!ispref){
-fputs("\n! New name is a prefix of <",stdout);
+printf("%s","\n! New name is a prefix of <");
 
 print_section_name(r);
 err_print(">");
@@ -1026,16 +1026,16 @@
 extend_section_name(r,first,last+1,ispref);
 break;
 case bad_extension:
-fputs("\n! New name extends <",stdout);
+printf("%s","\n! New name extends <");
 
 print_section_name(r);
 err_print(">");
 break;
 default:
-fputs("\n! Section name incompatible with <",stdout);
+printf("%s","\n! Section name incompatible with <");
 
 print_prefix_name(r);
-fputs(">,\n which abbreviates <",stdout);
+printf("%s",">,\n which abbreviates <");
 print_section_name(r);
 err_print(">");
 }
@@ -1087,7 +1087,7 @@
 err_print(
 const char*s)
 {
-*s=='!'?printf("\n%s",s):printf("%s",s);
+printf(*s=='!'?"\n%s":"%s",s);
 if(web_file_open)/*67:*/
 #line 1031 "common.w"
 
@@ -1119,7 +1119,7 @@
 #line 1064 "common.w"
 
 int wrap_up(void){
-if(show_progress)new_line();
+if(show_progress||show_happiness||history!=spotless)new_line();
 if(show_stats)
 print_stats();
 /*69:*/
@@ -1149,7 +1149,7 @@
 fatal(
 const char*s,const char*t)
 {
-if(*s)err_print(s);
+if(*s)printf("%s",s);
 err_print(t);
 history= fatal_message;exit(wrap_up());
 }
@@ -1179,7 +1179,7 @@
 strcpy(change_file_name,"/dev/null");
 while(--argc> 0){
 if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1244 "common.w"
+#line 1246 "common.w"
 
 for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
 flags[(eight_bits)*dot_pos]= flag_change;
@@ -1199,7 +1199,7 @@
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 1260 "common.w"
+#line 1262 "common.w"
 fatal("! Filename too long\n",*argv);
 
 
@@ -1214,8 +1214,10 @@
 }
 sprintf(alt_web_file_name,"%s.web",*argv);
 sprintf(tex_file_name,"%s.tex",name_pos);
+if(make_xrefs){
 sprintf(idx_file_name,"%s.idx",name_pos);
 sprintf(scn_file_name,"%s.scn",name_pos);
+}
 sprintf(C_file_name,"%s.c",name_pos);
 found_web= true;
 }
@@ -1224,18 +1226,18 @@
 #line 1176 "common.w"
 
 else if(!found_change)/*78:*/
-#line 1212 "common.w"
+#line 1214 "common.w"
 
 {
 if(strcmp(*argv,"-")!=0){
 if(s-*argv> max_file_name_length-4)
 /*82:*/
-#line 1260 "common.w"
+#line 1262 "common.w"
 fatal("! Filename too long\n",*argv);
 
 
 /*:82*/
-#line 1216 "common.w"
+#line 1218 "common.w"
 
 if(dot_pos==NULL)
 sprintf(change_file_name,"%s.ch",*argv);
@@ -1248,17 +1250,17 @@
 #line 1177 "common.w"
 
 else if(!found_out)/*79:*/
-#line 1224 "common.w"
+#line 1226 "common.w"
 
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 1260 "common.w"
+#line 1262 "common.w"
 fatal("! Filename too long\n",*argv);
 
 
 /*:82*/
-#line 1227 "common.w"
+#line 1229 "common.w"
 
 if(dot_pos==NULL){
 sprintf(tex_file_name,"%s.tex",*argv);
@@ -1279,7 +1281,7 @@
 #line 1178 "common.w"
 
 else/*81:*/
-#line 1248 "common.w"
+#line 1250 "common.w"
 
 {
 if(program==ctangle)
@@ -1298,7 +1300,7 @@
 }
 }
 if(!found_web)/*81:*/
-#line 1248 "common.w"
+#line 1250 "common.w"
 
 {
 if(program==ctangle)

Modified: trunk/Build/source/texk/web2c/cwebdir/common.h
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.h	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/common.h	2023-09-20 10:24:51 UTC (rev 68327)
@@ -41,7 +41,7 @@
 
 @ The procedure that gets everything rolling:
 @<Predecl...@>=
-extern void common_init(void);@/
+extern void common_init(void);
 
 @ Interface to the standard \CEE/ library:
 

Modified: trunk/Build/source/texk/web2c/cwebdir/common.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.w	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/common.w	2023-09-20 10:24:51 UTC (rev 68327)
@@ -883,10 +883,10 @@
     p=(c==less?p->llink:p->rlink);
   } else { /* new name matches |p| */
     if (r!=NULL) { /* and also |r|: illegal */
-      fputs("\n! Ambiguous prefix: matches <",stdout);
+      printf("%s","\n! Ambiguous prefix: matches <");
 @.Ambiguous prefix ... @>
       print_prefix_name(p);
-      fputs(">\n and <",stdout);
+      printf("%s",">\n and <");
       print_prefix_name(r);
       err_print(">");
       return name_dir; /* the unsection */
@@ -912,7 +912,7 @@
               /* compare all of |r| with new name */
   case prefix:
     if (!ispref) {
-      fputs("\n! New name is a prefix of <",stdout);
+      printf("%s","\n! New name is a prefix of <");
 @.New name is a prefix...@>
       print_section_name(r);
       err_print(">");
@@ -924,16 +924,16 @@
         extend_section_name(r,first,last+1,ispref);
       break;
   case bad_extension:
-      fputs("\n! New name extends <",stdout);
+      printf("%s","\n! New name extends <");
 @.New name extends...@>
       print_section_name(r);
       err_print(">");
     break;
   default: /* no match: illegal */
-    fputs("\n! Section name incompatible with <",stdout);
+    printf("%s","\n! Section name incompatible with <");
 @.Section name incompatible...@>
     print_prefix_name(r);
-    fputs(">,\n which abbreviates <",stdout);
+    printf("%s",">,\n which abbreviates <");
     print_section_name(r);
     err_print(">");
 }
@@ -1014,7 +1014,7 @@
 err_print( /* prints `\..' and location of error message */
 const char *s)
 {
-  *s=='!'? printf("\n%s",s) : printf("%s",s);
+  printf(*s=='!' ? "\n%s" : "%s",s);
   if (web_file_open) @<Print error location based on input buffer@>@;
   update_terminal(); mark_error();
 }
@@ -1063,7 +1063,7 @@
 
 @c
 int wrap_up(void) {
-  if (show_progress) new_line();
+  if (show_progress || show_happiness || history != spotless) new_line();
   if (show_stats)
     print_stats(); /* print statistics about memory usage */
   @<Print the job |history|@>@;
@@ -1093,7 +1093,7 @@
 fatal(
   const char *s,const char *t)
 {
-  if (*s) err_print(s);
+  if (*s) printf("%s",s);
   err_print(t);
   history=fatal_message; exit(wrap_up());
 }
@@ -1203,8 +1203,10 @@
   }
   sprintf(alt_web_file_name,"%s.web",*argv);
   sprintf(tex_file_name,"%s.tex",name_pos); /* strip off directory name */
-  sprintf(idx_file_name,"%s.idx",name_pos);
-  sprintf(scn_file_name,"%s.scn",name_pos);
+  if (make_xrefs) { /* indexes will be generated */
+    sprintf(idx_file_name,"%s.idx",name_pos);
+    sprintf(scn_file_name,"%s.scn",name_pos);
+  }
   sprintf(C_file_name,"%s.c",name_pos);
   found_web=true;
 }

Modified: trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/ctang-w2c.ch	2023-09-20 10:24:51 UTC (rev 68327)
@@ -80,9 +80,9 @@
 @z
 
 @x
-    fputs("\n! Not present: <",stdout);
+    printf("%s","\n! Not present: <");
 @y
-    fputs(_("\n! Not present: <"),stdout);
+    printf("%s",_("\n! Not present: <"));
 @z
 
 @x
@@ -92,9 +92,9 @@
 @z
 
 @x
-    fputs("\n! No program text was specified.",stdout); mark_harmless();
+    printf("%s","\n! No program text was specified."); mark_harmless();
 @y
-    fputs(_("\n! No program text was specified."),stdout); mark_harmless();
+    printf("%s",_("\n! No program text was specified.")); mark_harmless();
 @z
 
 @x
@@ -106,9 +106,9 @@
 @z
 
 @x
-      fputs("Done.",stdout);
+      printf("%s","Done.");
 @y
-      fputs(_("Done."),stdout);
+      printf("%s",_("Done."));
 @z
 
 @x
@@ -242,9 +242,9 @@
 @z
 
 @x
-    fputs("\n! String too long: ",stdout);
+    printf("%s","\n! String too long: ");
 @y
-    fputs(_("\n! String too long: "),stdout);
+    printf("%s",_("\n! String too long: "));
 @z
 
 @x
@@ -278,9 +278,9 @@
 @z
 
 @x
-  fputs("\n! Section name too long: ",stdout);
+  printf("%s","\n! Section name too long: ");
 @y
-  fputs(_("\n! Section name too long: "),stdout);
+  printf("%s",_("\n! Section name too long: "));
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.c	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.c	2023-09-20 10:24:51 UTC (rev 68327)
@@ -620,7 +620,7 @@
 a-= 024000;
 if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir);
 else if(a!=0){
-fputs("\n! Not present: <",stdout);
+printf("%s","\n! Not present: <");
 print_section_name(a+name_dir);err_print(">");
 
 }
@@ -680,7 +680,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();
+printf("%s","\n! No program text was specified.");mark_harmless();
 
 }
 else{
@@ -720,7 +720,7 @@
 
 if(show_happiness){
 if(show_progress)new_line();
-fputs("Done.",stdout);
+printf("%s","Done.");
 }
 }
 }
@@ -1034,7 +1034,7 @@
 if(++id_loc<=section_text_end)*id_loc= (char)c;
 }
 if(id_loc>=section_text_end){
-fputs("\n! String too long: ",stdout);
+printf("%s","\n! String too long: ");
 
 term_write(section_text+1,25);
 err_print("...");
@@ -1119,7 +1119,7 @@
 *k= (char)c;
 }
 if(k>=section_text_end){
-fputs("\n! Section name too long: ",stdout);
+printf("%s","\n! Section name too long: ");
 
 term_write(section_text+1,25);
 printf("...");mark_harmless();

Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.w	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.w	2023-09-20 10:24:51 UTC (rev 68327)
@@ -401,7 +401,7 @@
   a-=024000;
   if ((a+name_dir)->equiv!=(void *)text_info) push_level(a+name_dir);
   else if (a!=0) {
-    fputs("\n! Not present: <",stdout);
+    printf("%s","\n! Not present: <");
     print_section_name(a+name_dir); err_print(">");
 @.Not present: <section name>@>
   }
@@ -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();
+    printf("%s","\n! No program text was specified."); mark_harmless();
 @.No program text...@>
   }
   else {
@@ -533,7 +533,7 @@
     @<Write all the named output files@>@;
     if (show_happiness) {
       if (show_progress) new_line();
-      fputs("Done.",stdout);
+      printf("%s","Done.");
     }
   }
 }
@@ -1018,7 +1018,7 @@
     if (++id_loc<=section_text_end) *id_loc=(char)c;
   }
   if (id_loc>=section_text_end) {
-    fputs("\n! String too long: ",stdout);
+    printf("%s","\n! String too long: ");
 @.String too long@>
     term_write(section_text+1,25);
     err_print("...");
@@ -1113,7 +1113,7 @@
 *k=(char)c;
 }
 if (k>=section_text_end) {
-  fputs("\n! Section name too long: ",stdout);
+  printf("%s","\n! Section name too long: ");
 @.Section name too long@>
   term_write(section_text+1,25);
   printf("..."); mark_harmless();

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-proofsort
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-proofsort	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-proofsort	2023-09-20 10:24:51 UTC (rev 68327)
@@ -16,11 +16,10 @@
   $progname = basename $0;
   # Unicode::Collate has been around a long time,
   # but it's not part of core Perl.
-  my $rc = eval {
+  eval {
     require Unicode::Collate;
     $collator = Unicode::Collate->new();
   };
-  die "$progname: the Unicode::Collate module is required\n" unless $rc;
 }
 
 # We expect a TeX file as the single command-line parameter.

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-09-20 10:24:51 UTC (rev 68327)
@@ -305,9 +305,9 @@
 @z
 
 @x
-    fputs("\n! String too long: ",stdout);
+    printf("%s","\n! String too long: ");
 @y
-    fputs(_("\n! String too long: "),stdout);
+    printf("%s",_("\n! String too long: "));
 @z
 
 @x
@@ -338,9 +338,9 @@
 @z
 
 @x
-  fputs("\n! Section name too long: ",stdout);
+  printf("%s","\n! Section name too long: ");
 @y
-  fputs(_("\n! Section name too long: "),stdout);
+  printf("%s",_("\n! Section name too long: "));
 @z
 
 @x
@@ -445,18 +445,18 @@
 @z
 
 @x
-      fputs("\n! Never defined: <",stdout);
+      printf("%s","\n! Never defined: <");
       print_section_name(p); putchar('>'); mark_harmless();
 @y
-      fputs(_("\n! Never defined: <"),stdout);
+      printf("%s",_("\n! Never defined: <"));
       print_section_name(p); putchar('>'); mark_harmless();
 @z
 
 @x
-      fputs("\n! Never used: <",stdout);
+      printf("%s","\n! Never used: <");
       print_section_name(p); putchar('>'); mark_harmless();
 @y
-      fputs(_("\n! Never used: <"),stdout);
+      printf("%s",_("\n! Never used: <"));
       print_section_name(p); putchar('>'); mark_harmless();
 @z
 
@@ -912,15 +912,15 @@
 @z
 
 @x
-  fputs("\n! Illegal control code in section name: <",stdout);
+  printf("%s","\n! Illegal control code in section name: <");
 @y
-  fputs(_("\n! Illegal control code in section name: <"),stdout);
+  printf("%s",_("\n! Illegal control code in section name: <"));
 @z
 
 @x
-    fputs("\n! C text in section name didn't end: <",stdout);
+    printf("%s","\n! C text in section name didn't end: <");
 @y
-    fputs(_("\n! C text in section name didn't end: <"),stdout);
+    printf("%s",_("\n! C text in section name didn't end: <"));
 @z
 
 @x
@@ -936,9 +936,9 @@
 @z
 
 @x
-if (show_progress) fputs("\nWriting the output file...",stdout);
+if (show_progress) printf("%s","\nWriting the output file...");
 @y
-if (show_progress) fputs(_("\nWriting the output file..."),stdout);
+if (show_progress) printf("%s",_("\nWriting the output file..."));
 @z
 
 @x
@@ -1112,9 +1112,9 @@
 @z
 
 @x
-  if (show_progress) fputs("\nWriting the index...",stdout);
+  if (show_progress) printf("%s","\nWriting the index...");
 @y
-  if (show_progress) fputs(_("\nWriting the index..."),stdout);
+  if (show_progress) printf("%s",_("\nWriting the index..."));
 @z
 
 @x
@@ -1146,9 +1146,9 @@
 @z
 
 @x
-  fputs("Done.",stdout);
+  printf("%s","Done.");
 @y
-  fputs(_("Done."),stdout);
+  printf("%s",_("Done."));
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch	2023-09-20 10:24:51 UTC (rev 68327)
@@ -96,9 +96,9 @@
 @z
 
 @x
-    fputs("\n! String too long: ",stdout);
+    printf("%s","\n! String too long: ");
 @y
-    fputs(_("\n! String too long: "),stdout);
+    printf("%s",_("\n! String too long: "));
 @z
 
 @x
@@ -114,9 +114,9 @@
 @z
 
 @x
-  fputs("\n! Section name too long: ",stdout);
+  printf("%s","\n! Section name too long: ");
 @y
-  fputs(_("\n! Section name too long: "),stdout);
+  printf("%s",_("\n! Section name too long: "));
 @z
 
 @x
@@ -174,18 +174,18 @@
 @z
 
 @x
-      fputs("\n! Never defined: <",stdout);
+      printf("%s","\n! Never defined: <");
       print_section_name(p); putchar('>'); mark_harmless();
 @y
-      fputs(_("\n! Never defined: <"),stdout);
+      printf("%s",_("\n! Never defined: <"));
       print_section_name(p); putchar('>'); mark_harmless();
 @z
 
 @x
-      fputs("\n! Never used: <",stdout);
+      printf("%s","\n! Never used: <");
       print_section_name(p); putchar('>'); mark_harmless();
 @y
-      fputs(_("\n! Never used: <"),stdout);
+      printf("%s",_("\n! Never used: <"));
       print_section_name(p); putchar('>'); mark_harmless();
 @z
 
@@ -441,15 +441,15 @@
 @z
 
 @x
-  fputs("\n! Illegal control code in section name: <",stdout);
+  printf("%s","\n! Illegal control code in section name: <");
 @y
-  fputs(_("\n! Illegal control code in section name: <"),stdout);
+  printf("%s",_("\n! Illegal control code in section name: <"));
 @z
 
 @x
-    fputs("\n! C text in section name didn't end: <",stdout);
+    printf("%s","\n! C text in section name didn't end: <");
 @y
-    fputs(_("\n! C text in section name didn't end: <"),stdout);
+    printf("%s",_("\n! C text in section name didn't end: <"));
 @z
 
 @x
@@ -465,9 +465,9 @@
 @z
 
 @x
-if (show_progress) fputs("\nWriting the output file...",stdout);
+if (show_progress) printf("%s","\nWriting the output file...");
 @y
-if (show_progress) fputs(_("\nWriting the output file..."),stdout);
+if (show_progress) printf("%s",_("\nWriting the output file..."));
 @z
 
 @x
@@ -515,9 +515,9 @@
 @z
 
 @x
-  if (show_progress) fputs("\nWriting the index...",stdout);
+  if (show_progress) printf("%s","\nWriting the index...");
 @y
-  if (show_progress) fputs(_("\nWriting the index..."),stdout);
+  if (show_progress) printf("%s",_("\nWriting the index..."));
 @z
 
 @x
@@ -540,9 +540,9 @@
 @z
 
 @x
-  fputs("Done.",stdout);
+  printf("%s","Done.");
 @y
-  fputs(_("Done."),stdout);
+  printf("%s",_("Done."));
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-09-20 10:24:51 UTC (rev 68327)
@@ -646,7 +646,7 @@
   }
 }
 
-@*1 Inputting the next token.
+@* Inputting the next token.
 As stated above, \.{CWEAVE}'s most interesting lexical scanning routine is the
 |get_next| function that inputs the next token of \CEE/ input. However,
 |get_next| is not especially complicated.
@@ -911,7 +911,7 @@
     if (++id_loc<=section_text_end) *id_loc=c;
   }
   if (id_loc>=section_text_end) {
-    fputs("\n! String too long: ",stdout);
+    printf("%s","\n! String too long: ");
 @.String too long@>
     term_write(section_text+1,25);
     printf("..."); mark_error();
@@ -981,7 +981,7 @@
 *k=c;
 }
 if (k>=section_text_end) {
-  fputs("\n! Section name too long: ",stdout);
+  printf("%s","\n! Section name too long: ");
 @.Section name too long@>
   term_write(section_text+1,25);
   printf("..."); mark_harmless();
@@ -1302,13 +1302,13 @@
     cur_xref=(xref_pointer)p->xref;
     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);
+      printf("%s","\n! Never defined: <");
       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);
+      printf("%s","\n! Never used: <");
       print_section_name(p); putchar('>'); mark_harmless();
 @.Never used: <section name>@>
     }
@@ -4130,7 +4130,7 @@
 
 @ @<Skip next char...@>=
 if (*k++!='@@') {
-  fputs("\n! Illegal control code in section name: <",stdout);
+  printf("%s","\n! Illegal control code in section name: <");
 @.Illegal control code...@>
   print_section_name(cur_section_name); printf("> "); mark_error();
 }
@@ -4145,7 +4145,7 @@
 j=limit+1; *j='|'; delim=0;
 while (true) {
   if (k>=k_limit) {
-    fputs("\n! C text in section name didn't end: <",stdout);
+    printf("%s","\n! C text in section name didn't end: <");
 @.C text...didn't end@>
     print_section_name(cur_section_name); printf("> "); mark_error(); break;
   }
@@ -4180,7 +4180,7 @@
 static void
 phase_two(void) {
 phase=2; reset_input();
-if (show_progress) fputs("\nWriting the output file...",stdout);
+if (show_progress) printf("%s","\nWriting the output file...");
 @.Writing the output file...@>
 section_count=0; format_visible=true; copy_limbo();
 finish_line(); flush_buffer(out_buf,false,false);
@@ -4249,8 +4249,10 @@
   out_str("\\N");
 @.\\N@>
   {@+ char s[32];@+snprintf(s,32,"{%d}",sec_depth+1);@+out_str(s);@+}
-  if (show_progress)
-  printf("*%d",(int)section_count); update_terminal(); /* print a progress report */
+  if (show_progress) {
+    printf("*%d",(int)section_count);
+    update_terminal(); /* print a progress report */
+  }
 }
 out('{'); out_section(section_count); out('}');
 
@@ -4531,7 +4533,7 @@
   out_str("\\end");
 @.\\end@>
 else {
-  if (show_progress) fputs("\nWriting the index...",stdout);
+  if (show_progress) printf("%s","\nWriting the index...");
 @.Writing the index...@>
   if (change_exists) {
     @<Tell about changed sections@>@;
@@ -4569,7 +4571,7 @@
 fclose(active_file);
 if (show_happiness) {
   if (show_progress) new_line();
-  fputs("Done.",stdout);
+  printf("%s","Done.");
 }
 check_complete(); /* was all of the change file used? */
 }

Modified: trunk/Build/source/texk/web2c/cwebdir/cweb.1
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweb.1	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/cweb.1	2023-09-20 10:24:51 UTC (rev 68327)
@@ -1,4 +1,4 @@
-.TH CWEB 1 2021-Apr-24
+.TH CWEB 1 2023-Aug-20
 .
 .SH NAME
 ctangle, cweave \- translate CWEB to C and/or TeX
@@ -108,7 +108,7 @@
 .SH FILES
 The location of the files mentioned below varies from system to system.
 .TP
-cwebmac.tex
+cwebmac.tex, cwebacromac.tex
 TeX macros used by cweave output.
 .TP
 cwebman.tex

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebmac.tex	2023-09-20 10:24:51 UTC (rev 68327)
@@ -134,161 +134,8 @@
 \newif\iftokprocessed \newif\ifTnum \newif\ifinstr
 {\def\\{\global\let\spacechar= }\\ }
 
-\ifacro % The following are pdf macros
-\def\thewidth{\the\wd0 \space}
-\def\theheight{\the\ht\strutbox\space}
-\def\thedepth{\the\dp\strutbox\space}
-\ifpdftex
-  \ifx\pdfannotlink\undefined\let\pdfannotlink\pdfstartlink\fi% for pdfTeX 0.14
-  \def\pdflink#1#2{\hbox{\pdfannotlink height \theheight depth \thedepth
-    attr{/Border [0 0 0]} goto num #1 \Blue #1\Black\pdfendlink}} % changed 3.69
-\else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
-    \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
-      depth \thedepth << /Type /Annot /Subtype /Link
-      /Border [0 0 0] /A << /S /GoTo /D (#2) >> >>}\box0\relax}\fi
-\def\sanitizecommand#1#2{\addtokens\usersanitizer
-       {\noexpand\dosanitizecommand\noexpand#1{#2}}}
-\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
+\ifacrohint \input cwebacromac \fi % load hypertext macros
 
-\catcode`\[=1 \catcode`\]=2 \catcode`\{=12 \catcode`\}=12
-  \def\lbchar[{]  \def\rbchar[}]
-\catcode`\[=12 \catcode`\]=12 \catcode`\{=1 \catcode`\}=2
-\catcode`\~=12 \def\tildechar{~}  \catcode`\~=13
-\catcode`\|=0 |catcode`|\=12 |def|bschar{\} |catcode`|\=0 \catcode`\|=12
-\def\makeoutlinetoks{\Tnumfalse\afterassignment\makeolproctok\let\nxt= }
-\def\makeolnexttok{\afterassignment\makeolproctok\let\nxt= }
-\def\makeolgobbletok{\afterassignment\makeolnexttok\let\nxt= }
-\def\addF#1{\addtokens\toksF{#1}\tokprocessedtrue}
-% now comes a routine to "sanitize" section names, for pdf outlines
-\def\makeolproctok{\tokprocessedfalse
-  \let\next\makeolnexttok % default
-  \ifx\nxt\outlinedone\let\next\outlinedone
-  \else\ifx{\nxt \else\ifx}\nxt \Tnumfalse \instrfalse % skip braces
-  \else\ifx$\nxt % or a $ sign
-  \else\ifx^\nxt \addF^\else\ifx_\nxt \addF_% sanitize ^ and _
-  \else\ifx\nxt\spacechar \addF\space
-  \else\if\noexpand\nxt\relax % we have a control sequence; is it one we know?
-    \ifx\nxt~\addF\space
-    \else\ifx\nxt\onespace\addF\space
-    \else\the\usersanitizer
-    \iftokprocessed\else\makeolproctokctli
-    \iftokprocessed\else\makeolproctokctlii
-    \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
-    \fi\fi\fi\fi\fi
-   \else  % we don't have a control sequence, it's an ordinary char
-    \ifx/\nxt \addF{\string\/}% quote chars special to PDF with backslash
-    \else\ifx(\nxt \addF{\string\(}\else\ifx)\nxt \addF{\string\)}%
-    \else\ifx[\nxt \addF{\string\[}\else\ifx]\nxt \addF{\string\]}%
-    \else\expandafter\makeolproctokchar\meaning\nxt
-   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \next
-}
-\def\makeolproctokchar#1 #2 #3{\addF{#3}}
-\def\makeolproctokctli{%
-  \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
-  \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
-  \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
-  \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
-  \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
-  \else\ifx\nxt\Cee\addF{C}%
-  \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
-  \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
-      % skip \|
-  \else\ifx\nxt\\\ifinstr\addF{\bschar\bschar}\else\tokprocessedtrue\fi
-  \else\ifx\nxt\&\ifinstr\addF&\else\tokprocessedtrue\fi
-  \else\ifx\nxt\~\ifTnum\addF{0}\else\addF\tildechar\fi % 077->\T{\~77}
-  \else\ifx\nxt\_\ifTnum\addF{E}\else\addF_\fi  % 0.1E5->\T{0.1\_5}
-  \else\ifx\nxt\^\ifTnum\addF{0x}\else\addF^\fi  % 0x77 -> \T{\^77}
-  \else\ifx\nxt\\\\\ifTnum\addF{0b}\else\addF\\\fi  % 0b10111 -> \T{\\10111}
-  \else\ifx\nxt\$\ifTnum\tokprocessedtrue\else\addF$\fi %$% \T{77\$L}
-  \else\ifx\nxt\{\addF\lbchar       \else\ifx\nxt\}\addF\rbchar
-  \else\ifx\nxt\ \addF\space        \else\ifx\nxt\#\addF{\string\#}%
-  \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctlii{%
-  \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
-  \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
-  \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
-  \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
-  \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
-  \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
-  \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
-  \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
-  \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
-  \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
-  \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
-  \else\ifx\nxt\R\addF!%
-  \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
-    \tokprocessedtrue % \T{number}
-  \else\ifx\nxt\AM\addF&\else\ifx\nxt\%\addF{\string\%}%
-  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctliii{%
-  \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
-  \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
-  \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
-  \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
-  \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
-  \else\ifx\nxt\Xcompl\addF{\space compl\space}%
-  \else\ifx\nxt\Xnot\addF{\space not\space}%
-  \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
-  \else\ifx\nxt\Xor\addF{\space or\space}%
-  \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
-  \else\ifx\nxt\Xxor\addF{\space xor\space}%
-  \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi
-}
-\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
-  \outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
-
-\ifhint
-% The following uses HINT primitives to implement:
-% \HINThome to mark the position of the home page
-% \HINTlabel to attach a label to the top of a section
-% \HINTlink to link a section number to the section label
-% \HINTcontents to produce an 'outline' item
-% These are the top level HINT macros that are used in this file
-% No HINT primitives are used directly.
-\def\HINThome{\HINTdest name {HINT.home}%
-  \HINToutline goto name {HINT.home} depth 1 {Table of Contents}}
-\def\HINTlabel{{\let\*=\empty\HINTdest num \secstar top}}
-\def\HINTlink#1#2{\HINTstartlink goto num #1 {#1}\HINTendlink}% #2 not used ???
-\def\HINTcontents#1#2#3{\HINToutline goto num #3 depth #2 {#1}}
-\let\pdflink=\HINTlink
-\fi % End of HINT macros
-
-% Common macros for \ifacro and \ifhint
-\ifacrohint
-\def\pdfnote#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA}
-\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}%
-    \def\makenote{\addtokens\toksB{\the\toksC}\def\makenote{\toksD={}
-      \toksC={}\let\space\empty}\makenote}\maketoks}}
-\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}%
-  \ifcat\noexpand\first0\countB=`#1\else\countB=0\fi\toksA={#2}}
-\def\maketoks{\expandafter\poptoks\the\toksA|ENDTOKS|%
-  \ifnum\countB>`9 \countB=0 \fi
-  \ifnum\countB<`0
-    \ifnum0=\countC\else\makenote\fi
-    \ifx\first.\let\next=\maketoksdone\else
-        \let\next=\maketoks
-        \addtokens\toksB{\the\toksD}
-        \ifx\first,\addtokens\toksB{\space}\fi
-    \fi
-  \else \addtokens\toksC{\the\toksD}\global\countC=1\let\next=\maketoks
-  \fi
-  \next
-}
-\def\makenote{\addtokens\toksB
-    {\noexpand\pdflink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0}
-\def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\fi % End of common macros
-
 \def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
     attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A
       << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch	2023-09-20 10:24:51 UTC (rev 68327)
@@ -241,10 +241,10 @@
 @z
 
 @x
-Appendix B is the file that sets \TEX/ up to accept
+Appendix B displays the files that set \TEX/ up to accept
 the output of \.{CWEAVE}, and Appendix~C discusses how to use some of those
 @y
-\Appendix B is the file that sets \TEX/ up to accept
+\Appendix B displays the files that set \TEX/ up to accept
 the output of \.{CWEAVE}, and \Appendix C discusses how to use some of those
 @z
 
@@ -327,10 +327,16 @@
 
 @x
 if you have a duplex printer. Appendices D, E, and F of the complete
+version of this manual are printed using a commented-out option that
+substitutes `$\gets$' for `$=$' in the program listings. Looking at those
 @y
 if you have a duplex printer. Appendices \pdfURL{D}{common.pdf},
 \pdfURL{E}{ctangle.pdf}, and \pdfURL{F}{cweave.pdf}\cwebfootnote{And
 \pdfURL{Appendix~G}{ctwill.pdf}.} of the complete
+version of this manual are printed using a commented-out option that
+substitutes `$\gets$' for `$=$' in the program listings.\cwebfootnote{They
+also make use of the alternative format for \CEE/ comments.}
+Looking at those
 @z
 
 @x

Modified: trunk/Build/source/texk/web2c/cwebdir/cwebman.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cwebman.tex	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/cwebman.tex	2023-09-20 10:24:51 UTC (rev 68327)
@@ -1187,7 +1187,7 @@
 examines the listings in this appendix carefully will get a good
 feeling for the basic ideas of \.{CWEB}.
 
-Appendix B is the file that sets \TEX/ up to accept
+Appendix B displays the files that set \TEX/ up to accept
 the output of \.{CWEAVE}, and Appendix~C discusses how to use some of those
 macros to vary the output formats.
 
@@ -1524,20 +1524,28 @@
 
 \vskip6pt
 \begingroup \def\tt{\eighttt} \baselineskip9pt
-\def\printmacs{\begingroup
+\def\printmacs#1{\begingroup
   \def\do##1{\catcode`##1=12 } \dospecials
   \parskip 0pt \parindent 0pt
   \catcode`\ =13 \catcode`\^^M=13
-  \tt \verbatimdefs \input cwebmac \endgroup}
-\printmacs
+  \tt \verbatimdefs \input cweb#1mac \endgroup}
+\printmacs{\empty}
+
+\vskip6pt \baselineskip12pt
+\noindent And here comes the file that extends \.{cwebmac.tex} in order to
+support the ``hypertext'' features needed by the enhanced \TEX/ engines when
+processing the output of \.{CWEAVE}.
+
+\vskip6pt \baselineskip9pt
+\printmacs{acro}
 \endgroup
 \vfill\eject
 
 \def\runninghead{APPENDIX C --- NOTES ON FORMATTING}
 \section Appendix C: How to use \.{CWEB} macros.
-The macros in \.{cwebmac} make it possible to produce a variety of formats
-without editing the output of \.{CWEAVE}, and the purpose of this appendix
-is to explain some of the possibilities.
+The macros in \.{cwebmac} and \.{cwebacromac} make it possible to produce a
+variety of formats without editing the output of \.{CWEAVE}, and the purpose
+of this appendix is to explain some of the possibilities.
 
 \def\point#1.{\yskip\indent#1.\quad\ignorespaces}
 
@@ -1615,8 +1623,8 @@
 \point 9. Data for the table of contents is written to a file that
 is read after the indexes have been \TEX/ed; there's one line of data
 for every starred section. The file \.{common.toc} might look like this:
-$$\lpile{\.{\\ZZ \{Introduction\}\{0\}\{1\}\{29\}\{\}}\cr
-  \.{\\ZZ \{The character set\}\{1\}\{21\}\{35\}\{\}}\cr}$$
+$$\lpile{\.{\\ZZ \{Introduction\}\{1\}\{1\}\{30\}\{\}}\cr
+  \.{\\ZZ \{The character set\}\{1\}\{21\}\{36\}\{\}}\cr}$$
 and so on. The \.{\\topofcontents} macro could
 redefine \.{\\ZZ} so that the information appears in any desired format.
 (See also point~19 below.)
@@ -1752,7 +1760,7 @@
 can be opened up to list every section name; Acrobat users can therefore
 navigate easily to any desired section.
 
-The macros of \.{cwebmac.tex} are careful to ``sanitize'' all the names
+The macros of \.{cwebacromac.tex} are careful to ``sanitize'' all the names
 that appear as bookmarks, by removing special characters and
 formatting codes that are inappropriate for the limited typographic
 capabilities of {\mc PDF} outlines. For example, one section of \.{CWEAVE}

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctproofmac.tex	2023-09-20 10:24:51 UTC (rev 68327)
@@ -1,10 +1,10 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.9 --- June 2023
+% Version 4.10 --- August 2023
 % modified for proofs in CTWILL
 % modified for PDF output with 'tex "\let\pdf+', 'pdftex', 'xetex', and 'hitex'
 % This file is not copyrighted and can be used freely.
 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CTWILL4.9+PROOFS+PDF}
+\xdef\fmtversion{\fmtversion+CTWILL4.10+PROOFS+PDF}
 \input iftex.sty % TeX engine tests
 \ifx\pdf+\pdftrue\fi % for plain TeX in combination with dvipdfm
 % Uncomment the following line if you want PDF goodies to be the default
@@ -13,7 +13,7 @@
 \ifxetex\pdftrue\fi % XeTeX produces PDF output
 \ifpdftex % pdfTeX produces PDF output if \pdfoutput>0
   \def\Black{\pdfliteral{0 g 0 G}}  % use rgb colors for direct PDF output too
-  \def\PDFlinkcolor{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
+  \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
 \fi
 \let\ifacro=\ifpdf
 \newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
@@ -135,161 +135,8 @@
 \newif\iftokprocessed \newif\ifTnum \newif\ifinstr
 {\def\\{\global\let\spacechar= }\\ }
 
-\ifacro % The following are pdf macros
-\def\thewidth{\the\wd0 \space}
-\def\theheight{\the\ht\strutbox\space}
-\def\thedepth{\the\dp\strutbox\space}
-\ifpdftex
-  \ifx\pdfannotlink\undefined\let\pdfannotlink\pdfstartlink\fi% for pdfTeX 0.14
-  \def\pdflink#1#2{\hbox{\pdfannotlink height \theheight depth \thedepth
-    attr{/Border [0 0 0]} goto num #1 \PDFlinkcolor #1\Black\pdfendlink}}
-\else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
-    \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
-      depth \thedepth << /Type /Annot /Subtype /Link
-      /Border [0 0 0] /A << /S /GoTo /D (#2) >> >>}\box0\relax}\fi
-\def\sanitizecommand#1#2{\addtokens\usersanitizer
-       {\noexpand\dosanitizecommand\noexpand#1{#2}}}
-\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
+\ifacrohint \input cwebacromac \fi % load hypertext macros
 
-\catcode`\[=1 \catcode`\]=2 \catcode`\{=12 \catcode`\}=12
-  \def\lbchar[{]  \def\rbchar[}]
-\catcode`\[=12 \catcode`\]=12 \catcode`\{=1 \catcode`\}=2
-\catcode`\~=12 \def\tildechar{~}  \catcode`\~=13
-\catcode`\|=0 |catcode`|\=12 |def|bschar{\} |catcode`|\=0 \catcode`\|=12
-\def\makeoutlinetoks{\Tnumfalse\afterassignment\makeolproctok\let\nxt= }
-\def\makeolnexttok{\afterassignment\makeolproctok\let\nxt= }
-\def\makeolgobbletok{\afterassignment\makeolnexttok\let\nxt= }
-\def\addF#1{\addtokens\toksF{#1}\tokprocessedtrue}
-% now comes a routine to "sanitize" section names, for pdf outlines
-\def\makeolproctok{\tokprocessedfalse
-  \let\next\makeolnexttok % default
-  \ifx\nxt\outlinedone\let\next\outlinedone
-  \else\ifx{\nxt \else\ifx}\nxt \Tnumfalse \instrfalse % skip braces
-  \else\ifx$\nxt % or a $ sign
-  \else\ifx^\nxt \addF^\else\ifx_\nxt \addF_% sanitize ^ and _
-  \else\ifx\nxt\spacechar \addF\space
-  \else\if\noexpand\nxt\relax % we have a control sequence; is it one we know?
-    \ifx\nxt~\addF\space
-    \else\ifx\nxt\onespace\addF\space
-    \else\the\usersanitizer
-    \iftokprocessed\else\makeolproctokctli
-    \iftokprocessed\else\makeolproctokctlii
-    \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
-    \fi\fi\fi\fi\fi
-   \else  % we don't have a control sequence, it's an ordinary char
-    \ifx/\nxt \addF{\string\/}% quote chars special to PDF with backslash
-    \else\ifx(\nxt \addF{\string\(}\else\ifx)\nxt \addF{\string\)}%
-    \else\ifx[\nxt \addF{\string\[}\else\ifx]\nxt \addF{\string\]}%
-    \else\expandafter\makeolproctokchar\meaning\nxt
-   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \next
-}
-\def\makeolproctokchar#1 #2 #3{\addF{#3}}
-\def\makeolproctokctli{%
-  \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
-  \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
-  \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
-  \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
-  \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
-  \else\ifx\nxt\Cee\addF{C}%
-  \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
-  \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
-      % skip \|
-  \else\ifx\nxt\\\ifinstr\addF{\bschar\bschar}\else\tokprocessedtrue\fi
-  \else\ifx\nxt\&\ifinstr\addF&\else\tokprocessedtrue\fi
-  \else\ifx\nxt\~\ifTnum\addF{0}\else\addF\tildechar\fi % 077->\T{\~77}
-  \else\ifx\nxt\_\ifTnum\addF{E}\else\addF_\fi  % 0.1E5->\T{0.1\_5}
-  \else\ifx\nxt\^\ifTnum\addF{0x}\else\addF^\fi  % 0x77 -> \T{\^77}
-  \else\ifx\nxt\\\\\ifTnum\addF{0b}\else\addF\\\fi  % 0b10111 -> \T{\\10111}
-  \else\ifx\nxt\$\ifTnum\tokprocessedtrue\else\addF$\fi %$% \T{77\$L}
-  \else\ifx\nxt\{\addF\lbchar       \else\ifx\nxt\}\addF\rbchar
-  \else\ifx\nxt\ \addF\space        \else\ifx\nxt\#\addF{\string\#}%
-  \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctlii{%
-  \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
-  \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
-  \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
-  \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
-  \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
-  \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
-  \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
-  \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
-  \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
-  \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
-  \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
-  \else\ifx\nxt\R\addF!%
-  \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
-    \tokprocessedtrue % \T{number}
-  \else\ifx\nxt\AM\addF&\else\ifx\nxt\%\addF{\string\%}%
-  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctliii{%
-  \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
-  \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
-  \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
-  \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
-  \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
-  \else\ifx\nxt\Xcompl\addF{\space compl\space}%
-  \else\ifx\nxt\Xnot\addF{\space not\space}%
-  \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
-  \else\ifx\nxt\Xor\addF{\space or\space}%
-  \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
-  \else\ifx\nxt\Xxor\addF{\space xor\space}%
-  \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi
-}
-\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
-  \outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
-
-\ifhint
-% The following uses HINT primitives to implement:
-% \HINThome to mark the position of the home page
-% \HINTlabel to attach a label to the top of a section
-% \HINTlink to link a section number to the section label
-% \HINTcontents to produce an 'outline' item
-% These are the top level HINT macros that are used in this file
-% No HINT primitives are used directly.
-\def\HINThome{\HINTdest name {HINT.home}%
-  \HINToutline goto name {HINT.home} depth 1 {Table of Contents}}
-\def\HINTlabel{{\let\*=\empty\HINTdest num \secstar top}}
-\def\HINTlink#1#2{\HINTstartlink goto num #1 {#1}\HINTendlink}% #2 not used ???
-\def\HINTcontents#1#2#3{\HINToutline goto num #3 depth #2 {#1}}
-\let\pdflink=\HINTlink
-\fi % End of HINT macros
-
-% Common macros for \ifpdf and \ifhint
-\ifacrohint
-\def\pdfnote#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA}
-\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}%
-    \def\makenote{\addtokens\toksB{\the\toksC}\def\makenote{\toksD={}
-      \toksC={}\let\space\empty}\makenote}\maketoks}}
-\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}%
-  \ifcat\noexpand\first0\countB=`#1\else\countB=0\fi\toksA={#2}}
-\def\maketoks{\expandafter\poptoks\the\toksA|ENDTOKS|%
-  \ifnum\countB>`9 \countB=0 \fi
-  \ifnum\countB<`0
-    \ifnum0=\countC\else\makenote\fi
-    \ifx\first.\let\next=\maketoksdone\else
-        \let\next=\maketoks
-        \addtokens\toksB{\the\toksD}
-        \ifx\first,\addtokens\toksB{\space}\fi
-    \fi
-  \else \addtokens\toksC{\the\toksD}\global\countC=1\let\next=\maketoks
-  \fi
-  \next
-}
-\def\makenote{\addtokens\toksB
-    {\noexpand\pdflink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0}
-\def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\fi % End of common macros
-
 \def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
     attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A
       << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69

Modified: trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2023-09-19 23:43:42 UTC (rev 68326)
+++ trunk/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex	2023-09-20 10:24:51 UTC (rev 68327)
@@ -1,11 +1,11 @@
 % standard macros for CWEB listings (in addition to plain.tex)
-% Version 4.9 --- June 2023
+% Version 4.10 --- August 2023
 % modified for pages produced by CTWILL
 % further modified for page size of the MMIXware book
 % modified for PDF output with 'tex "\let\pdf+', 'pdftex', and 'xetex'
 % This file is not copyrighted and can be used freely.
 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros
-\xdef\fmtversion{\fmtversion+CTWILL4.9+LNCS+PDF}
+\xdef\fmtversion{\fmtversion+CTWILL4.10+LNCS+PDF}
 \input iftex.sty % TeX engine tests
 \ifx\pdf+\pdftrue\fi % for plain TeX in combination with dvipdfm
 % Uncomment the following line if you want PDF goodies to be the default
@@ -14,7 +14,7 @@
 \ifxetex\pdftrue\fi % XeTeX produces PDF output
 \ifpdftex % pdfTeX produces PDF output if \pdfoutput>0
   \def\Black{\pdfliteral{0 g 0 G}}  % use rgb colors for direct PDF output too
-  \def\PDFlinkcolor{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
+  \def\Blue{\pdfliteral{\pdflinkcolor\space rg \pdflinkcolor\space RG}}
 \fi
 \let\ifacro=\ifpdf
 \ifhint\message{These macros are not suitable for HiTeX.}
@@ -21,6 +21,7 @@
   \message{Please use 'ctwill +P [+lpdf]' instead.}
   \end
 \fi
+\newif\ifacrohint \ifacro\acrohinttrue\fi \ifhint\acrohinttrue\fi
 
 \let\:=\. % preserve a way to get the dot accent
  % (all other accents will still work as usual)
@@ -250,151 +251,8 @@
 \newif\iftokprocessed \newif\ifTnum \newif\ifinstr
 {\def\\{\global\let\spacechar= }\\ }
 
-\ifacro % The following are pdf macros
-\def\thewidth{\the\wd0 \space}
-\def\theheight{\the\ht\strutbox\space}
-\def\thedepth{\the\dp\strutbox\space}
-\ifpdftex
-  \ifx\pdfannotlink\undefined\let\pdfannotlink\pdfstartlink\fi% for pdfTeX 0.14
-  \def\pdflink#1#2{\hbox{\pdfannotlink height \theheight depth \thedepth
-    attr{/Border [0 0 0]} goto num #1 \PDFlinkcolor #1\Black\pdfendlink}}
-\else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
-    \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
-      depth \thedepth << /Type /Annot /Subtype /Link
-      /Border [0 0 0] /A << /S /GoTo /D (#2) >> >>}\box0\relax}\fi
-\def\pdfnote#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}\maketoks}\the\toksA}
-\def\firstsecno#1.{\setbox0=\hbox{\toksA={#1.}\toksB={}%
-    \def\makenote{\addtokens\toksB{\the\toksC}\def\makenote{\toksD={}
-      \toksC={}\let\space\empty}\makenote}\maketoks}}
-\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
-\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}%
-  \ifcat\noexpand\first0\countB=`#1\else\countB=0\fi\toksA={#2}}
-\def\maketoks{\expandafter\poptoks\the\toksA|ENDTOKS|%
-  \ifnum\countB>`9 \countB=0 \fi
-  \ifnum\countB<`0
-    \ifnum0=\countC\else\makenote\fi
-    \ifx\first.\let\next=\maketoksdone\else
-        \let\next=\maketoks
-        \addtokens\toksB{\the\toksD}
-        \ifx\first,\addtokens\toksB{\space}\fi
-    \fi
-  \else \addtokens\toksC{\the\toksD}\global\countC=1\let\next=\maketoks
-  \fi
-  \next
-}
-\def\makenote{\addtokens\toksB
-    {\noexpand\pdflink{\the\toksC}{\romannumeral\the\toksC}}\toksC={}\global\countC=0}
-\def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
-\def\pdfURL#1#2{\ifpdf \ifpdftex\pdfannotlink height \theheight depth \thedepth
-    attr {/Border [0 0 0]} user { /Type /Annot /Subtype /Link /A
-      << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69
-  \else {\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}%
-    \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight
-      depth \thedepth << /Border [0 0 0] /Type /Annot /Subtype /Link /A
-      << /S /URI /URI (#2) >> >>}\box0\relax}\fi
-  \else #1 ({\tt#2})\fi}
-{\catcode`\~=12 \gdef\TILDE/{~}} % ~ in a URL
-{\catcode`\_=12 \gdef\UNDER/{_}} % _ in a URL
-\def\sanitizecommand#1#2{\addtokens\usersanitizer
-       {\noexpand\dosanitizecommand\noexpand#1{#2}}}
-\def\dosanitizecommand#1#2{\ifx\nxt#1\addF{#2}\fi}
+\ifacrohint \input cwebacromac \fi % load hypertext macros
 
-\catcode`\[=1 \catcode`\]=2 \catcode`\{=12 \catcode`\}=12
-  \def\lbchar[{]  \def\rbchar[}]
-\catcode`\[=12 \catcode`\]=12 \catcode`\{=1 \catcode`\}=2
-\catcode`\~=12 \def\tildechar{~}  \catcode`\~=13
-\catcode`\|=0 |catcode`|\=12 |def|bschar{\} |catcode`|\=0 \catcode`\|=12
-\def\makeoutlinetoks{\Tnumfalse\afterassignment\makeolproctok\let\nxt= }
-\def\makeolnexttok{\afterassignment\makeolproctok\let\nxt= }
-\def\makeolgobbletok{\afterassignment\makeolnexttok\let\nxt= }
-\def\addF#1{\addtokens\toksF{#1}\tokprocessedtrue}
-% now comes a routine to "sanitize" section names, for pdf outlines
-\def\makeolproctok{\tokprocessedfalse
-  \let\next\makeolnexttok % default
-  \ifx\nxt\outlinedone\let\next\outlinedone
-  \else\ifx{\nxt \else\ifx}\nxt \Tnumfalse \instrfalse % skip braces
-  \else\ifx$\nxt % or a $ sign
-  \else\ifx^\nxt \addF^\else\ifx_\nxt \addF_% sanitize ^ and _
-  \else\ifx\nxt\spacechar \addF\space
-  \else\if\noexpand\nxt\relax % we have a control sequence; is it one we know?
-    \ifx\nxt~\addF\space
-    \else\ifx\nxt\onespace\addF\space
-    \else\the\usersanitizer
-    \iftokprocessed\else\makeolproctokctli
-    \iftokprocessed\else\makeolproctokctlii
-    \iftokprocessed\else\makeolproctokctliii % if not recognised, skip it
-    \fi\fi\fi\fi\fi
-   \else  % we don't have a control sequence, it's an ordinary char
-    \ifx/\nxt \addF{\string\/}% quote chars special to PDF with backslash
-    \else\ifx(\nxt \addF{\string\(}\else\ifx)\nxt \addF{\string\)}%
-    \else\ifx[\nxt \addF{\string\[}\else\ifx]\nxt \addF{\string\]}%
-    \else\expandafter\makeolproctokchar\meaning\nxt
-   \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \next
-}
-\def\makeolproctokchar#1 #2 #3{\addF{#3}}
-\def\makeolproctokctli{%
-  \ifx\nxt\CEE\addF{C}\let\next\makeolgobbletok % \CEE/
-  \else\ifx\nxt\UNIX\addF{UNIX}\let\next\makeolgobbletok % \UNIX/
-  \else\ifx\nxt\TEX\addF{TeX}\let\next\makeolgobbletok % \TEX/
-  \else\ifx\nxt\TeX\addF{TeX}\else\ifx\nxt\LaTeX\addF{LaTeX}%
-  \else\ifx\nxt\CPLUSPLUS\addF{C++}\let\next\makeolgobbletok % \CPLUSPLUS/
-  \else\ifx\nxt\Cee\addF{C}%
-  \else\ifx\nxt\PB \let\next\makeolgobbletok \tokprocessedtrue % \PB{...}
-  \else\ifx\nxt\.\tokprocessedtrue\instrtrue % \.{...}
-      % skip \|
-  \else\ifx\nxt\\\ifinstr\addF{\bschar\bschar}\else\tokprocessedtrue\fi
-  \else\ifx\nxt\&\ifinstr\addF&\else\tokprocessedtrue\fi
-  \else\ifx\nxt\~\ifTnum\addF{0}\else\addF\tildechar\fi % 077->\T{\~77}
-  \else\ifx\nxt\_\ifTnum\addF{E}\else\addF_\fi  % 0.1E5->\T{0.1\_5}
-  \else\ifx\nxt\^\ifTnum\addF{0x}\else\addF^\fi  % 0x77 -> \T{\^77}
-  \else\ifx\nxt\\\\\ifTnum\addF{0b}\else\addF\\\fi  % 0b10111 -> \T{\\10111}
-  \else\ifx\nxt\$\ifTnum\tokprocessedtrue\else\addF$\fi %$% \T{77\$L}
-  \else\ifx\nxt\{\addF\lbchar       \else\ifx\nxt\}\addF\rbchar
-  \else\ifx\nxt\ \addF\space        \else\ifx\nxt\#\addF{\string\#}%
-  \else\ifx\nxt\PP\addF{++}\else\ifx\nxt\MM\addF{--}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctlii{%
-  \ifx\nxt\MG\addF{->}\else\ifx\nxt\GG\addF{>>}%
-  \else\ifx\nxt\LL\addF{<<}\else\ifx\nxt\NULL\addF{NULL}%
-  \else\ifx\nxt\AND\addF&\else\ifx\nxt\OR\addF|%
-  \else\ifx\nxt\XOR\addF^\else\ifx\nxt\CM\addF\tildechar
-  \else\ifx\nxt\MOD\addF{\string\%}\else\ifx\nxt\DC\addF{::}%
-  \else\ifx\nxt\PA\addF{.*}\else\ifx\nxt\MGA\addF{->*}%
-  \else\ifx\nxt\this\addF{this}\else\ifx\nxt\?\addF?%
-  \else\ifx\nxt\E\addF{==}\else\ifx\nxt\G\addF{>=}%
-  \else\ifx\nxt\I\addF{!=}\else\ifx\nxt\K\addF{=}%
-  \else\ifx\nxt\l\addF{l}\else\ifx\nxt\L\addF{L}%
-  \else\ifx\nxt\o\addF{o}\else\ifx\nxt\O\addF{O}%
-  \else\ifx\nxt\R\addF!%
-  \else\ifx\nxt\T \Tnumtrue \let\next\makeolgobbletok
-    \tokprocessedtrue % \T{number}
-  \else\ifx\nxt\AM\addF&\else\ifx\nxt\%\addF{\string\%}%
-  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi\fi
-}
-\def\makeolproctokctliii{%
-  \ifx\nxt\V\addF{||}\else\ifx\nxt\W\addF{&&}\else\ifx\nxt\Z\addF{<=}%
-  \else\ifx\nxt\*\addF*\else\ifx\nxt\Xand\addF{\space and\space}%
-  \else\ifx\nxt\Xandxeq\addF{\space and_eq\space}%
-  \else\ifx\nxt\Xbitand\addF{\space bitand\space}%
-  \else\ifx\nxt\Xbitor\addF{\space bitor\space}%
-  \else\ifx\nxt\Xcompl\addF{\space compl\space}%
-  \else\ifx\nxt\Xnot\addF{\space not\space}%
-  \else\ifx\nxt\Xnotxeq\addF{\space not_eq\space}%
-  \else\ifx\nxt\Xor\addF{\space or\space}%
-  \else\ifx\nxt\Xorxeq\addF{\space or_eq\space}%
-  \else\ifx\nxt\Xxor\addF{\space xor\space}%
-  \else\ifx\nxt\Xxorxeq\addF{\space xor_eq\space}%
-  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
-  \fi\fi\fi\fi\fi
-}
-\def\outlinedone{\edef\outlinest{\global\noexpand\toksE={\the\toksF}}%
-  \outlinest\let\outlinedone=\relax}
-\fi % End of pdf macros
-
 \def\lapstar{\rlap{*}}
 \def\stsec{\tenpoint\rightskip=0pt % get out of C mode (cf. \B)
   \sfcode`;=1500 \pretolerance 200 \hyphenpenalty 50 \exhyphenpenalty 50



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