X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fdp.c;h=95a71637f93337c58c9c0864cb1b77c7d045ffba;hb=5e5e8b753acc7ff1e16c7fca172a2151a6c01353;hp=c94c8eac0ccfb33cf48e69b9e15c1e729b39b492;hpb=5dd6771b28c257af405d7248639ed0e3bcdce38b;p=mmh diff --git a/uip/dp.c b/uip/dp.c index c94c8ea..95a7163 100644 --- a/uip/dp.c +++ b/uip/dp.c @@ -37,11 +37,6 @@ static struct format *fmt; static int dat[5]; /* - * prototypes - */ -int sc_width (void); /* from termsbr.c */ - -/* * static prototypes */ static int process (char *, int); @@ -79,10 +74,10 @@ main (int argc, char **argv) snprintf (buf, sizeof(buf), "%s [switches] dates ...", 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 == '-') @@ -149,7 +144,7 @@ process (char *date, int length) FINDCOMP (cptr, "text"); if (cptr) cptr->c_text = date; - fmt_scan (fmt, buffer, length, dat); + fmt_scan (fmt, buffer, sizeof buffer - 1, length, dat); fputs (buffer, stdout); return status;