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
10@x10@x
11\def\v{\char'174} % vertical (|) in typewriter font11\def\v{\char'174} % vertical (|) in typewriter font
12 12
13\def\title{Common code for CTANGLE and CWEAVE (Version 3.3)}13\def\title{Common code for CTANGLE and CWEAVE (Version 3.42)}
14\def\topofcontents{\null\vfill14\def\topofcontents{\null\vfill
15 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and15 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
16 {\ttitlefont CWEAVE}}16 {\ttitlefont CWEAVE}}
17 \vskip 15pt17 \vskip 15pt
18 \centerline{(Version 3.3)}18 \centerline{(Version 3.42)}
19 \vfill}19 \vfill}
20\def\botofcontents{\vfill20\def\botofcontents{\vfill
21\noindent21\noindent
22@y22@y
23\def\v{\char'174} % vertical (|) in typewriter font23\def\v{\char'174} % vertical (|) in typewriter font
24 24
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)}
26\def\topofcontents{\null\vfill26\def\topofcontents{\null\vfill
27 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and27 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
28 {\ttitlefont CWEAVE}}28 {\ttitlefont CWEAVE}}
29 \vskip 15pt29 \vskip 15pt
30 \centerline{(Version 3.4)}30 \centerline{(Version 3.42)}
31 \vfill}31 \vfill}
32\def\botofcontents{\vfill32\def\botofcontents{\vfill
33\noindent33\noindent
@@ -174,16 +174,12 @@ after the dot. We must check that there is enough room in · 140 unmodified lines
174 sprintf(C_file_name,"%s.c",*argv);174 sprintf(C_file_name,"%s.c",*argv);
175 } else {175 } else {
176 strcpy(tex_file_name,*argv);176 strcpy(tex_file_name,*argv);
177 strcpy(C_file_name,*argv);
177 if (flags['x']) { /* indexes will be generated */178 if (flags['x']) { /* indexes will be generated */
178 if (program==cweave && strcmp(*argv+strlen(*argv)-4,".tex")!=0)179 *dot_pos=0;
179 fatal("! Output file name should end with .tex\n",*argv);180 sprintf(idx_file_name,"%s.idx",*argv);
180@.Output file name...tex@>181 sprintf(scn_file_name,"%s.scn",*argv);
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");
185 }182 }
186 strcpy(C_file_name,*argv);
187 }183 }
188 found_out=1;184 found_out=1;
189}185}
@@ -297,16 +293,12 @@ the routine as if it would work. · 107 unmodified lines
297 sprintf(C_file_name,"%s_c",*argv);293 sprintf(C_file_name,"%s_c",*argv);
298 } else {294 } else {
299 strcpy(tex_file_name,*argv);295 strcpy(tex_file_name,*argv);
296 strcpy(C_file_name,*argv);
300 if (flags['x']) { /* indexes will be generated */297 if (flags['x']) { /* indexes will be generated */
301 if (program==cweave && strcmp(*argv+strlen(*argv)-4,"_tex")!=0)298 *dot_pos=0;
302 fatal("! Output file name should end with _tex\n",*argv);299 sprintf(idx_file_name,"%s_idx",*argv);
303@.Output file name...tex@>300 sprintf(scn_file_name,"%s_scn",*argv);
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");
308 }301 }
309 strcpy(C_file_name,*argv);
310 }302 }
311 found_out=1;303 found_out=1;
312}304}
common.c+36−40
@@ -4,17 +4,17 @@ · 3 unmodified lines
4/*5:*/4/*5:*/
5#line 101 "common.w"5#line 101 "common.w"
6 6
7#include <ctype.h>7#include <ctype.h>
8 8
9/*:5*//*8:*/9/*:5*//*8:*/
10#line 164 "common.w"10#line 164 "common.w"
11 11
12#include <stdio.h>12#include <stdio.h>
13 13
14/*:8*//*22:*/14/*:8*//*22:*/
15#line 469 "common.w"15#line 469 "common.w"
16 16
17#include <stdlib.h> 17#include <stdlib.h>
18 18
19/*:22*/19/*:22*/
20#line 58 "common.w"20#line 58 "common.w"
@@ -229,7 +229,7 @@ char scn_file_name[max_file_name_length]; · 208 unmodified lines
229boolean flags[128];229boolean flags[128];
230 230
231/*:67*//*77:*/231/*:67*//*77:*/
232#line 1367 "common.w"232#line 1363 "common.w"
233 233
234FILE*C_file;234FILE*C_file;
235FILE*tex_file;235FILE*tex_file;
@@ -295,7 +295,7 @@ void fatal(),overflow(); · 59 unmodified lines
295void scan_args();295void scan_args();
296 296
297/*:69*//*81:*/297/*:69*//*81:*/
298#line 1408 "common.w"298#line 1404 "common.w"
299 299
300extern int strlen();300extern int strlen();
301extern int strcmp();301extern int strcmp();
@@ -342,7 +342,7 @@ show_banner= show_happiness= show_progress= 1; · 40 unmodified lines
342#line 93 "common.w"342#line 93 "common.w"
343;343;
344/*78:*/344/*78:*/
345#line 1374 "common.w"345#line 1370 "common.w"
346 346
347scan_args();347scan_args();
348if(program==ctangle){348if(program==ctangle){
@@ -372,7 +372,7 @@ if(feof(fp))return(0); · 23 unmodified lines
372limit= k= buffer;372limit= k= buffer;
373while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')373while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
374if((*(k++)= c)!=' ')limit= k;374if((*(k++)= c)!=' ')limit= k;
375if(k>buffer_end)375if(k> buffer_end)
376if((c= getc(fp))!=EOF&&c!='\n'){376if((c= getc(fp))!=EOF&&c!='\n'){
377ungetc(c,fp);loc= buffer;err_print("! Input line too long");377ungetc(c,fp);loc= buffer;err_print("! Input line too long");
378 378
@@ -458,7 +458,7 @@ err_print("! Change file ended before @y"); · 79 unmodified lines
458change_limit= change_buffer;changing= 0;458change_limit= change_buffer;changing= 0;
459return;459return;
460}460}
461if(limit>buffer+1&&buffer[0]=='@'){461if(limit> buffer+1&&buffer[0]=='@'){
462if(xisupper(buffer[1]))buffer[1]= tolower(buffer[1]);462if(xisupper(buffer[1]))buffer[1]= tolower(buffer[1]);
463/*17:*/463/*17:*/
464#line 357 "common.w"464#line 357 "common.w"
@@ -468,7 +468,7 @@ loc= buffer+2;err_print("! Where is the matching @y?"); · 3 unmodified lines
468 468
469}469}
470else if(buffer[1]=='y'){470else if(buffer[1]=='y'){
471if(n>0){471if(n> 0){
472loc= buffer+2;472loc= buffer+2;
473printf("\n! Hmm... %d ",n);473printf("\n! Hmm... %d ",n);
474err_print("of the preceding lines failed to match");474err_print("of the preceding lines failed to match");
@@ -552,7 +552,7 @@ err_print("! Change file ended without @z"); · 77 unmodified lines
552 552
553buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;553buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;
554}554}
555if(limit>buffer){555if(limit> buffer){
556if(change_pending){556if(change_pending){
557if_section_start_make_pending(0);557if_section_start_make_pending(0);
558if(change_pending){558if(change_pending){
@@ -577,7 +577,7 @@ prime_the_change_buffer();changing= !changing;print_where= 1; · 18 unmodified lines
577/*:25*/577/*:25*/
578#line 430 "common.w"578#line 430 "common.w"
579;579;
580if(!changing||include_depth>change_depth){580if(!changing||include_depth> change_depth){
581/*24:*/581/*24:*/
582#line 513 "common.w"582#line 513 "common.w"
583{583{
@@ -594,7 +594,7 @@ cur_line++; · 10 unmodified lines
594if(!changing&&!input_has_ended)594if(!changing&&!input_has_ended)
595if(limit-buffer==change_limit-change_buffer)595if(limit-buffer==change_limit-change_buffer)
596if(buffer[0]==change_buffer[0])596if(buffer[0]==change_buffer[0])
597if(change_limit>change_buffer)check_change();597if(change_limit> change_buffer)check_change();
598}598}
599 599
600/*:24*/600/*:24*/
@@ -626,7 +626,7 @@ char*k= cur_file_name,*kk; · 25 unmodified lines
626int l;626int l;
627 627
628while(*loc!=' '&&*loc!='\t'&&*loc!='"'&&k<=cur_file_name_end)*k++= *loc++;628while(*loc!=' '&&*loc!='\t'&&*loc!='"'&&k<=cur_file_name_end)*k++= *loc++;
629if(k>cur_file_name_end)too_long();629if(k> cur_file_name_end)too_long();
630 630
631*k= '\0';631*k= '\0';
632if((cur_file= fopen(cur_file_name,"r"))!=NULL){632if((cur_file= fopen(cur_file_name,"r"))!=NULL){
@@ -635,18 +635,18 @@ goto restart; · 2 unmodified lines
635}635}
636kk= getenv("CWEBINPUTS");636kk= getenv("CWEBINPUTS");
637if(kk!=NULL){637if(kk!=NULL){
638if((l= strlen(kk))>max_file_name_length-2)too_long();638if((l= strlen(kk))> max_file_name_length-2)too_long();
639strcpy(temp_file_name,kk);639strcpy(temp_file_name,kk);
640}640}
641else{641else{
642#ifdef CWEBINPUTS642#ifdef CWEBINPUTS
643if((l= strlen(CWEBINPUTS))>max_file_name_length-2)too_long();643if((l= strlen(CWEBINPUTS))> max_file_name_length-2)too_long();
644strcpy(temp_file_name,CWEBINPUTS);644strcpy(temp_file_name,CWEBINPUTS);
645#else645#else
646l= 0;646l= 0;
647#endif 647#endif
648}648}
649if(l>0){649if(l> 0){
650if(k+l+2>=cur_file_name_end)too_long();650if(k+l+2>=cur_file_name_end)too_long();
651 651
652for(;k>=cur_file_name;k--)*(k+l+1)= *k;652for(;k>=cur_file_name;k--)*(k+l+1)= *k;
@@ -722,7 +722,7 @@ p->link= hash[h];hash[h]= p; · 69 unmodified lines
722if(p==name_ptr)/*39:*/722if(p==name_ptr)/*39:*/
723#line 699 "common.w"723#line 699 "common.w"
724{724{
725if(byte_ptr+l>byte_mem_end)overflow("byte memory");725if(byte_ptr+l> byte_mem_end)overflow("byte memory");
726if(name_ptr>=name_dir_end)overflow("name");726if(name_ptr>=name_dir_end)overflow("name");
727strncpy(byte_ptr,first,l);727strncpy(byte_ptr,first,l);
728(++name_ptr)->byte_start= byte_ptr+= l;728(++name_ptr)->byte_start= byte_ptr+= l;
@@ -822,7 +822,7 @@ int ispref; · 93 unmodified lines
822name_pointer p= name_ptr;822name_pointer p= name_ptr;
823char*s= first_chunk(p);823char*s= first_chunk(p);
824int name_len= last-first+ispref;824int name_len= last-first+ispref;
825if(s+name_len>byte_mem_end)overflow("byte memory");825if(s+name_len> byte_mem_end)overflow("byte memory");
826if(name_ptr+1>=name_dir_end)overflow("name");826if(name_ptr+1>=name_dir_end)overflow("name");
827(++name_ptr)->byte_start= byte_ptr= s+name_len;827(++name_ptr)->byte_start= byte_ptr= s+name_len;
828if(ispref){828if(ispref){
@@ -857,7 +857,7 @@ while(q->link!=name_dir)q= q->link; · 28 unmodified lines
857q->link= name_ptr;857q->link= name_ptr;
858s= name_ptr->byte_start;858s= name_ptr->byte_start;
859name_ptr->link= name_dir;859name_ptr->link= name_dir;
860if(s+name_len>byte_mem_end)overflow("byte memory");860if(s+name_len> byte_mem_end)overflow("byte memory");
861(++name_ptr)->byte_start= byte_ptr= s+name_len;861(++name_ptr)->byte_start= byte_ptr= s+name_len;
862strncpy(s,first,name_len);862strncpy(s,first,name_len);
863if(ispref)*(byte_ptr-1)= ' ';863if(ispref)*(byte_ptr-1)= ' ';
@@ -1007,7 +1007,7 @@ printf(". (l. %d of change file)\n",change_line); · 143 unmodified lines
1007else if(include_depth==0)printf(". (l. %d)\n",cur_line);1007else if(include_depth==0)printf(". (l. %d)\n",cur_line);
1008else printf(". (l. %d of include file %s)\n",cur_line,cur_file_name);1008else printf(". (l. %d of include file %s)\n",cur_line,cur_file_name);
1009l= (loc>=limit?limit:loc);1009l= (loc>=limit?limit:loc);
1010if(l>buffer){1010if(l> buffer){
1011for(k= buffer;k<l;k++)1011for(k= buffer;k<l;k++)
1012if(*k=='\t')putchar(' ');1012if(*k=='\t')putchar(' ');
1013else putchar(*k);1013else putchar(*k);
@@ -1047,7 +1047,7 @@ case fatal_message:printf("(That was a fatal error, my friend.)\n"); · 33 unmodified lines
1047/*:62*/1047/*:62*/
1048#line 1148 "common.w"1048#line 1148 "common.w"
1049;1049;
1050if(history>harmless_message)return(1);1050if(history> harmless_message)return(1);
1051else return(0);1051else return(0);
1052}1052}
1053 1053
@@ -1085,14 +1085,14 @@ boolean found_web= 0,found_change= 0,found_out= 0; · 31 unmodified lines
1085 1085
1086boolean flag_change;1086boolean flag_change;
1087 1087
1088while(--argc>0){1088while(--argc> 0){
1089if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/1089if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/
1090#line 1341 "common.w"1090#line 1337 "common.w"
1091 1091
1092{1092{
1093if(**argv=='-')flag_change= 0;1093if(**argv=='-')flag_change= 0;
1094else flag_change= 1;1094else flag_change= 1;
1095for(dot_pos= *argv+1;*dot_pos>'\0';dot_pos++)1095for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
1096flags[*dot_pos]= flag_change;1096flags[*dot_pos]= flag_change;
1097}1097}
1098 1098
@@ -1110,9 +1110,9 @@ if(!found_web)/*71:*/ · 11 unmodified lines
1110#line 1285 "common.w"1110#line 1285 "common.w"
1111 1111
1112{1112{
1113if(s-*argv>max_file_name_length-5)1113if(s-*argv> max_file_name_length-5)
1114/*76:*/1114/*76:*/
1115#line 1361 "common.w"1115#line 1357 "common.w"
1116fatal("! Filename too long\n",*argv);1116fatal("! Filename too long\n",*argv);
1117 1117
1118 1118
@@ -1142,9 +1142,9 @@ else if(!found_change)/*72:*/ · 23 unmodified lines
1142{1142{
1143if(strcmp(*argv,"-")==0)found_change= -1;1143if(strcmp(*argv,"-")==0)found_change= -1;
1144else{1144else{
1145if(s-*argv>max_file_name_length-4)1145if(s-*argv> max_file_name_length-4)
1146/*76:*/1146/*76:*/
1147#line 1361 "common.w"1147#line 1357 "common.w"
1148fatal("! Filename too long\n",*argv);1148fatal("! Filename too long\n",*argv);
1149 1149
1150 1150
@@ -1165,9 +1165,9 @@ else if(!found_out)/*73:*/ · 14 unmodified lines
1165#line 1316 "common.w"1165#line 1316 "common.w"
1166 1166
1167{1167{
1168if(s-*argv>max_file_name_length-5)1168if(s-*argv> max_file_name_length-5)
1169/*76:*/1169/*76:*/
1170#line 1361 "common.w"1170#line 1357 "common.w"
1171fatal("! Filename too long\n",*argv);1171fatal("! Filename too long\n",*argv);
1172 1172
1173 1173
@@ -1181,16 +1181,12 @@ sprintf(scn_file_name,"%s.scn",*argv); · 7 unmodified lines
1181sprintf(C_file_name,"%s.c",*argv);1181sprintf(C_file_name,"%s.c",*argv);
1182}else{1182}else{
1183strcpy(tex_file_name,*argv);1183strcpy(tex_file_name,*argv);
1184strcpy(C_file_name,*argv);
1184if(flags['x']){1185if(flags['x']){
1185if(program==cweave&&strcmp(*argv+strlen(*argv)-4,".tex")!=0)1186*dot_pos= 0;
1186fatal("! Output file name should end with .tex\n",*argv);1187sprintf(idx_file_name,"%s.idx",*argv);
1187 1188sprintf(scn_file_name,"%s.scn",*argv);
1188strcpy(idx_file_name,*argv);
1189strcpy(idx_file_name+strlen(*argv)-4,".idx");
1190strcpy(scn_file_name,*argv);
1191strcpy(scn_file_name+strlen(*argv)-4,".scn");
1192}1189}
1193strcpy(C_file_name,*argv);
1194}1190}
1195found_out= 1;1191found_out= 1;
1196}1192}
@@ -1199,7 +1195,7 @@ found_out= 1; · 2 unmodified lines
1199#line 1270 "common.w"1195#line 1270 "common.w"
1200 1196
1201else/*75:*/1197else/*75:*/
1202#line 1349 "common.w"1198#line 1345 "common.w"
1203 1199
1204{1200{
1205if(program==ctangle)1201if(program==ctangle)
@@ -1218,7 +1214,7 @@ else fatal( · 12 unmodified lines
1218}1214}
1219}1215}
1220if(!found_web)/*75:*/1216if(!found_web)/*75:*/
1221#line 1349 "common.w"1217#line 1345 "common.w"
1222 1218
1223{1219{
1224if(program==ctangle)1220if(program==ctangle)
common.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% It is distributed WITHOUT ANY WARRANTY, express or implied.
5% Version 3.0 --- June 19935% Version 3.0 --- June 1993 (works also with later versions)
6 6
7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
8 8
common.w+7−11
@@ -2,7 +2,7 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% 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)
6 6
7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
8 8
@@ -17,12 +17,12 @@ · 8 unmodified lines
17 17
18\def\v{\char'174} % vertical (|) in typewriter font18\def\v{\char'174} % vertical (|) in typewriter font
19 19
20\def\title{Common code for CTANGLE and CWEAVE (Version 3.3)}20\def\title{Common code for CTANGLE and CWEAVE (Version 3.42)}
21\def\topofcontents{\null\vfill21\def\topofcontents{\null\vfill
22 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and22 \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and
23 {\ttitlefont CWEAVE}}23 {\ttitlefont CWEAVE}}
24 \vskip 15pt24 \vskip 15pt
25 \centerline{(Version 3.3)}25 \centerline{(Version 3.42)}
26 \vfill}26 \vfill}
27\def\botofcontents{\vfill27\def\botofcontents{\vfill
28\noindent28\noindent
@@ -1324,16 +1324,12 @@ after the dot. We must check that there is enough room in · 1295 unmodified lines
1324 sprintf(C_file_name,"%s.c",*argv);1324 sprintf(C_file_name,"%s.c",*argv);
1325 } else {1325 } else {
1326 strcpy(tex_file_name,*argv);1326 strcpy(tex_file_name,*argv);
1327 strcpy(C_file_name,*argv);
1327 if (flags['x']) { /* indexes will be generated */1328 if (flags['x']) { /* indexes will be generated */
1328 if (program==cweave && strcmp(*argv+strlen(*argv)-4,".tex")!=0)1329 *dot_pos=0;
1329 fatal("! Output file name should end with .tex\n",*argv);1330 sprintf(idx_file_name,"%s.idx",*argv);
1330@.Output file name...tex@>1331 sprintf(scn_file_name,"%s.scn",*argv);
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");
1335 }1332 }
1336 strcpy(C_file_name,*argv);
1337 }1333 }
1338 found_out=1;1334 found_out=1;
1339}1335}
ctang-bs.ch+2−2
@@ -17,12 +17,12 @@ by using "huge" pointers. · 16 unmodified lines
17The ``banner line'' defined here should be changed whenever \.{CTANGLE}17The ``banner line'' defined here should be changed whenever \.{CTANGLE}
18is modified.18is modified.
19 19
20@d banner "This is CTANGLE (Version 3.4)\n"20@d banner "This is CTANGLE (Version 3.43)\n"
21@y21@y
22The ``banner line'' defined here should be changed whenever \.{CTANGLE}22The ``banner line'' defined here should be changed whenever \.{CTANGLE}
23is modified.23is modified.
24 24
25@d banner "This is CTANGLE (Version 3.4pc/big)\n"25@d banner "This is CTANGLE (Version 3.43pc/big)\n"
26@z26@z
27 27
28 28
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
9alternate change files with -bs suffix instead of -pc.9alternate change files with -bs suffix instead of -pc.
10 10
11@x section 111@x section 1
12@d banner "This is CTANGLE (Version 3.4)\n"12@d banner "This is CTANGLE (Version 3.43)\n"
13@y13@y
14@d banner "This is CTANGLE (Version 3.4pc)\n"14@d banner "This is CTANGLE (Version 3.43pc)\n"
15@z15@z
16@x section 416@x section 4
17@d max_bytes 90000 /* the number of bytes in identifiers,17@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
7 7
8 8
9@x9@x
10\def\title{CTANGLE (Version 3.4)}10\def\title{CTANGLE (Version 3.43)}
11@y11@y
12\def\title{CTANGLE (QL Version 3.4)}12\def\title{CTANGLE (QL Version 3.43)}
13@z13@z
14 14
15@x section 115@x section 1
16@d banner "This is CTANGLE (Version 3.4)\n"16@d banner "This is CTANGLE (Version 3.43)\n"
17@y17@y
18@d banner "This is CTANGLE (QL Version 3.4)\n"18@d banner "This is CTANGLE (QL Version 3.43)\n"
19@z19@z
20 20
21@x21@x
ctang-vms.ch+2−2
@@ -10,9 +10,9 @@ created: · 9 unmodified lines
10(these changes not necessary for initial bootstrapping)10(these changes not necessary for initial bootstrapping)
11 11
12@x section 1 (01-FEB-1992 ST)12@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"
14@y14@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"
16@z16@z
17 17
18@x section 6 (from common.h) (01-FEB-1992 ST)18@x section 6 (from common.h) (01-FEB-1992 ST)
ctangle.c+102−101
@@ -4,18 +4,18 @@ · 3 unmodified lines
4/*6:*/4/*6:*/
5#line 35 "common.h"5#line 35 "common.h"
6 6
7#include <stdio.h>7#include <stdio.h>
8 8
9/*:6*//*62:*/9/*:6*//*62:*/
10#line 881 "ctangle.w"10#line 882 "ctangle.w"
11 11
12#include <ctype.h> 12#include <ctype.h>
13#include <stdlib.h> 13#include <stdlib.h>
14 14
15/*:62*/15/*:62*/
16#line 62 "ctangle.w"16#line 62 "ctangle.w"
17 17
18#define banner "This is CTANGLE (Version 3.4)\n" \18#define banner "This is CTANGLE (Version 3.43)\n" \
19 19
20#define max_bytes 90000 \20#define max_bytes 90000 \
21 21
@@ -24,7 +24,7 @@ · 2 unmodified lines
24 24
25#define max_texts 250025#define max_texts 2500
26#define hash_size 35326#define hash_size 353
27#define longest_name 100027#define longest_name 10000
28#define stack_size 5028#define stack_size 50
29#define buf_size 100 \29#define buf_size 100 \
30 30
@@ -127,7 +127,7 @@ · 96 unmodified lines
127#define constant 03 \127#define constant 03 \
128 128
129#define isxalpha(c) ((c) =='_') 129#define isxalpha(c) ((c) =='_')
130#define ishigh(c) ((unsigned char) (c) >0177) \130#define ishigh(c) ((unsigned char) (c) > 0177) \
131 \131 \
132 132
133#define compress(c) if(loc++<=limit) return(c) \133#define compress(c) if(loc++<=limit) return(c) \
@@ -328,34 +328,34 @@ char output_file_name[longest_name]; · 194 unmodified lines
328boolean output_defs_seen= 0;328boolean output_defs_seen= 0;
329 329
330/*:45*//*51:*/330/*:45*//*51:*/
331#line 706 "ctangle.w"331#line 707 "ctangle.w"
332 332
333char translit[128][translit_length];333char translit[128][translit_length];
334 334
335/*:51*//*56:*/335/*:51*//*56:*/
336#line 782 "ctangle.w"336#line 783 "ctangle.w"
337 337
338eight_bits ccode[256];338eight_bits ccode[256];
339 339
340/*:56*//*59:*/340/*:56*//*59:*/
341#line 838 "ctangle.w"341#line 839 "ctangle.w"
342 342
343boolean comment_continues= 0;343boolean comment_continues= 0;
344 344
345/*:59*//*61:*/345/*:59*//*61:*/
346#line 877 "ctangle.w"346#line 878 "ctangle.w"
347 347
348name_pointer cur_section_name;348name_pointer cur_section_name;
349int no_where;349int no_where;
350 350
351/*:61*//*75:*/351/*:61*//*75:*/
352#line 1191 "ctangle.w"352#line 1192 "ctangle.w"
353 353
354text_pointer cur_text;354text_pointer cur_text;
355eight_bits next_control;355eight_bits next_control;
356 356
357/*:75*//*82:*/357/*:75*//*82:*/
358#line 1341 "ctangle.w"358#line 1342 "ctangle.w"
359 359
360extern sixteen_bits section_count;360extern sixteen_bits section_count;
361 361
@@ -387,12 +387,12 @@ void output_defs(); · 25 unmodified lines
387static void out_char();387static void out_char();
388 388
389/*:48*//*90:*/389/*:48*//*90:*/
390#line 1448 "ctangle.w"390#line 1449 "ctangle.w"
391 391
392void phase_one();392void phase_one();
393 393
394/*:90*//*92:*/394/*:90*//*92:*/
395#line 1466 "ctangle.w"395#line 1467 "ctangle.w"
396 396
397void skip_limbo();397void skip_limbo();
398 398
@@ -431,7 +431,7 @@ last_unnamed= text_info;text_info->text_link= 0; · 32 unmodified lines
431cur_out_file= end_output_files= output_files+max_files;431cur_out_file= end_output_files= output_files+max_files;
432 432
433/*:39*//*52:*/433/*:39*//*52:*/
434#line 709 "ctangle.w"434#line 710 "ctangle.w"
435 435
436{436{
437int i;437int i;
@@ -439,7 +439,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i)); · 1 unmodified line
439}439}
440 440
441/*:52*//*57:*/441/*:52*//*57:*/
442#line 785 "ctangle.w"442#line 786 "ctangle.w"
443{443{
444int c;444int c;
445for(c= 0;c<256;c++)ccode[c]= ignore;445for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -459,7 +459,7 @@ ccode['\'']= ord; · 13 unmodified lines
459}459}
460 460
461/*:57*//*71:*/461/*:57*//*71:*/
462#line 1112 "ctangle.w"462#line 1113 "ctangle.w"
463section_text[0]= ' ';463section_text[0]= ' ';
464 464
465/*:71*/465/*:71*/
@@ -503,7 +503,7 @@ void · 37 unmodified lines
503store_two_bytes(x)503store_two_bytes(x)
504sixteen_bits x;504sixteen_bits x;
505{505{
506if(tok_ptr+2>tok_mem_end)overflow("token");506if(tok_ptr+2> tok_mem_end)overflow("token");
507*tok_ptr++= x>>8;507*tok_ptr++= x>>8;
508*tok_ptr++= x&0377;508*tok_ptr++= x&0377;
509}509}
@@ -538,7 +538,7 @@ cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start; · 28 unmodified lines
538return;538return;
539}539}
540stack_ptr--;540stack_ptr--;
541if(stack_ptr>stack)cur_state= *stack_ptr;541if(stack_ptr> stack)cur_state= *stack_ptr;
542}542}
543 543
544/*:31*//*33:*/544/*:31*//*33:*/
@@ -582,7 +582,7 @@ goto restart; · 37 unmodified lines
582#line 409 "ctangle.w"582#line 409 "ctangle.w"
583;583;
584break;584break;
585default:cur_val= a-050000;if(cur_val>0)cur_section= cur_val;585default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
586out_char(section_number);586out_char(section_number);
587}587}
588}588}
@@ -646,12 +646,12 @@ update_terminal; · 57 unmodified lines
646}646}
647if(text_info->text_link==0)goto writeloop;647if(text_info->text_link==0)goto writeloop;
648}648}
649while(stack_ptr>stack)get_output();649while(stack_ptr> stack)get_output();
650flush_buffer();650flush_buffer();
651writeloop:/*43:*/651writeloop:/*43:*/
652#line 569 "ctangle.w"652#line 569 "ctangle.w"
653 653
654for(an_output_file= end_output_files;an_output_file>cur_out_file;){654for(an_output_file= end_output_files;an_output_file> cur_out_file;){
655an_output_file--;655an_output_file--;
656sprint_section_name(output_file_name,*an_output_file);656sprint_section_name(output_file_name,*an_output_file);
657fclose(C_file);657fclose(C_file);
@@ -665,7 +665,7 @@ cur_name= (*an_output_file); · 7 unmodified lines
665cur_repl= (text_pointer)cur_name->equiv;665cur_repl= (text_pointer)cur_name->equiv;
666cur_byte= cur_repl->tok_start;666cur_byte= cur_repl->tok_start;
667cur_end= (cur_repl+1)->tok_start;667cur_end= (cur_repl+1)->tok_start;
668while(stack_ptr>stack)get_output();668while(stack_ptr> stack)get_output();
669flush_buffer();669flush_buffer();
670}670}
671 671
@@ -726,11 +726,11 @@ eight_bits cur_char; · 54 unmodified lines
726char*j,*k;726char*j,*k;
727restart:727restart:
728switch(cur_char){728switch(cur_char){
729case'\n':if(protect)C_putc(' ');729case'\n':if(protect&&out_state!=verbatim)C_putc(' ');
730if(protect||out_state==verbatim)C_putc('\\');730if(protect||out_state==verbatim)C_putc('\\');
731flush_buffer();if(out_state!=verbatim)out_state= normal;break;731flush_buffer();if(out_state!=verbatim)out_state= normal;break;
732/*53:*/732/*53:*/
733#line 715 "ctangle.w"733#line 716 "ctangle.w"
734 734
735case identifier:735case identifier:
736if(out_state==num_or_id)C_putc(' ');736if(out_state==num_or_id)C_putc(' ');
@@ -748,10 +748,10 @@ out_state= num_or_id;break; · 11 unmodified lines
748#line 659 "ctangle.w"748#line 659 "ctangle.w"
749;749;
750/*54:*/750/*54:*/
751#line 728 "ctangle.w"751#line 729 "ctangle.w"
752 752
753case section_number:753case section_number:
754if(cur_val>0)C_printf("/*%d:*/",cur_val);754if(cur_val> 0)C_printf("/*%d:*/",cur_val);
755else if(cur_val<0)C_printf("/*:%d*/",-cur_val);755else if(cur_val<0)C_printf("/*:%d*/",-cur_val);
756else if(protect){756else if(protect){
757cur_byte+= 4;757cur_byte+= 4;
@@ -775,7 +775,7 @@ break; · 17 unmodified lines
775#line 660 "ctangle.w"775#line 660 "ctangle.w"
776;776;
777/*50:*/777/*50:*/
778#line 677 "ctangle.w"778#line 678 "ctangle.w"
779 779
780case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;780case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
781case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;781case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -798,7 +798,8 @@ break; · 16 unmodified lines
798/*:50*/798/*:50*/
799#line 661 "ctangle.w"799#line 661 "ctangle.w"
800;800;
801case'=':C_putc('=');C_putc(' ');out_state= normal;break;801case'=':case'>':C_putc(cur_char);C_putc(' ');
802out_state= normal;break;
802case join:out_state= unbreakable;break;803case join:out_state= unbreakable;break;
803case constant:if(out_state==verbatim){804case constant:if(out_state==verbatim){
804out_state= num_or_id;break;805out_state= num_or_id;break;
@@ -814,14 +815,14 @@ default:C_putc(cur_char);out_state= normal;break; · 9 unmodified lines
814}815}
815 816
816/*:49*//*58:*/817/*:49*//*58:*/
817#line 806 "ctangle.w"818#line 807 "ctangle.w"
818 819
819eight_bits820eight_bits
820skip_ahead()821skip_ahead()
821{822{
822eight_bits c;823eight_bits c;
823while(1){824while(1){
824if(loc>limit&&(get_line()==0))return(new_section);825if(loc> limit&&(get_line()==0))return(new_section);
825*(limit+1)= '@';826*(limit+1)= '@';
826while(*loc!='@')loc++;827while(*loc!='@')loc++;
827if(loc<=limit){828if(loc<=limit){
@@ -832,14 +833,14 @@ if(c!=ignore||*(loc-1)=='>')return(c); · 4 unmodified lines
832}833}
833 834
834/*:58*//*60:*/835/*:58*//*60:*/
835#line 841 "ctangle.w"836#line 842 "ctangle.w"
836 837
837int skip_comment(is_long_comment)838int skip_comment(is_long_comment)
838boolean is_long_comment;839boolean is_long_comment;
839{840{
840char c;841char c;
841while(1){842while(1){
842if(loc>limit){843if(loc> limit){
843if(is_long_comment){844if(is_long_comment){
844if(get_line())return(comment_continues= 1);845if(get_line())return(comment_continues= 1);
845else{846else{
@@ -866,7 +867,7 @@ else loc++; · 20 unmodified lines
866}867}
867 868
868/*:60*//*63:*/869/*:60*//*63:*/
869#line 892 "ctangle.w"870#line 893 "ctangle.w"
870 871
871eight_bits872eight_bits
872get_next()873get_next()
@@ -874,13 +875,13 @@ get_next() · 1 unmodified line
874static int preprocessing= 0;875static int preprocessing= 0;
875eight_bits c;876eight_bits c;
876while(1){877while(1){
877if(loc>limit){878if(loc> limit){
878if(preprocessing&&*(limit-1)!='\\')preprocessing= 0;879if(preprocessing&&*(limit-1)!='\\')preprocessing= 0;
879if(get_line()==0)return(new_section);880if(get_line()==0)return(new_section);
880else if(print_where&&!no_where){881else if(print_where&&!no_where){
881print_where= 0;882print_where= 0;
882/*77:*/883/*77:*/
883#line 1221 "ctangle.w"884#line 1222 "ctangle.w"
884 885
885store_two_bytes(0150000);886store_two_bytes(0150000);
886if(changing)id_first= change_file_name;887if(changing)id_first= change_file_name;
@@ -892,7 +893,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
892app_repl(a%0400);}893app_repl(a%0400);}
893 894
894/*:77*/895/*:77*/
895#line 904 "ctangle.w"896#line 905 "ctangle.w"
896;897;
897}898}
898else return('\n');899else return('\n');
@@ -906,7 +907,7 @@ else continue; · 7 unmodified lines
906}907}
907loc++;908loc++;
908if(xisdigit(c)||c=='\\'||c=='.')/*66:*/909if(xisdigit(c)||c=='\\'||c=='.')/*66:*/
909#line 970 "ctangle.w"910#line 971 "ctangle.w"
910{911{
911id_first= loc-1;912id_first= loc-1;
912if(*id_first=='.'&&!xisdigit(*loc))goto mistake;913if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -934,11 +935,11 @@ return(constant); · 21 unmodified lines
934}935}
935 936
936/*:66*/937/*:66*/
937#line 916 "ctangle.w"938#line 917 "ctangle.w"
938 939
939else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"')))940else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"')))
940/*67:*/941/*67:*/
941#line 1001 "ctangle.w"942#line 1002 "ctangle.w"
942{943{
943char delim= c;944char delim= c;
944id_first= section_text+1;945id_first= section_text+1;
@@ -981,11 +982,11 @@ return(string); · 36 unmodified lines
981}982}
982 983
983/*:67*/984/*:67*/
984#line 918 "ctangle.w"985#line 919 "ctangle.w"
985 986
986else if(isalpha(c)||isxalpha(c)||ishigh(c))987else if(isalpha(c)||isxalpha(c)||ishigh(c))
987/*65:*/988/*65:*/
988#line 964 "ctangle.w"989#line 965 "ctangle.w"
989{990{
990id_first= --loc;991id_first= --loc;
991while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc));992while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc));
@@ -993,10 +994,10 @@ id_loc= loc;return(identifier); · 1 unmodified line
993}994}
994 995
995/*:65*/996/*:65*/
996#line 920 "ctangle.w"997#line 921 "ctangle.w"
997 998
998else if(c=='@')/*68:*/999else if(c=='@')/*68:*/
999#line 1045 "ctangle.w"1000#line 1046 "ctangle.w"
1000{1001{
1001c= ccode[(eight_bits)*loc++];1002c= ccode[(eight_bits)*loc++];
1002switch(c){1003switch(c){
@@ -1013,22 +1014,22 @@ continue; · 10 unmodified lines
1013case section_name:1014case section_name:
1014cur_section_name_char= *(loc-1);1015cur_section_name_char= *(loc-1);
1015/*70:*/1016/*70:*/
1016#line 1094 "ctangle.w"1017#line 1095 "ctangle.w"
1017{1018{
1018char*k;1019char*k;
1019/*72:*/1020/*72:*/
1020#line 1114 "ctangle.w"1021#line 1115 "ctangle.w"
1021 1022
1022k= section_text;1023k= section_text;
1023while(1){1024while(1){
1024if(loc>limit&&get_line()==0){1025if(loc> limit&&get_line()==0){
1025err_print("! Input ended in section name");1026err_print("! Input ended in section name");
1026 1027
1027loc= buffer+1;break;1028loc= buffer+1;break;
1028}1029}
1029c= *loc;1030c= *loc;
1030/*73:*/1031/*73:*/
1031#line 1138 "ctangle.w"1032#line 1139 "ctangle.w"
1032 1033
1033if(c=='@'){1034if(c=='@'){
1034c= *(loc+1);1035c= *(loc+1);
@@ -1047,7 +1048,7 @@ err_print("! Nesting of section names not allowed");break; · 12 unmodified lines
1047}1048}
1048 1049
1049/*:73*/1050/*:73*/
1050#line 1123 "ctangle.w"1051#line 1124 "ctangle.w"
1051;1052;
1052loc++;if(k<section_text_end)k++;1053loc++;if(k<section_text_end)k++;
1053if(xisspace(c)){1054if(xisspace(c)){
@@ -1061,12 +1062,12 @@ printf("\n! Section name too long: "); · 7 unmodified lines
1061term_write(section_text+1,25);1062term_write(section_text+1,25);
1062printf("...");mark_harmless;1063printf("...");mark_harmless;
1063}1064}
1064if(*k==' '&&k>section_text)k--;1065if(*k==' '&&k> section_text)k--;
1065 1066
1066/*:72*/1067/*:72*/
1067#line 1096 "ctangle.w"1068#line 1097 "ctangle.w"
1068;1069;
1069if(k-section_text>3&&strncmp(k-2,"...",3)==0)1070if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
1070cur_section_name= section_lookup(section_text+1,k-3,1);1071cur_section_name= section_lookup(section_text+1,k-3,1);
1071else cur_section_name= section_lookup(section_text+1,k,0);1072else cur_section_name= section_lookup(section_text+1,k,0);
1072if(cur_section_name_char=='(')1073if(cur_section_name_char=='(')
@@ -1078,7 +1079,7 @@ for(an_output_file= cur_out_file; · 5 unmodified lines
1078an_output_file<end_output_files;an_output_file++)1079an_output_file<end_output_files;an_output_file++)
1079if(*an_output_file==cur_section_name)break;1080if(*an_output_file==cur_section_name)break;
1080if(an_output_file==end_output_files){1081if(an_output_file==end_output_files){
1081if(cur_out_file>output_files)1082if(cur_out_file> output_files)
1082*--cur_out_file= cur_section_name;1083*--cur_out_file= cur_section_name;
1083else{1084else{
1084overflow("output files");1085overflow("output files");
@@ -1087,16 +1088,16 @@ overflow("output files"); · 2 unmodified lines
1087}1088}
1088 1089
1089/*:40*/1090/*:40*/
1090#line 1102 "ctangle.w"1091#line 1103 "ctangle.w"
1091;1092;
1092return(section_name);1093return(section_name);
1093}1094}
1094 1095
1095/*:70*/1096/*:70*/
1096#line 1060 "ctangle.w"1097#line 1061 "ctangle.w"
1097;1098;
1098case string:/*74:*/1099case string:/*74:*/
1099#line 1160 "ctangle.w"1100#line 1161 "ctangle.w"
1100{1101{
1101id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';1102id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
1102while(*loc!='@'||*(loc+1)!='>')loc++;1103while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1107,10 +1108,10 @@ return(string); · 4 unmodified lines
1107}1108}
1108 1109
1109/*:74*/1110/*:74*/
1110#line 1061 "ctangle.w"1111#line 1062 "ctangle.w"
1111;1112;
1112case ord:/*69:*/1113case ord:/*69:*/
1113#line 1073 "ctangle.w"1114#line 1074 "ctangle.w"
1114 1115
1115id_first= loc;1116id_first= loc;
1116if(*loc=='\\'){1117if(*loc=='\\'){
@@ -1124,7 +1125,7 @@ err_print("! Double @ should be used in ASCII constant"); · 7 unmodified lines
1124else loc++;1125else loc++;
1125}1126}
1126loc++;1127loc++;
1127if(loc>limit){1128if(loc> limit){
1128err_print("! String didn't end");loc= limit-1;break;1129err_print("! String didn't end");loc= limit-1;break;
1129 1130
1130}1131}
@@ -1133,23 +1134,23 @@ loc++; · 2 unmodified lines
1133return(ord);1134return(ord);
1134 1135
1135/*:69*/1136/*:69*/
1136#line 1062 "ctangle.w"1137#line 1063 "ctangle.w"
1137;1138;
1138default:return(c);1139default:return(c);
1139}1140}
1140}1141}
1141 1142
1142/*:68*/1143/*:68*/
1143#line 921 "ctangle.w"1144#line 922 "ctangle.w"
1144 1145
1145else if(xisspace(c)){1146else if(xisspace(c)){
1146if(!preprocessing||loc>limit)continue;1147if(!preprocessing||loc> limit)continue;
1147 1148
1148else return(' ');1149else return(' ');
1149}1150}
1150else if(c=='#'&&loc==buffer+1)preprocessing= 1;1151else if(c=='#'&&loc==buffer+1)preprocessing= 1;
1151mistake:/*64:*/1152mistake:/*64:*/
1152#line 942 "ctangle.w"1153#line 943 "ctangle.w"
1153 1154
1154switch(c){1155switch(c){
1155case'+':if(*loc=='+')compress(plus_plus);break;1156case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1173,14 +1174,14 @@ case'!':if(*loc=='=')compress(not_eq);break; · 17 unmodified lines
1173}1174}
1174 1175
1175/*:64*/1176/*:64*/
1176#line 928 "ctangle.w"1177#line 929 "ctangle.w"
1177 1178
1178return(c);1179return(c);
1179}1180}
1180}1181}
1181 1182
1182/*:63*//*76:*/1183/*:63*//*76:*/
1183#line 1195 "ctangle.w"1184#line 1196 "ctangle.w"
1184 1185
1185void1186void
1186scan_repl(t)1187scan_repl(t)
@@ -1188,7 +1189,7 @@ eight_bits t; · 1 unmodified line
1188{1189{
1189sixteen_bits a;1190sixteen_bits a;
1190if(t==section_name){/*77:*/1191if(t==section_name){/*77:*/
1191#line 1221 "ctangle.w"1192#line 1222 "ctangle.w"
1192 1193
1193store_two_bytes(0150000);1194store_two_bytes(0150000);
1194if(changing)id_first= change_file_name;1195if(changing)id_first= change_file_name;
@@ -1200,11 +1201,11 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
1200app_repl(a%0400);}1201app_repl(a%0400);}
1201 1202
1202/*:77*/1203/*:77*/
1203#line 1201 "ctangle.w"1204#line 1202 "ctangle.w"
1204;}1205;}
1205while(1)switch(a= get_next()){1206while(1)switch(a= get_next()){
1206/*78:*/1207/*78:*/
1207#line 1231 "ctangle.w"1208#line 1232 "ctangle.w"
1208 1209
1209case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;1210case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
1210app_repl((a/0400)+0200);1211app_repl((a/0400)+0200);
@@ -1212,7 +1213,7 @@ app_repl(a%0400);break; · 1 unmodified line
1212case section_name:if(t!=section_name)goto done;1213case section_name:if(t!=section_name)goto done;
1213else{1214else{
1214/*79:*/1215/*79:*/
1215#line 1259 "ctangle.w"1216#line 1260 "ctangle.w"
1216{1217{
1217char*try_loc= loc;1218char*try_loc= loc;
1218while(*try_loc==' '&&try_loc<limit)try_loc++;1219while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1225,13 +1226,13 @@ if(*try_loc=='=')err_print("! Missing `@ ' before a named section"); · 6 unmodified lines
1225}1226}
1226 1227
1227/*:79*/1228/*:79*/
1228#line 1237 "ctangle.w"1229#line 1238 "ctangle.w"
1229;1230;
1230a= cur_section_name-name_dir;1231a= cur_section_name-name_dir;
1231app_repl((a/0400)+0250);1232app_repl((a/0400)+0250);
1232app_repl(a%0400);1233app_repl(a%0400);
1233/*77:*/1234/*77:*/
1234#line 1221 "ctangle.w"1235#line 1222 "ctangle.w"
1235 1236
1236store_two_bytes(0150000);1237store_two_bytes(0150000);
1237if(changing)id_first= change_file_name;1238if(changing)id_first= change_file_name;
@@ -1243,7 +1244,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
1243app_repl(a%0400);}1244app_repl(a%0400);}
1244 1245
1245/*:77*/1246/*:77*/
1246#line 1241 "ctangle.w"1247#line 1242 "ctangle.w"
1247;break;1248;break;
1248}1249}
1249case output_defs_code:1250case output_defs_code:
@@ -1251,7 +1252,7 @@ a= output_defs_flag; · 1 unmodified line
1251app_repl((a/0400)+0200);1252app_repl((a/0400)+0200);
1252app_repl(a%0400);1253app_repl(a%0400);
1253/*77:*/1254/*77:*/
1254#line 1221 "ctangle.w"1255#line 1222 "ctangle.w"
1255 1256
1256store_two_bytes(0150000);1257store_two_bytes(0150000);
1257if(changing)id_first= change_file_name;1258if(changing)id_first= change_file_name;
@@ -1263,11 +1264,11 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
1263app_repl(a%0400);}1264app_repl(a%0400);}
1264 1265
1265/*:77*/1266/*:77*/
1266#line 1247 "ctangle.w"1267#line 1248 "ctangle.w"
1267;break;1268;break;
1268case constant:case string:1269case constant:case string:
1269/*80:*/1270/*80:*/
1270#line 1270 "ctangle.w"1271#line 1271 "ctangle.w"
1271 1272
1272app_repl(a);1273app_repl(a);
1273while(id_first<id_loc){1274while(id_first<id_loc){
@@ -1281,11 +1282,11 @@ app_repl(*id_first++); · 7 unmodified lines
1281app_repl(a);break;1282app_repl(a);break;
1282 1283
1283/*:80*/1284/*:80*/
1284#line 1249 "ctangle.w"1285#line 1250 "ctangle.w"
1285;1286;
1286case ord:1287case ord:
1287/*81:*/1288/*81:*/
1288#line 1286 "ctangle.w"1289#line 1287 "ctangle.w"
1289{1290{
1290int c= (eight_bits)*id_first;1291int c= (eight_bits)*id_first;
1291if(c=='\\'){1292if(c=='\\'){
@@ -1336,7 +1337,7 @@ app_repl(constant); · 44 unmodified lines
1336break;1337break;
1337 1338
1338/*:81*/1339/*:81*/
1339#line 1251 "ctangle.w"1340#line 1252 "ctangle.w"
1340;1341;
1341case definition:case format_code:case begin_C:if(t!=section_name)goto done;1342case definition:case format_code:case begin_C:if(t!=section_name)goto done;
1342else{1343else{
@@ -1346,7 +1347,7 @@ err_print("! @d, @f and @c are ignored in C text");continue; · 3 unmodified lines
1346case new_section:goto done;1347case new_section:goto done;
1347 1348
1348/*:78*/1349/*:78*/
1349#line 1206 "ctangle.w"1350#line 1207 "ctangle.w"
1350 1351
1351case')':app_repl(a);1352case')':app_repl(a);
1352if(t==macro)app_repl(' ');1353if(t==macro)app_repl(' ');
@@ -1354,12 +1355,12 @@ break; · 1 unmodified line
1354default:app_repl(a);1355default:app_repl(a);
1355}1356}
1356done:next_control= (eight_bits)a;1357done:next_control= (eight_bits)a;
1357if(text_ptr>text_info_end)overflow("text");1358if(text_ptr> text_info_end)overflow("text");
1358cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;1359cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
1359}1360}
1360 1361
1361/*:76*//*83:*/1362/*:76*//*83:*/
1362#line 1348 "ctangle.w"1363#line 1349 "ctangle.w"
1363 1364
1364void1365void
1365scan_section()1366scan_section()
@@ -1374,7 +1375,7 @@ printf("*%d",section_count);update_terminal; · 8 unmodified lines
1374next_control= 0;1375next_control= 0;
1375while(1){1376while(1){
1376/*84:*/1377/*84:*/
1377#line 1387 "ctangle.w"1378#line 1388 "ctangle.w"
1378 1379
1379while(next_control<definition)1380while(next_control<definition)
1380 1381
@@ -1383,11 +1384,11 @@ loc-= 2;next_control= get_next(); · 2 unmodified lines
1383}1384}
1384 1385
1385/*:84*/1386/*:84*/
1386#line 1362 "ctangle.w"1387#line 1363 "ctangle.w"
1387;1388;
1388if(next_control==definition){1389if(next_control==definition){
1389/*85:*/1390/*85:*/
1390#line 1394 "ctangle.w"1391#line 1395 "ctangle.w"
1391{1392{
1392while((next_control= get_next())=='\n');1393while((next_control= get_next())=='\n');
1393if(next_control!=identifier){1394if(next_control!=identifier){
@@ -1406,7 +1407,7 @@ cur_text->text_link= 0; · 12 unmodified lines
1406}1407}
1407 1408
1408/*:85*/1409/*:85*/
1409#line 1364 "ctangle.w"1410#line 1365 "ctangle.w"
1410 1411
1411continue;1412continue;
1412}1413}
@@ -1416,14 +1417,14 @@ p= name_dir;break; · 3 unmodified lines
1416if(next_control==section_name){1417if(next_control==section_name){
1417p= cur_section_name;1418p= cur_section_name;
1418/*86:*/1419/*86:*/
1419#line 1419 "ctangle.w"1420#line 1420 "ctangle.w"
1420 1421
1421while((next_control= get_next())=='+');1422while((next_control= get_next())=='+');
1422if(next_control!='='&&next_control!=eq_eq)1423if(next_control!='='&&next_control!=eq_eq)
1423continue;1424continue;
1424 1425
1425/*:86*/1426/*:86*/
1426#line 1372 "ctangle.w"1427#line 1373 "ctangle.w"
1427;1428;
1428break;1429break;
1429}1430}
@@ -1431,20 +1432,20 @@ return; · 1 unmodified line
1431}1432}
1432no_where= print_where= 0;1433no_where= print_where= 0;
1433/*87:*/1434/*87:*/
1434#line 1424 "ctangle.w"1435#line 1425 "ctangle.w"
1435 1436
1436/*88:*/1437/*88:*/
1437#line 1429 "ctangle.w"1438#line 1430 "ctangle.w"
1438 1439
1439store_two_bytes((sixteen_bits)(0150000+section_count));1440store_two_bytes((sixteen_bits)(0150000+section_count));
1440 1441
1441 1442
1442/*:88*/1443/*:88*/
1443#line 1425 "ctangle.w"1444#line 1426 "ctangle.w"
1444;1445;
1445scan_repl(section_name);1446scan_repl(section_name);
1446/*89:*/1447/*89:*/
1447#line 1433 "ctangle.w"1448#line 1434 "ctangle.w"
1448 1449
1449if(p==name_dir||p==0){1450if(p==name_dir||p==0){
1450(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;1451(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
1461 1462
1462 1463
1463/*:89*/1464/*:89*/
1464#line 1427 "ctangle.w"1465#line 1428 "ctangle.w"
1465;1466;
1466 1467
1467/*:87*/1468/*:87*/
1468#line 1378 "ctangle.w"1469#line 1379 "ctangle.w"
1469;1470;
1470}1471}
1471 1472
1472/*:83*//*91:*/1473/*:83*//*91:*/
1473#line 1451 "ctangle.w"1474#line 1452 "ctangle.w"
1474 1475
1475void1476void
1476phase_one(){1477phase_one(){
@@ -1484,14 +1485,14 @@ phase= 2; · 7 unmodified lines
1484}1485}
1485 1486
1486/*:91*//*93:*/1487/*:91*//*93:*/
1487#line 1469 "ctangle.w"1488#line 1470 "ctangle.w"
1488 1489
1489void1490void
1490skip_limbo()1491skip_limbo()
1491{1492{
1492char c;1493char c;
1493while(1){1494while(1){
1494if(loc>limit&&get_line()==0)return;1495if(loc> limit&&get_line()==0)return;
1495*(limit+1)= '@';1496*(limit+1)= '@';
1496while(*loc!='@')loc++;1497while(*loc!='@')loc++;
1497if(loc++<=limit){1498if(loc++<=limit){
@@ -1499,11 +1500,11 @@ c= *loc++; · 1 unmodified line
1499if(ccode[(eight_bits)c]==new_section)break;1500if(ccode[(eight_bits)c]==new_section)break;
1500switch(ccode[(eight_bits)c]){1501switch(ccode[(eight_bits)c]){
1501case translit_code:/*94:*/1502case translit_code:/*94:*/
1502#line 1498 "ctangle.w"1503#line 1499 "ctangle.w"
1503 1504
1504while(xisspace(*loc)&&loc<limit)loc++;1505while(xisspace(*loc)&&loc<limit)loc++;
1505loc+= 3;1506loc+= 3;
1506if(loc>limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))1507if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
1507||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))1508||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))
1508err_print("! Improper hex number following @l");1509err_print("! Improper hex number following @l");
1509 1510
@@ -1524,7 +1525,7 @@ translit[i-0200][loc-beg]= '\0'; · 14 unmodified lines
1524}1525}
1525 1526
1526/*:94*/1527/*:94*/
1527#line 1482 "ctangle.w"1528#line 1483 "ctangle.w"
1528;break;1529;break;
1529case format_code:case'@':break;1530case format_code:case'@':break;
1530case control_text:if(c=='q'||c=='Q'){1531case control_text:if(c=='q'||c=='Q'){
@@ -1542,7 +1543,7 @@ default:err_print("! Double @ should be used in limbo"); · 11 unmodified lines
1542}1543}
1543 1544
1544/*:93*//*95:*/1545/*:93*//*95:*/
1545#line 1524 "ctangle.w"1546#line 1525 "ctangle.w"
1546 1547
1547void1548void
1548print_stats(){1549print_stats(){
ctangle.w+8−7
@@ -2,7 +2,7 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% It is distributed WITHOUT ANY WARRANTY, express or implied.
5% Version 3.4 --- April 19955% Version 3.43 --- September 1998
6 6
7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
8 8
@@ -22,11 +22,11 @@ · 13 unmodified lines
22\mathchardef\RA="3221 % right arrow22\mathchardef\RA="3221 % right arrow
23\mathchardef\BA="3224 % double arrow23\mathchardef\BA="3224 % double arrow
24 24
25\def\title{CTANGLE (Version 3.4)}25\def\title{CTANGLE (Version 3.43)}
26\def\topofcontents{\null\vfill26\def\topofcontents{\null\vfill
27 \centerline{\titlefont The {\ttitlefont CTANGLE} processor}27 \centerline{\titlefont The {\ttitlefont CTANGLE} processor}
28 \vskip 15pt28 \vskip 15pt
29 \centerline{(Version 3.4)}29 \centerline{(Version 3.43)}
30 \vfill}30 \vfill}
31\def\botofcontents{\vfill31\def\botofcontents{\vfill
32\noindent32\noindent
@@ -56,7 +56,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. · 23 unmodified lines
56The ``banner line'' defined here should be changed whenever \.{CTANGLE}56The ``banner line'' defined here should be changed whenever \.{CTANGLE}
57is modified.57is modified.
58 58
59@d banner "This is CTANGLE (Version 3.4)\n"59@d banner "This is CTANGLE (Version 3.43)\n"
60 60
61@c61@c
62@<Include files@>@/62@<Include files@>@/
@@ -113,7 +113,7 @@ change them in the file |"common.w"|. · 50 unmodified lines
113 must be less than 10240; used in |"common.w"| */113 must be less than 10240; used in |"common.w"| */
114@d max_texts 2500 /* number of replacement texts, must be less than 10240 */114@d max_texts 2500 /* number of replacement texts, must be less than 10240 */
115@d hash_size 353 /* should be prime; used in |"common.w"| */115@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 */
117@d stack_size 50 /* number of simultaneous levels of macro expansion */117@d stack_size 50 /* number of simultaneous levels of macro expansion */
118@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */118@d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */
119 119
@@ -653,13 +653,14 @@ eight_bits cur_char; · 533 unmodified lines
653 char *j, *k; /* pointer into |byte_mem| */653 char *j, *k; /* pointer into |byte_mem| */
654restart:654restart:
655 switch (cur_char) {655 switch (cur_char) {
656 case '\n': if (protect) C_putc(' ');656 case '\n': if (protect && out_state!=verbatim) C_putc(' ');
657 if (protect || out_state==verbatim) C_putc('\\');657 if (protect || out_state==verbatim) C_putc('\\');
658 flush_buffer(); if (out_state!=verbatim) out_state=normal; break;658 flush_buffer(); if (out_state!=verbatim) out_state=normal; break;
659 @/@t\4@>@<Case of an identifier@>;659 @/@t\4@>@<Case of an identifier@>;
660 @/@t\4@>@<Case of a section number@>;660 @/@t\4@>@<Case of a section number@>;
661 @/@t\4@>@<Cases like \.{!=}@>;661 @/@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;
663 case join: out_state=unbreakable; break;664 case join: out_state=unbreakable; break;
664 case constant: if (out_state==verbatim) {665 case constant: if (out_state==verbatim) {
665 out_state=num_or_id; break;666 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
20The ``banner line'' defined here should be changed whenever \.{CWEAVE}20The ``banner line'' defined here should be changed whenever \.{CWEAVE}
21is modified.21is modified.
22 22
23@d banner "This is CWEAVE (Version 3.4)\n"23@d banner "This is CWEAVE (Version 3.43)\n"
24@y24@y
25The ``banner line'' defined here should be changed whenever \.{CWEAVE}25The ``banner line'' defined here should be changed whenever \.{CWEAVE}
26is modified.26is modified.
27 27
28@d banner "This is CWEAVE (Version 3.4pc/big)\n"28@d banner "This is CWEAVE (Version 3.43pc/big)\n"
29@z29@z
30 30
31 31
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
11change files that have -bs in their name instead of -pc.)11change files that have -bs in their name instead of -pc.)
12 12
13@x section 113@x section 1
14@d banner "This is CWEAVE (Version 3.4)\n"14@d banner "This is CWEAVE (Version 3.43)\n"
15@y15@y
16@d banner "This is CWEAVE (Version 3.4pc)\n"16@d banner "This is CWEAVE (Version 3.43pc)\n"
17@z17@z
18 18
19@x section 419@x section 4
cweav-ql.ch+4−4
@@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c =500000 cweave_c" · 6 unmodified lines
7 7
8 8
9@x9@x
10\def\title{CWEAVE (Version 3.4)}10\def\title{CWEAVE (Version 3.43)}
11@y11@y
12\def\title{CWEAVE (QL Version 3.4)}12\def\title{CWEAVE (QL Version 3.43)}
13@z13@z
14 14
15@x section 115@x section 1
16@d banner "This is CWEAVE (Version 3.4)\n"16@d banner "This is CWEAVE (Version 3.43)\n"
17@y17@y
18@d banner "This is CWEAVE (QL Version 3.4)\n"18@d banner "This is CWEAVE (QL Version 3.43)\n"
19@z19@z
20 20
21@x21@x
cweav-vms.ch+2−2
@@ -13,9 +13,9 @@ modified: · 12 unmodified lines
13(also modified by Don Knuth to keep version numbers uptodate)13(also modified by Don Knuth to keep version numbers uptodate)
14 14
15@x section 1 (01-FEB-1992 ST)15@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"
17@y17@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"
19@z19@z
20 20
21@x section 6 (from common.h) (01-FEB-1992 ST)21@x section 6 (from common.h) (01-FEB-1992 ST)
cweave.w+6−5
@@ -2,7 +2,8 @@ · 1 unmodified line
2% This program by Silvio Levy and Donald E. Knuth2% This program by Silvio Levy and Donald E. Knuth
3% is based on a program by Knuth.3% is based on a program by Knuth.
4% It is distributed WITHOUT ANY WARRANTY, express or implied.4% It is distributed WITHOUT ANY WARRANTY, express or implied.
5% Version 3.4 --- April 19955% Version 3.43 --- September 1998
6% (is same as Version 3.4 except that the latter used an older COMMON)
6 7
7% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth8% Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth
8 9
@@ -27,11 +28,11 @@ · 18 unmodified lines
27\def\skipxTeX{\\{skip\_\TEX/}}28\def\skipxTeX{\\{skip\_\TEX/}}
28\def\copyxTeX{\\{copy\_\TEX/}}29\def\copyxTeX{\\{copy\_\TEX/}}
29 30
30\def\title{CWEAVE (Version 3.4)}31\def\title{CWEAVE (Version 3.43)}
31\def\topofcontents{\null\vfill32\def\topofcontents{\null\vfill
32 \centerline{\titlefont The {\ttitlefont CWEAVE} processor}33 \centerline{\titlefont The {\ttitlefont CWEAVE} processor}
33 \vskip 15pt34 \vskip 15pt
34 \centerline{(Version 3.4)}35 \centerline{(Version 3.43)}
35 \vfill}36 \vfill}
36\def\botofcontents{\vfill37\def\botofcontents{\vfill
37\noindent38\noindent
@@ -61,7 +62,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. · 23 unmodified lines
61The ``banner line'' defined here should be changed whenever \.{CWEAVE}62The ``banner line'' defined here should be changed whenever \.{CWEAVE}
62is modified.63is modified.
63 64
64@d banner "This is CWEAVE (Version 3.4)\n"65@d banner "This is CWEAVE (Version 3.43)\n"
65 66
66@c @<Include files@>@/67@c @<Include files@>@/
67@h68@h
@@ -120,7 +121,7 @@ you have to change them also in the file |"common.w"|. · 52 unmodified lines
120@d max_sections 2000 /* greater than the total number of sections */121@d max_sections 2000 /* greater than the total number of sections */
121@d hash_size 353 /* should be prime */122@d hash_size 353 /* should be prime */
122@d buf_size 100 /* maximum length of input line, plus one */123@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 */
124@d long_buf_size (buf_size+longest_name)125@d long_buf_size (buf_size+longest_name)
125@d line_length 80 /* lines of \TEX/ output have at most this many characters;126@d line_length 80 /* lines of \TEX/ output have at most this many characters;
126 should be less than 256 */127 should be less than 256 */
cwebmac.tex+4−4
@@ -1,7 +1,7 @@
1% standard macros for CWEB listings (in addition to plain.tex)1% standard macros for CWEB listings (in addition to plain.tex)
2% Version 3.1 --- September 19942% Version 3.43 --- September 1998
3\ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros3\ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros
4\xdef\fmtversion{\fmtversion+CWEB3.1}4\xdef\fmtversion{\fmtversion+CWEB3.4}
5 5
6\let\:=\. % preserve a way to get the dot accent6\let\:=\. % preserve a way to get the dot accent
7 % (all other accents will still work as usual)7 % (all other accents will still work as usual)
@@ -42,7 +42,7 @@ · 34 unmodified lines
42 \let\&=\AM % ampersand in a string42 \let\&=\AM % ampersand in a string
43 \let\^=\CF % circumflex in a string43 \let\^=\CF % circumflex in a string
44 #1\kern.05em}}44 #1\kern.05em}}
45\def\){\discretionary{\hbox{\tentex\BS}}{}{}}45\def\){{\tentex\kern-.05em}\discretionary{\hbox{\tentex\BS}}{}{}}
46\def\AT{@} % at sign for control text (not needed in versions >= 2.9)46\def\AT{@} % at sign for control text (not needed in versions >= 2.9)
47\def\ATL{\par\noindent\bgroup\catcode`\_=12 \postATL} % print @l in limbo47\def\ATL{\par\noindent\bgroup\catcode`\_=12 \postATL} % print @l in limbo
48\def\postATL#1 #2 {\bf letter \\{\uppercase{\char"#1}}48\def\postATL#1 #2 {\bf letter \\{\uppercase{\char"#1}}
@@ -168,7 +168,7 @@ · 119 unmodified lines
168\let\V=\lor % logical or168\let\V=\lor % logical or
169\let\W=\land % logical and169\let\W=\land % logical and
170\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name170\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}
172\def\Y{\par\yskip}172\def\Y{\par\yskip}
173\let\Z=\le173\let\Z=\le
174\let\ZZ=\let % now you can \write the control sequence \ZZ174\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
409comments (i.e., between \.{/*} and \.{*/}, or following \.{//})409comments (i.e., between \.{/*} and \.{*/}, or following \.{//})
410is treated as \TEX/ text.410is treated as \TEX/ text.
411Likewise, the text of a section name consists of \TEX/ text, but411Likewise, the text of a section name consists of \TEX/ text, but
412the construct \.{@<section name@>} as a whole is is expected to be found412the construct \.{@<section name@>} as a whole is expected to be found
413in \CEE/ text; thus, one typically goes back and forth413in \CEE/ text; thus, one typically goes back and forth
414between the \CEE/ and \TEX/ environments in a natural way, as in these414between the \CEE/ and \TEX/ environments in a natural way, as in these
415examples:415examples:
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
14case '|': if (web>1) {
15 save_skipping=skipping;
16 goto skip_C_prime;
17 }
18@y
19case '|': 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
26up to the next \.\} will also be retained. Thus, for example, the26up to the next \.\} will also be retained. Thus, for example, the
27construction `\.{m\\=\{\\i\}n\\u\ us}' will be considered a single word,27construction `\.{m\\=\{\\i\}n\\u\ us}' will be considered a single word,
28in spite of the control sequences and the space between the two u's.28in spite of the control sequences and the space between the two u's.
29Discretionary hyphens `\.{\char`\\-}' are treated in the same way as accents.
29 30
30The \.{CWEB} conventions are essentially the same as the \TEX/ conventions,31The \.{CWEB} conventions are essentially the same as the \TEX/ conventions,
31in the \TEX/ parts of a \.{CWEB} file. The \CEE/ parts of the file32in 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
229 230
230@<Global...@>=231@<Global...@>=
231char ptab[]={0,1,1,1,1,0, /* \.{\\"} and \.{\\'} */232char 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 \.{\\.} */
233 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1, /* \.{\\=} */234 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1, /* \.{\\=} */
234 1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1, /* \.{\\H}, \.{\\L}, \.{\\O} */235 1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1, /* \.{\\H}, \.{\\L}, \.{\\O} */
235 0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1, /* \.{\\\^} */236 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
18;; and nothing else, the probable cause is that the wordtest program18;; and nothing else, the probable cause is that the wordtest program
19;; could not open /usr/local/lib/dict/words or ~/.words for reading.19;; could not open /usr/local/lib/dict/words or ~/.words for reading.
20 20
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
21(provide 'kspell)26(provide 'kspell)
22 27
23(defvar wordtest-command "wordtest" ;; maybe "/usr/local/bin/wordtest" better?28(defvar wordtest-command "wordtest" ;; maybe "/usr/local/bin/wordtest" better?
examples/oemacs.el+0−1
@@ -46,7 +46,6 @@ · 45 unmodified lines
46 (define-key suntool-map "jt" 'narrow-to-region) ; F1046 (define-key suntool-map "jt" 'narrow-to-region) ; F10
47 (define-key suntool-map "j\M-t" 'narrow-to-page) ; M-F1047 (define-key suntool-map "j\M-t" 'narrow-to-page) ; M-F10
48 (define-key suntool-map "kt" 'revert-buffer) ; F1148 (define-key suntool-map "kt" 'revert-buffer) ; F11
49 (define-key suntool-map "k\M-T" 'quick-revert-buffer) ; Shift-M-F11
50 (define-key suntool-map "k\M-t" 'quick-revert-other-buffer) ; M-F1149 (define-key suntool-map "k\M-t" 'quick-revert-other-buffer) ; M-F11
51 (define-key suntool-map "lt" 'goto-line) ; F1250 (define-key suntool-map "lt" 'goto-line) ; F12
52 (define-key suntool-map "l\M-t" 'goto-line) ; M-F1251 (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