summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-06-11 09:16:50 +0200
committerWerner Koch <wk@gnupg.org>1998-06-11 09:16:50 +0200
commitd9b3dc000085007bdd198ca4c0500e80a72475d7 (patch)
treebb3ffa42fa8b9e30476fdbc843632c896fcfec37 /util
parent. (diff)
downloadgnupg2-d9b3dc000085007bdd198ca4c0500e80a72475d7.tar.xz
gnupg2-d9b3dc000085007bdd198ca4c0500e80a72475d7.zip
update from tobold
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog6
-rw-r--r--util/Makefile.in2
-rw-r--r--util/argparse.c7
-rw-r--r--util/fileutil.c14
4 files changed, 25 insertions, 4 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index a62ba84db..b2a1d21b7 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jun 10 07:39:41 1998 Werner Koch,mobil,,, (wk@tobold)
+
+ * fileutil.c (compare_filenames): New.
+
+ * argparse.c (arg_parse): New flag bit 6 to ignore --version
+
Thu May 14 16:45:13 1998 Werner Koch (wk@isil.d.shuttle.de)
* argparse.c (show_help): Add some formatting stuff
diff --git a/util/Makefile.in b/util/Makefile.in
index 025ea3f8e..5e50aabcf 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -64,8 +64,6 @@ target_triplet = @target@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
-CIPHER_EXTRA_DIST = @CIPHER_EXTRA_DIST@
-CIPHER_EXTRA_OBJS = @CIPHER_EXTRA_OBJS@
CPP = @CPP@
DATADIRNAME = @DATADIRNAME@
G10_LOCALEDIR = @G10_LOCALEDIR@
diff --git a/util/argparse.c b/util/argparse.c
index ce1dbc6af..9a9909e30 100644
--- a/util/argparse.c
+++ b/util/argparse.c
@@ -72,6 +72,7 @@
* Bit 3 : Do not use -- to stop option processing.
* Bit 4 : Do not skip the first arg.
* Bit 5 : allow usage of long option with only one dash
+ * Bit 6 : ignore --version
* all other bits must be set to zero, this value is modified by the function
* so assume this is write only.
* Local flags (for each option):
@@ -377,8 +378,10 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
if( !opts[i].short_opt && !strcmp( "help", s+2) )
show_help(opts, arg->flags);
else if( !opts[i].short_opt && !strcmp( "version", s+2) ) {
- show_version();
- exit(0);
+ if( !(arg->flags & (1<<6)) ) {
+ show_version();
+ exit(0);
+ }
}
else if( !opts[i].short_opt && !strcmp( "warranty", s+2) ) {
puts( strusage(16) );
diff --git a/util/fileutil.c b/util/fileutil.c
index 88c84ecff..2cedf0f9e 100644
--- a/util/fileutil.c
+++ b/util/fileutil.c
@@ -65,6 +65,20 @@ make_filename( const char *first_part, ... )
}
+int
+compare_filenames( const char *a, const char *b )
+{
+ /* ? check whether this is an absolute filename and
+ * resolve symlinks?
+ */
+ #ifdef __MINGW32__
+ return stricmp(a,b);
+ #else
+ return strcmp(a,b);
+ #endif
+}
+
+
/****************
* A simple function to decide whether the filename is stdout
* or a real filename.