summaryrefslogtreecommitdiffstats
path: root/zutils.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-12-08 15:52:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-12-08 15:52:49 +0000
commit5a7a494ba28f0dfaa5792f70585ca4dfe3c3051a (patch)
treebf7d15bc5746003a969b81574707882fbe2df8cb /zutils.h
parentReleasing debian version 1.12~pre2-2. (diff)
downloadzutils-5a7a494ba28f0dfaa5792f70585ca4dfe3c3051a.tar.xz
zutils-5a7a494ba28f0dfaa5792f70585ca4dfe3c3051a.zip
Merging upstream version 1.12~rc1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'zutils.h')
-rw-r--r--zutils.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/zutils.h b/zutils.h
index 02ba5e6..0121ad3 100644
--- a/zutils.h
+++ b/zutils.h
@@ -15,6 +15,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+inline const char * name_or_stdin( const char * const name )
+ { return ( name[0] == '-' && name[1] == 0 ) ? "(stdin)" : name; }
+
int readblock( const int fd, uint8_t * const buf, const int size );
int writeblock( const int fd, const uint8_t * const buf, const int size );
bool feed_data( const std::string & filename, const int infd, const int outfd,
@@ -31,7 +34,7 @@ bool set_data_feeder( const std::string & filename, int * const infdp,
enum { magic_buf_size = 10 }; // >= longest extended magic (bzip2)
-// Return format index, or -1 if uncompressed.
+// Return format_index, or -1 if uncompressed.
//
int test_format( const int infd, uint8_t magic_data[],
int * const magic_sizep );