summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index 39ed1b6..d61ef30 100644
--- a/utility.c
+++ b/utility.c
@@ -109,6 +109,22 @@ extern void fatalError(const char *s, ...)
exit(EXIT_FAILURE);
}
+extern void perrorMsg(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ fflush(stdout);
+ fprintf(stderr, "%s: ", applet_name);
+ if (s && *s) {
+ vfprintf(stderr, s, p);
+ fputs(": ", stderr);
+ }
+ fprintf(stderr, "%s\n", strerror(errno));
+ va_end(p);
+ fflush(stderr);
+}
+
extern void fatalPerror(const char *s, ...)
{
va_list p;