| @@ -1,19 +1,19 @@ |
| 1 | /*1:*/ | 1 | /*1:*/ |
| 2 | #line 64 "ctangle.w" | 2 | #line 64 "./ctangle.w" |
| 3 | | 3 | |
| 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 888 "ctangle.w" | 10 | #line 888 "./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 65 "ctangle.w" | 16 | #line 65 "./ctangle.w" |
| 17 | | 17 | |
| 18 | #define banner "This is CTANGLE (Version 3.64)\n" \ | 18 | #define banner "This is CTANGLE (Version 3.64)\n" \ |
| 19 | | 19 | |
| @@ -137,10 +137,10 @@ · 117 unmodified lines |
| 137 | #define app_repl(c) {if(tok_ptr==tok_mem_end) overflow("token") ;*tok_ptr++= c;} \ | 137 | #define app_repl(c) {if(tok_ptr==tok_mem_end) overflow("token") ;*tok_ptr++= c;} \ |
| 138 | | 138 | |
| 139 | | 139 | |
| 140 | #line 66 "ctangle.w" | 140 | #line 66 "./ctangle.w" |
| 141 | | 141 | |
| 142 | /*5:*/ | 142 | /*5:*/ |
| 143 | #line 29 "common.h" | 143 | #line 29 "./common.h" |
| 144 | | 144 | |
| 145 | typedef short boolean; | 145 | typedef short boolean; |
| 146 | typedef char unsigned eight_bits; | 146 | typedef char unsigned eight_bits; |
| @@ -148,7 +148,7 @@ extern boolean program; · 1 unmodified line |
| 148 | extern int phase; | 148 | extern int phase; |
| 149 | | 149 | |
| 150 | /*:5*//*7:*/ | 150 | /*:5*//*7:*/ |
| 151 | #line 57 "common.h" | 151 | #line 57 "./common.h" |
| 152 | | 152 | |
| 153 | char section_text[longest_name+1]; | 153 | char section_text[longest_name+1]; |
| 154 | char*section_text_end= section_text+longest_name; | 154 | char*section_text_end= section_text+longest_name; |
| @@ -156,7 +156,7 @@ char*id_first; · 1 unmodified line |
| 156 | char*id_loc; | 156 | char*id_loc; |
| 157 | | 157 | |
| 158 | /*:7*//*8:*/ | 158 | /*:7*//*8:*/ |
| 159 | #line 72 "common.h" | 159 | #line 72 "./common.h" |
| 160 | | 160 | |
| 161 | extern char buffer[]; | 161 | extern char buffer[]; |
| 162 | extern char*buffer_end; | 162 | extern char*buffer_end; |
| @@ -164,7 +164,7 @@ extern char*loc; · 1 unmodified line |
| 164 | extern char*limit; | 164 | extern char*limit; |
| 165 | | 165 | |
| 166 | /*:8*//*9:*/ | 166 | /*:8*//*9:*/ |
| 167 | #line 87 "common.h" | 167 | #line 87 "./common.h" |
| 168 | | 168 | |
| 169 | typedef struct name_info{ | 169 | typedef struct name_info{ |
| 170 | char*byte_start; | 170 | char*byte_start; |
| @@ -192,7 +192,7 @@ extern name_pointer section_lookup(); · 21 unmodified lines |
| 192 | extern void print_section_name(),sprint_section_name(); | 192 | extern void print_section_name(),sprint_section_name(); |
| 193 | | 193 | |
| 194 | /*:9*//*10:*/ | 194 | /*:9*//*10:*/ |
| 195 | #line 122 "common.h" | 195 | #line 122 "./common.h" |
| 196 | | 196 | |
| 197 | extern history; | 197 | extern history; |
| 198 | extern err_print(); | 198 | extern err_print(); |
| @@ -201,7 +201,7 @@ extern void fatal(); · 2 unmodified lines |
| 201 | extern void overflow(); | 201 | extern void overflow(); |
| 202 | | 202 | |
| 203 | /*:10*//*11:*/ | 203 | /*:10*//*11:*/ |
| 204 | #line 137 "common.h" | 204 | #line 137 "./common.h" |
| 205 | | 205 | |
| 206 | extern include_depth; | 206 | extern include_depth; |
| 207 | extern FILE*file[]; | 207 | extern FILE*file[]; |
| @@ -223,7 +223,7 @@ extern get_line(); · 15 unmodified lines |
| 223 | extern check_complete(); | 223 | extern check_complete(); |
| 224 | | 224 | |
| 225 | /*:11*//*12:*/ | 225 | /*:11*//*12:*/ |
| 226 | #line 158 "common.h" | 226 | #line 158 "./common.h" |
| 227 | | 227 | |
| 228 | typedef unsigned short sixteen_bits; | 228 | typedef unsigned short sixteen_bits; |
| 229 | extern sixteen_bits section_count; | 229 | extern sixteen_bits section_count; |
| @@ -232,14 +232,14 @@ extern boolean change_pending; · 2 unmodified lines |
| 232 | extern boolean print_where; | 232 | extern boolean print_where; |
| 233 | | 233 | |
| 234 | /*:12*//*13:*/ | 234 | /*:12*//*13:*/ |
| 235 | #line 170 "common.h" | 235 | #line 170 "./common.h" |
| 236 | | 236 | |
| 237 | extern int argc; | 237 | extern int argc; |
| 238 | extern char**argv; | 238 | extern char**argv; |
| 239 | extern boolean flags[]; | 239 | extern boolean flags[]; |
| 240 | | 240 | |
| 241 | /*:13*//*14:*/ | 241 | /*:13*//*14:*/ |
| 242 | #line 182 "common.h" | 242 | #line 182 "./common.h" |
| 243 | | 243 | |
| 244 | extern FILE*C_file; | 244 | extern FILE*C_file; |
| 245 | extern FILE*tex_file; | 245 | extern FILE*tex_file; |
| @@ -248,16 +248,16 @@ extern FILE*scn_file; · 2 unmodified lines |
| 248 | extern FILE*active_file; | 248 | extern FILE*active_file; |
| 249 | | 249 | |
| 250 | /*:14*//*15:*/ | 250 | /*:14*//*15:*/ |
| 251 | #line 191 "common.h" | 251 | #line 191 "./common.h" |
| 252 | | 252 | |
| 253 | extern void common_init(); | 253 | extern void common_init(); |
| 254 | #line 128 "ctangle.w" | 254 | #line 128 "./ctangle.w" |
| 255 | | 255 | |
| 256 | /*:15*/ | 256 | /*:15*/ |
| 257 | #line 67 "ctangle.w" | 257 | #line 67 "./ctangle.w" |
| 258 | | 258 | |
| 259 | /*16:*/ | 259 | /*16:*/ |
| 260 | #line 152 "ctangle.w" | 260 | #line 152 "./ctangle.w" |
| 261 | | 261 | |
| 262 | typedef struct{ | 262 | typedef struct{ |
| 263 | eight_bits*tok_start; | 263 | eight_bits*tok_start; |
| @@ -266,7 +266,7 @@ sixteen_bits text_link; · 2 unmodified lines |
| 266 | typedef text*text_pointer; | 266 | typedef text*text_pointer; |
| 267 | | 267 | |
| 268 | /*:16*//*27:*/ | 268 | /*:16*//*27:*/ |
| 269 | #line 296 "ctangle.w" | 269 | #line 296 "./ctangle.w" |
| 270 | | 270 | |
| 271 | typedef struct{ | 271 | typedef struct{ |
| 272 | eight_bits*end_field; | 272 | eight_bits*end_field; |
| @@ -278,10 +278,10 @@ sixteen_bits section_field; · 5 unmodified lines |
| 278 | typedef output_state*stack_pointer; | 278 | typedef output_state*stack_pointer; |
| 279 | | 279 | |
| 280 | /*:27*/ | 280 | /*:27*/ |
| 281 | #line 68 "ctangle.w" | 281 | #line 68 "./ctangle.w" |
| 282 | | 282 | |
| 283 | /*17:*/ | 283 | /*17:*/ |
| 284 | #line 159 "ctangle.w" | 284 | #line 159 "./ctangle.w" |
| 285 | | 285 | |
| 286 | text text_info[max_texts]; | 286 | text text_info[max_texts]; |
| 287 | text_pointer text_info_end= text_info+max_texts-1; | 287 | 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 |
| 291 | eight_bits*tok_ptr; | 291 | eight_bits*tok_ptr; |
| 292 | | 292 | |
| 293 | /*:17*//*23:*/ | 293 | /*:17*//*23:*/ |
| 294 | #line 227 "ctangle.w" | 294 | #line 227 "./ctangle.w" |
| 295 | | 295 | |
| 296 | text_pointer last_unnamed; | 296 | text_pointer last_unnamed; |
| 297 | | 297 | |
| 298 | /*:23*//*28:*/ | 298 | /*:23*//*28:*/ |
| 299 | #line 312 "ctangle.w" | 299 | #line 312 "./ctangle.w" |
| 300 | | 300 | |
| 301 | output_state cur_state; | 301 | output_state cur_state; |
| 302 | | 302 | |
| @@ -305,18 +305,18 @@ stack_pointer stack_ptr; · 2 unmodified lines |
| 305 | stack_pointer stack_end= stack+stack_size; | 305 | stack_pointer stack_end= stack+stack_size; |
| 306 | | 306 | |
| 307 | /*:28*//*32:*/ | 307 | /*:28*//*32:*/ |
| 308 | #line 384 "ctangle.w" | 308 | #line 384 "./ctangle.w" |
| 309 | | 309 | |
| 310 | int cur_val; | 310 | int cur_val; |
| 311 | | 311 | |
| 312 | /*:32*//*36:*/ | 312 | /*:32*//*36:*/ |
| 313 | #line 473 "ctangle.w" | 313 | #line 473 "./ctangle.w" |
| 314 | | 314 | |
| 315 | eight_bits out_state; | 315 | eight_bits out_state; |
| 316 | boolean protect; | 316 | boolean protect; |
| 317 | | 317 | |
| 318 | /*:36*//*38:*/ | 318 | /*:36*//*38:*/ |
| 319 | #line 502 "ctangle.w" | 319 | #line 502 "./ctangle.w" |
| 320 | | 320 | |
| 321 | name_pointer output_files[max_files]; | 321 | name_pointer output_files[max_files]; |
| 322 | name_pointer*cur_out_file,*end_output_files,*an_output_file; | 322 | name_pointer*cur_out_file,*end_output_files,*an_output_file; |
| @@ -324,47 +324,47 @@ char cur_section_name_char; · 1 unmodified line |
| 324 | char output_file_name[longest_name]; | 324 | char output_file_name[longest_name]; |
| 325 | | 325 | |
| 326 | /*:38*//*45:*/ | 326 | /*:38*//*45:*/ |
| 327 | #line 599 "ctangle.w" | 327 | #line 599 "./ctangle.w" |
| 328 | | 328 | |
| 329 | boolean output_defs_seen= 0; | 329 | boolean output_defs_seen= 0; |
| 330 | | 330 | |
| 331 | /*:45*//*51:*/ | 331 | /*:45*//*51:*/ |
| 332 | #line 710 "ctangle.w" | 332 | #line 710 "./ctangle.w" |
| 333 | | 333 | |
| 334 | char translit[128][translit_length]; | 334 | char translit[128][translit_length]; |
| 335 | | 335 | |
| 336 | /*:51*//*56:*/ | 336 | /*:51*//*56:*/ |
| 337 | #line 789 "ctangle.w" | 337 | #line 789 "./ctangle.w" |
| 338 | | 338 | |
| 339 | eight_bits ccode[256]; | 339 | eight_bits ccode[256]; |
| 340 | | 340 | |
| 341 | /*:56*//*59:*/ | 341 | /*:56*//*59:*/ |
| 342 | #line 845 "ctangle.w" | 342 | #line 845 "./ctangle.w" |
| 343 | | 343 | |
| 344 | boolean comment_continues= 0; | 344 | boolean comment_continues= 0; |
| 345 | | 345 | |
| 346 | /*:59*//*61:*/ | 346 | /*:59*//*61:*/ |
| 347 | #line 884 "ctangle.w" | 347 | #line 884 "./ctangle.w" |
| 348 | | 348 | |
| 349 | name_pointer cur_section_name; | 349 | name_pointer cur_section_name; |
| 350 | int no_where; | 350 | int no_where; |
| 351 | | 351 | |
| 352 | /*:61*//*75:*/ | 352 | /*:61*//*75:*/ |
| 353 | #line 1195 "ctangle.w" | 353 | #line 1195 "./ctangle.w" |
| 354 | | 354 | |
| 355 | text_pointer cur_text; | 355 | text_pointer cur_text; |
| 356 | eight_bits next_control; | 356 | eight_bits next_control; |
| 357 | | 357 | |
| 358 | /*:75*//*82:*/ | 358 | /*:75*//*82:*/ |
| 359 | #line 1350 "ctangle.w" | 359 | #line 1350 "./ctangle.w" |
| 360 | | 360 | |
| 361 | extern sixteen_bits section_count; | 361 | extern sixteen_bits section_count; |
| 362 | | 362 | |
| 363 | /*:82*/ | 363 | /*:82*/ |
| 364 | #line 69 "ctangle.w" | 364 | #line 69 "./ctangle.w" |
| 365 | | 365 | |
| 366 | /*2:*/ | 366 | /*2:*/ |
| 367 | #line 77 "ctangle.w" | 367 | #line 77 "./ctangle.w" |
| 368 | | 368 | |
| 369 | extern int strlen(); | 369 | extern int strlen(); |
| 370 | extern int strcmp(); | 370 | extern int strcmp(); |
| @@ -373,36 +373,36 @@ extern int strncmp(); · 2 unmodified lines |
| 373 | extern char*strncpy(); | 373 | extern char*strncpy(); |
| 374 | | 374 | |
| 375 | /*:2*//*41:*/ | 375 | /*:2*//*41:*/ |
| 376 | #line 533 "ctangle.w" | 376 | #line 533 "./ctangle.w" |
| 377 | | 377 | |
| 378 | void phase_two(); | 378 | void phase_two(); |
| 379 | | 379 | |
| 380 | /*:41*//*46:*/ | 380 | /*:41*//*46:*/ |
| 381 | #line 602 "ctangle.w" | 381 | #line 602 "./ctangle.w" |
| 382 | | 382 | |
| 383 | void output_defs(); | 383 | void output_defs(); |
| 384 | | 384 | |
| 385 | /*:46*//*48:*/ | 385 | /*:46*//*48:*/ |
| 386 | #line 648 "ctangle.w" | 386 | #line 648 "./ctangle.w" |
| 387 | | 387 | |
| 388 | static void out_char(); | 388 | static void out_char(); |
| 389 | | 389 | |
| 390 | /*:48*//*90:*/ | 390 | /*:48*//*90:*/ |
| 391 | #line 1457 "ctangle.w" | 391 | #line 1457 "./ctangle.w" |
| 392 | | 392 | |
| 393 | void phase_one(); | 393 | void phase_one(); |
| 394 | | 394 | |
| 395 | /*:90*//*92:*/ | 395 | /*:90*//*92:*/ |
| 396 | #line 1475 "ctangle.w" | 396 | #line 1475 "./ctangle.w" |
| 397 | | 397 | |
| 398 | void skip_limbo(); | 398 | void skip_limbo(); |
| 399 | | 399 | |
| 400 | /*:92*/ | 400 | /*:92*/ |
| 401 | #line 70 "ctangle.w" | 401 | #line 70 "./ctangle.w" |
| 402 | | 402 | |
| 403 | | 403 | |
| 404 | /*:1*//*3:*/ | 404 | /*:1*//*3:*/ |
| 405 | #line 91 "ctangle.w" | 405 | #line 91 "./ctangle.w" |
| 406 | | 406 | |
| 407 | int main(ac,av) | 407 | int main(ac,av) |
| 408 | int ac; | 408 | int ac; |
| @@ -411,28 +411,28 @@ char**av; · 2 unmodified lines |
| 411 | argc= ac;argv= av; | 411 | argc= ac;argv= av; |
| 412 | program= ctangle; | 412 | program= ctangle; |
| 413 | /*18:*/ | 413 | /*18:*/ |
| 414 | #line 167 "ctangle.w" | 414 | #line 167 "./ctangle.w" |
| 415 | | 415 | |
| 416 | text_info->tok_start= tok_ptr= tok_mem; | 416 | text_info->tok_start= tok_ptr= tok_mem; |
| 417 | text_ptr= text_info+1;text_ptr->tok_start= tok_mem; | 417 | text_ptr= text_info+1;text_ptr->tok_start= tok_mem; |
| 418 | | 418 | |
| 419 | | 419 | |
| 420 | /*:18*//*20:*/ | 420 | /*:18*//*20:*/ |
| 421 | #line 177 "ctangle.w" | 421 | #line 177 "./ctangle.w" |
| 422 | | 422 | |
| 423 | name_dir->equiv= (char*)text_info; | 423 | name_dir->equiv= (char*)text_info; |
| 424 | | 424 | |
| 425 | /*:20*//*24:*/ | 425 | /*:20*//*24:*/ |
| 426 | #line 230 "ctangle.w" | 426 | #line 230 "./ctangle.w" |
| 427 | last_unnamed= text_info;text_info->text_link= 0; | 427 | last_unnamed= text_info;text_info->text_link= 0; |
| 428 | | 428 | |
| 429 | /*:24*//*39:*/ | 429 | /*:24*//*39:*/ |
| 430 | #line 512 "ctangle.w" | 430 | #line 512 "./ctangle.w" |
| 431 | | 431 | |
| 432 | cur_out_file= end_output_files= output_files+max_files; | 432 | cur_out_file= end_output_files= output_files+max_files; |
| 433 | | 433 | |
| 434 | /*:39*//*52:*/ | 434 | /*:39*//*52:*/ |
| 435 | #line 713 "ctangle.w" | 435 | #line 713 "./ctangle.w" |
| 436 | | 436 | |
| 437 | { | 437 | { |
| 438 | int i; | 438 | int i; |
| @@ -440,7 +440,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned)(128+i)); · 1 unmodified line |
| 440 | } | 440 | } |
| 441 | | 441 | |
| 442 | /*:52*//*57:*/ | 442 | /*:52*//*57:*/ |
| 443 | #line 792 "ctangle.w" | 443 | #line 792 "./ctangle.w" |
| 444 | { | 444 | { |
| 445 | int c; | 445 | int c; |
| 446 | for(c= 0;c<256;c++)ccode[c]= ignore; | 446 | for(c= 0;c<256;c++)ccode[c]= ignore; |
| @@ -460,11 +460,11 @@ ccode['\'']= ord; · 13 unmodified lines |
| 460 | } | 460 | } |
| 461 | | 461 | |
| 462 | /*:57*//*71:*/ | 462 | /*:57*//*71:*/ |
| 463 | #line 1116 "ctangle.w" | 463 | #line 1116 "./ctangle.w" |
| 464 | section_text[0]= ' '; | 464 | section_text[0]= ' '; |
| 465 | | 465 | |
| 466 | /*:71*/ | 466 | /*:71*/ |
| 467 | #line 98 "ctangle.w" | 467 | #line 98 "./ctangle.w" |
| 468 | ; | 468 | ; |
| 469 | common_init(); | 469 | common_init(); |
| 470 | if(show_banner)printf(banner); | 470 | if(show_banner)printf(banner); |
| @@ -474,7 +474,7 @@ return wrap_up(); · 3 unmodified lines |
| 474 | } | 474 | } |
| 475 | | 475 | |
| 476 | /*:3*//*21:*/ | 476 | /*:3*//*21:*/ |
| 477 | #line 183 "ctangle.w" | 477 | #line 183 "./ctangle.w" |
| 478 | | 478 | |
| 479 | int names_match(p,first,l) | 479 | int names_match(p,first,l) |
| 480 | name_pointer p; | 480 | name_pointer p; |
| @@ -486,7 +486,7 @@ return!strncmp(first,p->byte_start,l); · 5 unmodified lines |
| 486 | } | 486 | } |
| 487 | | 487 | |
| 488 | /*:21*//*22:*/ | 488 | /*:21*//*22:*/ |
| 489 | #line 198 "ctangle.w" | 489 | #line 198 "./ctangle.w" |
| 490 | | 490 | |
| 491 | void | 491 | void |
| 492 | init_node(node) | 492 | init_node(node) |
| @@ -498,7 +498,7 @@ void · 5 unmodified lines |
| 498 | init_p(){} | 498 | init_p(){} |
| 499 | | 499 | |
| 500 | /*:22*//*26:*/ | 500 | /*:22*//*26:*/ |
| 501 | #line 260 "ctangle.w" | 501 | #line 260 "./ctangle.w" |
| 502 | | 502 | |
| 503 | void | 503 | void |
| 504 | store_two_bytes(x) | 504 | store_two_bytes(x) |
| @@ -510,7 +510,7 @@ if(tok_ptr+2> tok_mem_end)overflow("token"); · 5 unmodified lines |
| 510 | } | 510 | } |
| 511 | | 511 | |
| 512 | /*:26*//*30:*/ | 512 | /*:26*//*30:*/ |
| 513 | #line 336 "ctangle.w" | 513 | #line 336 "./ctangle.w" |
| 514 | | 514 | |
| 515 | void | 515 | void |
| 516 | push_level(p) | 516 | push_level(p) |
| @@ -527,7 +527,7 @@ cur_section= 0; · 10 unmodified lines |
| 527 | } | 527 | } |
| 528 | | 528 | |
| 529 | /*:30*//*31:*/ | 529 | /*:30*//*31:*/ |
| 530 | #line 355 "ctangle.w" | 530 | #line 355 "./ctangle.w" |
| 531 | | 531 | |
| 532 | void | 532 | void |
| 533 | pop_level(flag) | 533 | pop_level(flag) |
| @@ -543,7 +543,7 @@ if(stack_ptr> stack)cur_state= *stack_ptr; · 9 unmodified lines |
| 543 | } | 543 | } |
| 544 | | 544 | |
| 545 | /*:31*//*33:*/ | 545 | /*:31*//*33:*/ |
| 546 | #line 391 "ctangle.w" | 546 | #line 391 "./ctangle.w" |
| 547 | | 547 | |
| 548 | void | 548 | void |
| 549 | get_output() | 549 | get_output() |
| @@ -566,7 +566,7 @@ switch(a/024000){ · 16 unmodified lines |
| 566 | case 0:cur_val= a;out_char(identifier);break; | 566 | case 0:cur_val= a;out_char(identifier);break; |
| 567 | case 1:if(a==output_defs_flag)output_defs(); | 567 | case 1:if(a==output_defs_flag)output_defs(); |
| 568 | else/*34:*/ | 568 | else/*34:*/ |
| 569 | #line 423 "ctangle.w" | 569 | #line 423 "./ctangle.w" |
| 570 | | 570 | |
| 571 | { | 571 | { |
| 572 | a-= 024000; | 572 | a-= 024000; |
| @@ -580,7 +580,7 @@ goto restart; · 7 unmodified lines |
| 580 | } | 580 | } |
| 581 | | 581 | |
| 582 | /*:34*/ | 582 | /*:34*/ |
| 583 | #line 412 "ctangle.w" | 583 | #line 412 "./ctangle.w" |
| 584 | ; | 584 | ; |
| 585 | break; | 585 | break; |
| 586 | default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; | 586 | default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; |
| @@ -590,7 +590,7 @@ out_char(section_number); · 3 unmodified lines |
| 590 | } | 590 | } |
| 591 | | 591 | |
| 592 | /*:33*//*37:*/ | 592 | /*:33*//*37:*/ |
| 593 | #line 481 "ctangle.w" | 593 | #line 481 "./ctangle.w" |
| 594 | | 594 | |
| 595 | void | 595 | void |
| 596 | flush_buffer() | 596 | flush_buffer() |
| @@ -605,29 +605,29 @@ cur_line++; · 8 unmodified lines |
| 605 | } | 605 | } |
| 606 | | 606 | |
| 607 | /*:37*//*42:*/ | 607 | /*:37*//*42:*/ |
| 608 | #line 536 "ctangle.w" | 608 | #line 536 "./ctangle.w" |
| 609 | | 609 | |
| 610 | void | 610 | void |
| 611 | phase_two(){ | 611 | phase_two(){ |
| 612 | web_file_open= 0; | 612 | web_file_open= 0; |
| 613 | cur_line= 1; | 613 | cur_line= 1; |
| 614 | /*29:*/ | 614 | /*29:*/ |
| 615 | #line 325 "ctangle.w" | 615 | #line 325 "./ctangle.w" |
| 616 | | 616 | |
| 617 | stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info; | 617 | stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info; |
| 618 | cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0; | 618 | cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0; |
| 619 | | 619 | |
| 620 | /*:29*/ | 620 | /*:29*/ |
| 621 | #line 541 "ctangle.w" | 621 | #line 541 "./ctangle.w" |
| 622 | ; | 622 | ; |
| 623 | /*44:*/ | 623 | /*44:*/ |
| 624 | #line 595 "ctangle.w" | 624 | #line 595 "./ctangle.w" |
| 625 | | 625 | |
| 626 | if(!output_defs_seen) | 626 | if(!output_defs_seen) |
| 627 | output_defs(); | 627 | output_defs(); |
| 628 | | 628 | |
| 629 | /*:44*/ | 629 | /*:44*/ |
| 630 | #line 542 "ctangle.w" | 630 | #line 542 "./ctangle.w" |
| 631 | ; | 631 | ; |
| 632 | if(text_info->text_link==0&&cur_out_file==end_output_files){ | 632 | if(text_info->text_link==0&&cur_out_file==end_output_files){ |
| 633 | printf("\n! No program text was specified.");mark_harmless; | 633 | printf("\n! No program text was specified.");mark_harmless; |
| @@ -650,7 +650,7 @@ if(text_info->text_link==0)goto writeloop; · 16 unmodified lines |
| 650 | while(stack_ptr> stack)get_output(); | 650 | while(stack_ptr> stack)get_output(); |
| 651 | flush_buffer(); | 651 | flush_buffer(); |
| 652 | writeloop:/*43:*/ | 652 | writeloop:/*43:*/ |
| 653 | #line 572 "ctangle.w" | 653 | #line 572 "./ctangle.w" |
| 654 | | 654 | |
| 655 | for(an_output_file= end_output_files;an_output_file> cur_out_file;){ | 655 | for(an_output_file= end_output_files;an_output_file> cur_out_file;){ |
| 656 | an_output_file--; | 656 | an_output_file--; |
| @@ -671,14 +671,14 @@ flush_buffer(); · 14 unmodified lines |
| 671 | } | 671 | } |
| 672 | | 672 | |
| 673 | /*:43*/ | 673 | /*:43*/ |
| 674 | #line 563 "ctangle.w" | 674 | #line 563 "./ctangle.w" |
| 675 | ; | 675 | ; |
| 676 | if(show_happiness)printf("\nDone."); | 676 | if(show_happiness)printf("\nDone."); |
| 677 | } | 677 | } |
| 678 | } | 678 | } |
| 679 | | 679 | |
| 680 | /*:42*//*47:*/ | 680 | /*:42*//*47:*/ |
| 681 | #line 605 "ctangle.w" | 681 | #line 605 "./ctangle.w" |
| 682 | | 682 | |
| 683 | void | 683 | void |
| 684 | output_defs() | 684 | output_defs() |
| @@ -718,7 +718,7 @@ pop_level(0); · 33 unmodified lines |
| 718 | } | 718 | } |
| 719 | | 719 | |
| 720 | /*:47*//*49:*/ | 720 | /*:47*//*49:*/ |
| 721 | #line 651 "ctangle.w" | 721 | #line 651 "./ctangle.w" |
| 722 | | 722 | |
| 723 | static void | 723 | static void |
| 724 | out_char(cur_char) | 724 | out_char(cur_char) |
| @@ -731,7 +731,7 @@ case'\n':if(protect&&out_state!=verbatim)C_putc(' '); · 6 unmodified lines |
| 731 | if(protect||out_state==verbatim)C_putc('\\'); | 731 | if(protect||out_state==verbatim)C_putc('\\'); |
| 732 | flush_buffer();if(out_state!=verbatim)out_state= normal;break; | 732 | flush_buffer();if(out_state!=verbatim)out_state= normal;break; |
| 733 | /*53:*/ | 733 | /*53:*/ |
| 734 | #line 719 "ctangle.w" | 734 | #line 719 "./ctangle.w" |
| 735 | | 735 | |
| 736 | case identifier: | 736 | case identifier: |
| 737 | if(out_state==num_or_id)C_putc(' '); | 737 | if(out_state==num_or_id)C_putc(' '); |
| @@ -746,10 +746,10 @@ j++; · 8 unmodified lines |
| 746 | out_state= num_or_id;break; | 746 | out_state= num_or_id;break; |
| 747 | | 747 | |
| 748 | /*:53*/ | 748 | /*:53*/ |
| 749 | #line 662 "ctangle.w" | 749 | #line 662 "./ctangle.w" |
| 750 | ; | 750 | ; |
| 751 | /*54:*/ | 751 | /*54:*/ |
| 752 | #line 732 "ctangle.w" | 752 | #line 732 "./ctangle.w" |
| 753 | | 753 | |
| 754 | case section_number: | 754 | case section_number: |
| 755 | if(cur_val> 0)C_printf("/*%d:*/",cur_val); | 755 | if(cur_val> 0)C_printf("/*%d:*/",cur_val); |
| @@ -776,10 +776,10 @@ C_printf("%s","\"\n"); · 20 unmodified lines |
| 776 | break; | 776 | break; |
| 777 | | 777 | |
| 778 | /*:54*/ | 778 | /*:54*/ |
| 779 | #line 663 "ctangle.w" | 779 | #line 663 "./ctangle.w" |
| 780 | ; | 780 | ; |
| 781 | /*50:*/ | 781 | /*50:*/ |
| 782 | #line 681 "ctangle.w" | 782 | #line 681 "./ctangle.w" |
| 783 | | 783 | |
| 784 | case plus_plus:C_putc('+');C_putc('+');out_state= normal;break; | 784 | case plus_plus:C_putc('+');C_putc('+');out_state= normal;break; |
| 785 | case minus_minus:C_putc('-');C_putc('-');out_state= normal;break; | 785 | 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 |
| 800 | break; | 800 | break; |
| 801 | | 801 | |
| 802 | /*:50*/ | 802 | /*:50*/ |
| 803 | #line 664 "ctangle.w" | 803 | #line 664 "./ctangle.w" |
| 804 | ; | 804 | ; |
| 805 | case'=':case'>':C_putc(cur_char);C_putc(' '); | 805 | case'=':case'>':C_putc(cur_char);C_putc(' '); |
| 806 | out_state= normal;break; | 806 | out_state= normal;break; |
| @@ -819,7 +819,7 @@ default:C_putc(cur_char);out_state= normal;break; · 12 unmodified lines |
| 819 | } | 819 | } |
| 820 | | 820 | |
| 821 | /*:49*//*58:*/ | 821 | /*:49*//*58:*/ |
| 822 | #line 813 "ctangle.w" | 822 | #line 813 "./ctangle.w" |
| 823 | | 823 | |
| 824 | eight_bits | 824 | eight_bits |
| 825 | skip_ahead() | 825 | skip_ahead() |
| @@ -837,7 +837,7 @@ if(c!=ignore||*(loc-1)=='>')return(c); · 11 unmodified lines |
| 837 | } | 837 | } |
| 838 | | 838 | |
| 839 | /*:58*//*60:*/ | 839 | /*:58*//*60:*/ |
| 840 | #line 848 "ctangle.w" | 840 | #line 848 "./ctangle.w" |
| 841 | | 841 | |
| 842 | int skip_comment(is_long_comment) | 842 | int skip_comment(is_long_comment) |
| 843 | boolean is_long_comment; | 843 | boolean is_long_comment; |
| @@ -871,7 +871,7 @@ else loc++; · 27 unmodified lines |
| 871 | } | 871 | } |
| 872 | | 872 | |
| 873 | /*:60*//*63:*/ | 873 | /*:60*//*63:*/ |
| 874 | #line 900 "ctangle.w" | 874 | #line 900 "./ctangle.w" |
| 875 | | 875 | |
| 876 | eight_bits | 876 | eight_bits |
| 877 | get_next() | 877 | get_next() |
| @@ -885,7 +885,7 @@ if(get_line()==0)return(new_section); · 7 unmodified lines |
| 885 | else if(print_where&&!no_where){ | 885 | else if(print_where&&!no_where){ |
| 886 | print_where= 0; | 886 | print_where= 0; |
| 887 | /*77:*/ | 887 | /*77:*/ |
| 888 | #line 1225 "ctangle.w" | 888 | #line 1225 "./ctangle.w" |
| 889 | | 889 | |
| 890 | store_two_bytes(0150000); | 890 | store_two_bytes(0150000); |
| 891 | if(changing)id_first= change_file_name; | 891 | if(changing)id_first= change_file_name; |
| @@ -897,7 +897,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines |
| 897 | app_repl(a%0400);} | 897 | app_repl(a%0400);} |
| 898 | | 898 | |
| 899 | /*:77*/ | 899 | /*:77*/ |
| 900 | #line 912 "ctangle.w" | 900 | #line 912 "./ctangle.w" |
| 901 | ; | 901 | ; |
| 902 | } | 902 | } |
| 903 | else return('\n'); | 903 | else return('\n'); |
| @@ -911,7 +911,7 @@ else continue; · 7 unmodified lines |
| 911 | } | 911 | } |
| 912 | loc++; | 912 | loc++; |
| 913 | if(xisdigit(c)||c=='.')/*66:*/ | 913 | if(xisdigit(c)||c=='.')/*66:*/ |
| 914 | #line 978 "ctangle.w" | 914 | #line 978 "./ctangle.w" |
| 915 | { | 915 | { |
| 916 | id_first= loc-1; | 916 | id_first= loc-1; |
| 917 | if(*id_first=='.'&&!xisdigit(*loc))goto mistake; | 917 | if(*id_first=='.'&&!xisdigit(*loc))goto mistake; |
| @@ -936,11 +936,11 @@ return(constant); · 18 unmodified lines |
| 936 | } | 936 | } |
| 937 | | 937 | |
| 938 | /*:66*/ | 938 | /*:66*/ |
| 939 | #line 924 "ctangle.w" | 939 | #line 924 "./ctangle.w" |
| 940 | | 940 | |
| 941 | else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"'))) | 941 | else if(c=='\''||c=='"'||(c=='L'&&(*loc=='\''||*loc=='"'))) |
| 942 | /*67:*/ | 942 | /*67:*/ |
| 943 | #line 1006 "ctangle.w" | 943 | #line 1006 "./ctangle.w" |
| 944 | { | 944 | { |
| 945 | char delim= c; | 945 | char delim= c; |
| 946 | id_first= section_text+1; | 946 | id_first= section_text+1; |
| @@ -983,11 +983,11 @@ return(string); · 36 unmodified lines |
| 983 | } | 983 | } |
| 984 | | 984 | |
| 985 | /*:67*/ | 985 | /*:67*/ |
| 986 | #line 926 "ctangle.w" | 986 | #line 926 "./ctangle.w" |
| 987 | | 987 | |
| 988 | else if(isalpha(c)||isxalpha(c)||ishigh(c)) | 988 | else if(isalpha(c)||isxalpha(c)||ishigh(c)) |
| 989 | /*65:*/ | 989 | /*65:*/ |
| 990 | #line 972 "ctangle.w" | 990 | #line 972 "./ctangle.w" |
| 991 | { | 991 | { |
| 992 | id_first= --loc; | 992 | id_first= --loc; |
| 993 | while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc)); | 993 | while(isalpha(*++loc)||isdigit(*loc)||isxalpha(*loc)||ishigh(*loc)); |
| @@ -995,10 +995,10 @@ id_loc= loc;return(identifier); · 1 unmodified line |
| 995 | } | 995 | } |
| 996 | | 996 | |
| 997 | /*:65*/ | 997 | /*:65*/ |
| 998 | #line 928 "ctangle.w" | 998 | #line 928 "./ctangle.w" |
| 999 | | 999 | |
| 1000 | else if(c=='@')/*68:*/ | 1000 | else if(c=='@')/*68:*/ |
| 1001 | #line 1050 "ctangle.w" | 1001 | #line 1050 "./ctangle.w" |
| 1002 | { | 1002 | { |
| 1003 | c= ccode[(eight_bits)*loc++]; | 1003 | c= ccode[(eight_bits)*loc++]; |
| 1004 | switch(c){ | 1004 | switch(c){ |
| @@ -1014,11 +1014,11 @@ continue; · 9 unmodified lines |
| 1014 | case section_name: | 1014 | case section_name: |
| 1015 | cur_section_name_char= *(loc-1); | 1015 | cur_section_name_char= *(loc-1); |
| 1016 | /*70:*/ | 1016 | /*70:*/ |
| 1017 | #line 1098 "ctangle.w" | 1017 | #line 1098 "./ctangle.w" |
| 1018 | { | 1018 | { |
| 1019 | char*k; | 1019 | char*k; |
| 1020 | /*72:*/ | 1020 | /*72:*/ |
| 1021 | #line 1118 "ctangle.w" | 1021 | #line 1118 "./ctangle.w" |
| 1022 | | 1022 | |
| 1023 | k= section_text; | 1023 | k= section_text; |
| 1024 | while(1){ | 1024 | while(1){ |
| @@ -1029,7 +1029,7 @@ loc= buffer+1;break; · 4 unmodified lines |
| 1029 | } | 1029 | } |
| 1030 | c= *loc; | 1030 | c= *loc; |
| 1031 | /*73:*/ | 1031 | /*73:*/ |
| 1032 | #line 1142 "ctangle.w" | 1032 | #line 1142 "./ctangle.w" |
| 1033 | | 1033 | |
| 1034 | if(c=='@'){ | 1034 | if(c=='@'){ |
| 1035 | c= *(loc+1); | 1035 | c= *(loc+1); |
| @@ -1048,7 +1048,7 @@ err_print("! Nesting of section names not allowed");break; · 12 unmodified lines |
| 1048 | } | 1048 | } |
| 1049 | | 1049 | |
| 1050 | /*:73*/ | 1050 | /*:73*/ |
| 1051 | #line 1127 "ctangle.w" | 1051 | #line 1127 "./ctangle.w" |
| 1052 | ; | 1052 | ; |
| 1053 | loc++;if(k<section_text_end)k++; | 1053 | loc++;if(k<section_text_end)k++; |
| 1054 | if(xisspace(c)){ | 1054 | if(xisspace(c)){ |
| @@ -1065,14 +1065,14 @@ printf("...");mark_harmless; · 10 unmodified lines |
| 1065 | if(*k==' '&&k> section_text)k--; | 1065 | if(*k==' '&&k> section_text)k--; |
| 1066 | | 1066 | |
| 1067 | /*:72*/ | 1067 | /*:72*/ |
| 1068 | #line 1100 "ctangle.w" | 1068 | #line 1100 "./ctangle.w" |
| 1069 | ; | 1069 | ; |
| 1070 | if(k-section_text> 3&&strncmp(k-2,"...",3)==0) | 1070 | if(k-section_text> 3&&strncmp(k-2,"...",3)==0) |
| 1071 | cur_section_name= section_lookup(section_text+1,k-3,1); | 1071 | cur_section_name= section_lookup(section_text+1,k-3,1); |
| 1072 | else cur_section_name= section_lookup(section_text+1,k,0); | 1072 | else cur_section_name= section_lookup(section_text+1,k,0); |
| 1073 | if(cur_section_name_char=='(') | 1073 | if(cur_section_name_char=='(') |
| 1074 | /*40:*/ | 1074 | /*40:*/ |
| 1075 | #line 516 "ctangle.w" | 1075 | #line 516 "./ctangle.w" |
| 1076 | | 1076 | |
| 1077 | { | 1077 | { |
| 1078 | for(an_output_file= cur_out_file; | 1078 | for(an_output_file= cur_out_file; |
| @@ -1088,16 +1088,16 @@ overflow("output files"); · 9 unmodified lines |
| 1088 | } | 1088 | } |
| 1089 | | 1089 | |
| 1090 | /*:40*/ | 1090 | /*:40*/ |
| 1091 | #line 1106 "ctangle.w" | 1091 | #line 1106 "./ctangle.w" |
| 1092 | ; | 1092 | ; |
| 1093 | return(section_name); | 1093 | return(section_name); |
| 1094 | } | 1094 | } |
| 1095 | | 1095 | |
| 1096 | /*:70*/ | 1096 | /*:70*/ |
| 1097 | #line 1064 "ctangle.w" | 1097 | #line 1064 "./ctangle.w" |
| 1098 | ; | 1098 | ; |
| 1099 | case string:/*74:*/ | 1099 | case string:/*74:*/ |
| 1100 | #line 1164 "ctangle.w" | 1100 | #line 1164 "./ctangle.w" |
| 1101 | { | 1101 | { |
| 1102 | id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; | 1102 | id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; |
| 1103 | while(*loc!='@'||*(loc+1)!='>')loc++; | 1103 | while(*loc!='@'||*(loc+1)!='>')loc++; |
| @@ -1108,10 +1108,10 @@ return(string); · 4 unmodified lines |
| 1108 | } | 1108 | } |
| 1109 | | 1109 | |
| 1110 | /*:74*/ | 1110 | /*:74*/ |
| 1111 | #line 1065 "ctangle.w" | 1111 | #line 1065 "./ctangle.w" |
| 1112 | ; | 1112 | ; |
| 1113 | case ord:/*69:*/ | 1113 | case ord:/*69:*/ |
| 1114 | #line 1077 "ctangle.w" | 1114 | #line 1077 "./ctangle.w" |
| 1115 | | 1115 | |
| 1116 | id_first= loc; | 1116 | id_first= loc; |
| 1117 | if(*loc=='\\'){ | 1117 | if(*loc=='\\'){ |
| @@ -1134,14 +1134,14 @@ loc++; · 16 unmodified lines |
| 1134 | return(ord); | 1134 | return(ord); |
| 1135 | | 1135 | |
| 1136 | /*:69*/ | 1136 | /*:69*/ |
| 1137 | #line 1066 "ctangle.w" | 1137 | #line 1066 "./ctangle.w" |
| 1138 | ; | 1138 | ; |
| 1139 | default:return(c); | 1139 | default:return(c); |
| 1140 | } | 1140 | } |
| 1141 | } | 1141 | } |
| 1142 | | 1142 | |
| 1143 | /*:68*/ | 1143 | /*:68*/ |
| 1144 | #line 929 "ctangle.w" | 1144 | #line 929 "./ctangle.w" |
| 1145 | | 1145 | |
| 1146 | else if(xisspace(c)){ | 1146 | else if(xisspace(c)){ |
| 1147 | if(!preprocessing||loc> limit)continue; | 1147 | if(!preprocessing||loc> limit)continue; |
| @@ -1150,7 +1150,7 @@ else return(' '); · 2 unmodified lines |
| 1150 | } | 1150 | } |
| 1151 | else if(c=='#'&&loc==buffer+1)preprocessing= 1; | 1151 | else if(c=='#'&&loc==buffer+1)preprocessing= 1; |
| 1152 | mistake:/*64:*/ | 1152 | mistake:/*64:*/ |
| 1153 | #line 950 "ctangle.w" | 1153 | #line 950 "./ctangle.w" |
| 1154 | | 1154 | |
| 1155 | switch(c){ | 1155 | switch(c){ |
| 1156 | case'+':if(*loc=='+')compress(plus_plus);break; | 1156 | case'+':if(*loc=='+')compress(plus_plus);break; |
| @@ -1174,14 +1174,14 @@ case'!':if(*loc=='=')compress(not_eq);break; · 17 unmodified lines |
| 1174 | } | 1174 | } |
| 1175 | | 1175 | |
| 1176 | /*:64*/ | 1176 | /*:64*/ |
| 1177 | #line 936 "ctangle.w" | 1177 | #line 936 "./ctangle.w" |
| 1178 | | 1178 | |
| 1179 | return(c); | 1179 | return(c); |
| 1180 | } | 1180 | } |
| 1181 | } | 1181 | } |
| 1182 | | 1182 | |
| 1183 | /*:63*//*76:*/ | 1183 | /*:63*//*76:*/ |
| 1184 | #line 1199 "ctangle.w" | 1184 | #line 1199 "./ctangle.w" |
| 1185 | | 1185 | |
| 1186 | void | 1186 | void |
| 1187 | scan_repl(t) | 1187 | scan_repl(t) |
| @@ -1189,7 +1189,7 @@ eight_bits t; · 1 unmodified line |
| 1189 | { | 1189 | { |
| 1190 | sixteen_bits a; | 1190 | sixteen_bits a; |
| 1191 | if(t==section_name){/*77:*/ | 1191 | if(t==section_name){/*77:*/ |
| 1192 | #line 1225 "ctangle.w" | 1192 | #line 1225 "./ctangle.w" |
| 1193 | | 1193 | |
| 1194 | store_two_bytes(0150000); | 1194 | store_two_bytes(0150000); |
| 1195 | if(changing)id_first= change_file_name; | 1195 | if(changing)id_first= change_file_name; |
| @@ -1201,11 +1201,11 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines |
| 1201 | app_repl(a%0400);} | 1201 | app_repl(a%0400);} |
| 1202 | | 1202 | |
| 1203 | /*:77*/ | 1203 | /*:77*/ |
| 1204 | #line 1205 "ctangle.w" | 1204 | #line 1205 "./ctangle.w" |
| 1205 | ;} | 1205 | ;} |
| 1206 | while(1)switch(a= get_next()){ | 1206 | while(1)switch(a= get_next()){ |
| 1207 | /*78:*/ | 1207 | /*78:*/ |
| 1208 | #line 1235 "ctangle.w" | 1208 | #line 1235 "./ctangle.w" |
| 1209 | | 1209 | |
| 1210 | case identifier:a= id_lookup(id_first,id_loc,0)-name_dir; | 1210 | case identifier:a= id_lookup(id_first,id_loc,0)-name_dir; |
| 1211 | app_repl((a/0400)+0200); | 1211 | app_repl((a/0400)+0200); |
| @@ -1213,7 +1213,7 @@ app_repl(a%0400);break; · 1 unmodified line |
| 1213 | case section_name:if(t!=section_name)goto done; | 1213 | case section_name:if(t!=section_name)goto done; |
| 1214 | else{ | 1214 | else{ |
| 1215 | /*79:*/ | 1215 | /*79:*/ |
| 1216 | #line 1268 "ctangle.w" | 1216 | #line 1268 "./ctangle.w" |
| 1217 | { | 1217 | { |
| 1218 | char*try_loc= loc; | 1218 | char*try_loc= loc; |
| 1219 | while(*try_loc==' '&&try_loc<limit)try_loc++; | 1219 | 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 |
| 1226 | } | 1226 | } |
| 1227 | | 1227 | |
| 1228 | /*:79*/ | 1228 | /*:79*/ |
| 1229 | #line 1241 "ctangle.w" | 1229 | #line 1241 "./ctangle.w" |
| 1230 | ; | 1230 | ; |
| 1231 | a= cur_section_name-name_dir; | 1231 | a= cur_section_name-name_dir; |
| 1232 | app_repl((a/0400)+0250); | 1232 | app_repl((a/0400)+0250); |
| 1233 | app_repl(a%0400); | 1233 | app_repl(a%0400); |
| 1234 | /*77:*/ | 1234 | /*77:*/ |
| 1235 | #line 1225 "ctangle.w" | 1235 | #line 1225 "./ctangle.w" |
| 1236 | | 1236 | |
| 1237 | store_two_bytes(0150000); | 1237 | store_two_bytes(0150000); |
| 1238 | if(changing)id_first= change_file_name; | 1238 | if(changing)id_first= change_file_name; |
| @@ -1244,7 +1244,7 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines |
| 1244 | app_repl(a%0400);} | 1244 | app_repl(a%0400);} |
| 1245 | | 1245 | |
| 1246 | /*:77*/ | 1246 | /*:77*/ |
| 1247 | #line 1245 "ctangle.w" | 1247 | #line 1245 "./ctangle.w" |
| 1248 | ;break; | 1248 | ;break; |
| 1249 | } | 1249 | } |
| 1250 | case output_defs_code:if(t!=section_name)err_print("! Misplaced @h"); | 1250 | case output_defs_code:if(t!=section_name)err_print("! Misplaced @h"); |
| @@ -1255,7 +1255,7 @@ a= output_defs_flag; · 4 unmodified lines |
| 1255 | app_repl((a/0400)+0200); | 1255 | app_repl((a/0400)+0200); |
| 1256 | app_repl(a%0400); | 1256 | app_repl(a%0400); |
| 1257 | /*77:*/ | 1257 | /*77:*/ |
| 1258 | #line 1225 "ctangle.w" | 1258 | #line 1225 "./ctangle.w" |
| 1259 | | 1259 | |
| 1260 | store_two_bytes(0150000); | 1260 | store_two_bytes(0150000); |
| 1261 | if(changing)id_first= change_file_name; | 1261 | if(changing)id_first= change_file_name; |
| @@ -1267,13 +1267,13 @@ else store_two_bytes((sixteen_bits)cur_line); · 5 unmodified lines |
| 1267 | app_repl(a%0400);} | 1267 | app_repl(a%0400);} |
| 1268 | | 1268 | |
| 1269 | /*:77*/ | 1269 | /*:77*/ |
| 1270 | #line 1254 "ctangle.w" | 1270 | #line 1254 "./ctangle.w" |
| 1271 | ; | 1271 | ; |
| 1272 | } | 1272 | } |
| 1273 | break; | 1273 | break; |
| 1274 | case constant:case string: | 1274 | case constant:case string: |
| 1275 | /*80:*/ | 1275 | /*80:*/ |
| 1276 | #line 1279 "ctangle.w" | 1276 | #line 1279 "./ctangle.w" |
| 1277 | | 1277 | |
| 1278 | app_repl(a); | 1278 | app_repl(a); |
| 1279 | while(id_first<id_loc){ | 1279 | while(id_first<id_loc){ |
| @@ -1287,11 +1287,11 @@ app_repl(*id_first++); · 7 unmodified lines |
| 1287 | app_repl(a);break; | 1287 | app_repl(a);break; |
| 1288 | | 1288 | |
| 1289 | /*:80*/ | 1289 | /*:80*/ |
| 1290 | #line 1258 "ctangle.w" | 1290 | #line 1258 "./ctangle.w" |
| 1291 | ; | 1291 | ; |
| 1292 | case ord: | 1292 | case ord: |
| 1293 | /*81:*/ | 1293 | /*81:*/ |
| 1294 | #line 1295 "ctangle.w" | 1294 | #line 1295 "./ctangle.w" |
| 1295 | { | 1295 | { |
| 1296 | int c= (eight_bits)*id_first; | 1296 | int c= (eight_bits)*id_first; |
| 1297 | if(c=='\\'){ | 1297 | if(c=='\\'){ |
| @@ -1342,7 +1342,7 @@ app_repl(constant); · 44 unmodified lines |
| 1342 | break; | 1342 | break; |
| 1343 | | 1343 | |
| 1344 | /*:81*/ | 1344 | /*:81*/ |
| 1345 | #line 1260 "ctangle.w" | 1345 | #line 1260 "./ctangle.w" |
| 1346 | ; | 1346 | ; |
| 1347 | case definition:case format_code:case begin_C:if(t!=section_name)goto done; | 1347 | case definition:case format_code:case begin_C:if(t!=section_name)goto done; |
| 1348 | else{ | 1348 | else{ |
| @@ -1352,7 +1352,7 @@ err_print("! @d, @f and @c are ignored in C text");continue; · 3 unmodified lines |
| 1352 | case new_section:goto done; | 1352 | case new_section:goto done; |
| 1353 | | 1353 | |
| 1354 | /*:78*/ | 1354 | /*:78*/ |
| 1355 | #line 1210 "ctangle.w" | 1355 | #line 1210 "./ctangle.w" |
| 1356 | | 1356 | |
| 1357 | case')':app_repl(a); | 1357 | case')':app_repl(a); |
| 1358 | if(t==macro)app_repl(' '); | 1358 | if(t==macro)app_repl(' '); |
| @@ -1365,7 +1365,7 @@ cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; · 6 unmodified lines |
| 1365 | } | 1365 | } |
| 1366 | | 1366 | |
| 1367 | /*:76*//*83:*/ | 1367 | /*:76*//*83:*/ |
| 1368 | #line 1357 "ctangle.w" | 1368 | #line 1357 "./ctangle.w" |
| 1369 | | 1369 | |
| 1370 | void | 1370 | void |
| 1371 | scan_section() | 1371 | scan_section() |
| @@ -1380,7 +1380,7 @@ printf("*%d",section_count);update_terminal; · 8 unmodified lines |
| 1380 | next_control= 0; | 1380 | next_control= 0; |
| 1381 | while(1){ | 1381 | while(1){ |
| 1382 | /*84:*/ | 1382 | /*84:*/ |
| 1383 | #line 1396 "ctangle.w" | 1383 | #line 1396 "./ctangle.w" |
| 1384 | | 1384 | |
| 1385 | while(next_control<definition) | 1385 | while(next_control<definition) |
| 1386 | | 1386 | |
| @@ -1389,11 +1389,11 @@ loc-= 2;next_control= get_next(); · 2 unmodified lines |
| 1389 | } | 1389 | } |
| 1390 | | 1390 | |
| 1391 | /*:84*/ | 1391 | /*:84*/ |
| 1392 | #line 1371 "ctangle.w" | 1392 | #line 1371 "./ctangle.w" |
| 1393 | ; | 1393 | ; |
| 1394 | if(next_control==definition){ | 1394 | if(next_control==definition){ |
| 1395 | /*85:*/ | 1395 | /*85:*/ |
| 1396 | #line 1403 "ctangle.w" | 1396 | #line 1403 "./ctangle.w" |
| 1397 | { | 1397 | { |
| 1398 | while((next_control= get_next())=='\n'); | 1398 | while((next_control= get_next())=='\n'); |
| 1399 | if(next_control!=identifier){ | 1399 | if(next_control!=identifier){ |
| @@ -1412,7 +1412,7 @@ cur_text->text_link= 0; · 12 unmodified lines |
| 1412 | } | 1412 | } |
| 1413 | | 1413 | |
| 1414 | /*:85*/ | 1414 | /*:85*/ |
| 1415 | #line 1373 "ctangle.w" | 1415 | #line 1373 "./ctangle.w" |
| 1416 | | 1416 | |
| 1417 | continue; | 1417 | continue; |
| 1418 | } | 1418 | } |
| @@ -1422,14 +1422,14 @@ p= name_dir;break; · 3 unmodified lines |
| 1422 | if(next_control==section_name){ | 1422 | if(next_control==section_name){ |
| 1423 | p= cur_section_name; | 1423 | p= cur_section_name; |
| 1424 | /*86:*/ | 1424 | /*86:*/ |
| 1425 | #line 1428 "ctangle.w" | 1425 | #line 1428 "./ctangle.w" |
| 1426 | | 1426 | |
| 1427 | while((next_control= get_next())=='+'); | 1427 | while((next_control= get_next())=='+'); |
| 1428 | if(next_control!='='&&next_control!=eq_eq) | 1428 | if(next_control!='='&&next_control!=eq_eq) |
| 1429 | continue; | 1429 | continue; |
| 1430 | | 1430 | |
| 1431 | /*:86*/ | 1431 | /*:86*/ |
| 1432 | #line 1381 "ctangle.w" | 1432 | #line 1381 "./ctangle.w" |
| 1433 | ; | 1433 | ; |
| 1434 | break; | 1434 | break; |
| 1435 | } | 1435 | } |
| @@ -1437,20 +1437,20 @@ return; · 1 unmodified line |
| 1437 | } | 1437 | } |
| 1438 | no_where= print_where= 0; | 1438 | no_where= print_where= 0; |
| 1439 | /*87:*/ | 1439 | /*87:*/ |
| 1440 | #line 1433 "ctangle.w" | 1440 | #line 1433 "./ctangle.w" |
| 1441 | | 1441 | |
| 1442 | /*88:*/ | 1442 | /*88:*/ |
| 1443 | #line 1438 "ctangle.w" | 1443 | #line 1438 "./ctangle.w" |
| 1444 | | 1444 | |
| 1445 | store_two_bytes((sixteen_bits)(0150000+section_count)); | 1445 | store_two_bytes((sixteen_bits)(0150000+section_count)); |
| 1446 | | 1446 | |
| 1447 | | 1447 | |
| 1448 | /*:88*/ | 1448 | /*:88*/ |
| 1449 | #line 1434 "ctangle.w" | 1449 | #line 1434 "./ctangle.w" |
| 1450 | ; | 1450 | ; |
| 1451 | scan_repl(section_name); | 1451 | scan_repl(section_name); |
| 1452 | /*89:*/ | 1452 | /*89:*/ |
| 1453 | #line 1442 "ctangle.w" | 1453 | #line 1442 "./ctangle.w" |
| 1454 | | 1454 | |
| 1455 | if(p==name_dir||p==0){ | 1455 | if(p==name_dir||p==0){ |
| 1456 | (last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text; | 1456 | (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 |
| 1467 | | 1467 | |
| 1468 | | 1468 | |
| 1469 | /*:89*/ | 1469 | /*:89*/ |
| 1470 | #line 1436 "ctangle.w" | 1470 | #line 1436 "./ctangle.w" |
| 1471 | ; | 1471 | ; |
| 1472 | | 1472 | |
| 1473 | /*:87*/ | 1473 | /*:87*/ |
| 1474 | #line 1387 "ctangle.w" | 1474 | #line 1387 "./ctangle.w" |
| 1475 | ; | 1475 | ; |
| 1476 | } | 1476 | } |
| 1477 | | 1477 | |
| 1478 | /*:83*//*91:*/ | 1478 | /*:83*//*91:*/ |
| 1479 | #line 1460 "ctangle.w" | 1479 | #line 1460 "./ctangle.w" |
| 1480 | | 1480 | |
| 1481 | void | 1481 | void |
| 1482 | phase_one(){ | 1482 | phase_one(){ |
| @@ -1490,7 +1490,7 @@ phase= 2; · 7 unmodified lines |
| 1490 | } | 1490 | } |
| 1491 | | 1491 | |
| 1492 | /*:91*//*93:*/ | 1492 | /*:91*//*93:*/ |
| 1493 | #line 1478 "ctangle.w" | 1493 | #line 1478 "./ctangle.w" |
| 1494 | | 1494 | |
| 1495 | void | 1495 | void |
| 1496 | skip_limbo() | 1496 | skip_limbo() |
| @@ -1505,7 +1505,7 @@ c= *loc++; · 8 unmodified lines |
| 1505 | if(ccode[(eight_bits)c]==new_section)break; | 1505 | if(ccode[(eight_bits)c]==new_section)break; |
| 1506 | switch(ccode[(eight_bits)c]){ | 1506 | switch(ccode[(eight_bits)c]){ |
| 1507 | case translit_code:/*94:*/ | 1507 | case translit_code:/*94:*/ |
| 1508 | #line 1507 "ctangle.w" | 1508 | #line 1507 "./ctangle.w" |
| 1509 | | 1509 | |
| 1510 | while(xisspace(*loc)&&loc<limit)loc++; | 1510 | while(xisspace(*loc)&&loc<limit)loc++; |
| 1511 | loc+= 3; | 1511 | loc+= 3; |
| @@ -1530,7 +1530,7 @@ translit[i-0200][loc-beg]= '\0'; · 18 unmodified lines |
| 1530 | } | 1530 | } |
| 1531 | | 1531 | |
| 1532 | /*:94*/ | 1532 | /*:94*/ |
| 1533 | #line 1491 "ctangle.w" | 1533 | #line 1491 "./ctangle.w" |
| 1534 | ;break; | 1534 | ;break; |
| 1535 | case format_code:case'@':break; | 1535 | case format_code:case'@':break; |
| 1536 | case control_text:if(c=='q'||c=='Q'){ | 1536 | case control_text:if(c=='q'||c=='Q'){ |
| @@ -1548,7 +1548,7 @@ default:err_print("! Double @ should be used in limbo"); · 11 unmodified lines |
| 1548 | } | 1548 | } |
| 1549 | | 1549 | |
| 1550 | /*:93*//*95:*/ | 1550 | /*:93*//*95:*/ |
| 1551 | #line 1533 "ctangle.w" | 1551 | #line 1533 "./ctangle.w" |
| 1552 | | 1552 | |
| 1553 | void | 1553 | void |
| 1554 | print_stats(){ | 1554 | print_stats(){ |