diff options
Diffstat (limited to 'libarchive_fe')
-rw-r--r-- | libarchive_fe/err.c | 6 | ||||
-rw-r--r-- | libarchive_fe/err.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/libarchive_fe/err.c b/libarchive_fe/err.c index 408c2029..8618a94e 100644 --- a/libarchive_fe/err.c +++ b/libarchive_fe/err.c @@ -52,9 +52,11 @@ lafe_getprogname(void) } void -lafe_setprogname(const char *name) +lafe_setprogname(const char *name, const char *defaultname) { - + + if (name == NULL) + name = defaultname; #if defined(_WIN32) && !defined(__CYGWIN__) lafe_progname = strrchr(name, '\\'); if (strrchr(name, '/') > lafe_progname) diff --git a/libarchive_fe/err.h b/libarchive_fe/err.h index c351cba8..ebf5de81 100644 --- a/libarchive_fe/err.h +++ b/libarchive_fe/err.h @@ -45,6 +45,6 @@ void lafe_errc(int eval, int code, const char *fmt, ...) __LA_DEAD __LA_PRINTFLIKE(3, 4); const char * lafe_getprogname(void); -void lafe_setprogname(const char *); +void lafe_setprogname(const char *name, const char *defaultname); #endif |