History

CWEB — Release 3.64aa, 2005-12-06.

Andreas Scherer committed 15 years ago

Commit 52dad7e1 parent c5c26712 files · +135 −135Browse files

Unified · Split

2 files
  1. ctangle.c +134 −134
  2. ctangle.w +1 −1
ctangle.c+134−134
@@ -1,19 +1,19 @@
11 /*1:*/
2−#line 64 "ctangle.w"
2+#line 64 "./ctangle.w"
33
44 /*6:*/
5−#line 35 "common.h"
5+#line 35 "./common.h"
66
77 #include <stdio.h>
88
99 /*:6*//*62:*/
10−#line 888 "ctangle.w"
10+#line 888 "./ctangle.w"
1111
1212 #include <ctype.h>
1313 #include <stdlib.h>
1414
1515 /*:62*/
16−#line 65 "ctangle.w"
16+#line 65 "./ctangle.w"
1717
1818 #define banner "This is CTANGLE (Version 3.64)\n" \
1919
@@ -137,10 +137,10 @@ · 117 unmodified lines
137137 #define app_repl(c) {if(tok_ptr==tok_mem_end) overflow("token") ;*tok_ptr++= c;} \
138138
139139
140−#line 66 "ctangle.w"
140+#line 66 "./ctangle.w"
141141
142142 /*5:*/
143−#line 29 "common.h"
143+#line 29 "./common.h"
144144
145145 typedef short boolean;
146146 typedef char unsigned eight_bits;
@@ -148,7 +148,7 @@ extern boolean program; · 1 unmodified line
148148 extern int phase;
149149
150150 /*:5*//*7:*/
151−#line 57 "common.h"
151+#line 57 "./common.h"
152152
153153 char section_text[longest_name+1];
154154 char*section_text_end= section_text+longest_name;
@@ -156,7 +156,7 @@ char*id_first; · 1 unmodified line
156156 char*id_loc;
157157
158158 /*:7*//*8:*/
159−#line 72 "common.h"
159+#line 72 "./common.h"
160160
161161 extern char buffer[];
162162 extern char*buffer_end;
@@ -164,7 +164,7 @@ extern char*loc; · 1 unmodified line
164164 extern char*limit;
165165
166166 /*:8*//*9:*/
167−#line 87 "common.h"
167+#line 87 "./common.h"
168168
169169 typedef struct name_info{
170170 char*byte_start;
@@ -192,7 +192,7 @@ extern name_pointer section_lookup(); · 21 unmodified lines
192192 extern void print_section_name(),sprint_section_name();
193193
194194 /*:9*//*10:*/
195−#line 122 "common.h"
195+#line 122 "./common.h"
196196
197197 extern history;
198198 extern err_print();
@@ -201,7 +201,7 @@ extern void fatal(); · 2 unmodified lines
201201 extern void overflow();
202202
203203 /*:10*//*11:*/
204−#line 137 "common.h"
204+#line 137 "./common.h"
205205
206206 extern include_depth;
207207 extern FILE*file[];
@@ -223,7 +223,7 @@ extern get_line(); · 15 unmodified lines
223223 extern check_complete();
224224
225225 /*:11*//*12:*/
226−#line 158 "common.h"
226+#line 158 "./common.h"
227227
228228 typedef unsigned short sixteen_bits;
229229 extern sixteen_bits section_count;
@@ -232,14 +232,14 @@ extern boolean change_pending; · 2 unmodified lines
232232 extern boolean print_where;
233233
234234 /*:12*//*13:*/
235−#line 170 "common.h"
235+#line 170 "./common.h"
236236
237237 extern int argc;
238238 extern char**argv;
239239 extern boolean flags[];
240240
241241 /*:13*//*14:*/
242−#line 182 "common.h"
242+#line 182 "./common.h"
243243
244244 extern FILE*C_file;
245245 extern FILE*tex_file;
@@ -248,16 +248,16 @@ extern FILE*scn_file; · 2 unmodified lines
248248 extern FILE*active_file;
249249
250250 /*:14*//*15:*/
251−#line 191 "common.h"
251+#line 191 "./common.h"
252252
253253 extern void common_init();
254−#line 128 "ctangle.w"
254+#line 128 "./ctangle.w"
255255
256256 /*:15*/
257−#line 67 "ctangle.w"
257+#line 67 "./ctangle.w"
258258
259259 /*16:*/
260−#line 152 "ctangle.w"
260+#line 152 "./ctangle.w"
261261
262262 typedef struct{
263263 eight_bits*tok_start;
@@ -266,7 +266,7 @@ sixteen_bits text_link; · 2 unmodified lines
266266 typedef text*text_pointer;
267267
268268 /*:16*//*27:*/
269−#line 296 "ctangle.w"
269+#line 296 "./ctangle.w"
270270
271271 typedef struct{
272272 eight_bits*end_field;
@@ -278,10 +278,10 @@ sixteen_bits section_field; · 5 unmodified lines
278278 typedef output_state*stack_pointer;
279279
280280 /*:27*/
281−#line 68 "ctangle.w"
281+#line 68 "./ctangle.w"
282282
283283 /*17:*/
284−#line 159 "ctangle.w"
284+#line 159 "./ctangle.w"
285285
286286 text text_info[max_texts];
287287 text_pointer text_info_end= text_info+max_texts-1;
@@ -291,12 +291,12 @@ eight_bits*tok_mem_end= tok_mem+max_toks-1; · 3 unmodified lines
291291 eight_bits*tok_ptr;
292292
293293 /*:17*//*23:*/
294−#line 227 "ctangle.w"
294+#line 227 "./ctangle.w"
295295
296296 text_pointer last_unnamed;
297297
298298 /*:23*//*28:*/
299−#line 312 "ctangle.w"
299+#line 312 "./ctangle.w"
300300
301301 output_state cur_state;
302302
@@ -305,18 +305,18 @@ stack_pointer stack_ptr; · 2 unmodified lines
305305 stack_pointer stack_end= stack+stack_size;
306306
307307 /*:28*//*32:*/
308−#line 384 "ctangle.w"
308+#line 384 "./ctangle.w"
309309
310310 int cur_val;
311311
312312 /*:32*//*36:*/
313−#line 473 "ctangle.w"
313+#line 473 "./ctangle.w"
314314
315315 eight_bits out_state;
316316 boolean protect;
317317
318318 /*:36*//*38:*/
319−#line 502 "ctangle.w"
319+#line 502 "./ctangle.w"
320320
321321 name_pointer output_files[max_files];
322322 name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -324,47 +324,47 @@ char cur_section_name_char; · 1 unmodified line
324324 char output_file_name[longest_name];
325325
326326 /*:38*//*45:*/
327−#line 599 "ctangle.w"
327+#line 599 "./ctangle.w"
328328
329329 boolean output_defs_seen= 0;
330330
331331 /*:45*//*51:*/
332−#line 710 "ctangle.w"
332+#line 710 "./ctangle.w"
333333
334334 char translit[128][translit_length];
335335
336336 /*:51*//*56:*/
337−#line 789 "ctangle.w"
337+#line 789 "./ctangle.w"
338338
339339 eight_bits ccode[256];
340340
341341 /*:56*//*59:*/
342−#line 845 "ctangle.w"
342+#line 845 "./ctangle.w"
343343
344344 boolean comment_continues= 0;
345345
346346 /*:59*//*61:*/
347−#line 884 "ctangle.w"
347+#line 884 "./ctangle.w"
348348
349349 name_pointer cur_section_name;
350350 int no_where;
351351
352352 /*:61*//*75:*/
353−#line 1195 "ctangle.w"
353+#line 1195 "./ctangle.w"
354354
355355 text_pointer cur_text;
356356 eight_bits next_control;
357357
358358 /*:75*//*82:*/
359−#line 1350 "ctangle.w"
359+#line 1350 "./ctangle.w"
360360
361361 extern sixteen_bits section_count;
362362
363363 /*:82*/
364−#line 69 "ctangle.w"
364+#line 69 "./ctangle.w"
365365
366366 /*2:*/
367−#line 77 "ctangle.w"
367+#line 77 "./ctangle.w"
368368
369369 extern int strlen();
370370 extern int strcmp();
@@ -373,36 +373,36 @@ extern int strncmp(); · 2 unmodified lines
373373 extern char*strncpy();
374374
375375 /*:2*//*41:*/
376−#line 533 "ctangle.w"
376+#line 533 "./ctangle.w"
377377
378378 void phase_two();
379379
380380 /*:41*//*46:*/
381−#line 602 "ctangle.w"
381+#line 602 "./ctangle.w"
382382
383383 void output_defs();
384384
385385 /*:46*//*48:*/
386−#line 648 "ctangle.w"
386+#line 648 "./ctangle.w"
387387
388388 static void out_char();
389389
390390 /*:48*//*90:*/
391−#line 1457 "ctangle.w"
391+#line 1457 "./ctangle.w"
392392
393393 void phase_one();
394394
395395 /*:90*//*92:*/
396−#line 1475 "ctangle.w"
396+#line 1475 "./ctangle.w"
397397
398398 void skip_limbo();
399399
400400 /*:92*/
401−#line 70 "ctangle.w"
401+#line 70 "./ctangle.w"
402402
403403
404404 /*:1*//*3:*/
405−#line 91 "ctangle.w"
405+#line 91 "./ctangle.w"
406406
407407 int main(ac,av)
408408 int ac;
@@ -411,28 +411,28 @@ char**av; · 2 unmodified lines
411411 argc= ac;argv= av;
412412 program= ctangle;
413413 /*18:*/
414−#line 167 "ctangle.w"
414+#line 167 "./ctangle.w"
415415
416416 text_info->tok_start= tok_ptr= tok_mem;
417417 text_ptr= text_info+1;text_ptr->tok_start= tok_mem;
418418
419419
420420 /*:18*//*20:*/
421−#line 177 "ctangle.w"
421+#line 177 "./ctangle.w"
422422
423423 name_dir->equiv= (char*)text_info;
424424
425425 /*:20*//*24:*/
426−#line 230 "ctangle.w"
426+#line 230 "./ctangle.w"
427427 last_unnamed= text_info;text_info->text_link= 0;
428428
429429 /*:24*//*39:*/
430−#line 512 "ctangle.w"
430+#line 512 "./ctangle.w"
431431
432432 cur_out_file= end_output_files= output_files+max_files;
433433
434434 /*:39*//*52:*/
435−#line 713 "ctangle.w"
435+#line 713 "./ctangle.w"
436436
437437 {
438438 int i;
@@ -440,7 +440,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i)); · 1 unmodified line
440440 }
441441
442442 /*:52*//*57:*/
443−#line 792 "ctangle.w"
443+#line 792 "./ctangle.w"
444444 {
445445 int c;
446446 for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -460,11 +460,11 @@ ccode['\'']= ord; · 13 unmodified lines
460460 }
461461
462462 /*:57*//*71:*/
463−#line 1116 "ctangle.w"
463+#line 1116 "./ctangle.w"
464464 section_text[0]= ' ';
465465
466466 /*:71*/
467−#line 98 "ctangle.w"
467+#line 98 "./ctangle.w"
468468 ;
469469 common_init();
470470 if(show_banner)printf(banner);
@@ -474,7 +474,7 @@ return wrap_up(); · 3 unmodified lines
474474 }
475475
476476 /*:3*//*21:*/
477−#line 183 "ctangle.w"
477+#line 183 "./ctangle.w"
478478
479479 int names_match(p,first,l)
480480 name_pointer p;
@@ -486,7 +486,7 @@ return!strncmp(first,p->byte_start,l); · 5 unmodified lines
486486 }
487487
488488 /*:21*//*22:*/
489−#line 198 "ctangle.w"
489+#line 198 "./ctangle.w"
490490
491491 void
492492 init_node(node)
@@ -498,7 +498,7 @@ void · 5 unmodified lines
498498 init_p(){}
499499
500500 /*:22*//*26:*/
501−#line 260 "ctangle.w"
501+#line 260 "./ctangle.w"
502502
503503 void
504504 store_two_bytes(x)
@@ -510,7 +510,7 @@ if(tok_ptr+2> tok_mem_end)overflow("token"); · 5 unmodified lines
510510 }
511511
512512 /*:26*//*30:*/
513−#line 336 "ctangle.w"
513+#line 336 "./ctangle.w"
514514
515515 void
516516 push_level(p)
@@ -527,7 +527,7 @@ cur_section= 0; · 10 unmodified lines
527527 }
528528
529529 /*:30*//*31:*/
530−#line 355 "ctangle.w"
530+#line 355 "./ctangle.w"
531531
532532 void
533533 pop_level(flag)
@@ -543,7 +543,7 @@ if(stack_ptr> stack)cur_state= *stack_ptr; · 9 unmodified lines
543543 }
544544
545545 /*:31*//*33:*/
546−#line 391 "ctangle.w"
546+#line 391 "./ctangle.w"
547547
548548 void
549549 get_output()
@@ -566,7 +566,7 @@ switch(a/024000){ · 16 unmodified lines
566566 case 0:cur_val= a;out_char(identifier);break;
567567 case 1:if(a==output_defs_flag)output_defs();
568568 else/*34:*/
569−#line 423 "ctangle.w"
569+#line 423 "./ctangle.w"
570570
571571 {
572572 a-= 024000;
@@ -580,7 +580,7 @@ goto restart; · 7 unmodified lines
580580 }
581581
582582 /*:34*/
583−#line 412 "ctangle.w"
583+#line 412 "./ctangle.w"
584584 ;
585585 break;
586586 default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -590,7 +590,7 @@ out_char(section_number); · 3 unmodified lines
590590 }
591591
592592 /*:33*//*37:*/
593−#line 481 "ctangle.w"
593+#line 481 "./ctangle.w"
594594
595595 void
596596 flush_buffer()
@@ -605,29 +605,29 @@ cur_line++; · 8 unmodified lines
605605 }
606606
607607 /*:37*//*42:*/
608−#line 536 "ctangle.w"
608+#line 536 "./ctangle.w"
609609
610610 void
611611 phase_two(){
612612 web_file_open= 0;
613613 cur_line= 1;
614614 /*29:*/
615−#line 325 "ctangle.w"
615+#line 325 "./ctangle.w"
616616
617617 stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
618618 cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
619619
620620 /*:29*/
621−#line 541 "ctangle.w"
621+#line 541 "./ctangle.w"
622622 ;
623623 /*44:*/
624−#line 595 "ctangle.w"
624+#line 595 "./ctangle.w"
625625
626626 if(!output_defs_seen)
627627 output_defs();
628628
629629 /*:44*/
630−#line 542 "ctangle.w"
630+#line 542 "./ctangle.w"
631631 ;
632632 if(text_info->text_link==0&&cur_out_file==end_output_files){
633633 printf("\n! No program text was specified.");mark_harmless;
@@ -650,7 +650,7 @@ if(text_info->text_link==0)goto writeloop; · 16 unmodified lines
650650 while(stack_ptr> stack)get_output();
651651 flush_buffer();
652652 writeloop:/*43:*/
653−#line 572 "ctangle.w"
653+#line 572 "./ctangle.w"
654654
655655 for(an_output_file= end_output_files;an_output_file> cur_out_file;){
656656 an_output_file--;
@@ -671,14 +671,14 @@ flush_buffer(); · 14 unmodified lines
671671 }
672672
673673 /*:43*/
674−#line 563 "ctangle.w"
674+#line 563 "./ctangle.w"
675675 ;
676676 if(show_happiness)printf("\nDone.");
677677 }
678678 }
679679
680680 /*:42*//*47:*/
681−#line 605 "ctangle.w"
681+#line 605 "./ctangle.w"
682682
683683 void
684684 output_defs()
@@ -718,7 +718,7 @@ pop_level(0); · 33 unmodified lines
718718 }
719719
720720 /*:47*//*49:*/
721−#line 651 "ctangle.w"
721+#line 651 "./ctangle.w"
722722
723723 static void
724724 out_char(cur_char)
@@ -731,7 +731,7 @@ case'\n':if(protect&&out_state!=verbatim)C_putc(' '); · 6 unmodified lines
731731 if(protect||out_state==verbatim)C_putc('\\');
732732 flush_buffer();if(out_state!=verbatim)out_state= normal;break;
733733 /*53:*/
734−#line 719 "ctangle.w"
734+#line 719 "./ctangle.w"
735735
736736 case identifier:
737737 if(out_state==num_or_id)C_putc(' ');
@@ -746,10 +746,10 @@ j++; · 8 unmodified lines
746746 out_state= num_or_id;break;
747747
748748 /*:53*/
749−#line 662 "ctangle.w"
749+#line 662 "./ctangle.w"
750750 ;
751751 /*54:*/
752−#line 732 "ctangle.w"
752+#line 732 "./ctangle.w"
753753
754754 case section_number:
755755 if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -776,10 +776,10 @@ C_printf("%s","\"\n"); · 20 unmodified lines
776776 break;
777777
778778 /*:54*/
779−#line 663 "ctangle.w"
779+#line 663 "./ctangle.w"
780780 ;
781781 /*50:*/
782−#line 681 "ctangle.w"
782+#line 681 "./ctangle.w"
783783
784784 case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
785785 case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -800,7 +800,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal; · 14 unmodified lines
800800 break;
801801
802802 /*:50*/
803−#line 664 "ctangle.w"
803+#line 664 "./ctangle.w"
804804 ;
805805 case'=':case'>':C_putc(cur_char);C_putc(' ');
806806 out_state= normal;break;
@@ -819,7 +819,7 @@ default:C_putc(cur_char);out_state= normal;break; · 12 unmodified lines
819819 }
820820
821821 /*:49*//*58:*/
822−#line 813 "ctangle.w"
822+#line 813 "./ctangle.w"
823823
824824 eight_bits
825825 skip_ahead()
@@ -837,7 +837,7 @@ if(c!=ignore||*(loc-1)=='>')return(c); · 11 unmodified lines
837837 }
838838
839839 /*:58*//*60:*/
840−#line 848 "ctangle.w"
840+#line 848 "./ctangle.w"
841841
842842 int skip_comment(is_long_comment)
843843 boolean is_long_comment;
@@ -871,7 +871,7 @@ else loc++; · 27 unmodified lines
871871 }
872872
873873 /*:60*//*63:*/
874−#line 900 "ctangle.w"
874+#line 900 "./ctangle.w"
875875
876876 eight_bits
877877 get_next()
@@ -885,7 +885,7 @@ if(get_line()==0)return(new_section); · 7 unmodified lines
885885 else if(print_where&&!no_where){
886886 print_where= 0;
887887 /*77:*/
888−#line 1225 "ctangle.w"
888+#line 1225 "./ctangle.w"
889889
890890 store_two_bytes(0150000);
891891 if(changing)id_first= change_file_name;
@@ -897,7 +897,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
897897 app_repl(a%0400);}
898898
899899 /*:77*/
900−#line 912 "ctangle.w"
900+#line 912 "./ctangle.w"
901901 ;
902902 }
903903 else return('\n');
@@ -911,7 +911,7 @@ else continue; · 7 unmodified lines
911911 }
912912 loc++;
913913 if(xisdigit(c)||c=='.')/*66:*/
914−#line 978 "ctangle.w"
914+#line 978 "./ctangle.w"
915915 {
916916 id_first= loc-1;
917917 if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -936,11 +936,11 @@ return(constant); · 18 unmodified lines
936936 }
937937
938938 /*:66*/
939−#line 924 "ctangle.w"
939+#line 924 "./ctangle.w"
940940
941941 else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"')))
942942 /*67:*/
943−#line 1006 "ctangle.w"
943+#line 1006 "./ctangle.w"
944944 {
945945 char delim= c;
946946 id_first= section_text+1;
@@ -983,11 +983,11 @@ return(string); · 36 unmodified lines
983983 }
984984
985985 /*:67*/
986−#line 926 "ctangle.w"
986+#line 926 "./ctangle.w"
987987
988988 else if(isalpha(c)||isxalpha(c)||ishigh(c))
989989 /*65:*/
990−#line 972 "ctangle.w"
990+#line 972 "./ctangle.w"
991991 {
992992 id_first= --loc;
993993 while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc));
@@ -995,10 +995,10 @@ id_loc= loc;return(identifier); · 1 unmodified line
995995 }
996996
997997 /*:65*/
998−#line 928 "ctangle.w"
998+#line 928 "./ctangle.w"
999999
10001000 else if(c=='@')/*68:*/
1001−#line 1050 "ctangle.w"
1001+#line 1050 "./ctangle.w"
10021002 {
10031003 c= ccode[(eight_bits)*loc++];
10041004 switch(c){
@@ -1014,11 +1014,11 @@ continue; · 9 unmodified lines
10141014 case section_name:
10151015 cur_section_name_char= *(loc-1);
10161016 /*70:*/
1017−#line 1098 "ctangle.w"
1017+#line 1098 "./ctangle.w"
10181018 {
10191019 char*k;
10201020 /*72:*/
1021−#line 1118 "ctangle.w"
1021+#line 1118 "./ctangle.w"
10221022
10231023 k= section_text;
10241024 while(1){
@@ -1029,7 +1029,7 @@ loc= buffer+1;break; · 4 unmodified lines
10291029 }
10301030 c= *loc;
10311031 /*73:*/
1032−#line 1142 "ctangle.w"
1032+#line 1142 "./ctangle.w"
10331033
10341034 if(c=='@'){
10351035 c= *(loc+1);
@@ -1048,7 +1048,7 @@ err_print("! Nesting of section names not allowed");break; · 12 unmodified lines
10481048 }
10491049
10501050 /*:73*/
1051−#line 1127 "ctangle.w"
1051+#line 1127 "./ctangle.w"
10521052 ;
10531053 loc++;if(k<section_text_end)k++;
10541054 if(xisspace(c)){
@@ -1065,14 +1065,14 @@ printf("...");mark_harmless; · 10 unmodified lines
10651065 if(*k==' '&&k> section_text)k--;
10661066
10671067 /*:72*/
1068−#line 1100 "ctangle.w"
1068+#line 1100 "./ctangle.w"
10691069 ;
10701070 if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
10711071 cur_section_name= section_lookup(section_text+1,k-3,1);
10721072 else cur_section_name= section_lookup(section_text+1,k,0);
10731073 if(cur_section_name_char=='(')
10741074 /*40:*/
1075−#line 516 "ctangle.w"
1075+#line 516 "./ctangle.w"
10761076
10771077 {
10781078 for(an_output_file= cur_out_file;
@@ -1088,16 +1088,16 @@ overflow("output files"); · 9 unmodified lines
10881088 }
10891089
10901090 /*:40*/
1091−#line 1106 "ctangle.w"
1091+#line 1106 "./ctangle.w"
10921092 ;
10931093 return(section_name);
10941094 }
10951095
10961096 /*:70*/
1097−#line 1064 "ctangle.w"
1097+#line 1064 "./ctangle.w"
10981098 ;
10991099 case string:/*74:*/
1100−#line 1164 "ctangle.w"
1100+#line 1164 "./ctangle.w"
11011101 {
11021102 id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
11031103 while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1108,10 +1108,10 @@ return(string); · 4 unmodified lines
11081108 }
11091109
11101110 /*:74*/
1111−#line 1065 "ctangle.w"
1111+#line 1065 "./ctangle.w"
11121112 ;
11131113 case ord:/*69:*/
1114−#line 1077 "ctangle.w"
1114+#line 1077 "./ctangle.w"
11151115
11161116 id_first= loc;
11171117 if(*loc=='\\'){
@@ -1134,14 +1134,14 @@ loc++; · 16 unmodified lines
11341134 return(ord);
11351135
11361136 /*:69*/
1137−#line 1066 "ctangle.w"
1137+#line 1066 "./ctangle.w"
11381138 ;
11391139 default:return(c);
11401140 }
11411141 }
11421142
11431143 /*:68*/
1144−#line 929 "ctangle.w"
1144+#line 929 "./ctangle.w"
11451145
11461146 else if(xisspace(c)){
11471147 if(!preprocessing||loc> limit)continue;
@@ -1150,7 +1150,7 @@ else return(' '); · 2 unmodified lines
11501150 }
11511151 else if(c=='#'&&loc==buffer+1)preprocessing= 1;
11521152 mistake:/*64:*/
1153−#line 950 "ctangle.w"
1153+#line 950 "./ctangle.w"
11541154
11551155 switch(c){
11561156 case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1174,14 +1174,14 @@ case'!':if(*loc=='=')compress(not_eq);break; · 17 unmodified lines
11741174 }
11751175
11761176 /*:64*/
1177−#line 936 "ctangle.w"
1177+#line 936 "./ctangle.w"
11781178
11791179 return(c);
11801180 }
11811181 }
11821182
11831183 /*:63*//*76:*/
1184−#line 1199 "ctangle.w"
1184+#line 1199 "./ctangle.w"
11851185
11861186 void
11871187 scan_repl(t)
@@ -1189,7 +1189,7 @@ eight_bits t; · 1 unmodified line
11891189 {
11901190 sixteen_bits a;
11911191 if(t==section_name){/*77:*/
1192−#line 1225 "ctangle.w"
1192+#line 1225 "./ctangle.w"
11931193
11941194 store_two_bytes(0150000);
11951195 if(changing)id_first= change_file_name;
@@ -1201,11 +1201,11 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
12011201 app_repl(a%0400);}
12021202
12031203 /*:77*/
1204−#line 1205 "ctangle.w"
1204+#line 1205 "./ctangle.w"
12051205 ;}
12061206 while(1)switch(a= get_next()){
12071207 /*78:*/
1208−#line 1235 "ctangle.w"
1208+#line 1235 "./ctangle.w"
12091209
12101210 case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
12111211 app_repl((a/0400)+0200);
@@ -1213,7 +1213,7 @@ app_repl(a%0400);break; · 1 unmodified line
12131213 case section_name:if(t!=section_name)goto done;
12141214 else{
12151215 /*79:*/
1216−#line 1268 "ctangle.w"
1216+#line 1268 "./ctangle.w"
12171217 {
12181218 char*try_loc= loc;
12191219 while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1226,13 +1226,13 @@ if(*try_loc=='=')err_print("! Missing `@ ' before a named section"); · 6 unmodified lines
12261226 }
12271227
12281228 /*:79*/
1229−#line 1241 "ctangle.w"
1229+#line 1241 "./ctangle.w"
12301230 ;
12311231 a= cur_section_name-name_dir;
12321232 app_repl((a/0400)+0250);
12331233 app_repl(a%0400);
12341234 /*77:*/
1235−#line 1225 "ctangle.w"
1235+#line 1225 "./ctangle.w"
12361236
12371237 store_two_bytes(0150000);
12381238 if(changing)id_first= change_file_name;
@@ -1244,7 +1244,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
12441244 app_repl(a%0400);}
12451245
12461246 /*:77*/
1247−#line 1245 "ctangle.w"
1247+#line 1245 "./ctangle.w"
12481248 ;break;
12491249 }
12501250 case output_defs_code:if(t!=section_name)err_print("! Misplaced @h");
@@ -1255,7 +1255,7 @@ a= output_defs_flag; · 4 unmodified lines
12551255 app_repl((a/0400)+0200);
12561256 app_repl(a%0400);
12571257 /*77:*/
1258−#line 1225 "ctangle.w"
1258+#line 1225 "./ctangle.w"
12591259
12601260 store_two_bytes(0150000);
12611261 if(changing)id_first= change_file_name;
@@ -1267,13 +1267,13 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines
12671267 app_repl(a%0400);}
12681268
12691269 /*:77*/
1270−#line 1254 "ctangle.w"
1270+#line 1254 "./ctangle.w"
12711271 ;
12721272 }
12731273 break;
12741274 case constant:case string:
12751275 /*80:*/
1276−#line 1279 "ctangle.w"
1276+#line 1279 "./ctangle.w"
12771277
12781278 app_repl(a);
12791279 while(id_first<id_loc){
@@ -1287,11 +1287,11 @@ app_repl(*id_first++); · 7 unmodified lines
12871287 app_repl(a);break;
12881288
12891289 /*:80*/
1290−#line 1258 "ctangle.w"
1290+#line 1258 "./ctangle.w"
12911291 ;
12921292 case ord:
12931293 /*81:*/
1294−#line 1295 "ctangle.w"
1294+#line 1295 "./ctangle.w"
12951295 {
12961296 int c= (eight_bits)*id_first;
12971297 if(c=='\\'){
@@ -1342,7 +1342,7 @@ app_repl(constant); · 44 unmodified lines
13421342 break;
13431343
13441344 /*:81*/
1345−#line 1260 "ctangle.w"
1345+#line 1260 "./ctangle.w"
13461346 ;
13471347 case definition:case format_code:case begin_C:if(t!=section_name)goto done;
13481348 else{
@@ -1352,7 +1352,7 @@ err_print("! @d, @f and @c are ignored in C text");continue; · 3 unmodified lines
13521352 case new_section:goto done;
13531353
13541354 /*:78*/
1355−#line 1210 "ctangle.w"
1355+#line 1210 "./ctangle.w"
13561356
13571357 case')':app_repl(a);
13581358 if(t==macro)app_repl(' ');
@@ -1365,7 +1365,7 @@ cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; · 6 unmodified lines
13651365 }
13661366
13671367 /*:76*//*83:*/
1368−#line 1357 "ctangle.w"
1368+#line 1357 "./ctangle.w"
13691369
13701370 void
13711371 scan_section()
@@ -1380,7 +1380,7 @@ printf("*%d",section_count);update_terminal; · 8 unmodified lines
13801380 next_control= 0;
13811381 while(1){
13821382 /*84:*/
1383−#line 1396 "ctangle.w"
1383+#line 1396 "./ctangle.w"
13841384
13851385 while(next_control<definition)
13861386
@@ -1389,11 +1389,11 @@ loc-= 2;next_control= get_next(); · 2 unmodified lines
13891389 }
13901390
13911391 /*:84*/
1392−#line 1371 "ctangle.w"
1392+#line 1371 "./ctangle.w"
13931393 ;
13941394 if(next_control==definition){
13951395 /*85:*/
1396−#line 1403 "ctangle.w"
1396+#line 1403 "./ctangle.w"
13971397 {
13981398 while((next_control= get_next())=='\n');
13991399 if(next_control!=identifier){
@@ -1412,7 +1412,7 @@ cur_text->text_link= 0; · 12 unmodified lines
14121412 }
14131413
14141414 /*:85*/
1415−#line 1373 "ctangle.w"
1415+#line 1373 "./ctangle.w"
14161416
14171417 continue;
14181418 }
@@ -1422,14 +1422,14 @@ p= name_dir;break; · 3 unmodified lines
14221422 if(next_control==section_name){
14231423 p= cur_section_name;
14241424 /*86:*/
1425−#line 1428 "ctangle.w"
1425+#line 1428 "./ctangle.w"
14261426
14271427 while((next_control= get_next())=='+');
14281428 if(next_control!='='&&next_control!=eq_eq)
14291429 continue;
14301430
14311431 /*:86*/
1432−#line 1381 "ctangle.w"
1432+#line 1381 "./ctangle.w"
14331433 ;
14341434 break;
14351435 }
@@ -1437,20 +1437,20 @@ return; · 1 unmodified line
14371437 }
14381438 no_where= print_where= 0;
14391439 /*87:*/
1440−#line 1433 "ctangle.w"
1440+#line 1433 "./ctangle.w"
14411441
14421442 /*88:*/
1443−#line 1438 "ctangle.w"
1443+#line 1438 "./ctangle.w"
14441444
14451445 store_two_bytes((sixteen_bits)(0150000+section_count));
14461446
14471447
14481448 /*:88*/
1449−#line 1434 "ctangle.w"
1449+#line 1434 "./ctangle.w"
14501450 ;
14511451 scan_repl(section_name);
14521452 /*89:*/
1453−#line 1442 "ctangle.w"
1453+#line 1442 "./ctangle.w"
14541454
14551455 if(p==name_dir||p==0){
14561456 (last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1467,16 +1467,16 @@ cur_text->text_link= section_flag; · 10 unmodified lines
14671467
14681468
14691469 /*:89*/
1470−#line 1436 "ctangle.w"
1470+#line 1436 "./ctangle.w"
14711471 ;
14721472
14731473 /*:87*/
1474−#line 1387 "ctangle.w"
1474+#line 1387 "./ctangle.w"
14751475 ;
14761476 }
14771477
14781478 /*:83*//*91:*/
1479−#line 1460 "ctangle.w"
1479+#line 1460 "./ctangle.w"
14801480
14811481 void
14821482 phase_one(){
@@ -1490,7 +1490,7 @@ phase= 2; · 7 unmodified lines
14901490 }
14911491
14921492 /*:91*//*93:*/
1493−#line 1478 "ctangle.w"
1493+#line 1478 "./ctangle.w"
14941494
14951495 void
14961496 skip_limbo()
@@ -1505,7 +1505,7 @@ c= *loc++; · 8 unmodified lines
15051505 if(ccode[(eight_bits)c]==new_section)break;
15061506 switch(ccode[(eight_bits)c]){
15071507 case translit_code:/*94:*/
1508−#line 1507 "ctangle.w"
1508+#line 1507 "./ctangle.w"
15091509
15101510 while(xisspace(*loc)&&loc<limit)loc++;
15111511 loc+= 3;
@@ -1530,7 +1530,7 @@ translit[i-0200][loc-beg]= '\0'; · 18 unmodified lines
15301530 }
15311531
15321532 /*:94*/
1533−#line 1491 "ctangle.w"
1533+#line 1491 "./ctangle.w"
15341534 ;break;
15351535 case format_code:case'@':break;
15361536 case control_text:if(c=='q'||c=='Q'){
@@ -1548,7 +1548,7 @@ default:err_print("! Double @ should be used in limbo"); · 11 unmodified lines
15481548 }
15491549
15501550 /*:93*//*95:*/
1551−#line 1533 "ctangle.w"
1551+#line 1533 "./ctangle.w"
15521552
15531553 void
15541554 print_stats(){
ctangle.w+1−1
@@ -831,7 +831,7 @@ speed in order to pass over comments, which \.{CTANGLE} does not transmit · 830 unmodified lines
831831 to the output. If the comment is introduced by \.{/*}, |skip_comment|
832832 proceeds until finding the end-comment token \.{*/} or a newline; in the
833833 latter case |skip_comment| will be called again by |get_next|, since the
834−comment is not finished. This is done so that the each newline in the
834+comment is not finished. This is done so that each newline in the
835835 \CEE/ part of a section is copied to the output; otherwise the \&{\#line}
836836 commands inserted into the \CEE/ file by the output routines become useless.
837837 On the other hand, if the comment is introduced by \.{//} (i.e., if it

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