X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=libiberty%2Ffunctions.texi;fp=libiberty%2Ffunctions.texi;h=9598b3c83ed0d8001b3c64f264add44a24da19a6;hp=e6ab84c69990b75c84dfa83d3167dcb84484f1ad;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/libiberty/functions.texi b/libiberty/functions.texi index e6ab84c..9598b3c 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -158,7 +158,7 @@ not recommended. @end deftypefn -@c make-temp-file.c:87 +@c make-temp-file.c:95 @deftypefn Replacement char* choose_tmpdir () Returns a pointer to a directory path suitable for creating temporary @@ -185,6 +185,21 @@ pointer encountered. Pointers to empty strings are ignored. @end deftypefn +@c crc32.c:141 +@deftypefn Extension unsigned int crc32 (const unsigned char *@var{buf}, int @var{len}, unsigned int @var{init}) + +Compute the 32-bit CRC of @var{buf} which has length @var{len}. The +starting value is @var{init}; this may be used to compute the CRC of +data split across multiple buffers by passing the return value of each +call as the @var{init} parameter of the next. + +This is intended to match the CRC used by the @command{gdb} remote +protocol for the @samp{qCRC} command. In order to get the same +results as gdb for a block of data, you must pass the first CRC +parameter as @code{0xffffffff}. + +@end deftypefn + @c argv.c:52 @deftypefn Extension char** dupargv (char **@var{vector}) @@ -602,7 +617,7 @@ relative prefix can be found, return @code{NULL}. @end deftypefn -@c make-temp-file.c:137 +@c make-temp-file.c:163 @deftypefn Replacement char* make_temp_file (const char *@var{suffix}) Return a temporary file name (as a string) or @code{NULL} if unable to @@ -643,6 +658,15 @@ Copies @var{length} bytes from memory region @var{in} to region @end deftypefn +@c memmem.c:20 +@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len}) + +Returns a pointer to the first occurrence of @var{needle} (length +@var{needle_len}) in @var{haystack} (length @var{haystack_len}). +Returns @code{NULL} if not found. + +@end deftypefn + @c memmove.c:6 @deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count}) @@ -688,7 +712,9 @@ reading and writing. @c pexecute.txh:266 @deftypefn Extension void pex_free (struct pex_obj @var{obj}) -Clean up and free all data associated with @var{obj}. +Clean up and free all data associated with @var{obj}. If you have not +yet called @code{pex_get_times} or @code{pex_get_status}, this will +try to kill the subprocesses. @end deftypefn @@ -814,7 +840,7 @@ the output pipe is you, but you are blocked on the input pipe. @end deftypefn -@c pexecute.txh:272 +@c pexecute.txh:274 @deftypefn Extension {const char *} pex_one (int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, int *@var{status}, int *@var{err}) An interface to permit the easy execution of a @@ -977,7 +1003,7 @@ form @code{VAR=VALUE}, with the exception of the last element that must be @end deftypefn -@c pexecute.txh:284 +@c pexecute.txh:286 @deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int @var{flags}) This is the old interface to execute one or more programs. It is @@ -986,7 +1012,7 @@ documented. @end deftypefn -@c strsignal.c:539 +@c strsignal.c:541 @deftypefn Supplemental void psignal (int @var{signo}, char *@var{message}) Print @var{message} to the standard error, followed by a colon, @@ -1005,7 +1031,7 @@ name is unset/removed. @end deftypefn -@c pexecute.txh:292 +@c pexecute.txh:294 @deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags}) Another part of the old execution interface. @@ -1100,13 +1126,15 @@ be the value @code{1}). @c snprintf.c:28 @deftypefn Supplemental int snprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, ...) -This function is similar to sprintf, but it will print at most @var{n} -characters. On error the return value is -1, otherwise it returns the -number of characters that would have been printed had @var{n} been -sufficiently large, regardless of the actual value of @var{n}. Note -some pre-C99 system libraries do not implement this correctly so users -cannot generally rely on the return value if the system version of -this function is used. +This function is similar to @code{sprintf}, but it will write to +@var{buf} at most @code{@var{n}-1} bytes of text, followed by a +terminating null byte, for a total of @var{n} bytes. +On error the return value is -1, otherwise it returns the number of +bytes, not including the terminating null byte, that would have been +written had @var{n} been sufficiently large, regardless of the actual +value of @var{n}. Note some pre-C99 system libraries do not implement +this correctly so users cannot generally rely on the return value if +the system version of this function is used. @end deftypefn @@ -1256,7 +1284,7 @@ call to @code{strsignal}. @end deftypefn -@c strsignal.c:446 +@c strsignal.c:448 @deftypefn Extension {const char*} strsigno (int @var{signo}) Given an signal number, returns a pointer to a string containing the @@ -1322,7 +1350,7 @@ that the converted value is unsigned. @end deftypefn -@c strsignal.c:500 +@c strsignal.c:502 @deftypefn Extension int strtosigno (const char *@var{name}) Given the symbolic name of a signal, map it to a signal number. If no @@ -1453,13 +1481,15 @@ nonstandard but common function @code{_doprnt}. @c vsnprintf.c:28 @deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, va_list @var{ap}) -This function is similar to vsprintf, but it will print at most -@var{n} characters. On error the return value is -1, otherwise it -returns the number of characters that would have been printed had -@var{n} been sufficiently large, regardless of the actual value of -@var{n}. Note some pre-C99 system libraries do not implement this -correctly so users cannot generally rely on the return value if the -system version of this function is used. +This function is similar to @code{vsprintf}, but it will write to +@var{buf} at most @code{@var{n}-1} bytes of text, followed by a +terminating null byte, for a total of @var{n} bytes. On error the +return value is -1, otherwise it returns the number of characters that +would have been printed had @var{n} been sufficiently large, +regardless of the actual value of @var{n}. Note some pre-C99 system +libraries do not implement this correctly so users cannot generally +rely on the return value if the system version of this function is +used. @end deftypefn