[tex-k] CTANGLE: spurious "ttp" file is left over

Andreas Scherer andreas_tex at freenet.de
Sun Jun 7 03:06:05 CEST 2020


Hi, Igor,

that's an interesting example.  I'll investigated later in the day.

For now, let me just say that your code is broken in and of itself:

Using TL's as my system CWEB, 'ctangle +v mf' runs fine and doesn't
leave 'mf.ttp' around.  (This is CTANGLE, Version 3.64 (TeX Live 2021/dev)).

Running 'ctangle mf mf', indeed leaves 'mf.ttp' behind, next to 'mf.c'.
I'll have to look into that.

However, running 'cweave +v mf' (This is CWEAVE, Version 3.64 (TeX Live
2021/dev)), produces this error message:

! Sorry, stack capacity exceeded. (l. 24490)
@
  @<|pool_ptr| initialization@>= str_start_550
(That was a fatal error, my friend.)

also with 'cweave +v mf mf' (both without leaving 'mf.wtp' behind).

Moreover, DEK's original CWEB isn't happy with your code at all.
Running '/opt/github/cweb/ctangle mf' gives this error message:

This is CTANGLE (Version 3.64)
*1*17*24*37
! Input line too long. (l. 1037)
pool_pointer @!str_start[max_strings+1]= {@<|str_start|
initialization@>}; /*the starting pointers*
! Input line too long. (l. 1264)
{@+int k;@+for(k=1;
k<=file_name_size;k++)name_of_file[k]=pool_name[k-1];@+} /*we needn't
set |name *54*67
! Input line too long. (l. 1785)
case '0': case '1': case '2': case '3': case '4': case '5': case '6':
case '7': case '8': case '9': *95*120
! Input line too long. (l. 2821)
angle @!spec_atan0[26], *const @!spec_atan = @!spec_atan0-1;
/*$\arctan2^{-k}$ times $2^{20}\cdot18 *153*158
! Input line too long. (l. 3283)
memory_word @!mem0[mem_max-mem_min+1], *const @!mem = @!mem0-mem_min;
/*the big dynamic storage are *175*186*200*214*228
! Input line too long. (l. 5204)
small_number @!big_node_size0[pair_type-transform_type+1], *const
@!big_node_size = @!big_node_size *250*255*269*303*323*386
! Input line too long. (l. 8537)
str_number @!octant_dir0[sixth_octant-first_octant+1], *const
@!octant_dir = @!octant_dir0-first_oc
! Input line too long. (l. 9644)
uint8_t @!octant_number0[sixth_octant-first_octant+1], *const
@!octant_number = @!octant_number0-fi
! Input line too long. (l. 9700)
case 3: case -5: case 4: case -4: case 5: case -3: @<Decide whether or
not to go clockwise@>@;@+bre *460
! Input line too long. (l. 9909)
uint8_t @!y_corr0[sixth_octant-first_octant+1], *const @!y_corr =
@!y_corr0-first_octant, @!xy_corr
! Input line too long. (l. 9910)
0[sixth_octant-first_octant+1], *const @!xy_corr =
@!xy_corr0-first_octant, @!z_corr0[sixth_octant-
*469*490*524*538*564*585*618*624*627*647*658*683*706*738*752*766*795
! Input line too long. (l. 16364)
unknown_types: case transform_type: case pair_type: @|case dependent:
case proto_dependent: case in *822*861*892
! Input line too long. (l. 17924)
 case expression_binary: case cycle: case plus_or_minus: case slash:
case ampersand: case equals: c
! Input line too long. (l. 18267)
case vacuous: case boolean_type: case string_type: case pen_type: case
future_pen: case path_type:
! Input line too long. (l. 18532)
case less_than: case less_or_equal: case greater_than: case
greater_or_equal: case equal_to: case u *988*1019*1086
! Input line too long. (l. 21008)
eight_bits @!label_char0[256], *const @!label_char = @!label_char0-1;
/*characters for |label_loc|* *1141*1148*1182*1201*1211*1213*1214
Writing the output file
(mf.c):.....500.....1000.....1500.....2000.....2500.....3000.....3500.....4000.....4500.....5000.....5500.....6000.....6500.....7000.....7500.....8000.....8500.....9000.....9500.....10000.....10500.....11000.....11500.....12000.....12500.....13000.....13500.....14000.....14500.....15000.....15500.....16000.....16500.....17000
Done.
(Pardon me, but I think I spotted something wrong.)

and '/opt/github/cweb/ctangle mf mf' gives

This is CTANGLE (Version 3.64)
*1*17*24*37
! Input line too long. (l. 1037)
pool_pointer @!str_start[max_strings+1]= {@<|str_start|
initialization@>}; /*the starting pointers*
! Input line too long. (l. 1264)
{@+int k;@+for(k=1;
k<=file_name_size;k++)name_of_file[k]=pool_name[k-1];@+} /*we needn't
set |name *54*67
! Input line too long. (l. 1785)
case '0': case '1': case '2': case '3': case '4': case '5': case '6':
case '7': case '8': case '9': *95*120
! Input line too long. (l. 2821)
angle @!spec_atan0[26], *const @!spec_atan = @!spec_atan0-1;
/*$\arctan2^{-k}$ times $2^{20}\cdot18 *153*158
! Input line too long. (l. 3283)
memory_word @!mem0[mem_max-mem_min+1], *const @!mem = @!mem0-mem_min;
/*the big dynamic storage are *175*186*200*214*228
! Input line too long. (l. 5204)
small_number @!big_node_size0[pair_type-transform_type+1], *const
@!big_node_size = @!big_node_size *250*255*269*303*323*386
! Input line too long. (l. 8537)
str_number @!octant_dir0[sixth_octant-first_octant+1], *const
@!octant_dir = @!octant_dir0-first_oc
! Input line too long. (l. 9644)
uint8_t @!octant_number0[sixth_octant-first_octant+1], *const
@!octant_number = @!octant_number0-fi
! Input line too long. (l. 9700)
case 3: case -5: case 4: case -4: case 5: case -3: @<Decide whether or
not to go clockwise@>@;@+bre *460
! Input line too long. (l. 9909)
uint8_t @!y_corr0[sixth_octant-first_octant+1], *const @!y_corr =
@!y_corr0-first_octant, @!xy_corr
! Input line too long. (l. 9910)
0[sixth_octant-first_octant+1], *const @!xy_corr =
@!xy_corr0-first_octant, @!z_corr0[sixth_octant-
*469*490*524*538*564*585*618*624*627*647*658*683*706*738*752*766*795
! Input line too long. (l. 16364)
unknown_types: case transform_type: case pair_type: @|case dependent:
case proto_dependent: case in *822*861*892
! Input line too long. (l. 17924)
 case expression_binary: case cycle: case plus_or_minus: case slash:
case ampersand: case equals: c
! Input line too long. (l. 18267)
case vacuous: case boolean_type: case string_type: case pen_type: case
future_pen: case path_type:
! Input line too long. (l. 18532)
case less_than: case less_or_equal: case greater_than: case
greater_or_equal: case equal_to: case u *988*1019*1086
! Input line too long. (l. 21008)
eight_bits @!label_char0[256], *const @!label_char = @!label_char0-1;
/*characters for |label_loc|* *1141*1148*1182*1201*1211*1213*1214
Writing the output files:
(mf.c).....500.....1000.....1500.....2000.....2500.....3000.....3500.....4000.....4500.....5000.....5500.....6000.....6500.....7000.....7500.....8000.....8500.....9000.....9500.....10000.....10500.....11000.....11500.....12000.....12500.....13000.....13500.....14000.....14500.....15000.....15500.....16000.....16500....
(/dev/null)
Done.
(Pardon me, but I think I spotted something wrong.)

'/opt/github/cweb/cweave mf' produces

This is CWEAVE (Version 3.64)
*1*17*24*37
! Input line too long. (l. 1037)
pool_pointer @!str_start[max_strings+1]= {@<|str_start|
initialization@>}; /*the starting pointers*
! Illegal use of @ in comment. (l. 1039)
pool_pointer @!
               pool_ptr=@<|pool_ptr| initialization@>; /*first unused
position in |str_pool|*/
! Input line too long. (l. 1264)
{@+int k;@+for(k=1;
k<=file_name_size;k++)name_of_file[k]=pool_name[k-1];@+} /*we needn't
set |name *54*67
! Input line too long. (l. 1785)
case '0': case '1': case '2': case '3': case '4': case '5': case '6':
case '7': case '8': case '9': *95*120
! Input line too long. (l. 2821)
angle @!spec_atan0[26], *const @!spec_atan = @!spec_atan0-1;
/*$\arctan2^{-k}$ times $2^{20}\cdot18 *153*158
! Input line too long. (l. 3283)
memory_word @!mem0[mem_max-mem_min+1], *const @!mem = @!mem0-mem_min;
/*the big dynamic storage are *175*186*200*214*228
! Input line too long. (l. 5204)
small_number @!big_node_size0[pair_type-transform_type+1], *const
@!big_node_size = @!big_node_size *250*255*269*303*323*386
! Input line too long. (l. 8537)
str_number @!octant_dir0[sixth_octant-first_octant+1], *const
@!octant_dir = @!octant_dir0-first_oc
! Input line too long. (l. 9644)
uint8_t @!octant_number0[sixth_octant-first_octant+1], *const
@!octant_number = @!octant_number0-fi
! Input line too long. (l. 9700)
case 3: case -5: case 4: case -4: case 5: case -3: @<Decide whether or
not to go clockwise@>@;@+bre *460
! Input line too long. (l. 9909)
uint8_t @!y_corr0[sixth_octant-first_octant+1], *const @!y_corr =
@!y_corr0-first_octant, @!xy_corr
! Input line too long. (l. 9910)
0[sixth_octant-first_octant+1], *const @!xy_corr =
@!xy_corr0-first_octant, @!z_corr0[sixth_octant-
*469*490*524*538*564*585*618*624*627*647*658*683*706*738*752*766*795
! Input line too long. (l. 16364)
unknown_types: case transform_type: case pair_type: @|case dependent:
case proto_dependent: case in *822*861*892
! Input line too long. (l. 17924)
 case expression_binary: case cycle: case plus_or_minus: case slash:
case ampersand: case equals: c
! Input line too long. (l. 18267)
case vacuous: case boolean_type: case string_type: case pen_type: case
future_pen: case path_type:
! Input line too long. (l. 18532)
case less_than: case less_or_equal: case greater_than: case
greater_or_equal: case equal_to: case u *988*1019*1086
! Input line too long. (l. 21008)
eight_bits @!label_char0[256], *const @!label_char = @!label_char0-1;
/*characters for |label_loc|*
! Illegal use of @ in comment. (l. 21010)
uint16_t @!
           label_ptr; /*highest position occupied in |label_loc|*/
