summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac1
-rw-r--r--getopt/.gitignore1
-rw-r--r--getopt/COPYING5
-rw-r--r--getopt/Makefile.am7
-rw-r--r--misc-utils/Makemodule.am8
-rw-r--r--[-rwxr-xr-x]misc-utils/getopt-parse.bash (renamed from getopt/getopt-parse.bash)4
-rw-r--r--[-rwxr-xr-x]misc-utils/getopt-parse.tcsh (renamed from getopt/getopt-parse.tcsh)4
-rw-r--r--misc-utils/getopt.1 (renamed from getopt/getopt.1)0
-rw-r--r--misc-utils/getopt.c (renamed from getopt/getopt.c)14
10 files changed, 19 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am
index 3933d1e80..825df74a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,6 @@ SUBDIRS = \
$(MAN_DIRS) \
disk-utils \
fdisk \
- getopt \
po \
tests
diff --git a/configure.ac b/configure.ac
index 49f4d2e5e..a2133618b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1287,7 +1287,6 @@ AC_CONFIG_FILES([
Makefile
disk-utils/Makefile
fdisk/Makefile
-getopt/Makefile
libblkid/blkid.pc
libblkid/docs/Makefile
libblkid/docs/version.xml
diff --git a/getopt/.gitignore b/getopt/.gitignore
deleted file mode 100644
index d3e0b2dd8..000000000
--- a/getopt/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-getopt
diff --git a/getopt/COPYING b/getopt/COPYING
deleted file mode 100644
index be70cdee4..000000000
--- a/getopt/COPYING
+++ /dev/null
@@ -1,5 +0,0 @@
-The getopt is explicitly licensed under GNU General Public License,
-version 2 terms.
-
-The complete text of the license is available at the
-Documentation/licenses/COPYING.GPLv2 file.
diff --git a/getopt/Makefile.am b/getopt/Makefile.am
deleted file mode 100644
index f0602b462..000000000
--- a/getopt/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(top_srcdir)/config/include-Makefile.am
-
-usrbin_exec_PROGRAMS = getopt
-dist_man_MANS = getopt.1
-
-exampledir = $(datadir)/getopt/
-dist_example_SCRIPTS = getopt-parse.bash getopt-parse.tcsh
diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am
index d0c9b4ce8..222ac0303 100644
--- a/misc-utils/Makemodule.am
+++ b/misc-utils/Makemodule.am
@@ -189,3 +189,11 @@ usrbin_exec_PROGRAMS += rename
dist_man_MANS += misc-utils/rename.1
rename_SOURCES = misc-utils/rename.c
endif
+
+usrbin_exec_PROGRAMS += getopt
+dist_man_MANS += misc-utils/getopt.1
+getopt_SOURCES = misc-utils/getopt.c
+getoptexampledir = $(datadir)/getopt/
+dist_getoptexample_SCRIPTS = \
+ misc-utils/getopt-parse.bash \
+ misc-utils/getopt-parse.tcsh
diff --git a/getopt/getopt-parse.bash b/misc-utils/getopt-parse.bash
index 864fc0add..29e7f6fa9 100755..100644
--- a/getopt/getopt-parse.bash
+++ b/misc-utils/getopt-parse.bash
@@ -16,7 +16,7 @@
# --> `another arg'
# --> `wow!*\?'
-# Note that we use `"$@"' to let each command-line parameter expand to a
+# Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential!
# We need TEMP as the `eval set --' would nuke the return value of getopt.
TEMP=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \
@@ -31,7 +31,7 @@ while true ; do
case "$1" in
-a|--a-long) echo "Option a" ; shift ;;
-b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;;
- -c|--c-long)
+ -c|--c-long)
# c has an optional argument. As we are in quoted mode,
# an empty parameter will be generated if its optional
# argument is not found.
diff --git a/getopt/getopt-parse.tcsh b/misc-utils/getopt-parse.tcsh
index 2266d0e64..408c4706b 100755..100644
--- a/getopt/getopt-parse.tcsh
+++ b/misc-utils/getopt-parse.tcsh
@@ -27,7 +27,7 @@
# each element of argv becomes a separate argument for getopt. The braces
# are needed because the result is also a list.
set temp=(`getopt -s tcsh -o ab:c:: --long a-long,b-long:,c-long:: -- $argv:q`)
-if ($? != 0) then
+if ($? != 0) then
echo "Terminating..." >/dev/stderr
exit 1
endif
@@ -41,7 +41,7 @@ while (1)
switch($1:q)
case -a:
case --a-long:
- echo "Option a" ; shift
+ echo "Option a" ; shift
breaksw;
case -b:
case --b-long:
diff --git a/getopt/getopt.1 b/misc-utils/getopt.1
index 6558e12bf..6558e12bf 100644
--- a/getopt/getopt.1
+++ b/misc-utils/getopt.1
diff --git a/getopt/getopt.c b/misc-utils/getopt.c
index 4ba340193..0efe5d862 100644
--- a/getopt/getopt.c
+++ b/misc-utils/getopt.c
@@ -17,9 +17,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-/*
+/*
* Version 1.0-b4: Tue Sep 23 1997. First public release.
- * Version 1.0: Wed Nov 19 1997.
+ * Version 1.0: Wed Nov 19 1997.
* Bumped up the version number to 1.0
* Fixed minor typo (CSH instead of TCSH)
* Version 1.0.1: Tue Jun 3 1998
@@ -33,7 +33,7 @@
* Version 1.0.6: Tue Jun 27 2000
* No important changes
* Version 1.1.0: Tue Jun 30 2000
- * Added NLS support (partly written by Arkadiusz Mi<B6>kiewicz
+ * Added NLS support (partly written by Arkadiusz Mi<B6>kiewicz
* <misiek@pld.org.pl>)
* Version 1.1.4: Mon Nov 7 2005
* Fixed a few type's in the manpage
@@ -62,7 +62,7 @@
#include "nls.h"
#include "xalloc.h"
-/* NON_OPT is the code that is returned when a non-option is found in '+'
+/* NON_OPT is the code that is returned when a non-option is found in '+'
* mode */
#define NON_OPT 1
/* LONG_OPT is the code that is returned when a long option is found. */
@@ -158,7 +158,7 @@ static const char *normalize(const char *arg)
return BUFFER;
}
-/*
+/*
* Generate the output. argv[0] is the program name (used for reporting errors).
* argv[1..] contains the options to be parsed. argc must be the number of
* elements in argv (ie. 1 if there are no options, only the program name),
@@ -264,7 +264,7 @@ static void add_longopt(const char *name, int has_arg)
}
-/*
+/*
* Register several long options. options is a string of long options,
* separated by commas or whitespace. This nukes options!
*/
@@ -438,7 +438,7 @@ int main(int argc, char *argv[])
default:
parse_error(_("internal error, contact the author."));
}
-
+
if (!optstr) {
if (optind >= argc)
parse_error(_("missing optstring argument"));