Pristine Ack-5.5
[Ack-5.5.git] / mach / sparc / ce / back.src / gen_str.c
1 #include "header.h"
2
3 gen_str( s,n)
4 char *s;
5 int n;
6 {
7         unsigned char c;
8         switch ( cur_seg) {
9           case SEGTXT :
10           case SEGCON :
11           case SEGROM :
12                         fprint( codefile, "%s\"", STR_FMT);
13                         while (n--)
14                         {
15                                 c= *s++;
16                                 if (isprint(c) && c != '"' && c != '\\')
17                                         fprint(codefile, "%c", c);
18                                 else
19                                         fprint(codefile, "\\%03o", c);
20                         }
21                         fprint( codefile, "\"\n");
22                         break;
23           case SEGBSS : bss( (arith) 1);
24                         break;
25           default : fprint( STDERR, "gen1 unkown seg %d\n", cur_seg);
26         }
27 }