replaced printfs by fputs where possible

This commit is contained in:
ceriel 1987-09-08 09:00:29 +00:00
parent 8120857c5b
commit 1ce6abf3de
4 changed files with 40 additions and 44 deletions

View file

@ -45,13 +45,13 @@ con_float() {
static int been_here; static int been_here;
if (argval != 4 && argval != 8) if (argval != 4 && argval != 8)
fatal("bad fcon size"); fatal("bad fcon size");
fprintf(codefile,".data4\t"); fputs(".data4\t", codefile);
if (argval == 8) if (argval == 8)
fprintf(codefile,"0,"); fputs("0,", codefile);
fprintf(codefile,"0 !dummy float\n"); fputs("0 !dummy float\n", codefile);
if ( !been_here++) if ( !been_here++)
{ {
fprintf(stderr,"Warning : dummy float-constant(s)\n"); fputs("Warning : dummy float-constant(s)\n", stderr);
} }
} }
@ -108,13 +108,13 @@ save()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l "); fputs("movem.l ", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
fprintf(codefile,",-(sp)\n"); fputs(",-(sp)\n", codefile);
} else { } else {
for (p = regsav; p < &regsav[regnr]; p++) { for (p = regsav; p < &regsav[regnr]; p++) {
fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg); fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg);
@ -140,9 +140,9 @@ restr()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l (sp)+,"); fputs("movem.l (sp)+,", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
@ -152,8 +152,7 @@ restr()
fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg); fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg);
} }
} }
fprintf(codefile,"unlk a6\n"); fputs("unlk a6\nrts\n", codefile);
fprintf(codefile,"rts\n");
} }

View file

@ -45,13 +45,13 @@ con_float() {
static int been_here; static int been_here;
if (argval != 4 && argval != 8) if (argval != 4 && argval != 8)
fatal("bad fcon size"); fatal("bad fcon size");
fprintf(codefile,".data4\t"); fputs(".data4\t", codefile);
if (argval == 8) if (argval == 8)
fprintf(codefile,"0,"); fputs("0,", codefile);
fprintf(codefile,"0 !dummy float\n"); fputs("0 !dummy float\n", codefile);
if ( !been_here++) if ( !been_here++)
{ {
fprintf(stderr,"Warning : dummy float-constant(s)\n"); fputs("Warning : dummy float-constant(s)\n", stderr);
} }
} }
@ -108,13 +108,13 @@ save()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l "); fputs("movem.l ", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
fprintf(codefile,",-(sp)\n"); fputs(",-(sp)\n", codefile);
} else { } else {
for (p = regsav; p < &regsav[regnr]; p++) { for (p = regsav; p < &regsav[regnr]; p++) {
fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg); fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg);
@ -140,9 +140,9 @@ restr()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l (sp)+,"); fputs("movem.l (sp)+,", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
@ -152,8 +152,7 @@ restr()
fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg); fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg);
} }
} }
fprintf(codefile,"unlk a6\n"); fputs("unlk a6\nrts\n", codefile);
fprintf(codefile,"rts\n");
} }

View file

@ -45,13 +45,13 @@ con_float() {
static int been_here; static int been_here;
if (argval != 4 && argval != 8) if (argval != 4 && argval != 8)
fatal("bad fcon size"); fatal("bad fcon size");
fprintf(codefile,".data4\t"); fputs(".data4\t", codefile);
if (argval == 8) if (argval == 8)
fprintf(codefile,"0,"); fputs("0,", codefile);
fprintf(codefile,"0 !dummy float\n"); fputs("0 !dummy float\n", codefile);
if ( !been_here++) if ( !been_here++)
{ {
fprintf(stderr,"Warning : dummy float-constant(s)\n"); fputs("Warning : dummy float-constant(s)\n", stderr);
} }
} }
@ -108,13 +108,13 @@ save()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l "); fputs("movem.l ", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
fprintf(codefile,",-(sp)\n"); fputs(",-(sp)\n", codefile);
} else { } else {
for (p = regsav; p < &regsav[regnr]; p++) { for (p = regsav; p < &regsav[regnr]; p++) {
fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg); fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg);
@ -140,9 +140,9 @@ restr()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l (sp)+,"); fputs("movem.l (sp)+,", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
@ -152,8 +152,7 @@ restr()
fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg); fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg);
} }
} }
fprintf(codefile,"unlk a6\n"); fputs("unlk a6\nrts\n", codefile);
fprintf(codefile,"rts\n");
} }

View file

@ -45,13 +45,13 @@ con_float() {
static int been_here; static int been_here;
if (argval != 4 && argval != 8) if (argval != 4 && argval != 8)
fatal("bad fcon size"); fatal("bad fcon size");
fprintf(codefile,".data4\t"); fputs(".data4\t", codefile);
if (argval == 8) if (argval == 8)
fprintf(codefile,"0,"); fputs("0,", codefile);
fprintf(codefile,"0 !dummy float\n"); fputs("0 !dummy float\n", codefile);
if ( !been_here++) if ( !been_here++)
{ {
fprintf(stderr,"Warning : dummy float-constant(s)\n"); fputs("Warning : dummy float-constant(s)\n", stderr);
} }
} }
@ -108,13 +108,13 @@ save()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l "); fputs("movem.l ", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
fprintf(codefile,",-(sp)\n"); fputs(",-(sp)\n", codefile);
} else { } else {
for (p = regsav; p < &regsav[regnr]; p++) { for (p = regsav; p < &regsav[regnr]; p++) {
fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg); fprintf(codefile,"move.l %s,-(sp)\n",p->rs_reg);
@ -140,9 +140,9 @@ restr()
register struct regsav_t *p; register struct regsav_t *p;
if (regnr > MOVEM_LIMIT) { if (regnr > MOVEM_LIMIT) {
fprintf(codefile,"movem.l (sp)+,"); fputs("movem.l (sp)+,", codefile);
for (p = regsav; ;) { for (p = regsav; ;) {
fprintf(codefile,"%s",p->rs_reg); fputs(p->rs_reg, codefile);
if (++p == &regsav[regnr]) break; if (++p == &regsav[regnr]) break;
putc('/',codefile); putc('/',codefile);
} }
@ -152,8 +152,7 @@ restr()
fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg); fprintf(codefile,"move.l (sp)+,%s\n",p->rs_reg);
} }
} }
fprintf(codefile,"unlk a6\n"); fputs("unlk a6\nrts\n", codefile);
fprintf(codefile,"rts\n");
} }