summaryrefslogtreecommitdiffstats
path: root/zutils.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 );