759 |
bool b; |
bool b; |
760 |
extern void (*write_ch_fun)(int), writec_PRINTstream(int); |
extern void (*write_ch_fun)(int), writec_PRINTstream(int); |
761 |
|
|
762 |
if (fmt_nparam == 0) { |
fmt_max_param(5); |
763 |
|
fmt_set_param(0, &radix, fmt_int, -1); |
764 |
|
if (radix==-1) { |
765 |
x = fmt_advance(); |
x = fmt_advance(); |
766 |
check_type_integer(&x); |
check_type_integer(&x); |
767 |
if (atsign) { |
if (atsign) { |
818 |
} |
} |
819 |
return; |
return; |
820 |
} |
} |
821 |
fmt_max_param(5); |
fmt_set_param(0, &radix, fmt_int, -1); |
|
fmt_set_param(0, &radix, fmt_int, 10); |
|
822 |
fmt_set_param(1, &mincol, fmt_int, 0); |
fmt_set_param(1, &mincol, fmt_int, 0); |
823 |
fmt_set_param(2, &padchar, fmt_char, ' '); |
fmt_set_param(2, &padchar, fmt_char, ' '); |
824 |
fmt_set_param(3, &commachar, fmt_char, ','); |
fmt_set_param(3, &commachar, fmt_char, ','); |
841 |
|
|
842 |
mincol=BOUND_MINCOL(mincol); |
mincol=BOUND_MINCOL(mincol); |
843 |
if (type_of(x) != t_fixnum && type_of(x) != t_bignum) { |
if (type_of(x) != t_fixnum && type_of(x) != t_bignum) { |
844 |
fmt_temporary_string->st.st_fillp = 0; |
object fts,ftm;/*FIXME more comprehensive solution |
845 |
/* fmt_temporary_stream->sm.sm_int0 = file_column(fmt_stream); */ |
here, but this avoids some recursive |
846 |
STREAM_FILE_COLUMN(fmt_temporary_stream) = file_column(fmt_stream); |
use of the temporaries*/ |
847 |
|
ftm=make_string_output_stream(64); |
848 |
|
fts=ftm->sm.sm_object0; |
849 |
|
fts->st.st_fillp = 0; |
850 |
|
/* ftm->sm.sm_int0 = file_column(fmt_stream); */ |
851 |
|
STREAM_FILE_COLUMN(ftm) = file_column(fmt_stream); |
852 |
{SETUP_PRINT_DEFAULT(x); |
{SETUP_PRINT_DEFAULT(x); |
853 |
PRINTstream = fmt_temporary_stream; |
PRINTstream = ftm; |
854 |
PRINTescape = FALSE; |
PRINTescape = FALSE; |
855 |
PRINTbase = radix; |
PRINTbase = radix; |
856 |
write_ch_fun = writec_PRINTstream; |
write_ch_fun = writec_PRINTstream; |
857 |
write_object(x, 0); |
write_object(x, 0); |
858 |
CLEANUP_PRINT_DEFAULT;} |
CLEANUP_PRINT_DEFAULT;} |
859 |
l = fmt_temporary_string->st.st_fillp; |
l = fts->st.st_fillp; |
860 |
mincol -= l; |
mincol -= l; |
861 |
while (mincol-- > 0) |
while (mincol-- > 0) |
862 |
writec_stream(padchar, fmt_stream); |
writec_stream(padchar, fmt_stream); |
863 |
for (s = 0; l > 0; --l, s++) |
for (s = 0; l > 0; --l, s++) |
864 |
writec_stream(fmt_tempstr(s), fmt_stream); |
writec_stream(fts->st.st_self[s], fmt_stream); |
865 |
return; |
return; |
866 |
} |
} |
867 |
fmt_temporary_string->st.st_fillp = 0; |
fmt_temporary_string->st.st_fillp = 0; |
1034 |
{ |
{ |
1035 |
object x; |
object x; |
1036 |
int i; |
int i; |
1037 |
|
int c1[]={'\r',' ','\177','\f','\t','\b','\n',0},*c; |
1038 |
|
|
1039 |
fmt_max_param(0); |
fmt_max_param(0); |
|
fmt_temporary_string->st.st_fillp = 0; |
|
|
/* fmt_temporary_stream->sm.sm_int0 = 0;*/ |
|
|
STREAM_FILE_COLUMN(fmt_temporary_stream) = 0; |
|
1040 |
x = fmt_advance(); |
x = fmt_advance(); |
1041 |
check_type_character(&x); |
check_type_character(&x); |
1042 |
prin1(x, fmt_temporary_stream); |
|
1043 |
if (!colon && atsign) |
for (c=c1;*c && *c!=x->ch.ch_code;c++); |
1044 |
i = 0; |
if (colon ? *c : atsign) { |
1045 |
else |
|
1046 |
i = 2; |
i=(!colon && atsign) ? 0 : 2; |
1047 |
for (; i < fmt_temporary_string->st.st_fillp; i++) |
|
1048 |
writec_stream(fmt_tempstr(i), fmt_stream); |
fmt_temporary_string->st.st_fillp = 0; |
1049 |
|
/* fmt_temporary_stream->sm.sm_int0 = 0;*/ |
1050 |
|
STREAM_FILE_COLUMN(fmt_temporary_stream) = 0; |
1051 |
|
prin1(x, fmt_temporary_stream); |
1052 |
|
|
1053 |
|
for (; i < fmt_temporary_string->st.st_fillp; i++) |
1054 |
|
writec_stream(fmt_tempstr(i), fmt_stream); |
1055 |
|
|
1056 |
|
} else |
1057 |
|
writec_stream(x->ch.ch_code, fmt_stream); |
1058 |
|
|
1059 |
} |
} |
1060 |
|
|
1061 |
static void |
static void |
2345 |
} else |
} else |
2346 |
switch (type_of(control)) { |
switch (type_of(control)) { |
2347 |
case t_cfun: |
case t_cfun: |
2348 |
|
case t_ifun: |
2349 |
case t_gfun: |
case t_gfun: |
2350 |
case t_sfun: |
case t_sfun: |
2351 |
case t_vfun: |
case t_vfun: |