History

CWEB — Release 3.43, 1998-09-14.

Andreas Scherer committed 15 years ago

Commit d9d98d91 parent 9b7fced21 files · +227 −212Browse files

Unified · Split

21 files
  1. comm-ql.ch +12 −20
  2. common.c +36 −40
  3. common.h +1 −1
  4. common.w +7 −11
  5. ctang-bs.ch +2 −2
  6. ctang-pc.ch +2 −2
  7. ctang-ql.ch +4 −4
  8. ctang-vms.ch +2 −2
  9. ctangle.c +102 −101
  10. ctangle.w +8 −7
  11. cweav-bs.ch +2 −2
  12. cweav-pc.ch +2 −2
  13. cweav-ql.ch +4 −4
  14. cweav-vms.ch +2 −2
  15. cweave.w +6 −5
  16. cwebmac.tex +4 −4
  17. cwebman.tex +1 −1
  18. examples/extex.ch +23 −0
  19. examples/extex.w +2 −1
  20. examples/kspell.el +5 −0
  21. examples/oemacs.el +0 −1
comm-ql.ch+12−20
@@ -10,24 +10,24 @@ ex <dev_>cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c' · 9 unmodified lines
1010 @x
1111 \def\v{\char'174} % vertical (|) in typewriter font
1212
13−\def\title{Common code for CTANGLE and CWEAVE (Version 3.3)}
13+\def\title{Common code for CTANGLE and CWEAVE (Version 3.42)}
1414 \def\topofcontents{\null\vfill
1515 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
1616 {\ttitlefont CWEAVE}}
1717 \vskip 15pt
18− \centerline{(Version 3.3)}
18+ \centerline{(Version 3.42)}
1919 \vfill}
2020 \def\botofcontents{\vfill
2121 \noindent
2222 @y
2323 \def\v{\char'174} % vertical (|) in typewriter font
2424
25−\def\title{Common code for CTANGLE and CWEAVE (QL Version 3.4)}
25+\def\title{Common code for CTANGLE and CWEAVE (QL Version 3.42)}
2626 \def\topofcontents{\null\vfill
2727 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
2828 {\ttitlefont CWEAVE}}
2929 \vskip 15pt
30− \centerline{(Version 3.4)}
30+ \centerline{(Version 3.42)}
3131 \vfill}
3232 \def\botofcontents{\vfill
3333 \noindent
@@ -174,16 +174,12 @@ after the dot. We must check that there is enough room in · 140 unmodified lines
174174 sprintf(C_file_name,"%s.c",*argv);
175175 } else {
176176 strcpy(tex_file_name,*argv);
177+ strcpy(C_file_name,*argv);
177178 if (flags['x']) { /* indexes will be generated */
178− if (program==cweave && strcmp(*argv+strlen(*argv)-4,".tex")!=0)
179− fatal("! Output file name should end with .tex\n",*argv);
180−@.Output file name...tex@>
181− strcpy(idx_file_name,*argv);
182− strcpy(idx_file_name+strlen(*argv)-4,".idx");
183− strcpy(scn_file_name,*argv);
184− strcpy(scn_file_name+strlen(*argv)-4,".scn");
179+ *dot_pos=0;
180+ sprintf(idx_file_name,"%s.idx",*argv);
181+ sprintf(scn_file_name,"%s.scn",*argv);
185182 }
186− strcpy(C_file_name,*argv);
187183 }
188184 found_out=1;
189185 }
@@ -297,16 +293,12 @@ the routine as if it would work. · 107 unmodified lines
297293 sprintf(C_file_name,"%s_c",*argv);
298294 } else {
299295 strcpy(tex_file_name,*argv);
296+ strcpy(C_file_name,*argv);
300297 if (flags['x']) { /* indexes will be generated */
301− if (program==cweave && strcmp(*argv+strlen(*argv)-4,"_tex")!=0)
302− fatal("! Output file name should end with _tex\n",*argv);
303−@.Output file name...tex@>
304− strcpy(idx_file_name,*argv);
305− strcpy(idx_file_name+strlen(*argv)-4,"_idx");
306− strcpy(scn_file_name,*argv);
307− strcpy(scn_file_name+strlen(*argv)-4,"_scn");
298+ *dot_pos=0;
299+ sprintf(idx_file_name,"%s_idx",*argv);
300+ sprintf(scn_file_name,"%s_scn",*argv);
308301 }
309− strcpy(C_file_name,*argv);
310302 }
311303 found_out=1;
312304 }
common.c+36−40
@@ -4,17 +4,17 @@ · 3 unmodified lines
44 /*5:*/
55 #line 101 "common.w"
66
7−#include <ctype.h>
7+#include <ctype.h>
88
99 /*:5*//*8:*/
1010 #line 164 "common.w"
1111
12−#include <stdio.h>
12+#include <stdio.h>
1313
1414 /*:8*//*22:*/
1515 #line 469 "common.w"
1616
17−#include <stdlib.h>
17+#include <stdlib.h>
1818
1919 /*:22*/
2020 #line 58 "common.w"
@@ -229,7 +229,7 @@ char scn_file_name[max_file_name_length]; · 208 unmodified lines
229229 boolean flags[128];
230230
231231 /*:67*//*77:*/
232−#line 1367 "common.w"
232+#line 1363 "common.w"
233233
234234 FILE*C_file;
235235 FILE*tex_file;
@@ -295,7 +295,7 @@ void fatal(),overflow(); · 59 unmodified lines
295295 void scan_args();
296296
297297 /*:69*//*81:*/
298−#line 1408 "common.w"
298+#line 1404 "common.w"
299299
300300 extern int strlen();
301301 extern int strcmp();
@@ -342,7 +342,7 @@ show_banner= show_happiness= show_progress= 1; · 40 unmodified lines
342342 #line 93 "common.w"
343343 ;
344344 /*78:*/
345−#line 1374 "common.w"
345+#line 1370 "common.w"
346346
347347 scan_args();
348348 if(program==ctangle){
@@ -372,7 +372,7 @@ if(feof(fp))return(0); · 23 unmodified lines
372372 limit= k= buffer;
373373 while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
374374 if((*(k++)= c)!=' ')limit= k;
375−if(k>buffer_end)
375+if(k> buffer_end)
376376 if((c= getc(fp))!=EOF&&c!='\n'){
377377 ungetc(c,fp);loc= buffer;err_print("! Input line too long");
378378
@@ -458,7 +458,7 @@ err_print("! Change file ended before @y"); · 79 unmodified lines
458458 change_limit= change_buffer;changing= 0;
459459 return;
460460 }
461−if(limit>buffer+1&&buffer[0]=='@'){
461+if(limit> buffer+1&&buffer[0]=='@'){
462462 if(xisupper(buffer[1]))buffer[1]= tolower(buffer[1]);
463463 /*17:*/
464464 #line 357 "common.w"
@@ -468,7 +468,7 @@ loc= buffer+2;err_print("! Where is the matching @y?"); · 3 unmodified lines
468468
469469 }
470470 else if(buffer[1]=='y'){
471−if(n>0){
471+if(n> 0){
472472 loc= buffer+2;
473473 printf("\n! Hmm... %d ",n);
474474 err_print("of the preceding lines failed to match");
@@ -552,7 +552,7 @@ err_print("! Change file ended without @z"); · 77 unmodified lines
552552
553553 buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;
554554 }
555−if(limit>buffer){
555+if(limit> buffer){
556556 if(change_pending){
557557 if_section_start_make_pending(0);
558558 if(change_pending){
@@ -577,7 +577,7 @@ prime_the_change_buffer();changing= !changing;print_where= 1; · 18 unmodified lines
577577 /*:25*/
578578 #line 430 "common.w"
579579 ;
580−if(!changing||include_depth>change_depth){
580+if(!changing||include_depth> change_depth){
581581 /*24:*/
582582 #line 513 "common.w"
583583 {
@@ -594,7 +594,7 @@ cur_line++; · 10 unmodified lines
594594 if(!changing&&!input_has_ended)
595595 if(limit-buffer==change_limit-change_buffer)
596596 if(buffer[0]==change_buffer[0])
597−if(change_limit>change_buffer)check_change();
597+if(change_limit> change_buffer)check_change();
598598 }
599599
600600 /*:24*/
@@ -626,7 +626,7 @@ char*k= cur_file_name,*kk; · 25 unmodified lines
626626 int l;
627627
628628 while(*loc!=' '&&*loc!='\t'&&*loc!='"'&&k<=cur_file_name_end)*k++= *loc++;
629−if(k>cur_file_name_end)too_long();
629+if(k> cur_file_name_end)too_long();
630630
631631 *k= '\0';
632632 if((cur_file= fopen(cur_file_name,"r"))!=NULL){
@@ -635,18 +635,18 @@ goto restart; · 2 unmodified lines
635635 }
636636 kk= getenv("CWEBINPUTS");
637637 if(kk!=NULL){
638−if((l= strlen(kk))>max_file_name_length-2)too_long();
638+if((l= strlen(kk))> max_file_name_length-2)too_long();
639639 strcpy(temp_file_name,kk);
640640 }
641641 else{
642642 #ifdef CWEBINPUTS
643−if((l= strlen(CWEBINPUTS))>max_file_name_length-2)too_long();
643+if((l= strlen(CWEBINPUTS))> max_file_name_length-2)too_long();
644644 strcpy(temp_file_name,CWEBINPUTS);
645645 #else
646646 l= 0;
647647 #endif
648648 }
649−if(l>0){
649+if(l> 0){
650650 if(k+l+2>=cur_file_name_end)too_long();
651651
652652 for(;k>=cur_file_name;k--)*(k+l+1)= *k;
@@ -722,7 +722,7 @@ p->link= hash[h];hash[h]= p; · 69 unmodified lines
722722 if(p==name_ptr)/*39:*/
723723 #line 699 "common.w"
724724 {
725−if(byte_ptr+l>byte_mem_end)overflow("byte memory");
725+if(byte_ptr+l> byte_mem_end)overflow("byte memory");
726726 if(name_ptr>=name_dir_end)overflow("name");
727727 strncpy(byte_ptr,first,l);
728728 (++name_ptr)->byte_start= byte_ptr+= l;
@@ -822,7 +822,7 @@ int ispref; · 93 unmodified lines
822822 name_pointer p= name_ptr;
823823 char*s= first_chunk(p);
824824 int name_len= last-first+ispref;
825−if(s+name_len>byte_mem_end)overflow("byte memory");
825+if(s+name_len> byte_mem_end)overflow("byte memory");
826826 if(name_ptr+1>=name_dir_end)overflow("name");
827827 (++name_ptr)->byte_start= byte_ptr= s+name_len;
828828 if(ispref){
@@ -857,7 +857,7 @@ while(q->link!=name_dir)q= q->link; · 28 unmodified lines
857857 q->link= name_ptr;
858858 s= name_ptr->byte_start;
859859 name_ptr->link= name_dir;
860−if(s+name_len>byte_mem_end)overflow("byte memory");
860+if(s+name_len> byte_mem_end)overflow("byte memory");
861861 (++name_ptr)->byte_start= byte_ptr= s+name_len;
862862 strncpy(s,first,name_len);
863863 if(ispref)*(byte_ptr-1)= ' ';
@@ -1007,7 +1007,7 @@ printf(". (l. %d of change file)\n",change_line); · 143 unmodified lines
10071007 else if(include_depth==0)printf(". (l. %d)\n",cur_line);
10081008 else printf(". (l. %d of include file %s)\n",cur_line,cur_file_name);
10091009 l= (loc>=limit?limit:loc);
1010−if(l>buffer){
1010+if(l> buffer){
10111011 for(k= buffer;k<l;k++)
10121012 if(*k=='\t')putchar(' ');
10131013 else putchar(*k);
@@ -1047,7 +1047,7 @@ case fatal_message:printf("(That was a fatal error, my friend.)\n"); · 33 unmodified lines
10471047 /*:62*/
10481048 #line 1148 "common.w"
10491049 ;
1050−if(history>harmless_message)return(1);
1050+if(history> harmless_message)return(1);
10511051 else return(0);
10521052 }
10531053
@@ -1085,14 +1085,14 @@ boolean found_web= 0,found_change= 0,found_out= 0; · 31 unmodified lines
10851085
10861086 boolean flag_change;
10871087
1088−while(--argc>0){
1088+while(--argc> 0){
10891089 if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/
1090−#line 1341 "common.w"
1090+#line 1337 "common.w"
10911091
10921092 {
10931093 if(**argv=='-')flag_change= 0;
10941094 else flag_change= 1;
1095−for(dot_pos= *argv+1;*dot_pos>'\0';dot_pos++)
1095+for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
10961096 flags[*dot_pos]= flag_change;
10971097 }
10981098
@@ -1110,9 +1110,9 @@ if(!found_web)/*71:*/ · 11 unmodified lines
11101110 #line 1285 "common.w"
11111111
11121112 {
1113−if(s-*argv>max_file_name_length-5)
1113+if(s-*argv> max_file_name_length-5)
11141114 /*76:*/
1115−#line 1361 "common.w"
1115+#line 1357 "common.w"
11161116 fatal("! Filename too long\n",*argv);
11171117
11181118
@@ -1142,9 +1142,9 @@ else if(!found_change)/*72:*/ · 23 unmodified lines
11421142 {
11431143 if(strcmp(*argv,"-")==0)found_change= -1;
11441144 else{
1145−if(s-*argv>max_file_name_length-4)
1145+if(s-*argv> max_file_name_length-4)
11461146 /*76:*/
1147−#line 1361 "common.w"
1147+#line 1357 "common.w"
11481148 fatal("! Filename too long\n",*argv);
11491149
11501150
@@ -1165,9 +1165,9 @@ else if(!found_out)/*73:*/ · 14 unmodified lines
11651165 #line 1316 "common.w"
11661166
11671167 {
1168−if(s-*argv>max_file_name_length-5)
1168+if(s-*argv> max_file_name_length-5)
11691169 /*76:*/
1170−#line 1361 "common.w"
1170+#line 1357 "common.w"
11711171 fatal("! Filename too long\n",*argv);
11721172
11731173
@@ -1181,16 +1181,12 @@ sprintf(scn_file_name,"%s.scn",*argv); · 7 unmodified lines
11811181 sprintf(C_file_name,"%s.c",*argv);
11821182 }else{
11831183 strcpy(tex_file_name,*argv);
1184+strcpy(C_file_name,*argv);
11841185 if(flags['x']){
1185−if(program==cweave&&strcmp(*argv+strlen(*argv)-4,".tex")!=0)
1186−fatal("! Output file name should end with .tex\n",*argv);
1187−
1188−strcpy(idx_file_name,*argv);
1189−strcpy(idx_file_name+strlen(*argv)-4,".idx");
1190−strcpy(scn_file_name,*argv);
1191−strcpy(scn_file_name+strlen(*argv)-4,".scn");
1186+*dot_pos= 0;
1187+sprintf(idx_file_name,"%s.idx",*argv);
1188+sprintf(scn_file_name,"%s.scn",*argv);
11921189 }
1193−strcpy(C_file_name,*argv);
11941190 }
11951191 found_out= 1;
11961192 }
@@ -1199,7 +1195,7 @@ found_out= 1; · 2 unmodified lines
11991195 #line 1270 "common.w"
12001196
12011197 else/*75:*/
1202−#line 1349 "common.w"
1198+#line 1345 "common.w"
12031199
12041200 {
12051201 if(program==ctangle)
@@ -1218,7 +1214,7 @@ else fatal( · 12 unmodified lines
12181214 }
12191215 }
12201216 if(!found_web)/*75:*/
1221−#line 1349 "common.w"
1217+#line 1345 "common.w"
12221218
12231219 {
12241220 if(program==ctangle)
common.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 % This program by Silvio Levy and Donald E. Knuth
33 % is based on a program by Knuth.
44 % It is distributed WITHOUT ANY WARRANTY, express or implied.
5−% Version 3.0 --- June 1993
5+% Version 3.0 --- June 1993 (works also with later versions)
66
77 % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
88
common.w+7−11
@@ -2,7 +2,7 @@ · 1 unmodified line
22 % This program by Silvio Levy and Donald E. Knuth
33 % is based on a program by Knuth.
44 % It is distributed WITHOUT ANY WARRANTY, express or implied.
5−% Version 3.3 --- December 1994 (works with later versions too)
5+% Version 3.42 --- August 1998 (works with later versions too)
66
77 % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
88
@@ -17,12 +17,12 @@ · 8 unmodified lines
1717
1818 \def\v{\char'174} % vertical (|) in typewriter font
1919
20−\def\title{Common code for CTANGLE and CWEAVE (Version 3.3)}
20+\def\title{Common code for CTANGLE and CWEAVE (Version 3.42)}
2121 \def\topofcontents{\null\vfill
2222 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
2323 {\ttitlefont CWEAVE}}
2424 \vskip 15pt
25− \centerline{(Version 3.3)}
25+ \centerline{(Version 3.42)}
2626 \vfill}
2727 \def\botofcontents{\vfill
2828 \noindent
@@ -1324,16 +1324,12 @@ after the dot. We must check that there is enough room in · 1295 unmodified lines
13241324 sprintf(C_file_name,"%s.c",*argv);
13251325 } else {
13261326 strcpy(tex_file_name,*argv);
1327+ strcpy(C_file_name,*argv);
13271328 if (flags['x']) { /* indexes will be generated */
1328− if (program==cweave && strcmp(*argv+strlen(*argv)-4,".tex")!=0)
1329− fatal("! Output file name should end with .tex\n",*argv);
1330−@.Output file name...tex@>
1331− strcpy(idx_file_name,*argv);
1332− strcpy(idx_file_name+strlen(*argv)-4,".idx");
1333− strcpy(scn_file_name,*argv);
1334− strcpy(scn_file_name+strlen(*argv)-4,".scn");
1329+ *dot_pos=0;
1330+ sprintf(idx_file_name,"%s.idx",*argv);
1331+ sprintf(scn_file_name,"%s.scn",*argv);
13351332 }
1336− strcpy(C_file_name,*argv);
13371333 }
13381334 found_out=1;
13391335 }
ctang-bs.ch+2−2
@@ -17,12 +17,12 @@ by using "huge" pointers. · 16 unmodified lines
1717 The ``banner line'' defined here should be changed whenever \.{CTANGLE}
1818 is modified.
1919
20−@d banner "This is CTANGLE (Version 3.4)\n"
20+@d banner "This is CTANGLE (Version 3.43)\n"
2121 @y
2222 The ``banner line'' defined here should be changed whenever \.{CTANGLE}
2323 is modified.
2424
25−@d banner "This is CTANGLE (Version 3.4pc/big)\n"
25+@d banner "This is CTANGLE (Version 3.43pc/big)\n"
2626 @z
2727
2828
ctang-pc.ch+2−2
@@ -9,9 +9,9 @@ that allows >64K arrays. If you need lots of bytes and toks, try the · 8 unmodified lines
99 alternate change files with -bs suffix instead of -pc.
1010
1111 @x section 1
12−@d banner "This is CTANGLE (Version 3.4)\n"
12+@d banner "This is CTANGLE (Version 3.43)\n"
1313 @y
14−@d banner "This is CTANGLE (Version 3.4pc)\n"
14+@d banner "This is CTANGLE (Version 3.43pc)\n"
1515 @z
1616 @x section 4
1717 @d max_bytes 90000 /* the number of bytes in identifiers,
ctang-ql.ch+4−4
@@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c -=500000 ctangle_c" · 6 unmodified lines
77
88
99 @x
10−\def\title{CTANGLE (Version 3.4)}
10+\def\title{CTANGLE (Version 3.43)}
1111 @y
12−\def\title{CTANGLE (QL Version 3.4)}
12+\def\title{CTANGLE (QL Version 3.43)}
1313 @z
1414
1515 @x section 1
16−@d banner "This is CTANGLE (Version 3.4)\n"
16+@d banner "This is CTANGLE (Version 3.43)\n"
1717 @y
18−@d banner "This is CTANGLE (QL Version 3.4)\n"
18+@d banner "This is CTANGLE (QL Version 3.43)\n"
1919 @z
2020
2121 @x
ctang-vms.ch+2−2
@@ -10,9 +10,9 @@ created: · 9 unmodified lines
1010 (these changes not necessary for initial bootstrapping)
1111
1212 @x section 1 (01-FEB-1992 ST)
13−@d banner "This is CTANGLE (Version 3.4)\n"
13+@d banner "This is CTANGLE (Version 3.43)\n"
1414 @y
15−@d banner "This is CTANGLE (VAX/VMS Version 3.4)\n"
15+@d banner "This is CTANGLE (VAX/VMS Version 3.43)\n"
1616 @z
1717
1818 @x section 6 (from common.h) (01-FEB-1992 ST)
ctangle.c+102−101
@@ -4,18 +4,18 @@ · 3 unmodified lines
44 /*6:*/
55 #line 35 "common.h"
66
7−#include <stdio.h>
7+#include <stdio.h>
88
99 /*:6*//*62:*/
10−#line 881 "ctangle.w"
10+#line 882 "ctangle.w"
1111
12−#include <ctype.h>
13−#include <stdlib.h>
12+#include <ctype.h>
13+#include <stdlib.h>
1414
1515 /*:62*/
1616 #line 62 "ctangle.w"
1717
18−#define banner "This is CTANGLE (Version 3.4)\n" \
18+#define banner "This is CTANGLE (Version 3.43)\n" \
1919
2020 #define max_bytes 90000 \
2121
@@ -24,7 +24,7 @@ · 2 unmodified lines
2424
2525 #define max_texts 2500
2626 #define hash_size 353
27−#define longest_name 1000
27+#define longest_name 10000
2828 #define stack_size 50
2929 #define buf_size 100 \
3030
@@ -127,7 +127,7 @@ · 96 unmodified lines
127127 #define constant 03 \
128128
129129 #define isxalpha(c) ((c) =='_')
130−#define ishigh(c) ((unsigned char) (c) >0177) \
130+#define ishigh(c) ((unsigned char) (c) > 0177) \
131131 \
132132
133133 #define compress(c) if(loc++<=limit) return(c) \
@@ -328,34 +328,34 @@ char output_file_name[longest_name]; · 194 unmodified lines
328328 boolean output_defs_seen= 0;
329329
330330 /*:45*//*51:*/
331−#line 706 "ctangle.w"
331+#line 707 "ctangle.w"
332332
333333 char translit[128][translit_length];
334334
335335 /*:51*//*56:*/
336−#line 782 "ctangle.w"
336+#line 783 "ctangle.w"
337337
338338 eight_bits ccode[256];
339339
340340 /*:56*//*59:*/
341−#line 838 "ctangle.w"
341+#line 839 "ctangle.w"
342342
343343 boolean comment_continues= 0;
344344
345345 /*:59*//*61:*/
346−#line 877 "ctangle.w"
346+#line 878 "ctangle.w"
347347
348348 name_pointer cur_section_name;
349349 int no_where;
350350
351351 /*:61*//*75:*/
352−#line 1191 "ctangle.w"
352+#line 1192 "ctangle.w"
353353
354354 text_pointer cur_text;
355355 eight_bits next_control;
356356
357357 /*:75*//*82:*/
358−#line 1341 "ctangle.w"
358+#line 1342 "ctangle.w"
359359
360360 extern sixteen_bits section_count;
361361
@@ -387,12 +387,12 @@ void output_defs(); · 25 unmodified lines
387387 static void out_char();
388388
389389 /*:48*//*90:*/
390−#line 1448 "ctangle.w"
390+#line 1449 "ctangle.w"
391391
392392 void phase_one();
393393
394394 /*:90*//*92:*/
395−#line 1466 "ctangle.w"
395+#line 1467 "ctangle.w"
396396
397397 void skip_limbo();
398398
@@ -431,7 +431,7 @@ last_unnamed= text_info;text_info->text_link= 0; · 32 unmodified lines
431431 cur_out_file= end_output_files= output_files+max_files;
432432
433433 /*:39*//*52:*/
434−#line 709 "ctangle.w"
434+#line 710 "ctangle.w"
435435
436436 {
437437 int i;
@@ -439,7 +439,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i)); · 1 unmodified line
439439 }
440440
441441 /*:52*//*57:*/
442−#line 785 "ctangle.w"
442+#line 786 "ctangle.w"
443443 {
444444 int c;
445445 for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -459,7 +459,7 @@ ccode['\'']= ord; · 13 unmodified lines
459459 }
460460
461461 /*:57*//*71:*/
462−#line 1112 "ctangle.w"
462+#line 1113 "ctangle.w"
463463 section_text[0]= ' ';
464464
465465 /*:71*/
@@ -503,7 +503,7 @@ void · 37 unmodified lines
503503 store_two_bytes(x)
504504 sixteen_bits x;
505505 {
506−if(tok_ptr+2>tok_mem_end)overflow("token");
506+if(tok_ptr+2> tok_mem_end)overflow("token");
507507 *tok_ptr++= x>>8;
508508 *tok_ptr++= x&0377;
509509 }
@@ -538,7 +538,7 @@ cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start; · 28 unmodified lines
538538 return;
539539 }
540540 stack_ptr--;
541−if(stack_ptr>stack)cur_state= *stack_ptr;
541+if(stack_ptr> stack)cur_state= *stack_ptr;
542542 }
543543
544544 /*:31*//*33:*/
@@ -582,7 +582,7 @@ goto restart; · 37 unmodified lines
582582 #line 409 "ctangle.w"
583583 ;
584584 break;
585−default:cur_val= a-050000;if(cur_val>0)cur_section= cur_val;
585+default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
586586 out_char(section_number);
587587 }
588588 }
@@ -646,12 +646,12 @@ update_terminal; · 57 unmodified lines
646646 }
647647 if(text_info->text_link==0)goto writeloop;
648648 }
649−while(stack_ptr>stack)get_output();
649+while(stack_ptr> stack)get_output();
650650 flush_buffer();
651651 writeloop:/*43:*/
652652 #line 569 "ctangle.w"
653653
654−for(an_output_file= end_output_files;an_output_file>cur_out_file;){
654+for(an_output_file= end_output_files;an_output_file> cur_out_file;){
655655 an_output_file--;
656656 sprint_section_name(output_file_name,*an_output_file);
657657 fclose(C_file);
@@ -665,7 +665,7 @@ cur_name= (*an_output_file); · 7 unmodified lines
665665 cur_repl= (text_pointer)cur_name->equiv;
666666 cur_byte= cur_repl->tok_start;
667667 cur_end= (cur_repl+1)->tok_start;
668−while(stack_ptr>stack)get_output();
668+while(stack_ptr> stack)get_output();
669669 flush_buffer();
670670 }
671671
@@ -726,11 +726,11 @@ eight_bits cur_char; · 54 unmodified lines
726726 char*j,*k;
727727 restart:
728728 switch(cur_char){
729−case'\n':if(protect)C_putc(' ');
729+case'\n':if(protect&&out_state!=verbatim)C_putc(' ');
730730 if(protect||out_state==verbatim)C_putc('\\');
731731 flush_buffer();if(out_state!=verbatim)out_state= normal;break;
732732 /*53:*/
733−#line 715 "ctangle.w"
733+#line 716 "ctangle.w"
734734
735735 case identifier:
736736 if(out_state==num_or_id)C_putc(' ');
@@ -748,10 +748,10 @@ out_state= num_or_id;break; · 11 unmodified lines
748748 #line 659 "ctangle.w"
749749 ;
750750 /*54:*/
751−#line 728 "ctangle.w"
751+#line 729 "ctangle.w"
752752
753753 case section_number:
754−if(cur_val>0)C_printf("/*%d:*/",cur_val);
754+if(cur_val> 0)C_printf("/*%d:*/",cur_val);
755755 else if(cur_val<0)C_printf("/*:%d*/",-cur_val);
756756 else if(protect){
757757 cur_byte+= 4;
@@ -775,7 +775,7 @@ break; · 17 unmodified lines
775775 #line 660 "ctangle.w"
776776 ;
777777 /*50:*/
778−#line 677 "ctangle.w"
778+#line 678 "ctangle.w"
779779
780780 case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
781781 case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -798,7 +798,8 @@ break; · 16 unmodified lines
798798 /*:50*/
799799 #line 661 "ctangle.w"
800800 ;
801−case'=':C_putc('=');C_putc(' ');out_state= normal;break;
801+case'=':case'>':C_putc(cur_char);C_putc(' ');
802+out_state= normal;break;
802803 case join:out_state= unbreakable;break;
803804 case constant:if(out_state==verbatim){
804805 out_state= num_or_id;break;
@@ -814,14 +815,14 @@ default:C_putc(cur_char);out_state= normal;break; · 9 unmodified lines
814815 }
815816
816817 /*:49*//*58:*/
817−#line 806 "ctangle.w"
818+#line 807 "ctangle.w"
818819
819820 eight_bits
820821 skip_ahead()
821822 {
822823 eight_bits c;
823824 while(1){
824−if(loc>limit&&(get_line()==0))return(new_section);
825+if(loc> limit&&(get_line()==0))return(new_section);
825826 *(limit+1)= '@';
826827 while(*loc!='@')loc++;
827828 if(loc<=limit){
@@ -832,14 +833,14 @@ if(c!=ignore||*(loc-1)=='>')return(c); · 4 unmodified lines
832833 }
833834
834835 /*:58*//*60:*/
835−#line 841 "ctangle.w"
836+#line 842 "ctangle.w"
836837
837838 int skip_comment(is_long_comment)
838839 boolean is_long_comment;
839840 {
840841 char c;
841842 while(1){
842−if(loc>limit){
843+if(loc> limit){
843844 if(is_long_comment){
844845 if(get_line())return(comment_continues= 1);
845846 else{
@@ -866,7 +867,7 @@ else loc++; · 20 unmodified lines
866867 }
867868
868869 /*:60*//*63:*/
869−#line 892 "ctangle.w"
870+#line 893 "ctangle.w"
870871
871872 eight_bits
872873 get_next()
@@ -874,13 +875,13 @@ get_next() · 1 unmodified line
874875 static int preprocessing= 0;
875876 eight_bits c;
876877 while(1){
877−if(loc>limit){
878+if(loc> limit){
878879 if(preprocessing&&*(limit-1)!='\\')preprocessing= 0;
879880 if(get_line()==0)return(new_section);
880881 else if(print_where&&!no_where){
881882 print_where= 0;
882883 /*77:*/
883−#line 1221 "ctangle.w"
884+#line 1222 "ctangle.w"
884885
885886 store_two_bytes(0150000);
886887 if(changing)id_first= change_file_name;
@@ -892,7 +893,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
892893 app_repl(a%0400);}
893894
894895 /*:77*/
895−#line 904 "ctangle.w"
896+#line 905 "ctangle.w"
896897 ;
897898 }
898899 else return('\n');
@@ -906,7 +907,7 @@ else continue; · 7 unmodified lines
906907 }
907908 loc++;
908909 if(xisdigit(c)||c=='\\'||c=='.')/*66:*/
909−#line 970 "ctangle.w"
910+#line 971 "ctangle.w"
910911 {
911912 id_first= loc-1;
912913 if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -934,11 +935,11 @@ return(constant); · 21 unmodified lines
934935 }
935936
936937 /*:66*/
937−#line 916 "ctangle.w"
938+#line 917 "ctangle.w"
938939
939940 else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"')))
940941 /*67:*/
941−#line 1001 "ctangle.w"
942+#line 1002 "ctangle.w"
942943 {
943944 char delim= c;
944945 id_first= section_text+1;
@@ -981,11 +982,11 @@ return(string); · 36 unmodified lines
981982 }
982983
983984 /*:67*/
984−#line 918 "ctangle.w"
985+#line 919 "ctangle.w"
985986
986987 else if(isalpha(c)||isxalpha(c)||ishigh(c))
987988 /*65:*/
988−#line 964 "ctangle.w"
989+#line 965 "ctangle.w"
989990 {
990991 id_first= --loc;
991992 while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc));
@@ -993,10 +994,10 @@ id_loc= loc;return(identifier); · 1 unmodified line
993994 }
994995
995996 /*:65*/
996−#line 920 "ctangle.w"
997+#line 921 "ctangle.w"
997998
998999 else if(c=='@')/*68:*/
999−#line 1045 "ctangle.w"
1000+#line 1046 "ctangle.w"
10001001 {
10011002 c= ccode[(eight_bits)*loc++];
10021003 switch(c){
@@ -1013,22 +1014,22 @@ continue; · 10 unmodified lines
10131014 case section_name:
10141015 cur_section_name_char= *(loc-1);
10151016 /*70:*/
1016−#line 1094 "ctangle.w"
1017+#line 1095 "ctangle.w"
10171018 {
10181019 char*k;
10191020 /*72:*/
1020−#line 1114 "ctangle.w"
1021+#line 1115 "ctangle.w"
10211022
10221023 k= section_text;
10231024 while(1){
1024−if(loc>limit&&get_line()==0){
1025+if(loc> limit&&get_line()==0){
10251026 err_print("! Input ended in section name");
10261027
10271028 loc= buffer+1;break;
10281029 }
10291030 c= *loc;
10301031 /*73:*/
1031−#line 1138 "ctangle.w"
1032+#line 1139 "ctangle.w"
10321033
10331034 if(c=='@'){
10341035 c= *(loc+1);
@@ -1047,7 +1048,7 @@ err_print("! Nesting of section names not allowed");break; · 12 unmodified lines
10471048 }
10481049
10491050 /*:73*/
1050−#line 1123 "ctangle.w"
1051+#line 1124 "ctangle.w"
10511052 ;
10521053 loc++;if(k<section_text_end)k++;
10531054 if(xisspace(c)){
@@ -1061,12 +1062,12 @@ printf("\n! Section name too long: "); · 7 unmodified lines
10611062 term_write(section_text+1,25);
10621063 printf("...");mark_harmless;
10631064 }
1064−if(*k==' '&&k>section_text)k--;
1065+if(*k==' '&&k> section_text)k--;
10651066
10661067 /*:72*/
1067−#line 1096 "ctangle.w"
1068+#line 1097 "ctangle.w"
10681069 ;
1069−if(k-section_text>3&&strncmp(k-2,"...",3)==0)
1070+if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
10701071 cur_section_name= section_lookup(section_text+1,k-3,1);
10711072 else cur_section_name= section_lookup(section_text+1,k,0);
10721073 if(cur_section_name_char=='(')
@@ -1078,7 +1079,7 @@ for(an_output_file= cur_out_file; · 5 unmodified lines
10781079 an_output_file<end_output_files;an_output_file++)
10791080 if(*an_output_file==cur_section_name)break;
10801081 if(an_output_file==end_output_files){
1081−if(cur_out_file>output_files)
1082+if(cur_out_file> output_files)
10821083 *--cur_out_file= cur_section_name;
10831084 else{
10841085 overflow("output files");
@@ -1087,16 +1088,16 @@ overflow("output files"); · 2 unmodified lines
10871088 }
10881089
10891090 /*:40*/
1090−#line 1102 "ctangle.w"
1091+#line 1103 "ctangle.w"
10911092 ;
10921093 return(section_name);
10931094 }
10941095
10951096 /*:70*/
1096−#line 1060 "ctangle.w"
1097+#line 1061 "ctangle.w"
10971098 ;
10981099 case string:/*74:*/
1099−#line 1160 "ctangle.w"
1100+#line 1161 "ctangle.w"
11001101 {
11011102 id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
11021103 while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1107,10 +1108,10 @@ return(string); · 4 unmodified lines
11071108 }
11081109
11091110 /*:74*/
1110−#line 1061 "ctangle.w"
1111+#line 1062 "ctangle.w"
11111112 ;
11121113 case ord:/*69:*/
1113−#line 1073 "ctangle.w"
1114+#line 1074 "ctangle.w"
11141115
11151116 id_first= loc;
11161117 if(*loc=='\\'){
@@ -1124,7 +1125,7 @@ err_print("! Double @ should be used in ASCII constant"); · 7 unmodified lines
11241125 else loc++;
11251126 }
11261127 loc++;
1127−if(loc>limit){
1128+if(loc> limit){
11281129 err_print("! String didn't end");loc= limit-1;break;
11291130
11301131 }
@@ -1133,23 +1134,23 @@ loc++; · 2 unmodified lines
11331134 return(ord);
11341135
11351136 /*:69*/
1136−#line 1062 "ctangle.w"
1137+#line 1063 "ctangle.w"
11371138 ;
11381139 default:return(c);
11391140 }
11401141 }
11411142
11421143 /*:68*/
1143−#line 921 "ctangle.w"
1144+#line 922 "ctangle.w"
11441145
11451146 else if(xisspace(c)){
1146−if(!preprocessing||loc>limit)continue;
1147+if(!preprocessing||loc> limit)continue;
11471148
11481149 else return(' ');
11491150 }
11501151 else if(c=='#'&&loc==buffer+1)preprocessing= 1;
11511152 mistake:/*64:*/
1152−#line 942 "ctangle.w"
1153+#line 943 "ctangle.w"
11531154
11541155 switch(c){
11551156 case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1173,14 +1174,14 @@ case'!':if(*loc=='=')compress(not_eq);break; · 17 unmodified lines
11731174 }
11741175
11751176 /*:64*/
1176−#line 928 "ctangle.w"
1177+#line 929 "ctangle.w"
11771178
11781179 return(c);
11791180 }
11801181 }
11811182
11821183 /*:63*//*76:*/
1183−#line 1195 "ctangle.w"
1184+#line 1196 "ctangle.w"
11841185
11851186 void
11861187 scan_repl(t)
@@ -1188,7 +1189,7 @@ eight_bits t; · 1 unmodified line
11881189 {
11891190 sixteen_bits a;
11901191 if(t==section_name){/*77:*/
1191−#line 1221 "ctangle.w"
1192+#line 1222 "ctangle.w"
11921193
11931194 store_two_bytes(0150000);
11941195 if(changing)id_first= change_file_name;
@@ -1200,11 +1201,11 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
12001201 app_repl(a%0400);}
12011202
12021203 /*:77*/
1203−#line 1201 "ctangle.w"
1204+#line 1202 "ctangle.w"
12041205 ;}
12051206 while(1)switch(a= get_next()){
12061207 /*78:*/
1207−#line 1231 "ctangle.w"
1208+#line 1232 "ctangle.w"
12081209
12091210 case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
12101211 app_repl((a/0400)+0200);
@@ -1212,7 +1213,7 @@ app_repl(a%0400);break; · 1 unmodified line
12121213 case section_name:if(t!=section_name)goto done;
12131214 else{
12141215 /*79:*/
1215−#line 1259 "ctangle.w"
1216+#line 1260 "ctangle.w"
12161217 {
12171218 char*try_loc= loc;
12181219 while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1225,13 +1226,13 @@ if(*try_loc=='=')err_print("! Missing `@ ' before a named section"); · 6 unmodified lines
12251226 }
12261227
12271228 /*:79*/
1228−#line 1237 "ctangle.w"
1229+#line 1238 "ctangle.w"
12291230 ;
12301231 a= cur_section_name-name_dir;
12311232 app_repl((a/0400)+0250);
12321233 app_repl(a%0400);
12331234 /*77:*/
1234−#line 1221 "ctangle.w"
1235+#line 1222 "ctangle.w"
12351236
12361237 store_two_bytes(0150000);
12371238 if(changing)id_first= change_file_name;
@@ -1243,7 +1244,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
12431244 app_repl(a%0400);}
12441245
12451246 /*:77*/
1246−#line 1241 "ctangle.w"
1247+#line 1242 "ctangle.w"
12471248 ;break;
12481249 }
12491250 case output_defs_code:
@@ -1251,7 +1252,7 @@ a= output_defs_flag; · 1 unmodified line
12511252 app_repl((a/0400)+0200);
12521253 app_repl(a%0400);
12531254 /*77:*/
1254−#line 1221 "ctangle.w"
1255+#line 1222 "ctangle.w"
12551256
12561257 store_two_bytes(0150000);
12571258 if(changing)id_first= change_file_name;
@@ -1263,11 +1264,11 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
12631264 app_repl(a%0400);}
12641265
12651266 /*:77*/
1266−#line 1247 "ctangle.w"
1267+#line 1248 "ctangle.w"
12671268 ;break;
12681269 case constant:case string:
12691270 /*80:*/
1270−#line 1270 "ctangle.w"
1271+#line 1271 "ctangle.w"
12711272
12721273 app_repl(a);
12731274 while(id_first<id_loc){
@@ -1281,11 +1282,11 @@ app_repl(*id_first++); · 7 unmodified lines
12811282 app_repl(a);break;
12821283
12831284 /*:80*/
1284−#line 1249 "ctangle.w"
1285+#line 1250 "ctangle.w"
12851286 ;
12861287 case ord:
12871288 /*81:*/
1288−#line 1286 "ctangle.w"
1289+#line 1287 "ctangle.w"
12891290 {
12901291 int c= (eight_bits)*id_first;
12911292 if(c=='\\'){
@@ -1336,7 +1337,7 @@ app_repl(constant); · 44 unmodified lines
13361337 break;
13371338
13381339 /*:81*/
1339−#line 1251 "ctangle.w"
1340+#line 1252 "ctangle.w"
13401341 ;
13411342 case definition:case format_code:case begin_C:if(t!=section_name)goto done;
13421343 else{
@@ -1346,7 +1347,7 @@ err_print("! @d, @f and @c are ignored in C text");continue; · 3 unmodified lines
13461347 case new_section:goto done;
13471348
13481349 /*:78*/
1349−#line 1206 "ctangle.w"
1350+#line 1207 "ctangle.w"
13501351
13511352 case')':app_repl(a);
13521353 if(t==macro)app_repl(' ');
@@ -1354,12 +1355,12 @@ break; · 1 unmodified line
13541355 default:app_repl(a);
13551356 }
13561357 done:next_control= (eight_bits)a;
1357−if(text_ptr>text_info_end)overflow("text");
1358+if(text_ptr> text_info_end)overflow("text");
13581359 cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
13591360 }
13601361
13611362 /*:76*//*83:*/
1362−#line 1348 "ctangle.w"
1363+#line 1349 "ctangle.w"
13631364
13641365 void
13651366 scan_section()
@@ -1374,7 +1375,7 @@ printf("*%d",section_count);update_terminal; · 8 unmodified lines
13741375 next_control= 0;
13751376 while(1){
13761377 /*84:*/
1377−#line 1387 "ctangle.w"
1378+#line 1388 "ctangle.w"
13781379
13791380 while(next_control<definition)
13801381
@@ -1383,11 +1384,11 @@ loc-= 2;next_control= get_next(); · 2 unmodified lines
13831384 }
13841385
13851386 /*:84*/
1386−#line 1362 "ctangle.w"
1387+#line 1363 "ctangle.w"
13871388 ;
13881389 if(next_control==definition){
13891390 /*85:*/
1390−#line 1394 "ctangle.w"
1391+#line 1395 "ctangle.w"
13911392 {
13921393 while((next_control= get_next())=='\n');
13931394 if(next_control!=identifier){
@@ -1406,7 +1407,7 @@ cur_text->text_link= 0; · 12 unmodified lines
14061407 }
14071408
14081409 /*:85*/
1409−#line 1364 "ctangle.w"
1410+#line 1365 "ctangle.w"
14101411
14111412 continue;
14121413 }
@@ -1416,14 +1417,14 @@ p= name_dir;break; · 3 unmodified lines
14161417 if(next_control==section_name){
14171418 p= cur_section_name;
14181419 /*86:*/
1419−#line 1419 "ctangle.w"
1420+#line 1420 "ctangle.w"
14201421
14211422 while((next_control= get_next())=='+');
14221423 if(next_control!='='&&next_control!=eq_eq)
14231424 continue;
14241425
14251426 /*:86*/
1426−#line 1372 "ctangle.w"
1427+#line 1373 "ctangle.w"
14271428 ;
14281429 break;
14291430 }
@@ -1431,20 +1432,20 @@ return; · 1 unmodified line
14311432 }
14321433 no_where= print_where= 0;
14331434 /*87:*/
1434−#line 1424 "ctangle.w"
1435+#line 1425 "ctangle.w"
14351436
14361437 /*88:*/
1437−#line 1429 "ctangle.w"
1438+#line 1430 "ctangle.w"
14381439
14391440 store_two_bytes((sixteen_bits)(0150000+section_count));
14401441
14411442
14421443 /*:88*/
1443−#line 1425 "ctangle.w"
1444+#line 1426 "ctangle.w"
14441445 ;
14451446 scan_repl(section_name);
14461447 /*89:*/
1447−#line 1433 "ctangle.w"
1448+#line 1434 "ctangle.w"
14481449
14491450 if(p==name_dir||p==0){
14501451 (last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1461,16 +1462,16 @@ cur_text->text_link= section_flag; · 10 unmodified lines
14611462
14621463
14631464 /*:89*/
1464−#line 1427 "ctangle.w"
1465+#line 1428 "ctangle.w"
14651466 ;
14661467
14671468 /*:87*/
1468−#line 1378 "ctangle.w"
1469+#line 1379 "ctangle.w"
14691470 ;
14701471 }
14711472
14721473 /*:83*//*91:*/
1473−#line 1451 "ctangle.w"
1474+#line 1452 "ctangle.w"
14741475
14751476 void
14761477 phase_one(){
@@ -1484,14 +1485,14 @@ phase= 2; · 7 unmodified lines
14841485 }
14851486
14861487 /*:91*//*93:*/
1487−#line 1469 "ctangle.w"
1488+#line 1470 "ctangle.w"
14881489
14891490 void
14901491 skip_limbo()
14911492 {
14921493 char c;
14931494 while(1){
1494−if(loc>limit&&get_line()==0)return;
1495+if(loc> limit&&get_line()==0)return;
14951496 *(limit+1)= '@';
14961497 while(*loc!='@')loc++;
14971498 if(loc++<=limit){
@@ -1499,11 +1500,11 @@ c= *loc++; · 1 unmodified line
14991500 if(ccode[(eight_bits)c]==new_section)break;
15001501 switch(ccode[(eight_bits)c]){
15011502 case translit_code:/*94:*/
1502−#line 1498 "ctangle.w"
1503+#line 1499 "ctangle.w"
15031504
15041505 while(xisspace(*loc)&&loc<limit)loc++;
15051506 loc+= 3;
1506−if(loc>limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
1507+if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
15071508 ||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))
15081509 err_print("! Improper hex number following @l");
15091510
@@ -1524,7 +1525,7 @@ translit[i-0200][loc-beg]= '\0'; · 14 unmodified lines
15241525 }
15251526
15261527 /*:94*/
1527−#line 1482 "ctangle.w"
1528+#line 1483 "ctangle.w"
15281529 ;break;
15291530 case format_code:case'@':break;
15301531 case control_text:if(c=='q'||c=='Q'){
@@ -1542,7 +1543,7 @@ default:err_print("! Double @ should be used in limbo"); · 11 unmodified lines
15421543 }
15431544
15441545 /*:93*//*95:*/
1545−#line 1524 "ctangle.w"
1546+#line 1525 "ctangle.w"
15461547
15471548 void
15481549 print_stats(){
ctangle.w+8−7
@@ -2,7 +2,7 @@ · 1 unmodified line
22 % This program by Silvio Levy and Donald E. Knuth
33 % is based on a program by Knuth.
44 % It is distributed WITHOUT ANY WARRANTY, express or implied.
5−% Version 3.4 --- April 1995
5+% Version 3.43 --- September 1998
66
77 % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
88
@@ -22,11 +22,11 @@ · 13 unmodified lines
2222 \mathchardef\RA="3221 % right arrow
2323 \mathchardef\BA="3224 % double arrow
2424
25−\def\title{CTANGLE (Version 3.4)}
25+\def\title{CTANGLE (Version 3.43)}
2626 \def\topofcontents{\null\vfill
2727 \centerline{\titlefont The {\ttitlefont CTANGLE} processor}
2828 \vskip 15pt
29− \centerline{(Version 3.4)}
29+ \centerline{(Version 3.43)}
3030 \vfill}
3131 \def\botofcontents{\vfill
3232 \noindent
@@ -56,7 +56,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. · 23 unmodified lines
5656 The ``banner line'' defined here should be changed whenever \.{CTANGLE}
5757 is modified.
5858
59−@d banner "This is CTANGLE (Version 3.4)\n"
59+@d banner "This is CTANGLE (Version 3.43)\n"
6060
6161 @c
6262 @<Include files@>@/
@@ -113,7 +113,7 @@ change them in the file |"common.w"|. · 50 unmodified lines
113113 must be less than 10240; used in |"common.w"| */
114114 @d max_texts 2500 /* number of replacement texts, must be less than 10240 */
115115 @d hash_size 353 /* should be prime; used in |"common.w"| */
116−@d longest_name 1000 /* section names shouldn't be longer than this */
116+@d longest_name 10000 /* section names shouldn't be longer than this */
117117 @d stack_size 50 /* number of simultaneous levels of macro expansion */
118118 @d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */
119119
@@ -653,13 +653,14 @@ eight_bits cur_char; · 533 unmodified lines
653653 char *j, *k; /* pointer into |byte_mem| */
654654 restart:
655655 switch (cur_char) {
656− case '\n': if (protect) C_putc(' ');
656+ case '\n': if (protect && out_state!=verbatim) C_putc(' ');
657657 if (protect || out_state==verbatim) C_putc('\\');
658658 flush_buffer(); if (out_state!=verbatim) out_state=normal; break;
659659 @/@t\4@>@<Case of an identifier@>;
660660 @/@t\4@>@<Case of a section number@>;
661661 @/@t\4@>@<Cases like \.{!=}@>;
662− case '=': C_putc('='); C_putc(' '); out_state=normal; break;
662+ case '=': case '>': C_putc(cur_char); C_putc(' ');
663+ out_state=normal; break;
663664 case join: out_state=unbreakable; break;
664665 case constant: if (out_state==verbatim) {
665666 out_state=num_or_id; break;
cweav-bs.ch+2−2
@@ -20,12 +20,12 @@ This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94. · 19 unmodified lines
2020 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
2121 is modified.
2222
23−@d banner "This is CWEAVE (Version 3.4)\n"
23+@d banner "This is CWEAVE (Version 3.43)\n"
2424 @y
2525 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
2626 is modified.
2727
28−@d banner "This is CWEAVE (Version 3.4pc/big)\n"
28+@d banner "This is CWEAVE (Version 3.43pc/big)\n"
2929 @z
3030
3131
cweav-pc.ch+2−2
@@ -11,9 +11,9 @@ that allows >64K arrays. (If you need lots more bytes, try the alternate · 10 unmodified lines
1111 change files that have -bs in their name instead of -pc.)
1212
1313 @x section 1
14−@d banner "This is CWEAVE (Version 3.4)\n"
14+@d banner "This is CWEAVE (Version 3.43)\n"
1515 @y
16−@d banner "This is CWEAVE (Version 3.4pc)\n"
16+@d banner "This is CWEAVE (Version 3.43pc)\n"
1717 @z
1818
1919 @x section 4
cweav-ql.ch+4−4
@@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c =500000 cweave_c" · 6 unmodified lines
77
88
99 @x
10−\def\title{CWEAVE (Version 3.4)}
10+\def\title{CWEAVE (Version 3.43)}
1111 @y
12−\def\title{CWEAVE (QL Version 3.4)}
12+\def\title{CWEAVE (QL Version 3.43)}
1313 @z
1414
1515 @x section 1
16−@d banner "This is CWEAVE (Version 3.4)\n"
16+@d banner "This is CWEAVE (Version 3.43)\n"
1717 @y
18−@d banner "This is CWEAVE (QL Version 3.4)\n"
18+@d banner "This is CWEAVE (QL Version 3.43)\n"
1919 @z
2020
2121 @x
cweav-vms.ch+2−2
@@ -13,9 +13,9 @@ modified: · 12 unmodified lines
1313 (also modified by Don Knuth to keep version numbers uptodate)
1414
1515 @x section 1 (01-FEB-1992 ST)
16−@d banner "This is CWEAVE (Version 3.4)\n"
16+@d banner "This is CWEAVE (Version 3.43)\n"
1717 @y
18−@d banner "This is CWEAVE (VAX/VMS Version 3.4)\n"
18+@d banner "This is CWEAVE (VAX/VMS Version 3.43)\n"
1919 @z
2020
2121 @x section 6 (from common.h) (01-FEB-1992 ST)
cweave.w+6−5
@@ -2,7 +2,8 @@ · 1 unmodified line
22 % This program by Silvio Levy and Donald E. Knuth
33 % is based on a program by Knuth.
44 % It is distributed WITHOUT ANY WARRANTY, express or implied.
5−% Version 3.4 --- April 1995
5+% Version 3.43 --- September 1998
6+% (is same as Version 3.4 except that the latter used an older COMMON)
67
78 % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
89
@@ -27,11 +28,11 @@ · 18 unmodified lines
2728 \def\skipxTeX{\\{skip\_\TEX/}}
2829 \def\copyxTeX{\\{copy\_\TEX/}}
2930
30−\def\title{CWEAVE (Version 3.4)}
31+\def\title{CWEAVE (Version 3.43)}
3132 \def\topofcontents{\null\vfill
3233 \centerline{\titlefont The {\ttitlefont CWEAVE} processor}
3334 \vskip 15pt
34− \centerline{(Version 3.4)}
35+ \centerline{(Version 3.43)}
3536 \vfill}
3637 \def\botofcontents{\vfill
3738 \noindent
@@ -61,7 +62,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. · 23 unmodified lines
6162 The ``banner line'' defined here should be changed whenever \.{CWEAVE}
6263 is modified.
6364
64−@d banner "This is CWEAVE (Version 3.4)\n"
65+@d banner "This is CWEAVE (Version 3.43)\n"
6566
6667 @c @<Include files@>@/
6768 @h
@@ -120,7 +121,7 @@ you have to change them also in the file |"common.w"|. · 52 unmodified lines
120121 @d max_sections 2000 /* greater than the total number of sections */
121122 @d hash_size 353 /* should be prime */
122123 @d buf_size 100 /* maximum length of input line, plus one */
123−@d longest_name 1000 /* section names and strings shouldn't be longer than this */
124+@d longest_name 10000 /* section names and strings shouldn't be longer than this */
124125 @d long_buf_size (buf_size+longest_name)
125126 @d line_length 80 /* lines of \TEX/ output have at most this many characters;
126127 should be less than 256 */
cwebmac.tex+4−4
@@ -1,7 +1,7 @@
11 % standard macros for CWEB listings (in addition to plain.tex)
2−% Version 3.1 --- September 1994
2+% Version 3.43 --- September 1998
33 \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
4−\xdef\fmtversion{\fmtversion+CWEB3.1}
4+\xdef\fmtversion{\fmtversion+CWEB3.4}
55
66 \let\:=\. % preserve a way to get the dot accent
77 % (all other accents will still work as usual)
@@ -42,7 +42,7 @@ · 34 unmodified lines
4242 \let\&=\AM % ampersand in a string
4343 \let\^=\CF % circumflex in a string
4444 #1\kern.05em}}
45−\def\){\discretionary{\hbox{\tentex\BS}}{}{}}
45+\def\){{\tentex\kern-.05em}\discretionary{\hbox{\tentex\BS}}{}{}}
4646 \def\AT{@} % at sign for control text (not needed in versions >= 2.9)
4747 \def\ATL{\par\noindent\bgroup\catcode`\_=12 \postATL} % print @l in limbo
4848 \def\postATL#1 #2 {\bf letter \\{\uppercase{\char"#1}}
@@ -168,7 +168,7 @@ · 119 unmodified lines
168168 \let\V=\lor % logical or
169169 \let\W=\land % logical and
170170 \def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name
171− \XX$\langle\,${#2\eightrm\kern.5em#1}$\,\rangle$\XX}
171+ \XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em#1}$\,\rangle$\XX}
172172 \def\Y{\par\yskip}
173173 \let\Z=\le
174174 \let\ZZ=\let % now you can \write the control sequence \ZZ
cwebman.tex+1−1
@@ -409,7 +409,7 @@ appears frequently within \CEE/ text, because everything in · 408 unmodified lines
409409 comments (i.e., between \.{/*} and \.{*/}, or following \.{//})
410410 is treated as \TEX/ text.
411411 Likewise, the text of a section name consists of \TEX/ text, but
412−the construct \.{@<section name@>} as a whole is is expected to be found
412+the construct \.{@<section name@>} as a whole is expected to be found
413413 in \CEE/ text; thus, one typically goes back and forth
414414 between the \CEE/ and \TEX/ environments in a natural way, as in these
415415 examples:
examples/extex.ch+23−0
@@ -0,0 +1,23 @@
1+@x In my work (mainly TAOCP) I use \: (not \.) for the dot accent
2+'&`&\relax\^&"&\relax\~&=&.&u&v\cr
3+@y
4+'&`&\relax\^&"&\relax\~&=&:&u&v\cr
5+@z
6+@x
7+ 1,1,1,1,1,0,0,1, /* \.{\\-} and \.{\\.} */
8+ 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1, /* \.{\\=} */
9+@y
10+ 1,1,1,1,1,0,1,1, /* \.{\\-} */
11+ 1,1,1,1,1,1,1,1,1,1,0,1,1,0,1,1, /* \.{:} and \.{\\=} */
12+@z
13+@x and I use |...xref-tag...| for cross-references
14+case '|': if (web>1) {
15+ save_skipping=skipping;
16+ goto skip_C_prime;
17+ }
18+@y
19+case '|': if (web>1) {
20+ save_skipping=skipping;
21+ goto skip_C_prime;
22+ } else discard_to('|');
23+@z
examples/extex.w+2−1
@@ -26,6 +26,7 @@ along too. If any of these control sequences is followed by \.\{, everything · 25 unmodified lines
2626 up to the next \.\} will also be retained. Thus, for example, the
2727 construction `\.{m\\=\{\\i\}n\\u\ us}' will be considered a single word,
2828 in spite of the control sequences and the space between the two u's.
29+Discretionary hyphens `\.{\char`\\-}' are treated in the same way as accents.
2930
3031 The \.{CWEB} conventions are essentially the same as the \TEX/ conventions,
3132 in the \TEX/ parts of a \.{CWEB} file. The \CEE/ parts of the file
@@ -229,7 +230,7 @@ special, otherwise~1; the conventions for letters are reversed. · 197 unmodified lines
229230
230231 @<Global...@>=
231232 char ptab[]={0,1,1,1,1,0, /* \.{\\"} and \.{\\'} */
232− 1,1,1,1,1,1,0,1, /* \.{\\.} */
233+ 1,1,1,1,1,0,0,1, /* \.{\\-} and \.{\\.} */
233234 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1, /* \.{\\=} */
234235 1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1, /* \.{\\H}, \.{\\L}, \.{\\O} */
235236 0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1, /* \.{\\\^} */
examples/kspell.el+5−0
@@ -18,6 +18,11 @@ · 17 unmodified lines
1818 ;; and nothing else, the probable cause is that the wordtest program
1919 ;; could not open /usr/local/lib/dict/words or ~/.words for reading.
2020
21+;; Note (10 Feb 1998): The spell-check logic failed to catch "obso1ete"
22+;; as a scanner-typo for "obsolete". The reason is that, although "obso"
23+;; and "ete" are non-words, they couldn't be found in query-replace
24+;; for the regexps "\bobso\b" and "\bete\b".
25+
2126 (provide 'kspell)
2227
2328 (defvar wordtest-command "wordtest" ;; maybe "/usr/local/bin/wordtest" better?
examples/oemacs.el+0−1
@@ -46,7 +46,6 @@ · 45 unmodified lines
4646 (define-key suntool-map "jt" 'narrow-to-region) ; F10
4747 (define-key suntool-map "j\M-t" 'narrow-to-page) ; M-F10
4848 (define-key suntool-map "kt" 'revert-buffer) ; F11
49− (define-key suntool-map "k\M-T" 'quick-revert-buffer) ; Shift-M-F11
5049 (define-key suntool-map "k\M-t" 'quick-revert-other-buffer) ; M-F11
5150 (define-key suntool-map "lt" 'goto-line) ; F12
5251 (define-key suntool-map "l\M-t" 'goto-line) ; M-F12

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t