purge as many printf calls as possible
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Thu, 13 Feb 1986 12:44:25 +0000 (04:44 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Thu, 13 Feb 1986 12:44:25 +0000 (04:44 -0800)
SCCS-vsn: old/pcc/ccom.tahoe/code.c 1.3
SCCS-vsn: old/pcc/ccom.tahoe/local.c 1.3
SCCS-vsn: old/pcc/ccom.tahoe/local2.c 1.5

usr/src/old/pcc/ccom.tahoe/code.c
usr/src/old/pcc/ccom.tahoe/local.c
usr/src/old/pcc/ccom.tahoe/local2.c

index 50095d3..0ce7840 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)code.c     1.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)code.c     1.3 (Berkeley) %G%";
 #endif
 
 # include "pass1.h"
 #endif
 
 # include "pass1.h"
@@ -7,6 +7,8 @@ static char sccsid[] = "@(#)code.c      1.2 (Berkeley) %G%";
 # include <a.out.h>
 # include <stab.h>
 
 # include <a.out.h>
 # include <stab.h>
 
+# define putstr(s)     fputs((s), stdout)
+
 int proflg = 0;        /* are we generating profiling code? */
 int strftn = 0;  /* is the current function one which returns a value */
 int gdebug;
 int proflg = 0;        /* are we generating profiling code? */
 int strftn = 0;  /* is the current function one which returns a value */
 int gdebug;
