From 367147e9dfe6392b04e4f98f11c3f3ce57a8d081 Mon Sep 17 00:00:00 2001 From: Anders Nordby Date: Wed, 10 Apr 2002 20:24:07 +0000 Subject: Unbreak command line parsing, use getopt rather. Loose maintainership (I have no interest in nbsmtp currently). PR: 32899 Submitted by: Pierre-Paul Lavoie Kimura Fuyuki --- mail/nbsmtp/Makefile | 2 +- mail/nbsmtp/files/patch-nbsmtp.c | 66 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 mail/nbsmtp/files/patch-nbsmtp.c (limited to 'mail/nbsmtp') diff --git a/mail/nbsmtp/Makefile b/mail/nbsmtp/Makefile index 873e463ebee8..199d0e32745e 100644 --- a/mail/nbsmtp/Makefile +++ b/mail/nbsmtp/Makefile @@ -12,7 +12,7 @@ MASTER_SITES= http://physeeks.dyndns.org:8000/download/ \ ftp://ftp.nuug.no/pub/anders/distfiles/ EXTRACT_SUFX= .tgz -MAINTAINER= anders@FreeBSD.org +MAINTAINER= ports@FreeBSD.org NO_WRKSUBDIR= yes diff --git a/mail/nbsmtp/files/patch-nbsmtp.c b/mail/nbsmtp/files/patch-nbsmtp.c new file mode 100644 index 000000000000..3d18f430a5a3 --- /dev/null +++ b/mail/nbsmtp/files/patch-nbsmtp.c @@ -0,0 +1,66 @@ +--- nbsmtp.c.orig Sat Apr 7 02:09:01 2001 ++++ nbsmtp.c Wed Apr 10 22:03:27 2002 +@@ -19,6 +19,8 @@ + */ + + #include ++#include ++#include + #include + #include + #include +@@ -76,42 +78,45 @@ + { + printf("Usage:\n"); + printf("%s -d domain -f from@addr -h host [-p port] [-l debuglevel]\n", prog); ++ exit(EXIT_FAILURE); + } + + int main(int argc, char *argv[]) + { +- int i; ++ int ch; + +- for(i=1; i 1) + stdlog = fopen("nbsmtp.log", "w"); + else + stdlog = stdout; + break; ++ case '?': + default: + print_usage(argv[0]); ++ break; + } + } + ++ argc -= optind; + if(domain==NULL || fromaddr==NULL || host==NULL){ + print_usage(argv[0]); +- return 1; + } + + if(port==0) -- cgit