*1141*1148*1182*1201*1211*1213*1214
! Sorry, cross-reference capacity exceeded. (l. 24483)
str_start_530
             =str_start_529+sizeof(str_529)-1,@/
(That was a fatal error, my friend.)

and '/opt/github/cweb/cweave mf mf' gives

This is CWEAVE (Version 3.64)
*1*17*24*37
! Input line too long. (l. 1037)
pool_pointer @!str_start[max_strings+1]= {@<|str_start|
initialization@>}; /*the starting pointers*
! Illegal use of @ in comment. (l. 1039)
pool_pointer @!
               pool_ptr=@<|pool_ptr| initialization@>; /*first unused
position in |str_pool|*/
! Input line too long. (l. 1264)
{@+int k;@+for(k=1;
k<=file_name_size;k++)name_of_file[k]=pool_name[k-1];@+} /*we needn't
set |name *54*67
! Input line too long. (l. 1785)
case '0': case '1': case '2': case '3': case '4': case '5': case '6':
case '7': case '8': case '9': *95*120
! Input line too long. (l. 2821)
angle @!spec_atan0[26], *const @!spec_atan = @!spec_atan0-1;
/*$\arctan2^{-k}$ times $2^{20}\cdot18 *153*158
! Input line too long. (l. 3283)
memory_word @!mem0[mem_max-mem_min+1], *const @!mem = @!mem0-mem_min;
/*the big dynamic storage are *175*186*200*214*228
! Input line too long. (l. 5204)
small_number @!big_node_size0[pair_type-transform_type+1], *const
@!big_node_size = @!big_node_size *250*255*269*303*323*386
! Input line too long. (l. 8537)
str_number @!octant_dir0[sixth_octant-first_octant+1], *const
@!octant_dir = @!octant_dir0-first_oc
! Input line too long. (l. 9644)
uint8_t @!octant_number0[sixth_octant-first_octant+1], *const
@!octant_number = @!octant_number0-fi
! Input line too long. (l. 9700)
case 3: case -5: case 4: case -4: case 5: case -3: @<Decide whether or
not to go clockwise@>@;@+bre *460
! Input line too long. (l. 9909)
uint8_t @!y_corr0[sixth_octant-first_octant+1], *const @!y_corr =
@!y_corr0-first_octant, @!xy_corr
! Input line too long. (l. 9910)
0[sixth_octant-first_octant+1], *const @!xy_corr =
@!xy_corr0-first_octant, @!z_corr0[sixth_octant-
*469*490*524*538*564*585*618*624*627*647*658*683*706*738*752*766*795
! Input line too long. (l. 16364)
unknown_types: case transform_type: case pair_type: @|case dependent:
case proto_dependent: case in *822*861*892
! Input line too long. (l. 17924)
 case expression_binary: case cycle: case plus_or_minus: case slash:
case ampersand: case equals: c
! Input line too long. (l. 18267)
case vacuous: case boolean_type: case string_type: case pen_type: case
future_pen: case path_type:
! Input line too long. (l. 18532)
case less_than: case less_or_equal: case greater_than: case
greater_or_equal: case equal_to: case u *988*1019*1086
! Input line too long. (l. 21008)
eight_bits @!label_char0[256], *const @!label_char = @!label_char0-1;
/*characters for |label_loc|*
! Illegal use of @ in comment. (l. 21010)
uint16_t @!
           label_ptr; /*highest position occupied in |label_loc|*/
*1141*1148*1182*1201*1211*1213*1214
! Sorry, name capacity exceeded. (l. 24201)
str_start_536, str_start_537
                            , str_start_538, str_start_539,
(That was a fatal error, my friend.)

Later,
Andreas


More information about the tex-k mailing list.