diff options
author | Eric Blake <ebb9@byu.net> | 2009-09-09 06:24:28 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-09-23 21:04:24 -0600 |
commit | c6dc1761b3e928d2de0a6116cd933b3147ffd7d8 (patch) | |
tree | e8b0eb500a34b5696c9e9b10551e09316a35916d /lib/dirname.h | |
parent | 657fb89d3276465fcf756392f10aa268ca451136 (diff) | |
download | gnulib-c6dc1761b3e928d2de0a6116cd933b3147ffd7d8.tar.gz |
dirname: add library-safe mdir_name
A library-safe dir_name is nice, especially alongside
mfile_name_concat. Someday, we should rearrange the .o
files so that linking in mdir_name does not suck in
xalloc_die, but for now, the only planned client of
mdir_name (at-func2) is already using xalloc_die.
* lib/dirname.h (mdir_name): New prototype.
* lib/dirname.c (dir_name): Move guts...
(mdir_name): ...to new function that avoids xalloc_die.
Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/dirname.h')
-rw-r--r-- | lib/dirname.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/dirname.h b/lib/dirname.h index f592350b81..90a1f0c2c1 100644 --- a/lib/dirname.h +++ b/lib/dirname.h @@ -1,6 +1,6 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003-2006 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2003-2006, 2009 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -59,6 +59,7 @@ # define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) char *base_name (char const *file); +char *mdir_name (char const *file); char *dir_name (char const *file); size_t base_len (char const *file); size_t dir_len (char const *file); |