diff options
author | Werner Koch <wk@gnupg.org> | 2006-04-21 14:56:40 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2006-04-21 14:56:40 +0200 |
commit | 4459fcb032268d6164ce70ab750f7b6baded9bf2 (patch) | |
tree | 8726c450d6750d110809c70cb0be27f716ab90b9 /jnlib | |
parent | Continued with merging. (diff) | |
download | gnupg2-4459fcb032268d6164ce70ab750f7b6baded9bf2.tar.xz gnupg2-4459fcb032268d6164ce70ab750f7b6baded9bf2.zip |
Still merging 1.4.3 code back
Diffstat (limited to 'jnlib')
-rw-r--r-- | jnlib/ChangeLog | 5 | ||||
-rw-r--r-- | jnlib/stringhelp.c | 10 | ||||
-rw-r--r-- | jnlib/stringhelp.h | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/jnlib/ChangeLog b/jnlib/ChangeLog index 32549d136..8816068b0 100644 --- a/jnlib/ChangeLog +++ b/jnlib/ChangeLog @@ -1,3 +1,8 @@ +2006-04-20 Werner Koch <wk@g10code.com> + + * stringhelp.c (make_basename): New arg INPUTPATH for future + riscos compatibility. + 2006-04-18 Werner Koch <wk@g10code.com> * libjnlib-config.h (JNLIB_NEED_UTF8CONF): Defined. diff --git a/jnlib/stringhelp.c b/jnlib/stringhelp.c index 760398b0c..e999170dd 100644 --- a/jnlib/stringhelp.c +++ b/jnlib/stringhelp.c @@ -234,15 +234,19 @@ length_sans_trailing_ws (const unsigned char *line, size_t len) * */ char * -make_basename(const char *filepath) +make_basename(const char *filepath, const char *inputpath) { char *p; +#ifdef __riscos__ + return riscos_make_basename(filepath, inputpath); +#endif + if ( !(p=strrchr(filepath, '/')) ) - #ifdef HAVE_DRIVE_LETTERS +#ifdef HAVE_DRIVE_LETTERS if ( !(p=strrchr(filepath, '\\')) ) if ( !(p=strrchr(filepath, ':')) ) - #endif +#endif { return jnlib_xstrdup(filepath); } diff --git a/jnlib/stringhelp.h b/jnlib/stringhelp.h index bdd7d561c..4c9e66452 100644 --- a/jnlib/stringhelp.h +++ b/jnlib/stringhelp.h @@ -35,7 +35,7 @@ size_t length_sans_trailing_chars (const unsigned char *line, size_t len, size_t length_sans_trailing_ws (const unsigned char *line, size_t len); -char *make_basename(const char *filepath); +char *make_basename(const char *filepath, const char *inputpath); char *make_dirname(const char *filepath); char *make_filename( const char *first_part, ... ); int compare_filenames( const char *a, const char *b ); |