summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2008-05-15 19:27:52 +0000
committerbrooks <brooks@FreeBSD.org>2008-05-15 19:27:52 +0000
commit77128b91aff4ee651182ae1b13a5b3a37b55d9d8 (patch)
tree2b2ca0315994fed463f040f60de1a8ef512f94c4 /usr.bin
parent47efda9e75f987cc5e5a2ed381356d8750ec12be (diff)
downloadFreeBSD-src-77128b91aff4ee651182ae1b13a5b3a37b55d9d8.zip
FreeBSD-src-77128b91aff4ee651182ae1b13a5b3a37b55d9d8.tar.gz
getopt.c is public domain. Add a comment to that effect.
Remove confusing README. PR: bin/98911 Submitted by: Jason McIntyre <jmc at kerhand dot co dot uk> Obtained from: OpenBSD MFC after: 3 days
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/getopt/README57
-rw-r--r--usr.bin/getopt/getopt.c5
2 files changed, 5 insertions, 57 deletions
diff --git a/usr.bin/getopt/README b/usr.bin/getopt/README
deleted file mode 100644
index 55e6998..0000000
--- a/usr.bin/getopt/README
+++ /dev/null
@@ -1,57 +0,0 @@
-/***** unido:mod.std.unix / ut-sally!jsq / 8:54 pm Jul 4, 1985*/
-From: John Quarterman (moderator) <ut-sally!std-unix>
-
-Topic: yet more on getopt (command line arguments)
-
-Two more messages, the first a followup to a previous posting, and
-the second public domain sources and man pages for getopt(3) and getopt(1).
- -mod
-
-----------------------------------------------------------------------
-
-From: ihnp4!utzoo!henry
-Date: 3 Jul 85 18:34:41 CDT (Wed)
-To: ihnp4!ut-sally!std-unix
-Subject: Re: command line arguments
-
-> > A group of bundled options may end with an option that has an argument.
->
-> This creates confusion in using C-Kermit when you want to send an image
-> file. For example:
->
-> send -is filename < --- works fine
-> send -si filename < --- bombs the program
-
-The AT&T syntax standard (which getopt does not completely enforce)
-actually forbids both of these usages. Options with arguments are not
-allowed to be bundled, and they must be separated from their arguments
-by a space.
-
-> I would *much* prefer to bundle the flags, then
-> have those with arguments pick them up in the same order as the flags are
-> listed.
-
-The few existing commands that use such a convention, notably tar(1), are
-(in my experience) the worse for it. It's seriously error-prone. I think
-the AT&T people did the right thing.
-
-------------------------------
-
-Date: Tue, 2 Jul 85 13:07:09 edt
-From: ihnp4!utcs!ian (Ian F. Darwin)
-To: ihnp4!ut-sally!jsq@tzec.UTEXAS.ARPA
-Subject: here is getopt
-
-Here is the source for getopt(3), the function that should be in
-everybody's C program, and getopt(1), a program that uses it to
-make shell programs comprehensible and consistent. There are man
-pages for both. Please send these on to the mod. group. Thanks.
-
-[ I have hacked the following shell script slightly so that
-it doesn't extract directly into system source directories,
-rather into the current directory. It should be assumed that
-this code comes with no warranty from me, Ian Darwin, or anyone
-else as to whether it accurately represents getopt as distributed
-with System V, or any command line standard, or that it works
-at all, or that it will cause no damage when extracted or used. -mod]
-
diff --git a/usr.bin/getopt/getopt.c b/usr.bin/getopt/getopt.c
index 3363760..d1671a7 100644
--- a/usr.bin/getopt/getopt.c
+++ b/usr.bin/getopt/getopt.c
@@ -1,6 +1,11 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+/*
+ * This material, written by Henry Spencer, was released by him
+ * into the public domain and is thus not subject to any copyright.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
OpenPOWER on IntegriCloud