aboutsummaryrefslogtreecommitdiffstats
path: root/util/fileutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/fileutil.c')
-rw-r--r--util/fileutil.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/util/fileutil.c b/util/fileutil.c
index e5f9311bc..f3e00f8d6 100644
--- a/util/fileutil.c
+++ b/util/fileutil.c
@@ -64,3 +64,26 @@ make_filename( const char *first_part, ... )
return name;
}
+
+/****************
+ * A simple function to decide, wether the filename ist stdout
+ * or a real filename.
+ */
+const char *
+print_fname_stdout( const char *s )
+{
+ if( !s || (*s == '-' && !s[1]) )
+ return "[stdout]";
+ return s;
+}
+
+
+const char *
+print_fname_stdin( const char *s )
+{
+ if( !s || (*s == '-' && !s[1]) )
+ return "[stdin]";
+ return s;
+}
+
+