[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.6.1-20100214-152-g49fb651)



The branch, master has been updated
       via  49fb65103d192a462edb5f0db8ace851c675b749 (commit)
      from  41ea61b2f156ec7b473863935410b5113aab1514 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/src/parsecmd.c |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)


=================
 Commit Messages
=================

commit 49fb65103d192a462edb5f0db8ace851c675b749
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gschem: Add -V (version info) command-line option.

:100644 100644 8b72d6a... a77c984... M	gschem/src/parsecmd.c

=========
 Changes
=========

commit 49fb65103d192a462edb5f0db8ace851c675b749
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gschem: Add -V (version info) command-line option.

diff --git a/gschem/src/parsecmd.c b/gschem/src/parsecmd.c
index 8b72d6a..a77c984 100644
--- a/gschem/src/parsecmd.c
+++ b/gschem/src/parsecmd.c
@@ -18,6 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
  */
 #include <config.h>
+#include <version.h>
 
 #include <stdio.h>
 #ifdef HAVE_UNISTD_H
@@ -30,7 +31,7 @@
 #include <dmalloc.h>
 #endif
 
-#define OPTIONS "hqvr:s:o:pt"
+#define OPTIONS "hqvr:s:o:ptV"
 
 #ifndef OPTARG_IN_UNISTD
 extern char *optarg;
@@ -52,11 +53,28 @@ void usage(char *cmd)
          "  -o filename   Output filename (for printing)\n"
          "  -p            Automatically place the window\n"
          "  -t            Print stroke information\n"
+         "  -V            Show version information\n"
          "  -h            Help; this message\n"
          "\n"), cmd);
   exit(0);
 }
 
+static void
+version ()
+{
+  char *git7 = strndup (PACKAGE_GIT_COMMIT, 7);
+  printf(_(
+"gEDA %s (g%s)\n"
+"Copyright (C) 1998-2010 gEDA developers\n"
+"This is free software, and you are welcome to redistribute it under\n"
+"certain conditions. For details, see the file `COPYING', which is\n"
+"included in the gEDA distribution.\n"
+"There is NO WARRANTY, to the extent permitted by law.\n"),
+         PACKAGE_DOTTED_VERSION, git7);
+  free (git7);
+  exit (0);
+}
+
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -100,6 +118,10 @@ int parse_commandline(int argc, char *argv[])
         usage(argv[0]);
         break;
 
+      case 'V':
+        version ();
+        break;
+
       case '?':
       default:
         usage(argv[0]);




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs