modified the string-constant printing routines; bts2str() is invoked
This commit is contained in:
parent
f2ff7661e4
commit
5bdb108e47
|
@ -185,7 +185,7 @@ sim: cfiles
|
|||
$(SIM) $(SIMFLAGS) `sources $(COBJ)` $(GSRC) $(LSRC)
|
||||
|
||||
#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO
|
||||
main.o: LLlex.h Lpars.h alloc.h arith.h debug.h declar.h idf.h input.h inputtype.h level.h maxincl.h myalloc.h nobitfield.h nopp.h spec_arith.h specials.h target_sizes.h tokenname.h type.h use_tmp.h
|
||||
main.o: LLlex.h Lpars.h alloc.h arith.h debug.h declar.h idf.h input.h inputtype.h level.h maxincl.h myalloc.h nobitfield.h nopp.h spec_arith.h specials.h target_sizes.h tokenname.h type.h use_tmp.h ssize.h
|
||||
idf.o: LLlex.h Lpars.h align.h alloc.h arith.h assert.h botch_free.h debug.h declar.h decspecs.h def.h idf.h idfsize.h label.h level.h nobitfield.h nopp.h sizes.h spec_arith.h specials.h stack.h storage.h struct.h type.h
|
||||
declarator.o: Lpars.h alloc.h arith.h botch_free.h declar.h expr.h idf.h label.h nobitfield.h nopp.h sizes.h spec_arith.h storage.h type.h
|
||||
decspecs.o: Lpars.h arith.h decspecs.h def.h level.h nobitfield.h spec_arith.h type.h
|
||||
|
|
|
@ -284,7 +284,8 @@ type2str(tp)
|
|||
}
|
||||
|
||||
char * /* the ultimate transient buffer supplier */
|
||||
next_transient() {
|
||||
next_transient()
|
||||
{
|
||||
static int bnum;
|
||||
static char buf[MAXTRANS][300];
|
||||
|
||||
|
@ -340,8 +341,15 @@ p1_expr(lvl, expr)
|
|||
v->vl_value);
|
||||
break;
|
||||
case String:
|
||||
printf("%s\n", expr->SG_VALUE);
|
||||
{
|
||||
char bts2str();
|
||||
|
||||
printf(
|
||||
"%s\n",
|
||||
bts2str(expr->SG_VALUE, expr->SG_LEN, next_transient())
|
||||
);
|
||||
break;
|
||||
}
|
||||
case Float:
|
||||
printf("%s\n", expr->FL_VALUE);
|
||||
break;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "LLlex.h"
|
||||
#include "alloc.h"
|
||||
#include "specials.h"
|
||||
#include "ssize.h"
|
||||
|
||||
extern struct tokenname tkidf[], tkother[];
|
||||
extern char *symbol2str();
|
||||
|
@ -328,8 +329,14 @@ preprocess()
|
|||
printf(" ");
|
||||
break;
|
||||
case STRING:
|
||||
printf("\"%s\" ", dot.tk_bts);
|
||||
{
|
||||
char sbuf[SSIZE];
|
||||
char *bts2str();
|
||||
|
||||
printf("\"%s\" ",
|
||||
bts2str(dot.tk_bts, dot.tk_len, sbuf));
|
||||
break;
|
||||
}
|
||||
case INTEGER:
|
||||
printf("%ld ", dot.tk_ival);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue