X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fap.c;h=fdb47e2a309c8c1ba4e453d1c7287ad5523c71cc;hb=90986dddba4b24b0449238f86f836581cfb93938;hp=a0f7f778f6517b9c126bc0e62d376c86ed3afde3;hpb=5dd6771b28c257af405d7248639ed0e3bcdce38b;p=mmh diff --git a/uip/ap.c b/uip/ap.c index a0f7f77..fdb47e2 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -42,11 +42,6 @@ static struct format *fmt; static int dat[5]; /* - * prototypes - */ -int sc_width (void); /* from termsbr.c */ - -/* * static prototypes */ static int process (char *, int, int); @@ -87,10 +82,10 @@ main (int argc, char **argv) snprintf (buf, sizeof(buf), "%s [switches] addrs ...", invo_name); print_help (buf, switches, 1); - done (1); + done (0); case VERSIONSW: print_version (invo_name); - done (1); + done (0); case FORMSW: if (!(form = *argp++) || *form == '-') @@ -195,7 +190,7 @@ process (char *arg, int length, int norm) if (cptr) cptr->c_text = p->pq_error; - fmt_scan (fmt, buffer, length, dat); + fmt_scan (fmt, buffer, sizeof buffer - 1, length, dat); fputs (buffer, stdout); free (p->pq_text);