diff options
author | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-22 20:01:07 +0000 |
---|---|---|
committer | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-22 20:01:07 +0000 |
commit | 5feeeb385ffdbe1125f30929aafc4b44e1f3d97d (patch) | |
tree | cd0710e42a786802096e328c11e150db4dc4067a /libiberty/functions.texi | |
parent | 549c28fd1ce04729f5bb1617a52a2ba92e765599 (diff) | |
download | gcc-5feeeb385ffdbe1125f30929aafc4b44e1f3d97d.tar.gz |
include/
* libiberty.h (make_relative_prefix): Add prototype.
libiberty/
* Makefile.in: Add make-relative-prefix.c.
* make-relative-prefix.c: New file.
* functions.texi: Rebuilt.
gcc/
* gcc.c (make_relative_prefix, split_directories)
(free_split_directories): Removed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59385 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/functions.texi')
-rw-r--r-- | libiberty/functions.texi | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/libiberty/functions.texi b/libiberty/functions.texi index b518243d95a..7d9c181d219 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -276,7 +276,7 @@ itself. @end deftypefn -@c getruntime.c:78 +@c getruntime.c:82 @deftypefn Replacement long get_run_time (void) Returns the time used so far, in microseconds. If possible, this is @@ -322,11 +322,12 @@ between calls to @code{getpwd}. Initializes the array mapping the current character set to corresponding hex values. This function must be called before any -call to @code{hex_p} or @code{hex_value}. +call to @code{hex_p} or @code{hex_value}. If you fail to call it, a +default ASCII-based table will normally be used on ASCII systems. @end deftypefn -@c hex.c:33 +@c hex.c:34 @deftypefn Extension int hex_p (int @var{c}) Evaluates to non-zero if the given character is a valid hex character, @@ -335,7 +336,7 @@ or zero if it is not. Note that the value you pass will be cast to @end deftypefn -@c hex.c:41 +@c hex.c:42 @deftypefn Extension int hex_value (int @var{c}) Returns the numeric equivalent of the given character when interpreted @@ -391,6 +392,22 @@ and a path ending in @code{/} returns the empty string after it. @end deftypefn +@c make-relative-prefix.c:24 +@deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, const char *@var{bin_prefix}, const char *@var{prefix}) + +Given three strings @var{progname}, @var{bin_prefix}, @var{prefix}, return a string +that gets to @var{prefix} starting with the directory portion of @var{progname} and +a relative pathname of the difference between @var{bin_prefix} and @var{prefix}. + +For example, if @var{bin_prefix} is @code{/alpha/beta/gamma/gcc/delta}, @var{prefix} +is @code{/alpha/beta/gamma/omega/}, and @var{progname} is @code{/red/green/blue/gcc}, +then this function will return @code{/red/green/blue/../../omega/}. + +The return value is normally allocated via @code{malloc}. If no relative prefix +can be found, return @code{NULL}. + +@end deftypefn + @c make-temp-file.c:138 @deftypefn Replacement char* make_temp_file (const char *@var{suffix}) |