* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)setfmt.c 5.1 (Berkeley) 6/7/85";
extern char *fmtptr
, *s_init
;
int fmt_len
, frmt_str_lab
;
prlabel(asmfile
, lp
->labelno
);
fprintf( asmfile
, ".word %d\n", FMT_COMP
); /* precompiled format */
fprintf( asmfile
, ".word %d\n", pc
);
frmt_str_lab
= newlabel(); /* to mark loc of format string */
prcona( asmfile
, frmt_str_lab
);
putshrts( syl
, sizeof(struct syl
)/SZSHORT
*pc
);
if( fmt_strings
) pruse( asmfile
, USEINIT
) ;
prlabel(asmfile
, frmt_str_lab
);
putstr(asmfile
, s
, fmt_len
);
if( fmt_strings
) pruse( asmfile
, USECONST
) ;
fprintf( asmfile
, ".word %d\n", *words
++ );
static char *fmt_seg_ptr
;
char *ep
, *end_ptr
= s_init
+fmt_len
;
ep
= fmtptr
- (i
<25?i
:25);
while(i
&& *ep
&& ep
<end_ptr
)
if(ep
==fmtptr
) save_char('|',fmt_seg
);
errstr("Error in format: %s", fmt_seg
);
} else if (c
< ' ' || c
== 0177) {