diff options
author | Werner Koch <[email protected]> | 2004-10-13 09:59:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2004-10-13 09:59:46 +0000 |
commit | 620ac79ebf8bf6475ed3505b603a4d85a563c314 (patch) | |
tree | aa1a5df7260b166ae3640137188bc153b46a3fe0 /util/iobuf.c | |
parent | * Makefile.am (.S.o): Include MPI_SFLAGS. This is our bug 145. (diff) | |
download | gnupg-620ac79ebf8bf6475ed3505b603a4d85a563c314.tar.gz gnupg-620ac79ebf8bf6475ed3505b603a4d85a563c314.zip |
* configure.ac: Actually name the option --disable-finger and not
http.
* openfile.c (overwrite_filep, make_outfile_name, open_outfile)
(open_sigfile): Use iobuf_is_pipe_filename to check for pipes so
that special filesnames are taken into account. This is bug 327.
* tdbdump.c (import_ownertrust): Ditto.
* sign.c (write_plaintext_packet): Ditto.
* progress.c (handle_progress): Ditto.
* plaintext.c (handle_plaintext): Ditto.
* encode.c (encode_simple, encode_crypt): Ditto.
* iobuf.c (iobuf_is_pipe_filename): New.
* fileutil.c (is_file_compressed): Use it here.
Diffstat (limited to 'util/iobuf.c')
-rw-r--r-- | util/iobuf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/iobuf.c b/util/iobuf.c index 1a97e564f..26cde114f 100644 --- a/util/iobuf.c +++ b/util/iobuf.c @@ -1005,6 +1005,16 @@ check_special_filename ( const char *fname ) return -1; } +/* This fucntion returns true if FNAME indicates a PIPE (stdout or + stderr) or a special file name if those are enabled. */ +int +iobuf_is_pipe_filename (const char *fname) +{ + if (!fname || (*fname=='-' && !fname[1]) ) + return 1; + return check_special_filename (fname) != -1; +} + /**************** * Create a head iobuf for reading from a file * returns: NULL if an error occures and sets errno |