summaryrefslogtreecommitdiff
path: root/lib/libc/string
Commit message (Collapse)AuthorAgeFilesLines
* Translate from GNU C to ISO C.Dag-Erling Smørgrav2004-01-144-4/+4
| | | | Notes: svn path=/head/; revision=124514
* Add and document ffsl(), fls() and flsl().Dag-Erling Smørgrav2004-01-136-10/+199
| | | | Notes: svn path=/head/; revision=124483
* Brucification: Don't initialize in declaration, make sure extra linesJordan K. Hubbard2003-12-182-2/+5
| | | | | | | follow declaration section. Notes: svn path=/head/; revision=123631
* Do comparison using appropriate casting first, as per SUSv3 (search for firstJordan K. Hubbard2003-12-172-2/+4
| | | | | | | [last] character, not int). Notes: svn path=/head/; revision=123584
* Pass NULL instead of a pointer to a zeroed mbstate_t object.Tim J. Robbins2003-11-052-10/+4
| | | | Notes: svn path=/head/; revision=122104
* Pacify gcc about casting pointers to integers (for the lowest few bits).Peter Wemm2003-10-261-6/+8
| | | | Notes: svn path=/head/; revision=121531
* mdoc(7): Use the new feature of the .In macro.Ruslan Ermilov2003-09-086-12/+12
| | | | Notes: svn path=/head/; revision=119893
* Move a sentence about the terminating \0 from the RETURN VALUES sectionSimon L. B. Nielsen2003-09-042-14/+14
| | | | | | | | | | | (where it didn't really belong), to the DESCRIPTION section. English advice: ceri Requested by: das MFC after: 4 weeks Notes: svn path=/head/; revision=119748
* * Merge index(3) and rindex(3) to index(3) since the two functions areSimon L. B. Nielsen2003-07-285-216/+61
| | | | | | | | | | | | | | | | almost identical. * Merge strchr(3) and strrchr(3) to strchr(3) since the two functions are almost identical. * Make the wording of index(3) and strchr(3) more similar. * mdoc(7) cleanup. Submitted by: SUZUKI Koichi <metal@gc5.so-net.ne.jp>, keramida, myself PR: docs/32054 Reviewed by: ru Approved by: ceri (mentor) Notes: svn path=/head/; revision=118134
* o strmode(3) returns void not 0.Maxim Konovalov2003-07-011-5/+0
| | | | | | | | | PR: docs/53488 Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> MFC after: 1 week Notes: svn path=/head/; revision=117123
* Back out the `hiding' of strlcpy and strlcat. Several peopleJacques Vidrine2003-05-013-13/+5
| | | | | | | vocally objected to this safety belt. Notes: svn path=/head/; revision=114443
* `Hide' strlcpy and strlcat (using the namespace.h / __weak_referenceJacques Vidrine2003-04-293-5/+13
| | | | | | | | | | technique) so that we don't wind up calling into an application's version if the application defines them. Inspired by: qpopper's interfering and buggy version of strlcpy Notes: svn path=/head/; revision=114256
* MFp4: Make `spanp' const.Tim J. Robbins2003-03-121-3/+4
| | | | Notes: svn path=/head/; revision=112131
* Optimize errstr() by reducing the number of times it walks a string.Mike Barcroft2003-01-031-9/+7
| | | | | | | | | | | As a side effect, it makes the code easier to read and requires less pointer arithmetic. Test by: strerror regression test Submitted by: Tim Kientzle <kientzle@acm.org> Notes: svn path=/head/; revision=108603
* Stylistic changes:Mike Barcroft2002-12-201-11/+14
| | | | | | | | | | | | | | o Fix an English error (comma splice) and poorly worded sentence. o Fix KNF ordering of variables (pointers come before arithmetic types). o Restore hand-optimization of sizeof()-1, instead of strlen(). o Remove unneeded local variables in strerror_r(). Test by: strerror regression test Requested by: bde Reviewed by: bde Notes: svn path=/head/; revision=108118
* Add back the Standards section claiming conformance to 1003.1-2001 andTim J. Robbins2002-12-191-10/+13
| | | | | | | C99 now that all known standards-related bugs have been fixed. Notes: svn path=/head/; revision=108091
* mdoc(7) police: "The .Fa argument.".Ruslan Ermilov2002-12-191-1/+1
| | | | Notes: svn path=/head/; revision=108087
* Rearrange strerror() so that its itoa procedure can be used withMike Barcroft2002-12-182-86/+45
| | | | | | | | | | | | | | | | | | strerror_r(). Doing this allows us to ensure that strerror_r() always fills the supplied buffer regardless of EINVAL or ERANGE errors. strerror()'s semantics have changed slightly such that an argument of 0 is now considered invalid and errno is set to EINVAL. Remove internal regression test for strerror() and strerror_r(). This will be reincarnated in src/tools/regression/lib/libc/string. In strerror(3), add a comment about strerror()'s bogus return type. PR: 44356 Notes: svn path=/head/; revision=108044
* mdoc(7) police: Fixed abuses of the .Ar and .Em macros.Ruslan Ermilov2002-12-183-4/+4
| | | | Notes: svn path=/head/; revision=108040
* mdoc(7) police: "The .Fn function".Ruslan Ermilov2002-12-183-0/+5
| | | | Notes: svn path=/head/; revision=108037
* mdoc(7) police: tiny nits.Ruslan Ermilov2002-12-093-8/+11
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107706
* mdoc(7) police: formatting nits.Ruslan Ermilov2002-11-292-2/+4
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107387
* libc_r wasn't so tied to libc for 22 months.Ruslan Ermilov2002-11-181-6/+4
| | | | Notes: svn path=/head/; revision=107052
* Replace wcsstr() with an implementation based on strstr(), which is farTim J. Robbins2002-10-241-38/+32
| | | | | | | | | more efficient. The problem with the previous implementation was that it calculated the length of the first argument ("big") with wcslen() when it was not necessary. Notes: svn path=/head/; revision=105844
* Restore Berkeley SCCS id.Tim J. Robbins2002-10-241-1/+5
| | | | Notes: svn path=/head/; revision=105842
* Remove the Standards section again until we get these functions sortedTim J. Robbins2002-10-241-8/+0
| | | | | | | out. This will probably have to wait until after 5.0-R. Notes: svn path=/head/; revision=105838
* Fix the NetBSD RCS id's on these files; somehow they were initiallyTim J. Robbins2002-10-232-2/+2
| | | | | | | committed with the tags unexpanded. Notes: svn path=/head/; revision=105787
* Reimplement more efficiently, using a single forward scan (like strrchr(3))Tim J. Robbins2002-10-231-22/+12
| | | | | | | | instead of scanning forwards to find the end of the string then scanning backwards to find the character. Notes: svn path=/head/; revision=105786
* Reimplement, handling the case where c == L'\0' correctly and fixingTim J. Robbins2002-10-231-21/+7
| | | | | | | some style(9) bugs. Notes: svn path=/head/; revision=105785
* Add a Standards section, claiming conformance to IEEE Std. 1003.1-2001.Tim J. Robbins2002-10-231-1/+17
| | | | | | | | Also add a note to the Bugs section pointing out that strerror() and perror() share the same static buffer. Notes: svn path=/head/; revision=105779
* Translate to English.Dag-Erling Smørgrav2002-10-231-13/+18
| | | | Notes: svn path=/head/; revision=105772
* Replace this wcsncpy() implementation with one based on strncpy.c to fixTim J. Robbins2002-10-231-26/+32
| | | | | | | | | | two major bugs: - off-by-one overflow when the length of the source string exceeds or equals the destination buffer size. - old version was not padding the destination buffer with null wide chars Notes: svn path=/head/; revision=105761
* C89 does not specifiy strsep(), so our strsep() implementation cannotTim J. Robbins2002-10-191-1/+0
| | | | | | | | | conform to it. Obtained from: OpenBSD Notes: svn path=/head/; revision=105447
* Add cross-references to the wide character counterparts of these functions.Tim J. Robbins2002-10-153-3/+6
| | | | Notes: svn path=/head/; revision=105150
* Remove stray comma at the end of the See Also list.Tim J. Robbins2002-10-151-1/+1
| | | | Notes: svn path=/head/; revision=105148
* Fix another spelling mistake.Robert Drehmel2002-10-101-1/+1
| | | | Notes: svn path=/head/; revision=104780
* Correct a spelling mistake.Robert Drehmel2002-10-101-1/+1
| | | | Notes: svn path=/head/; revision=104779
* Add a placeholder implementation of wcscoll() and wcsxfrm() which givesTim J. Robbins2002-10-045-4/+454
| | | | | | | | locale-sensitive collation only in single-byte locales, and just does binary comparison for the others with extended character sets. Notes: svn path=/head/; revision=104443
* Add stpcpy(3).David E. O'Brien2002-10-034-2/+73
| | | | Notes: svn path=/head/; revision=104419
* Add an example showing how to use wcstok(). Fix ordering of See Also section.Tim J. Robbins2002-10-021-2/+15
| | | | Notes: svn path=/head/; revision=104372
* Simplify by removing unneeded local variables and explicit null termination.Tim J. Robbins2002-09-261-12/+8
| | | | Notes: svn path=/head/; revision=103999
* Simplify by removing useless local variables and explicit null termination.Tim J. Robbins2002-09-261-9/+5
| | | | Notes: svn path=/head/; revision=103998
* Remove unnecessary #include <assert.h>; it was used to bring in theTim J. Robbins2002-09-2120-20/+0
| | | | | | | _DIAGASSERT macro on NetBSD, but we don't need it. Notes: svn path=/head/; revision=103724
* Replace a stray reference to strtok() with one to wcstok().Tim J. Robbins2002-09-081-1/+1
| | | | Notes: svn path=/head/; revision=103095
* Add an implementation of wcstok(), based on strtok_r().Tim J. Robbins2002-09-073-3/+213
| | | | Notes: svn path=/head/; revision=103067
* Sync prototypes with <wchar.h> with respect to the restrict qualifier.Tim J. Robbins2002-09-071-6/+6
| | | | Notes: svn path=/head/; revision=103060
* Add restrict qualifiers where C99 permits them. All of these already hadTim J. Robbins2002-09-076-12/+12
| | | | | | | restrict qualifiers on their prototypes in <wchar.h>. Notes: svn path=/head/; revision=103059
* Call strtok_r() via a libc private name from within strtok().Tim J. Robbins2002-09-071-2/+6
| | | | Notes: svn path=/head/; revision=103057
* Style: One space between "restrict" qualifier and "*".Tim J. Robbins2002-09-068-10/+10
| | | | Notes: svn path=/head/; revision=103012
* - Let their manual pages show the reader that the bzero(3) andRobert Drehmel2002-09-014-22/+33
| | | | | | | | | | | | | bcopy(3) functions are prototyped in <strings.h> and not in <string.h> anymore. - Add a sentence about that to the respective HISTORY sections. In the C source files: - Include <string.h> or <strings.h> depending on what function is to be compiled. - Use ANSI-C function definitions. Notes: svn path=/head/; revision=102809