texlive[67857] Build/source/texk/web2c/cwebdir: [CWEB] Compare

commits+ascherer at tug.org commits+ascherer at tug.org
Wed Aug 9 12:43:40 CEST 2023


Revision: 67857
          http://tug.org/svn/texlive?view=revision&revision=67857
Author:   ascherer
Date:     2023-08-09 12:43:40 +0200 (Wed, 09 Aug 2023)
Log Message:
-----------
[CWEB] Compare sections 218 and 263 of CWEAVE.

For CTWILL, these are sections 235 and 280 (plus section 316 in PDF,
resp. section 298 in HINT).

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
    trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
    trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch
    trunk/Build/source/texk/web2c/cwebdir/cweave.w

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch	2023-08-09 09:45:29 UTC (rev 67856)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch	2023-08-09 10:43:40 UTC (rev 67857)
@@ -1952,7 +1952,7 @@
   next_name=sort_ptr->head;
 @y
 @ @<Split the list...@>= {@+
-  int c;
+  int c; @+
   next_name=sort_ptr->head;@/
 @z
 
@@ -1959,8 +1959,10 @@
 Section 279.
 
 @x
+@ @<Output index...@>= {
   cur_name=sort_ptr->head;
 @y
+@ @<Output index...@>= { @+
   cur_name=sort_ptr->head;@/
 @z
 

Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-08-09 09:45:29 UTC (rev 67856)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch	2023-08-09 10:43:40 UTC (rev 67857)
@@ -1205,7 +1205,7 @@
 
 @x
 @ @<Output the name...@>=
-switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
+switch (cur_name->ilk) {@+char *p; /* index into |byte_mem| */@+ at t}\6{\4@>
 @y
 @ We don't format the index completely; the \.{twinx} program does the
 rest of the job.  Compare this code with section |@<Mini-output...@>|.
@@ -1223,7 +1223,8 @@
 @x
     else {@+boolean all_caps=true;@+ at t}\6{@>
 @y
-    else {@+boolean all_caps=true;@+char *j;@+ at t}\6{@>
+    else {@+boolean all_caps=true;@+char *p;
+      /* index into |byte_mem| */ @+ at t}\6{@>
 @z
 
 @x
@@ -1230,8 +1231,8 @@
   case roman: not_an_identifier: out_name(cur_name,false); goto name_done;
   case custom:
     out_str("$\\");
-    for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
-      out(*j=='_'? 'x': *j=='$'? 'X': *j);
+    for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
+      out(*p=='_'? 'x': *p=='$'? 'X': *p);
     out('$');
     goto name_done;
 @y
@@ -1849,12 +1850,14 @@
 @ Compare this code with section |@<Output the name...@>|.
 
 @<Mini-output...@>=
-switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
+switch (cur_name->ilk) {@+char *p; /* index into |byte_mem| */@+ at t}\6{\4@>
   case normal: case func_template:
     if (is_tiny(cur_name)) out_str("\\|");
     else {@+boolean all_caps=true;@+ at t}\6{@>
-      for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
-        if (xislower(*j)) all_caps=false;
+      for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
+        if (xislower(*p)) { /* not entirely uppercase */
+          all_caps=false; break;
+        }
       out_str(all_caps ? "\\." : "\\\\");
     }
   break;
@@ -1868,8 +1871,8 @@
   case roman: break;
   case custom:
     out_str("$\\");
-    for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
-      out(*j=='_'? 'x': *j=='$'? 'X': *j);
+    for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
+      out(*p=='_'? 'x': *p=='$'? 'X': *p);
     out('$');
     goto name_done;
   default: out_str("\\&");

Modified: trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch	2023-08-09 09:45:29 UTC (rev 67856)
+++ trunk/Build/source/texk/web2c/cwebdir/cweav-bs.ch	2023-08-09 10:43:40 UTC (rev 67857)
@@ -216,7 +216,7 @@
 
 
 @x Section 264.
-switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
+switch (cur_name->ilk) {@+char *p; /* index into |byte_mem| */@+ at t}\6{\4@>
 @y
-switch (cur_name->ilk) {@+char huge* j;@+ at t}\6{\4@>
+switch (cur_name->ilk) {@+char huge* p; /* index into |byte_mem| */@+ at t}\6{\4@>
 @z

Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-08-09 09:45:29 UTC (rev 67856)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w	2023-08-09 10:43:40 UTC (rev 67857)
@@ -4772,12 +4772,14 @@
 }
 
 @ @<Output the name...@>=
-switch (cur_name->ilk) {@+char *j;@+ at t}\6{\4@>
+switch (cur_name->ilk) {@+char *p; /* index into |byte_mem| */@+ at t}\6{\4@>
   case normal: case func_template:
     if (is_tiny(cur_name)) out_str("\\|");
     else {@+boolean all_caps=true;@+ at t}\6{@>
-      for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
-        if (xislower(*j)) all_caps=false;
+      for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
+        if (xislower(*p)) { /* not entirely uppercase */
+          all_caps=false; break;
+        }
       out_str(all_caps ? "\\." : "\\\\");
     }
     break;
@@ -4791,8 +4793,8 @@
   case roman: not_an_identifier: out_name(cur_name,false); goto name_done;
   case custom:
     out_str("$\\");
-    for (j=cur_name->byte_start;j<(cur_name+1)->byte_start;j++)
-      out(*j=='_'? 'x': *j=='$'? 'X': *j);
+    for (p=cur_name->byte_start;p<(cur_name+1)->byte_start;p++)
+      out(*p=='_'? 'x': *p=='$'? 'X': *p);
     out('$');
     goto name_done;
   default: out_str("\\&");



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