diff options
-rw-r--r-- | share/misc/Makefile | 4 | ||||
-rw-r--r-- | share/misc/getopt | 47 |
2 files changed, 2 insertions, 49 deletions
diff --git a/share/misc/Makefile b/share/misc/Makefile index 2c4960d2368..11614e3b14f 100644 --- a/share/misc/Makefile +++ b/share/misc/Makefile @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile,v 1.13 2014/08/25 14:29:49 reyk Exp $ +# $OpenBSD: Makefile,v 1.14 2016/09/05 09:23:22 bentley Exp $ # from: @(#)Makefile 5.13 (Berkeley) 5/7/91 -FILES= airport ascii birthtoken countrycodes eqnchar getopt \ +FILES= airport ascii birthtoken countrycodes eqnchar \ inter.phone license.template mdoc.template mime.types \ na.phone operator scsi_modes usb_hid_usages usb_hid_usages \ zipcodes diff --git a/share/misc/getopt b/share/misc/getopt deleted file mode 100644 index 45c61ad9f34..00000000000 --- a/share/misc/getopt +++ /dev/null @@ -1,47 +0,0 @@ -/* $OpenBSD: getopt,v 1.8 2006/02/01 09:27:28 otto Exp $ */ -/* - * Main/getopt(3) fragment. - * - * from: @(#)getopt 5.3 (Berkeley) 3/28/94 - */ - -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -__dead void usage(void); - -int -main(int argc, char *argv[]) -{ - int bflag, ch; - char *file; - - bflag = 0; - file = NULL; - while ((ch = getopt(argc, argv, "bf:")) != -1) - switch (ch) { - case 'b': - bflag = 1; - break; - case 'f': - file = optarg; - break; - default: - usage(); - /* NOTREACHED */ - } - argc -= optind; - argv += optind; - - return (0); -} - -void -usage(void) -{ - extern char *__progname; - - (void)fprintf(stderr, "usage: %s [-b] [-f file]\n", __progname); - exit(1); -} |