@@ -59,25 +61,25 @@ locctr( l ){
        switch( l ){
 
        case PROG:
        switch( l ){
 
        case PROG:
-               printf( "       .text\n" );
+               putstr( "       .text\n" );
                psline();
                break;
 
        case DATA:
        case ADATA:
                psline();
                break;
 
        case DATA:
        case ADATA:
-               printf( "       .data\n" );
+               putstr( "       .data\n" );
                break;
 
        case STRNG:
                break;
 
        case STRNG:
-               printf( "       .data   1\n" );
+               putstr( "       .data   1\n" );
                break;
 
        case ISTRNG:
                break;
 
        case ISTRNG:
-               printf( "       .data   2\n" );
+               putstr( "       .data   2\n" );
                break;
 
        case STAB:
                break;
 
        case STAB:
-               printf( "       .stab\n" );
+               putstr( "       .stab\n" );
                break;
 
        default:
                break;
 
        default:
@@ -117,10 +119,10 @@ efcode(){
 
                i = getlab();   /* label for return area */
 #ifndef LCOMM
 
                i = getlab();   /* label for return area */
 #ifndef LCOMM
-               printf("        .data\n" );
-               printf("        .align  2\n" );
+               putstr("        .data\n" );
+               putstr("        .align  2\n" );
                printf("L%d:    .space  %d\n", i, tsize(t, p->dimoff, p->sizoff)/SZCHAR );
                printf("L%d:    .space  %d\n", i, tsize(t, p->dimoff, p->sizoff)/SZCHAR );
-               printf("        .text\n" );
+               putstr("        .text\n" );
 #else
                { int sz = tsize(t, p->dimoff, p->sizoff) / SZCHAR;
                if (sz % (SZINT/SZCHAR))
 #else
                { int sz = tsize(t, p->dimoff, p->sizoff) / SZCHAR;
                if (sz % (SZINT/SZCHAR))
@@ -168,7 +170,7 @@ bfcode( a, n ) int a[]; {
 
        locctr( PROG );
        p = &stab[curftn];
 
        locctr( PROG );
        p = &stab[curftn];
-       printf( "       .align  1\n");
+       putstr( "       .align  1\n");
        defnam( p );
        temp = p->stype;
        temp = DECREF(temp);
        defnam( p );
        temp = p->stype;
        temp = DECREF(temp);
@@ -195,11 +197,11 @@ bfcode( a, n ) int a[]; {
        if( proflg ) {  /* profile code */
                i = getlab();
                printf("        pushl   $L%d\n", i);
        if( proflg ) {  /* profile code */
                i = getlab();
                printf("        pushl   $L%d\n", i);
-               printf("        callf   $8,mcount\n");
-               printf("        .data\n");
-               printf("        .align  2\n");
+               putstr("        callf   $8,mcount\n");
+               putstr("        .data\n");
+               putstr("        .align  2\n");
                printf("L%d:    .long   0\n", i);
                printf("L%d:    .long   0\n", i);
-               printf("        .text\n");
+               putstr("        .text\n");
                psline();
                }
 
                psline();
                }
 
@@ -215,7 +217,7 @@ bfcode( a, n ) int a[]; {
 #ifdef REG_CHAR
                        printf( "       %s", toreg(p->stype)) );
 #else
 #ifdef REG_CHAR
                        printf( "       %s", toreg(p->stype)) );
 #else
-                       printf("        movl");
+                       putstr("        movl");
 #endif
                        printf( "       %d(fp),%s\n", p->offset/SZCHAR, rname(temp) );
                        p->offset = temp;  /* remember register number */
 #endif
                        printf( "       %d(fp),%s\n", p->offset/SZCHAR, rname(temp) );
                        p->offset = temp;  /* remember register number */
@@ -287,9 +289,9 @@ static      int     lastoctal = 0;
 
        i &= 077;
        if ( t < 0 ){
 
        i &= 077;
        if ( t < 0 ){
-               if ( i != 0 )   printf( "\"\n" );
+               if ( i != 0 )   putstr( "\"\n" );
        } else {
        } else {
-               if ( i == 0 ) printf("\t.ascii\t\"");
+               if ( i == 0 ) putstr("\t.ascii\t\"");
                if ( t == '\\' || t == '"'){
                        lastoctal = 0;
                        printf("\\%c", t);
                if ( t == '\\' || t == '"'){
                        lastoctal = 0;
                        printf("\\%c", t);
@@ -307,20 +309,20 @@ static    int     lastoctal = 0;
                        lastoctal = 0;
                        putchar(t);
                }
                        lastoctal = 0;
                        putchar(t);
                }
-               if ( i == 077 ) printf("\"\n");
+               if ( i == 077 ) putstr("\"\n");
        }
 #else
 
        i &= 07;
        if( t < 0 ){ /* end of the string */
        }
 #else
 
        i &= 07;
        if( t < 0 ){ /* end of the string */
-               if( i != 0 ) printf( "\n" );
+               if( i != 0 ) putchar( '\n' );
                }
 
        else { /* stash byte t into string */
                }
 
        else { /* stash byte t into string */
-               if( i == 0 ) printf( "  .byte   " );
-               else printf( "," );
+               if( i == 0 ) putstr( "  .byte   " );
+               else putchar( ',' );
                printf( "0x%x", t );
                printf( "0x%x", t );
-               if( i == 07 ) printf( "\n" );
+               if( i == 07 ) putchar( '\n' );
                }
 #endif
        }
                }
 #endif
        }
@@ -409,9 +411,9 @@ genswitch(p,n) register struct sw *p;{
                dlab = p->slab >= 0 ? p->slab : getlab();
 
                /* already in r0 */
                dlab = p->slab >= 0 ? p->slab : getlab();
 
                /* already in r0 */
-               printf( "       casel   r0,$" );
+               putstr( "       casel   r0,$" );
                printf( CONFMT, p[1].sval );
                printf( CONFMT, p[1].sval );
-               printf(",$");
+               putstr(",$");
                printf( CONFMT, range);
                printf("\n      .align 1\nL%d:\n", swlab);
                for( i=1,j=p[1].sval; i<=n; j++) {
                printf( CONFMT, range);
                printf("\n      .align 1\nL%d:\n", swlab);
                for( i=1,j=p[1].sval; i<=n; j++) {
@@ -450,7 +452,7 @@ genswitch(p,n) register struct sw *p;{
        for( i=1; i<=n; ++i ){
                /* already in r0 */
 
        for( i=1; i<=n; ++i ){
                /* already in r0 */
 
-               printf( "       cmpl    r0,$" );
+               putstr( "       cmpl    r0,$" );
                printf( CONFMT, p[i].sval );
                printf( "\n     jeql    L%d\n", p[i].slab );
                }
                printf( CONFMT, p[i].sval );
                printf( "\n     jeql    L%d\n", p[i].slab );
                }
@@ -484,7 +486,7 @@ walkheap(start, limit)
 
 
        if( start > limit ) return;
 
 
        if( start > limit ) return;
-       printf( "       cmpl    r0,$" );
+       putstr( "       cmpl    r0,$" );
        printf( CONFMT, heapsw[start].sval);
        printf("\n      jeql    L%d\n", heapsw[start].slab);
        if( (2*start) > limit ) {
        printf( CONFMT, heapsw[start].sval);
        printf("\n      jeql    L%d\n", heapsw[start].slab);
        if( (2*start) > limit ) {
index be0d7dc..f442a18 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)local.c    1.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)local.c    1.3 (Berkeley) %G%";
 #endif
 
 # include "pass1.h"
 #endif
 
 # include "pass1.h"
@@ -417,8 +417,7 @@ commdec( id ){ /* make a common declaration for id, if reasonable */
        q = &stab[id];
        printf( "       .comm   %s,", exname( q->sname ) );
        off = tsize( q->stype, q->dimoff, q->sizoff );
        q = &stab[id];
        printf( "       .comm   %s,", exname( q->sname ) );
        off = tsize( q->stype, q->dimoff, q->sizoff );
-       printf( "%d" /*CONFMT*/, off/SZCHAR );
-       printf( "\n" );
+       printf( "%d\n" /*CONFMT*/, off/SZCHAR );
        }
 
 prtdcon(p)
        }
 
 prtdcon(p)
index 8a81843..2af7972 100644 (file)
@@ -1,9 +1,12 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)local2.c   1.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)local2.c   1.5 (Berkeley) %G%";
 #endif
 
 # include "pass2.h"
 # include <ctype.h>
 #endif
 
 # include "pass2.h"
 # include <ctype.h>
+
+# define putstr(s)     fputs((s), stdout)
+
 # ifdef FORT
 int ftlab1, ftlab2;
 # endif
 # ifdef FORT
 int ftlab1, ftlab2;
 # endif
@@ -134,32 +137,32 @@ prtype(n) NODE *n;
                {
 
                case DOUBLE:
                {
 
                case DOUBLE:
-                       printf("d");
+                       putchar('d');
                        return;
 
                case FLOAT:
                        return;
 
                case FLOAT:
-                       printf("f");
+                       putchar('f');
                        return;
 
                case INT:
                case UNSIGNED:
                        return;
 
                case INT:
                case UNSIGNED:
-                       printf("l");
+                       putchar('l');
                        return;
 
                case SHORT:
                case USHORT:
                        return;
 
                case SHORT:
                case USHORT:
-                       printf("w");
+                       putchar('w');
                        return;
 
                case CHAR:
                case UCHAR:
                        return;
 
                case CHAR:
                case UCHAR:
-                       printf("b");
+                       putchar('b');
                        return;
 
                default:
                        if ( !ISPTR( n->in.type ) ) cerror("zzzcode- bad type");
                        else {
                        return;
 
                default:
                        if ( !ISPTR( n->in.type ) ) cerror("zzzcode- bad type");
                        else {
-                               printf("l");
+                               putchar('l');
                                return;
                                }
                }
                                return;
                                }
                }
@@ -199,24 +202,23 @@ zzzcode( p, c ) register NODE *p; {
                if (r->in.op == ICON)
                        if(r->in.name[0] == '\0') {
                                if (r->tn.lval == 0) {
                if (r->in.op == ICON)
                        if(r->in.name[0] == '\0') {
                                if (r->tn.lval == 0) {
-                                       printf("clr");
+                                       putstr("clr");
                                        prtype(l);
                                        prtype(l);
-                                       printf("        ");
+                                       putchar('\t');
                                        adrput(l);
                                        return;
                                }
                                if (r->tn.lval < 0 && r->tn.lval >= -63) {
                                        adrput(l);
                                        return;
                                }
                                if (r->tn.lval < 0 && r->tn.lval >= -63) {
-                                       printf("mneg");
+                                       putstr("mneg");
                                        prtype(l);
                                        r->tn.lval = -r->tn.lval;
                                        goto ops;
                                }
 #ifdef MOVAFASTER
                        } else {
                                        prtype(l);
                                        r->tn.lval = -r->tn.lval;
                                        goto ops;
                                }
 #ifdef MOVAFASTER
                        } else {
-                               printf("movab");
-                               printf("        ");
+                               putstr("movab\t");
                                acon(r);
                                acon(r);
-                               printf(",");
+                               putchar(',');
                                adrput(l);
                                return;
 #endif MOVAFASTER
                                adrput(l);
                                return;
 #endif MOVAFASTER
@@ -224,29 +226,28 @@ zzzcode( p, c ) register NODE *p; {
 
                if (l->in.op == REG) {
                        if( tlen(l) < tlen(r) ) {
 
                if (l->in.op == REG) {
                        if( tlen(l) < tlen(r) ) {
-                               !ISUNSIGNED(l->in.type)?
-                                       printf("cvt"):
-                                       printf("movz");
+                               putstr(!ISUNSIGNED(l->in.type)?
+                                       "cvt": "movz");
                                prtype(l);
                                prtype(l);
-                               printf("l");
+                               putchar('l');
                                goto ops;
                        } else
                                l->in.type = INT;
                }
                if (tlen(l) == tlen(r)) {
                                goto ops;
                        } else
                                l->in.type = INT;
                }
                if (tlen(l) == tlen(r)) {
-                       printf("mov");
+                       putstr("mov");
                        prtype(l);
                        goto ops;
                } else if (tlen(l) > tlen(r) && ISUNSIGNED(r->in.type))
                        prtype(l);
                        goto ops;
                } else if (tlen(l) > tlen(r) && ISUNSIGNED(r->in.type))
-                       printf("movz");
+                       putstr("movz");
                else
                else
-                       printf("cvt");
+                       putstr("cvt");
                prtype(r);
                prtype(l);
        ops:
                prtype(r);
                prtype(l);
        ops:
-               printf("        ");
+               putchar('\t');
                adrput(r);
                adrput(r);
-               printf(",");
+               putchar(',');
                adrput(l);
                return;
                }
                adrput(l);
                return;
                }
@@ -257,11 +258,11 @@ zzzcode( p, c ) register NODE *p; {
                if (xdebug) eprint(p, 0, &val, &val);
                r = p->in.right;
                if( tlen(r) == sizeof(int) && r->in.type != FLOAT )
                if (xdebug) eprint(p, 0, &val, &val);
                r = p->in.right;
                if( tlen(r) == sizeof(int) && r->in.type != FLOAT )
-                       printf("movl");
+                       putstr("movl");
                else {
                else {
-                       printf(ISUNSIGNED(r->in.type) ? "movz" : "cvt");
+                       putstr(ISUNSIGNED(r->in.type) ? "movz" : "cvt");
                        prtype(r);
                        prtype(r);
-                       printf("l");
+                       putchar('l');
                        }
                return;
                }
                        }
                return;
                }
@@ -284,22 +285,22 @@ zzzcode( p, c ) register NODE *p; {
 
        case 'D':       /* INCR and DECR */
                zzzcode(p->in.left, 'A');
 
        case 'D':       /* INCR and DECR */
                zzzcode(p->in.left, 'A');
-               printf("\n      ");
+               putstr("\n      ");
 
        case 'E':       /* INCR and DECR, FOREFF */
                if (p->in.right->tn.lval == 1)
                        {
 
        case 'E':       /* INCR and DECR, FOREFF */
                if (p->in.right->tn.lval == 1)
                        {
-                       printf("%s", (p->in.op == INCR ? "inc" : "dec") );
+                       putstr(p->in.op == INCR ? "inc" : "dec");
                        prtype(p->in.left);
                        prtype(p->in.left);
-                       printf("        ");
+                       putchar('\t');
                        adrput(p->in.left);
                        return;
                        }
                        adrput(p->in.left);
                        return;
                        }
-               printf("%s", (p->in.op == INCR ? "add" : "sub") );
+               putstr(p->in.op == INCR ? "add" : "sub");
                prtype(p->in.left);
                prtype(p->in.left);
-               printf("2       ");
+               putstr("2       ");
                adrput(p->in.right);
                adrput(p->in.right);
-               printf(",");
+               putchar(',');
                adrput(p->in.left);
                return;
 
                adrput(p->in.left);
                return;
 
@@ -309,11 +310,11 @@ zzzcode( p, c ) register NODE *p; {
 
        case 'H':       /* opcode for shift */
                if(p->in.op == LS || p->in.op == ASG LS)
 
        case 'H':       /* opcode for shift */
                if(p->in.op == LS || p->in.op == ASG LS)
-                       printf("shll");
+                       putstr("shll");
                else if(ISUNSIGNED(p->in.left->in.type))
                else if(ISUNSIGNED(p->in.left->in.type))
-                       printf("shrl");
+                       putstr("shrl");
                else
                else
-                       printf("shar");
+                       putstr("shar");
                return;
 
        case 'L':       /* type of left operand */
                return;
 
        case 'L':       /* type of left operand */
@@ -389,15 +390,15 @@ zzzcode( p, c ) register NODE *p; {
        }
 
 #define        MOVB(dst, src, off) { \
        }
 
 #define        MOVB(dst, src, off) { \
-       printf("\tmovb\t"); upput(src, off); putchar(','); \
+       putstr("\tmovb\t"); upput(src, off); putchar(','); \
        upput(dst, off); putchar('\n'); \
 }
 #define        MOVW(dst, src, off) { \
        upput(dst, off); putchar('\n'); \
 }
 #define        MOVW(dst, src, off) { \
-       printf("\tmovw\t"); upput(src, off); putchar(','); \
+       putstr("\tmovw\t"); upput(src, off); putchar(','); \
        upput(dst, off); putchar('\n'); \
 }
 #define        MOVL(dst, src, off) { \
        upput(dst, off); putchar('\n'); \
 }
 #define        MOVL(dst, src, off) { \
-       printf("\tmovl\t"); upput(src, off); putchar(','); \
+       putstr("\tmovl\t"); upput(src, off); putchar(','); \
        upput(dst, off); putchar('\n'); \
 }
 /*
        upput(dst, off); putchar('\n'); \
 }
 /*
@@ -446,21 +447,21 @@ stasg(p)
        switch (size) {
 
        case 1:
        switch (size) {
 
        case 1:
-               printf("\tmovb\t");
+               putstr("\tmovb\t");
        optimized:
                adrput(r);
        optimized:
                adrput(r);
-               printf(",");
+               putchar(',');
                adrput(l);
                adrput(l);
-               printf("\n");
+               putchar('\n');
 werror("optimized structure assignment (size %d alignment %d)", size, p->stn.stalign);
                break;
 
        case 2:
                if (p->stn.stalign != 2) {
                        MOVB(l, r, SZCHAR);
 werror("optimized structure assignment (size %d alignment %d)", size, p->stn.stalign);
                break;
 
        case 2:
                if (p->stn.stalign != 2) {
                        MOVB(l, r, SZCHAR);
-                       printf("\tmovb\t");
+                       putstr("\tmovb\t");
                } else
                } else
-                       printf("\tmovw\t");
+                       putstr("\tmovw\t");
                goto optimized;
 
        case 4:
                goto optimized;
 
        case 4:
@@ -469,13 +470,13 @@ werror("optimized structure assignment (size %d alignment %d)", size, p->stn.sta
                                MOVB(l, r, 3*SZCHAR);
                                MOVB(l, r, 2*SZCHAR);
                                MOVB(l, r, 1*SZCHAR);
                                MOVB(l, r, 3*SZCHAR);
                                MOVB(l, r, 2*SZCHAR);
                                MOVB(l, r, 1*SZCHAR);
-                               printf("\tmovb\t");
+                               putstr("\tmovb\t");
                        } else {
                                MOVW(l, r, SZSHORT);
                        } else {
                                MOVW(l, r, SZSHORT);
-                               printf("\tmovw\t");
+                               putstr("\tmovw\t");
                        }
                } else
                        }
                } else
-                       printf("\tmovl\t");
+                       putstr("\tmovl\t");
                goto optimized;
 
        case 6:
                goto optimized;
 
        case 6:
@@ -483,13 +484,13 @@ werror("optimized structure assignment (size %d alignment %d)", size, p->stn.sta
                        goto movblk;
                MOVW(l, r, 2*SZSHORT);
                MOVW(l, r, 1*SZSHORT);
                        goto movblk;
                MOVW(l, r, 2*SZSHORT);
                MOVW(l, r, 1*SZSHORT);
-               printf("\tmovw\t");
+               putstr("\tmovw\t");
                goto optimized;
 
        case 8:
                if (p->stn.stalign == 4) {
                        MOVL(l, r, SZLONG);
                goto optimized;
 
        case 8:
                if (p->stn.stalign == 4) {
                        MOVL(l, r, SZLONG);
-                       printf("\tmovl\t");
+                       putstr("\tmovl\t");
                        goto optimized;
                }
                /* fall thru...*/
                        goto optimized;
                }
                /* fall thru...*/
@@ -499,9 +500,9 @@ werror("optimized structure assignment (size %d alignment %d)", size, p->stn.sta
                /*
                 * Can we ever get a register conflict with R1 here?
                 */
                /*
                 * Can we ever get a register conflict with R1 here?
                 */
-               printf("\tmovab\t");
+               putstr("\tmovab\t");
                adrput(l);
                adrput(l);
-               printf(",r1\n\tmovab\t");
+               putstr(",r1\n\tmovab\t");
                adrput(r);
                printf(",r0\n\tmovl\t$%d,r2\n\tmovblk\n", size);
                rname(R2);
                adrput(r);
                printf(",r0\n\tmovl\t$%d,r2\n\tmovblk\n", size);
                rname(R2);
@@ -539,7 +540,7 @@ upput(p, size)
 
        case REG:
                if (size == SZLONG) {
 
        case REG:
                if (size == SZLONG) {
-                       printf("%s", rname(p->tn.rval+1));
+                       putstr(rname(p->tn.rval+1));
                        break;
                }
                /* fall thru... */
                        break;
                }
                /* fall thru... */
@@ -711,7 +712,7 @@ conput( p ) register NODE *p; {
                return;
 
        case REG:
                return;
 
        case REG:
-               printf( "%s", rname(p->tn.rval) );
+               putstr(rname(p->tn.rval));
                return;
 
        default:
                return;
 
        default:
@@ -738,12 +739,12 @@ adrput( p ) register NODE *p; {
 
        case ICON:
                /* addressable value of the constant */
 
        case ICON:
                /* addressable value of the constant */
-               printf( "$" );
+               putchar('$');
                acon( p );
                return;
 
        case REG:
                acon( p );
                return;
 
        case REG:
-               printf( "%s", rname(p->tn.rval) );
+               putstr(rname(p->tn.rval));
                if(p->in.type == DOUBLE)        /* for entry mask */
                        (void) rname(p->tn.rval+1);
                return;
                if(p->in.type == DOUBLE)        /* for entry mask */
                        (void) rname(p->tn.rval+1);
                return;
@@ -754,7 +755,7 @@ adrput( p ) register NODE *p; {
                        register int flags;
 
                        flags = R2UPK3(r);
                        register int flags;
 
                        flags = R2UPK3(r);
-                       if( flags & 1 ) printf("*");
+                       if( flags & 1 ) putchar('*');
                        if( p->tn.lval != 0 || p->in.name[0] != '\0' ) acon(p);
                        if( R2UPK1(r) != 100) printf( "(%s)", rname(R2UPK1(r)) );
                        printf( "[%s]", rname(R2UPK2(r)) );
                        if( p->tn.lval != 0 || p->in.name[0] != '\0' ) acon(p);
                        if( R2UPK1(r) != 100) printf( "(%s)", rname(R2UPK1(r)) );
                        printf( "[%s]", rname(R2UPK2(r)) );
@@ -763,7 +764,7 @@ adrput( p ) register NODE *p; {
                if( r == FP && p->tn.lval > 0 ){  /* in the argument region */
                        if( p->in.name[0] != '\0' ) werror( "bad arg temp" );
                        printf( CONFMT, p->tn.lval );
                if( r == FP && p->tn.lval > 0 ){  /* in the argument region */
                        if( p->in.name[0] != '\0' ) werror( "bad arg temp" );
                        printf( CONFMT, p->tn.lval );
-                       printf( "(fp)" );
+                       putstr( "(fp)" );
                        return;
                        }
                if( p->tn.lval != 0 || p->in.name[0] != '\0') acon( p );
                        return;
                        }
                if( p->tn.lval != 0 || p->in.name[0] != '\0') acon( p );
@@ -773,7 +774,7 @@ adrput( p ) register NODE *p; {
        case UNARY MUL:
                /* STARNM or STARREG found */
                if( tshape(p, STARNM) ) {
        case UNARY MUL:
                /* STARNM or STARREG found */
                if( tshape(p, STARNM) ) {
-                       printf( "*" );
+                       putchar( '*' );
                        adrput( p->in.left);
                        }
                return;
                        adrput( p->in.left);
                        }
                return;
@@ -790,22 +791,18 @@ acon( p ) register NODE *p; { /* print out a constant */
 
        if( p->in.name[0] == '\0' ){
                printf( CONFMT, p->tn.lval);
 
        if( p->in.name[0] == '\0' ){
                printf( CONFMT, p->tn.lval);
-               }
-       else if( p->tn.lval == 0 ) {
+               return;
+       } else {
 #ifndef FLEXNAMES
                printf( "%.8s", p->in.name );
 #else
 #ifndef FLEXNAMES
                printf( "%.8s", p->in.name );
 #else
-               printf( "%s", p->in.name );
+               putstr(p->in.name);
 #endif
 #endif
+               if (p->tn.lval != 0) {
+                       putchar('+');
+                       printf(CONFMT, p->tn.lval);
                }
                }
-       else {
-#ifndef FLEXNAMES
-               printf( "%.8s+", p->in.name );
-#else
-               printf( "%s+", p->in.name );
-#endif
-               printf( CONFMT, p->tn.lval );
-               }
+       }
        }
 
 genscall( p, cookie ) register NODE *p; {
        }
 
 genscall( p, cookie ) register NODE *p; {