]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/8c/list.c
ircrc: freenode -> oftc
[plan9front.git] / sys / src / cmd / 8c / list.c
index e23c1ff43bdf744c8e1a069d2c3ee1ed153311b7..4c4f30f15566da858be2b5feb44a496e21abdac6 100644 (file)
@@ -34,20 +34,18 @@ Bconv(Fmt *fp)
 int
 Pconv(Fmt *fp)
 {
-       char str[STRINGSZ];
        Prog *p;
 
        p = va_arg(fp->args, Prog*);
        if(p->as == ADATA)
-               snprint(str, sizeof(str), "     %A      %D/%d,%D",
+               return fmtprint(fp, "   %A      %D/%d,%D",
                        p->as, &p->from, p->from.scale, &p->to);
        else if(p->as == ATEXT)
-               snprint(str, sizeof(str), "     %A      %D,%d,%D",
+               return fmtprint(fp, "   %A      %D,%d,%D",
                        p->as, &p->from, p->from.scale, &p->to);
        else
-               snprint(str, sizeof(str), "     %A      %D,%D",
+               return fmtprint(fp, "   %A      %D,%D",
                        p->as, &p->from, &p->to);
-       return fmtstrcpy(fp, str);
 }
 
 int
@@ -213,16 +211,13 @@ char*     regstr[] =
 int
 Rconv(Fmt *fp)
 {
-       char str[20];
        int r;
 
        r = va_arg(fp->args, int);
        if(r >= D_AL && r <= D_NONE)
-               snprint(str, sizeof(str), "%s", regstr[r-D_AL]);
+               return fmtprint(fp, "%s", regstr[r-D_AL]);
        else
-               snprint(str, sizeof(str), "gok(%d)", r);
-
-       return fmtstrcpy(fp, str);
+               return fmtprint(fp, "gok(%d)", r);
 }
 
 int