Lines Matching refs:var

7 @deftypefn Replacement void* alloca (size_t @var{size})
25 @deftypefn Extension int asprintf (char **@var{resptr}, const char *@var{format}, ...)
30 pointer to the allocated memory in @code{*@var{resptr}}. The value
33 @code{*@var{resptr}}.
38 @deftypefn Supplemental int atexit (void (*@var{f})())
40 Causes function @var{f} to be called at exit. Returns 0.
45 @deftypefn Supplemental char* basename (const char *@var{name})
47 Returns a pointer to the last component of pathname @var{name}.
53 @deftypefn Supplemental int bcmp (char *@var{x}, char *@var{y}, int @var{count})
55 Compares the first @var{count} bytes of two areas of memory. Returns
57 @var{count} is zero. A nonzero result only indicates a difference,
59 result mean @var{x} sorts before @var{y}).
64 @deftypefn Supplemental void bcopy (char *@var{in}, char *@var{out}, int @var{length})
66 Copies @var{length} bytes from memory region @var{in} to region
67 @var{out}. The use of @code{bcopy} is deprecated in new programs.
72 @deftypefn Supplemental void* bsearch (const void *@var{key}, @
73 const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, @
74 int (*@var{compar})(const void *, const void *))
76 Performs a search over an array of @var{nmemb} elements pointed to by
77 @var{base} for a member that matches the object pointed to by @var{key}.
78 The size of each member is specified by @var{size}. The array contents
79 should be sorted in ascending order according to the @var{compar}
81 the @var{key} and to an array member, in that order, and should return an
82 integer less than, equal to, or greater than zero if the @var{key} object
88 @deftypefn Extension char** buildargv (char *@var{sp})
103 @code{NULL} if @var{sp} is @code{NULL} or if there is insufficient
113 @deftypefn Supplemental void bzero (char *@var{mem}, int @var{count})
115 Zeros @var{count} bytes starting at @var{mem}. Use of this function
121 @deftypefn Supplemental void* calloc (size_t @var{nelem}, size_t @var{elsize})
123 Uses @code{malloc} to allocate storage for @var{nelem} objects of
124 @var{elsize} bytes each, then zeros the memory.
129 @deftypefn Extension int canonical_filename_eq (const char *@var{a}, const char *@var{b})
131 Return non-zero if file names @var{a} and @var{b} are equivalent.
169 @deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @
179 @deftypefn Extension int countargv (char **@var{argv})
181 Return the number of elements in @var{argv}.
182 Returns zero if @var{argv} is NULL.
187 @deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @
188 int @var{len}, unsigned int @var{init})
190 Compute the 32-bit CRC of @var{buf} which has length @var{len}. The
191 starting value is @var{init}; this may be used to compute the CRC of
193 call as the @var{init} parameter of the next.
216 @deftypefn Extension char** dupargv (char **@var{vector})
218 Duplicate an argument vector. Simply scans through @var{vector},
245 @deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
247 The @var{argcp} and @code{argvp} arguments are pointers to the usual
265 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
280 @deftypefn Extension {FILE *} fdopen_unlocked (int @var{fildes}, @
281 const char * @var{mode})
291 @deftypefn Supplemental int ffs (int @var{valu})
293 Find the first (least significant) bit set in @var{valu}. Bits are
295 value 1). If @var{valu} is zero, zero is returned.
300 @deftypefn Extension int filename_cmp (const char *@var{s1}, const char *@var{s2})
302 Return zero if the two file names @var{s1} and @var{s2} are equivalent.
304 would return. In other words, it returns a negative value if @var{s1}
305 is less than @var{s2}, or a positive value if @var{s2} is greater than
306 @var{s2}.
317 @deftypefn Extension int filename_eq (const void *@var{s1}, const void *@var{s2})
319 Return non-zero if file names @var{s1} and @var{s2} are equivalent.
325 @deftypefn Extension hashval_t filename_hash (const void *@var{s})
327 Return the hash value for file name @var{s} that will be compared
334 @deftypefn Extension int filename_ncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n})
336 Return zero if the two file names @var{s1} and @var{s2} are equivalent
337 in range @var{n}.
339 would return. In other words, it returns a negative value if @var{s1}
340 is less than @var{s2}, or a positive value if @var{s2} is greater than
341 @var{s2}.
352 @deftypefn Replacement int fnmatch (const char *@var{pattern}, @
353 const char *@var{string}, int @var{flags})
355 Matches @var{string} against @var{pattern}, returning zero if it
356 matches, @code{FNM_NOMATCH} if not. @var{pattern} may contain the
378 @var{string} is assumed to be a path name. No wildcard will ever match
385 A leading period (at the beginning of @var{string}, or if
390 Means that @var{string} also matches @var{pattern} if some initial part
391 of @var{string} matches, and is followed by @code{/} and zero or more
403 @deftypefn Extension {FILE *} fopen_unlocked (const char *@var{path}, @
404 const char * @var{mode})
414 @deftypefn Extension void freeargv (char **@var{vector})
417 scans through @var{vector}, freeing the memory for each argument until
418 the terminating @code{NULL} is found, and then frees @var{vector}
424 @deftypefn Extension {FILE *} freopen_unlocked (const char * @var{path}, @
425 const char * @var{mode}, FILE * @var{stream})
444 @deftypefn Supplemental char* getcwd (char *@var{pathname}, int @var{len})
447 @var{pathname}, which is assumed to point to a buffer of at least
448 @var{len} bytes, and return a pointer to the buffer. If the current
449 directory's path doesn't fit in @var{len} characters, the result is
450 @code{NULL} and @code{errno} is set. If @var{pathname} is a null pointer,
451 @code{getcwd} will obtain @var{len} bytes of space using
476 @deftypefn Supplemental int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
478 Writes the current time to @var{tp}. This implementation requires
479 that @var{tz} be NULL. Returns 0 on success, -1 on failure.
494 @deftypefn Extension int hex_p (int @var{c})
503 @deftypefn Extension {unsigned int} hex_value (int @var{c})
541 @deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, @
542 htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, @
543 htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, @
544 htab_free @var{free_f})
547 @var{alloc_tab_f} and @var{alloc_f} to use for allocating the table itself
551 The created hash table is slightly larger than @var{size} and it is
559 @deftypefn Supplemental char* index (char *@var{s}, int @var{c})
561 Returns a pointer to the first occurrence of the character @var{c} in
562 the string @var{s}, or @code{NULL} if not found. The use of @code{index} is
568 @deftypefn Supplemental void insque (struct qelem *@var{elem}, @
569 struct qelem *@var{pred})
570 @deftypefnx Supplemental void remque (struct qelem *@var{elem})
573 @code{insque} routine inserts @var{elem} in the queue immediately
574 after @var{pred}. The @code{remque} routine removes @var{elem} from
590 @deffn Extension ISALPHA (@var{c})
591 @deffnx Extension ISALNUM (@var{c})
592 @deffnx Extension ISBLANK (@var{c})
593 @deffnx Extension ISCNTRL (@var{c})
594 @deffnx Extension ISDIGIT (@var{c})
595 @deffnx Extension ISGRAPH (@var{c})
596 @deffnx Extension ISLOWER (@var{c})
597 @deffnx Extension ISPRINT (@var{c})
598 @deffnx Extension ISPUNCT (@var{c})
599 @deffnx Extension ISSPACE (@var{c})
600 @deffnx Extension ISUPPER (@var{c})
601 @deffnx Extension ISXDIGIT (@var{c})
640 @deffn Extension ISIDNUM (@var{c})
641 @deffnx Extension ISIDST (@var{c})
642 @deffnx Extension IS_VSPACE (@var{c})
643 @deffnx Extension IS_NVSPACE (@var{c})
644 @deffnx Extension IS_SPACE_OR_NUL (@var{c})
645 @deffnx Extension IS_ISOBASIC (@var{c})
662 @deftypefn Replacement {const char*} lbasename (const char *@var{name})
678 @deftypefn Replacement {const char*} lrealpath (const char *@var{name})
688 @deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, @
689 const char *@var{bin_prefix}, const char *@var{prefix})
691 Given three paths @var{progname}, @var{bin_prefix}, @var{prefix},
693 @var{progname}'s directory as @var{prefix} is relative to
694 @var{bin_prefix}. That is, a string starting with the directory
695 portion of @var{progname}, followed by a relative pathname of the
696 difference between @var{bin_prefix} and @var{prefix}.
698 If @var{progname} does not contain any directory separators,
700 named @var{progname}. Also, if @var{progname} is a symbolic link,
703 For example, if @var{bin_prefix} is @code{/alpha/beta/gamma/gcc/delta},
704 @var{prefix} is @code{/alpha/beta/gamma/omega/}, and @var{progname} is
714 @deftypefn Replacement char* make_temp_file (const char *@var{suffix})
717 create one. @var{suffix} is a suffix to append to the file name. The
723 @deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, @
724 size_t @var{n})
726 This function searches memory starting at @code{*@var{s}} for the
727 character @var{c}. The search only ends with the first occurrence of
728 @var{c}, or after @var{length} characters; in particular, a null
729 character does not terminate the search. If the character @var{c} is
730 found within @var{length} characters of @code{*@var{s}}, a pointer
731 to the character is returned. If @var{c} is not found, then @code{NULL} is
737 @deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, @
738 size_t @var{count})
740 Compares the first @var{count} bytes of two areas of memory. Returns
741 zero if they are the same, a value less than zero if @var{x} is
742 lexically less than @var{y}, or a value greater than zero if @var{x}
743 is lexically greater than @var{y}. Note that lexical order is determined
749 @deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, @
750 size_t @var{length})
752 Copies @var{length} bytes from memory region @var{in} to region
753 @var{out}. Returns a pointer to @var{out}.
758 @deftypefn Supplemental void* memmem (const void *@var{haystack}, @
759 size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len})
761 Returns a pointer to the first occurrence of @var{needle} (length
762 @var{needle_len}) in @var{haystack} (length @var{haystack_len}).
768 @deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, @
769 size_t @var{count})
771 Copies @var{count} bytes from memory area @var{from} to memory area
772 @var{to}, returning a pointer to @var{to}.
777 @deftypefn Supplemental void* mempcpy (void *@var{out}, const void *@var{in}, @
778 size_t @var{length})
780 Copies @var{length} bytes from memory region @var{in} to region
781 @var{out}. Returns a pointer to @var{out} + @var{length}.
786 @deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @
787 size_t @var{count})
789 Sets the first @var{count} bytes of @var{s} to the constant byte
790 @var{c}, returning a pointer to @var{s}.
795 @deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
797 Generate a unique temporary file name from @var{pattern}.
798 @var{pattern} has the form:
801 @var{path}/ccXXXXXX@var{suffix}
804 @var{suffix_len} tells us how long @var{suffix} is (it can be zero
805 length). The last six characters of @var{pattern} before @var{suffix}
813 @deftypefn Extension void pex_free (struct pex_obj @var{obj})
815 Clean up and free all data associated with @var{obj}. If you have not
822 @deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, @
823 int @var{count}, int *@var{vector})
825 Returns the exit status of all programs run using @var{obj}.
826 @var{count} is the number of results expected. The results will be
827 placed into @var{vector}. The results are in the order of the calls
833 @deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, @
834 int @var{count}, struct pex_time *@var{vector})
837 @var{obj}. @var{count} is the number of results expected. The
838 results will be placed into @var{vector}. The results are in the
851 @deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, @
852 const char *@var{pname}, const char *@var{tempbase})
858 @var{flags} is a bitwise combination of the following:
877 @var{pname} is the name of program to be executed, used in error
878 messages. @var{tempbase} is a base name to use for any required
884 @deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, @
885 int @var{flags}, const char *@var{in_name})
892 @var{in_name}, @var{obj} and the @code{PEX_SUFFIX} bit in @var{flags}.
897 If @var{flags} includes @code{PEX_BINARY_OUTPUT}, open the stream in
899 @code{PEX_BINARY_OUTPUT} in @var{flags} has no effect on Unix.
903 @deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, @
904 int @var{binary})
906 Return a stream @var{fp} for a pipe connected to the standard input of
907 the first program in the pipeline; @var{fp} is opened for writing.
909 that returned @var{obj}.
911 You must close @var{fp} using @code{fclose} yourself when you have
914 The file descriptor underlying @var{fp} is marked not to be inherited
940 you fill the input pipe by writing more data to @var{fp}, then there
949 @deftypefn Extension {const char *} pex_one (int @var{flags}, @
950 const char *@var{executable}, char * const *@var{argv}, @
951 const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, @
952 int *@var{status}, int *@var{err})
956 for a call to @code{pex_run}. @var{flags} is restricted to a
958 @code{PEX_BINARY_OUTPUT}. @var{outname} is interpreted as if
959 @code{PEX_LAST} were set. On a successful return, @code{*@var{status}} will
965 @deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, @
966 int @var{binary})
972 @var{obj}. @var{binary} should be non-zero if the file should be
979 @deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, @
980 int @var{binary})
986 @var{obj}. @var{binary} should be non-zero if the file should be
993 @deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, @
994 int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @
995 const char *@var{outname}, const char *@var{errname}, int *@var{err})
1001 @var{obj} is returned by a previous call to @code{pex_init}.
1003 @var{flags} is a bitwise combination of the following:
1011 of the program will be sent to @var{outname}, or, if @var{outname} is
1015 @var{pex_run} may no longer be called with the same @var{obj}.
1023 @var{outname} is a suffix. See the description of @var{outname},
1051 @var{executable} is the program to execute. @var{argv} is the set of
1052 arguments to pass to the program; normally @code{@var{argv}[0]} will
1053 be a copy of @var{executable}.
1055 @var{outname} is used to set the name of the file to use for standard
1060 if @code{PEX_LAST} is not set in @var{flags}, and @code{PEX_USE_PIPES}
1064 if @code{PEX_LAST} is set in @var{flags}, and @var{outname} is
1079 @code{PEX_SUFFIX} is set in @var{flags}. In this case
1080 @var{outname} may not be @code{NULL}. If the @var{tempbase} parameter
1082 the concatenation of @var{tempbase} and @var{outname}. If
1083 @var{tempbase} was @code{NULL}, then the output file name is a random
1084 file name ending in @var{outname}.
1087 @code{PEX_SUFFIX} was not set in @var{flags}. In this
1088 case, if @var{outname} is not @code{NULL}, it is used as the output
1089 file name. If @var{outname} is @code{NULL}, and @var{tempbase} was
1091 @var{tempbase}. Otherwise the output file name is chosen completely
1095 @var{errname} is the file name to use for standard error output. If
1099 On an error return, the code sets @code{*@var{err}} to an @code{errno}
1105 @deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, @
1106 int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @
1107 char * const *@var{env}, int @var{env_size}, const char *@var{outname}, @
1108 const char *@var{errname}, int *@var{err})
1114 @var{env} is the environment for the child process, specified as an array of
1122 @deftypefn Extension int pexecute (const char *@var{program}, @
1123 char * const *@var{argv}, const char *@var{this_pname}, @
1124 const char *@var{temp_base}, char **@var{errmsg_fmt}, @
1125 char **@var{errmsg_arg}, int @var{flags})
1134 @deftypefn Supplemental void psignal (int @var{signo}, char *@var{message})
1136 Print @var{message} to the standard error, followed by a colon,
1137 followed by the description of the signal specified by @var{signo},
1143 @deftypefn Supplemental int putenv (const char *@var{string})
1145 Uses @code{setenv} or @code{unsetenv} to put @var{string} into
1146 the environment or remove it. If @var{string} is of the form
1153 @deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
1161 @deftypefnx Supplement void srandom (unsigned int @var{seed})
1162 @deftypefnx Supplement void* initstate (unsigned int @var{seed}, @
1163 void *@var{arg_state}, unsigned long @var{n})
1164 @deftypefnx Supplement void* setstate (void *@var{arg_state})
1168 number generator to some starting point determined by @var{seed}
1176 @deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @
1179 Same as @code{concat}, except that if @var{optr} is not @code{NULL} it
1191 @deftypefn Supplemental int rename (const char *@var{old}, const char *@var{new})
1193 Renames a file from @var{old} to @var{new}. If @var{new} already
1199 @deftypefn Supplemental char* rindex (const char *@var{s}, int @var{c})
1201 Returns a pointer to the last occurrence of the character @var{c} in
1202 the string @var{s}, or @code{NULL} if not found. The use of @code{rindex} is
1208 @deftypefn Supplemental int setenv (const char *@var{name}, @
1209 const char *@var{value}, int @var{overwrite})
1210 @deftypefnx Supplemental void unsetenv (const char *@var{name})
1212 @code{setenv} adds @var{name} to the environment with value
1213 @var{value}. If the name was already present in the environment,
1214 the new value will be stored only if @var{overwrite} is nonzero.
1215 The companion @code{unsetenv} function removes @var{name} from the
1221 @deftypefn Supplemental void setproctitle (const char *@var{fmt}, ...)
1223 Set the title of a process to @var{fmt}. va args not supported for now,
1247 @deftypefn Supplemental int sigsetmask (int @var{set})
1249 Sets the signal mask to the one provided in @var{set} and returns
1257 (simple_object_attributes *@var{attrs1}, simple_object_attributes *@var{attrs2}, @
1258 int *@var{err})
1260 Compare @var{attrs1} and @var{attrs2}. If they could be linked
1262 error message and set @code{*@var{err}} to an errno value or @code{0}
1269 (simple_object_read *@var{simple_object}, const char **@var{errmsg}, int *@var{err})
1271 Fetch the attributes of @var{simple_object}. The attributes are
1275 @var{simple_object} itself is released.
1277 On error this returns @code{NULL}, sets @code{*@var{errmsg}} to an
1278 error message, and sets @code{*@var{err}} to an errno value or
1285 (simple_object_read *@var{simple_object} off_t *@var{offset}, @
1286 off_t *@var{length}, const char **@var{errmsg}, int *@var{err})
1288 Look for the section @var{name} in @var{simple_object}. This returns
1291 If found, return 1 and set @code{*@var{offset}} to the offset in the
1292 file of the section contents and set @code{*@var{length}} to the
1293 length of the section contents. The value in @code{*@var{offset}}
1299 @code{*@var{errmsg}} to @code{NULL}.
1302 @code{0}, sets @code{*@var{errmsg}} to an error message, and sets
1303 @code{*@var{err}} to an errno value or @code{0} if there is no
1310 (simple_object_read *@var{simple_object}, int (*@var{pfn}) (void *@var{data}, @
1311 const char *@var{name}, off_t @var{offset}, off_t @var{length}), @
1312 void *@var{data}, int *@var{err})
1314 This function calls @var{pfn} for each section in @var{simple_object}.
1315 It calls @var{pfn} with the section name, the offset within the file
1318 @code{simple_object_open_read}. The @var{data} argument to this
1319 function is passed along to @var{pfn}.
1321 If @var{pfn} returns @code{0}, the loop over the sections stops and
1322 @code{simple_object_find_sections} returns. If @var{pfn} returns some
1326 returns an error string, and sets @code{*@var{err}} to an errno value
1333 (int @var{descriptor}, off_t @var{offset}, const char *{segment_name}, @
1334 const char **@var{errmsg}, int *@var{err})
1340 @var{descriptor} holds a file descriptor which permits reading.
1342 @var{offset} is the offset into the file; this will be @code{0} in the
1346 @var{segment_name} is only used with the Mach-O file format used on
1352 @code{*@var{errmsg}} to an error string and sets @code{*@var{err}} to
1359 (simple_object_attributes *@var{attrs})
1361 Release all resources associated with @var{attrs}.
1367 (simple_object_read *@var{simple_object})
1369 Release all resources associated with @var{simple_object}. This does
1376 (simple_object_write *@var{simple_object})
1378 Release all resources associated with @var{simple_object}.
1384 (simple_object_attributes @var{attrs}, const char *@var{segment_name}, @
1385 const char **@var{errmsg}, int *@var{err})
1388 described in @var{attrs}. You must fetch attribute information from
1392 @var{segment_name} is only used with Mach-O as found on Darwin aka Mac
1398 @code{*@var{ERRMSG}} to an error message, and sets @code{*@var{err}}
1405 (simple_object_write *@var{simple_object}, @
1406 simple_object_write_section *@var{section}, const void *@var{buffer}, @
1407 size_t @var{size}, int @var{copy}, int *@var{err})
1409 Add data @var{buffer}/@var{size} to @var{section} in
1410 @var{simple_object}. If @var{copy} is non-zero, the data will be
1411 copied into memory if necessary. If @var{copy} is zero, @var{buffer}
1416 message, and sets @code{*@var{err}} to an errno value or 0 if there is
1423 (simple_object_write *@var{simple_object}, const char *@var{name}, @
1424 unsigned int @var{align}, const char **@var{errmsg}, int *@var{err})
1426 Add a section to @var{simple_object}. @var{name} is the name of the
1427 new section. @var{align} is the required alignment expressed as the
1435 On error this returns @code{NULL}, sets @code{*@var{errmsg}} to an
1436 error message, and sets @code{*@var{err}} to an errno value or
1443 (simple_object_write *@var{simple_object}, int @var{descriptor}, int *@var{err})
1445 Write the complete object file to @var{descriptor}, an open file
1448 @var{simple_object_write_add_data}.
1451 message and sets @code{*@var{err}} to an errno value or @code{0} if
1457 @deftypefn Supplemental int snprintf (char *@var{buf}, size_t @var{n}, @
1458 const char *@var{format}, ...)
1461 @var{buf} at most @code{@var{n}-1} bytes of text, followed by a
1462 terminating null byte, for a total of @var{n} bytes.
1465 written had @var{n} been sufficiently large, regardless of the actual
1466 value of @var{n}. Note some pre-C99 system libraries do not implement
1473 @deftypefn Extension char* spaces (int @var{count})
1483 (splay_tree_compare_fn @var{compare_fn}, @
1484 splay_tree_delete_key_fn @var{delete_key_fn}, @
1485 splay_tree_delete_value_fn @var{delete_value_fn}, @
1486 splay_tree_allocate_fn @var{tree_allocate_fn}, @
1487 splay_tree_allocate_fn @var{node_allocate_fn}, @
1488 splay_tree_deallocate_fn @var{deallocate_fn}, @
1489 void * @var{allocate_data})
1492 @var{tree_allocate_fn} and @var{node_allocate_fn} to use for allocating the
1496 The splay tree will use @var{compare_fn} to compare nodes,
1497 @var{delete_key_fn} to deallocate keys, and @var{delete_value_fn} to
1503 @deftypefn Extension void stack_limit_increase (unsigned long @var{pref})
1505 Attempt to increase stack size limit to @var{pref} bytes if possible.
1510 @deftypefn Supplemental char* stpcpy (char *@var{dst}, const char *@var{src})
1512 Copies the string @var{src} into @var{dst}. Returns a pointer to
1513 @var{dst} + strlen(@var{src}).
1518 @deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, @
1519 size_t @var{len})
1521 Copies the string @var{src} into @var{dst}, copying exactly @var{len}
1522 and padding with zeros if necessary. If @var{len} < strlen(@var{src})
1523 then return @var{dst} + @var{len}, otherwise returns @var{dst} +
1524 strlen(@var{src}).
1529 @deftypefn Supplemental int strcasecmp (const char *@var{s1}, const char *@var{s2})
1536 @deftypefn Supplemental char* strchr (const char *@var{s}, int @var{c})
1538 Returns a pointer to the first occurrence of the character @var{c} in
1539 the string @var{s}, or @code{NULL} if not found. If @var{c} is itself the
1545 @deftypefn Supplemental char* strdup (const char *@var{s})
1547 Returns a pointer to a copy of @var{s} in memory obtained from
1553 @deftypefn Replacement {const char*} strerrno (int @var{errnum})
1561 number, then returns the string @samp{Error @var{num}}, where @var{num}
1573 @deftypefn Supplemental char* strerror (int @var{errnoval})
1582 error number, then returns the string @samp{Error @var{num}}, where
1583 @var{num} is the error number.
1594 @deftypefn Supplemental int strncasecmp (const char *@var{s1}, const char *@var{s2})
1601 @deftypefn Supplemental int strncmp (const char *@var{s1}, @
1602 const char *@var{s2}, size_t @var{n})
1604 Compares the first @var{n} bytes of two strings, returning a value as
1610 @deftypefn Extension char* strndup (const char *@var{s}, size_t @var{n})
1612 Returns a pointer to a copy of @var{s} with at most @var{n} characters
1619 @deftypefn Supplemental size_t strnlen (const char *@var{s}, size_t @var{maxlen})
1621 Returns the length of @var{s}, as with @code{strlen}, but never looks
1622 past the first @var{maxlen} characters in the string. If there is no
1623 '\0' character in the first @var{maxlen} characters, returns
1624 @var{maxlen}.
1629 @deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
1631 Returns a pointer to the last occurrence of the character @var{c} in
1632 the string @var{s}, or @code{NULL} if not found. If @var{c} is itself the
1638 @deftypefn Supplemental {const char *} strsignal (int @var{signo})
1647 signal number, then returns the string @samp{Signal @var{num}}, where
1648 @var{num} is the signal number.
1659 @deftypefn Extension {const char*} strsigno (int @var{signo})
1666 number, then returns the string @samp{Signal @var{num}}, where
1667 @var{num} is the signal number.
1678 @deftypefn Supplemental char* strstr (const char *@var{string}, const char *@var{sub})
1680 This function searches for the substring @var{sub} in the string
1681 @var{string}, not including the terminating null characters. A pointer
1682 to the first occurrence of @var{sub} is returned, or @code{NULL} if the
1683 substring is absent. If @var{sub} points to a string with zero
1684 length, the function returns @var{string}.
1689 @deftypefn Supplemental double strtod (const char *@var{string}, @
1690 char **@var{endptr})
1692 This ISO C function converts the initial portion of @var{string} to a
1693 @code{double}. If @var{endptr} is not @code{NULL}, a pointer to the
1695 the location referenced by @var{endptr}. If no conversion is
1696 performed, zero is returned and the value of @var{string} is stored in
1697 the location referenced by @var{endptr}.
1702 @deftypefn Extension int strtoerrno (const char *@var{name})
1710 @deftypefn Supplemental {long int} strtol (const char *@var{string}, @
1711 char **@var{endptr}, int @var{base})
1712 @deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, @
1713 char **@var{endptr}, int @var{base})
1715 The @code{strtol} function converts the string in @var{string} to a
1716 long integer value according to the given @var{base}, which must be
1717 between 2 and 36 inclusive, or be the special value 0. If @var{base}
1721 @code{0x} is allowed. The handling of @var{endptr} is as that of
1728 @deftypefn Supplemental {long long int} strtoll (const char *@var{string}, @
1729 char **@var{endptr}, int @var{base})
1731 const char *@var{string}, char **@var{endptr}, int @var{base})
1733 The @code{strtoll} function converts the string in @var{string} to a
1734 long long integer value according to the given @var{base}, which must be
1735 between 2 and 36 inclusive, or be the special value 0. If @var{base}
1739 @code{0x} is allowed. The handling of @var{endptr} is as that of
1746 @deftypefn Extension int strtosigno (const char *@var{name})
1754 @deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2})
1755 The @code{strverscmp} function compares the string @var{s1} against
1756 @var{s2}, considering them as holding indices/version numbers. Return
1758 function. In fact, if @var{s1} and @var{s2} contain no digits,
1801 @deftypefn Extension void timeval_add (struct timeval *@var{a}, @
1802 struct timeval *@var{b}, struct timeval *@var{result})
1804 Adds @var{a} to @var{b} and stores the result in @var{result}.
1809 @deftypefn Extension void timeval_sub (struct timeval *@var{a}, @
1810 struct timeval *@var{b}, struct timeval *@var{result})
1812 Subtracts @var{b} from @var{a} and stores the result in @var{result}.
1817 @deftypefn Supplemental char* tmpnam (char *@var{s})
1821 it. @var{s} must point to a buffer of at least @code{L_tmpnam} bytes,
1847 @deftypefn Extension void unlock_stream (FILE * @var{stream})
1851 pointer unchanged. If the @var{stream} is @code{NULL} do nothing.
1856 @deftypefn Extension int vasprintf (char **@var{resptr}, @
1857 const char *@var{format}, va_list @var{args})
1862 pointer to the allocated memory in @code{*@var{resptr}}. The value
1865 @code{*@var{resptr}}.
1877 @deftypefn Supplemental int vprintf (const char *@var{format}, va_list @var{ap})
1878 @deftypefnx Supplemental int vfprintf (FILE *@var{stream}, @
1879 const char *@var{format}, va_list @var{ap})
1880 @deftypefnx Supplemental int vsprintf (char *@var{str}, @
1881 const char *@var{format}, va_list @var{ap})
1893 @deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, @
1894 const char *@var{format}, va_list @var{ap})
1897 @var{buf} at most @code{@var{n}-1} bytes of text, followed by a
1898 terminating null byte, for a total of @var{n} bytes. On error the
1900 would have been printed had @var{n} been sufficiently large,
1901 regardless of the actual value of @var{n}. Note some pre-C99 system
1909 @deftypefn Supplemental int waitpid (int @var{pid}, int *@var{status}, int)
1912 values of @var{pid} depend on your implementation of @code{wait}, as
1918 @deftypefn Extension int writeargv (const char **@var{argv}, FILE *@var{file})
1927 @deftypefun int xatexit (void (*@var{fn}) (void))
1937 @deftypefn Replacement void* xcalloc (size_t @var{nelem}, size_t @var{elsize})
1946 @deftypefn Replacement void xexit (int @var{code})
1975 @deftypefn Replacement void xmalloc_set_program_name (const char *@var{name})
1983 @deftypefn Replacement void* xmemdup (void *@var{input}, @
1984 size_t @var{copy_size}, size_t @var{alloc_size})
1986 Duplicates a region of memory without fail. First, @var{alloc_size} bytes
1987 are allocated, then @var{copy_size} bytes from @var{input} are copied into
1994 @deftypefn Replacement void* xrealloc (void *@var{ptr}, size_t @var{size})
2001 @deftypefn Replacement char* xstrdup (const char *@var{s})
2009 @deftypefn Replacement char* xstrerror (int @var{errnum})
2017 @deftypefn Replacement char* xstrndup (const char *@var{s}, size_t @var{n})
2019 Returns a pointer to a copy of @var{s} with at most @var{n} characters