X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fap.c;h=b5b0c5b99c1631167b4303a4f48c28ed31b36660;hb=8e79ce1919d9cf54f101a812e0fd70a33286b9f3;hp=11381f3c868851d963a1a1b2b18e1def6e1b5cf8;hpb=197f95940cc0860683e6988352f721e6603f9339;p=mmh diff --git a/uip/ap.c b/uip/ap.c index 11381f3..b5b0c5b 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -2,12 +2,15 @@ /* * ap.c -- parse addresses 822-style * - * $Id$ + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include #include #include +#include #define NADDRS 100 @@ -30,7 +33,7 @@ static struct swit switches[] = { #define VERSIONSW 5 { "version", 0 }, #define HELPSW 6 - { "help", 4 }, + { "help", 0 }, { NULL, 0 } }; @@ -39,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); @@ -84,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 == '-') @@ -146,7 +144,8 @@ main (int argc, char **argv) for (addrp = 0; addrs[addrp]; addrp++) status += process (addrs[addrp], width, normalize); - return done (status); + done (status); + return 1; } struct pqpair {