ack/mach/sparc/ce/back.src/gen_str.c

28 lines
494 B
C
Raw Normal View History

1991-09-20 18:14:05 +00:00
#include "header.h"
gen_str( s,n)
char *s;
int n;
{
unsigned char c;
switch ( cur_seg) {
case SEGTXT :
case SEGCON :
case SEGROM :
fprint( codefile, "%s\"", STR_FMT);
while (n--)
{
c= *s++;
if (isprint(c) && c != '"' && c != '\\')
1991-09-20 18:14:05 +00:00
fprint(codefile, "%c", c);
else
fprint(codefile, "\\%03o", c);
}
fprint( codefile, "\"\n");
break;
case SEGBSS : bss( (arith) 1);
break;
default : fprint( STDERR, "gen1 unkown seg %d\n", cur_seg);
}
}