Index: gcc/libiberty/functions.texi |
diff --git a/gcc/libiberty/functions.texi b/gcc/libiberty/functions.texi |
index 34566d8f17abefa997039589d2d08a3743a35d2b..72ca56cbd44dcd192ff59afdb14116fcf99a668f 100644 |
--- a/gcc/libiberty/functions.texi |
+++ b/gcc/libiberty/functions.texi |
@@ -1,7 +1,7 @@ |
@c Automatically generated from *.c and others (the comments before |
@c each entry tell you which file and where in that file). DO NOT EDIT! |
@c Edit the *.c files, configure with --enable-maintainer-mode, |
-@c and let gather-docs build you a new copy. |
+@c run 'make stamp-functions' and gather-docs will build a new copy. |
@c safe-ctype.c:25 |
@defvr Extension HOST_CHARSET |
@@ -104,7 +104,7 @@ is respectively less than, matching, or greater than the array member. |
@end deftypefn |
-@c argv.c:124 |
+@c argv.c:142 |
@deftypefn Extension char** buildargv (char *@var{sp}) |
Given a pointer to a string, parse the string extracting fields |
@@ -145,7 +145,7 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of |
@end deftypefn |
-@c choose-temp.c:42 |
+@c choose-temp.c:46 |
@deftypefn Extension char* choose_temp_base (void) |
Return a prefix for temporary file names or @code{NULL} if unable to |
@@ -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,34 @@ 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}. |
+ |
+This CRC can be specified as: |
+ |
+ Width : 32 |
+ Poly : 0x04c11db7 |
+ Init : parameter, typically 0xffffffff |
+ RefIn : false |
+ RefOut : false |
+ XorOut : 0 |
+ |
+This differs from the "standard" CRC-32 algorithm in that the values |
+are not reflected, and there is no final XOR value. These differences |
+make it easy to compose the values of multiple blocks. |
+ |
+@end deftypefn |
+ |
@c argv.c:52 |
@deftypefn Extension char** dupargv (char **@var{vector}) |
@@ -214,7 +242,7 @@ symbolic name or message. |
@end deftypefn |
-@c argv.c:348 |
+@c argv.c:361 |
@deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp}) |
The @var{argcp} and @code{argvp} arguments are pointers to the usual |
@@ -602,7 +630,7 @@ relative prefix can be found, return @code{NULL}. |
@end deftypefn |
-@c make-temp-file.c:137 |
+@c make-temp-file.c:168 |
@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 +671,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}) |
@@ -1102,13 +1139,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 |
@@ -1455,13 +1494,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 |
@@ -1474,7 +1515,7 @@ does the return value. The third argument is unused in @libib{}. |
@end deftypefn |
-@c argv.c:293 |
+@c argv.c:306 |
@deftypefn Extension int writeargv (const char **@var{argv}, FILE *@var{file}) |
Write each member of ARGV, handling all necessary quoting, to the file |