aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarattero Laurent <laurent@larueluberlu.net>2014-01-29 13:15:33 +0100
committerBarattero Laurent <laurent@larueluberlu.net>2014-01-29 13:15:33 +0100
commit49fe49f7f0c6ad3ec81fbcbcd266ce627379182a (patch)
tree254009fe02287bf16664aaf233c06112d27877b1
parent0c924969382da97ab2012948cfe2022fb7c39696 (diff)
Fix getoptlong --version
-rw-r--r--README.md2
-rwxr-xr-xconfigure20
-rw-r--r--configure.ac2
-rw-r--r--src/main.cpp141
4 files changed, 85 insertions, 80 deletions
diff --git a/README.md b/README.md
index ae8a083..d414fa7 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-README for AeroUp 0.3.0
+README for AeroUp 0.3.1
=======================
diff --git a/configure b/configure
index 070f283..0b92987 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision: 0.0 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for AeroUp 0.3.0.
+# Generated by GNU Autoconf 2.69 for AeroUp 0.3.1.
#
# Report bugs to <laurentba<at>larueluberlu.net>.
#
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='AeroUp'
PACKAGE_TARNAME='aeroup'
-PACKAGE_VERSION='0.3.0'
-PACKAGE_STRING='AeroUp 0.3.0'
+PACKAGE_VERSION='0.3.1'
+PACKAGE_STRING='AeroUp 0.3.1'
PACKAGE_BUGREPORT='laurentba<at>larueluberlu.net'
PACKAGE_URL='https://github.com/LaurentBa/AeroUp'
@@ -1290,7 +1290,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures AeroUp 0.3.0 to adapt to many kinds of systems.
+\`configure' configures AeroUp 0.3.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1356,7 +1356,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of AeroUp 0.3.0:";;
+ short | recursive ) echo "Configuration of AeroUp 0.3.1:";;
esac
cat <<\_ACEOF
@@ -1451,7 +1451,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-AeroUp configure 0.3.0
+AeroUp configure 0.3.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1955,7 +1955,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by AeroUp $as_me 0.3.0, which was
+It was created by AeroUp $as_me 0.3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2789,7 +2789,7 @@ fi
# Define the identity of the package.
PACKAGE='aeroup'
- VERSION='0.3.0'
+ VERSION='0.3.1'
cat >>confdefs.h <<_ACEOF
@@ -5963,7 +5963,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by AeroUp $as_me 0.3.0, which was
+This file was extended by AeroUp $as_me 0.3.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6030,7 +6030,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-AeroUp config.status 0.3.0
+AeroUp config.status 0.3.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 5c9e857..5516a1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@
AC_PREREQ([2.69])
AC_CONFIG_AUX_DIR([build-aux])
-AC_INIT([AeroUp], [0.3.0], [laurentba<at>larueluberlu.net], , [https://github.com/LaurentBa/AeroUp])
+AC_INIT([AeroUp], [0.3.1], [laurentba<at>larueluberlu.net], , [https://github.com/LaurentBa/AeroUp])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/global.hpp])
AC_CONFIG_HEADERS([src/config.h])
diff --git a/src/main.cpp b/src/main.cpp
index b385006..e9cf981 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -98,75 +98,80 @@ main ( int argc, char *argv[] )
switch (c)
{
- case 'o':
- manager.addItemStart(optarg);
- break;
-
- case 't':
- manager.addItemTest(optarg);
- break;
-
- case 'c':
- try
- {
- manager.subRoutine(FLAG_COLOR);
- }
- catch ( const string & Msg )
- {
- cerr << "Error : " << Msg << endl;
- return(EXIT_FAILURE);
- }
- break;
-
- case 'G':
- manager.addItemGetSerial(optarg);
- break;
-
- case 'S':
- try
- {
- manager.subRoutine(FLAG_SET_SER);
- }
- catch ( const string & Msg )
- {
- cerr << "Error : " << Msg << endl;
- return(EXIT_FAILURE);
- }
- break;
+ case 0:
+ /* If this option set a flag, do nothing else now. */
+ if (long_options[option_index].flag != 0)
+ break;
+
+ case 'o':
+ manager.addItemStart(optarg);
+ break;
+
+ case 't':
+ manager.addItemTest(optarg);
+ break;
+
+ case 'c':
+ try
+ {
+ manager.subRoutine(FLAG_COLOR);
+ }
+ catch ( const string & Msg )
+ {
+ cerr << "Error : " << Msg << endl;
+ return(EXIT_FAILURE);
+ }
+ break;
+
+ case 'G':
+ manager.addItemGetSerial(optarg);
+ break;
+
+ case 'S':
+ try
+ {
+ manager.subRoutine(FLAG_SET_SER);
+ }
+ catch ( const string & Msg )
+ {
+ cerr << "Error : " << Msg << endl;
+ return(EXIT_FAILURE);
+ }
+ break;
- case 'i':
- manager.addItemVerify(optarg);
- break;
-
- case 'u':
- manager.subRoutine(FLAG_UP_GLO);
- break;
-
- case 'U':
- manager.subRoutine(FLAG_UP_GLOC);
- break;
-
- case 'k':
- manager.addItemSymlink(optarg);
- break;
-
- case 'v':
- VERBOSE_AERO = true;
- break;
-
- case 'h':
- help = 1;
- break;
-
- case '?':
- /* getopt_long already printed an error message. */
- puts("To get help : 'aeroup --help' or 'man aeroup'");
- return EXIT_FAILURE;
- break;
-
- default:
- abort ();
- }
+ case 'i':
+ manager.addItemVerify(optarg);
+ break;
+
+ case 'u':
+ manager.subRoutine(FLAG_UP_GLO);
+ break;
+
+ case 'U':
+ manager.subRoutine(FLAG_UP_GLOC);
+ break;
+
+ case 'k':
+ manager.addItemSymlink(optarg);
+ break;
+
+ case 'v':
+ VERBOSE_AERO = true;
+ break;
+
+ case 'h':
+ help = 1;
+ break;
+
+ case '?':
+ /* getopt_long already printed an error message. */
+ puts("To get help : 'aeroup --help' or 'man aeroup'");
+ return EXIT_FAILURE;
+ break;
+
+ default:
+ abort ();
+ }
}
/* Print any remaining command line arguments (not options). */