summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
Commit message (Collapse)AuthorAgeFilesLines
* Replace wcsstr() with an implementation based on strstr(), which is fartjr2002-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.
* Restore Berkeley SCCS id.tjr2002-10-241-1/+5
|
* Remove the Standards section again until we get these functions sortedtjr2002-10-241-8/+0
| | | | out. This will probably have to wait until after 5.0-R.
* Fix the NetBSD RCS id's on these files; somehow they were initiallytjr2002-10-232-2/+2
| | | | committed with the tags unexpanded.
* Reimplement more efficiently, using a single forward scan (like strrchr(3))tjr2002-10-231-22/+12
| | | | | instead of scanning forwards to find the end of the string then scanning backwards to find the character.
* Reimplement, handling the case where c == L'\0' correctly and fixingtjr2002-10-231-21/+7
| | | | some style(9) bugs.
* Add a Standards section, claiming conformance to IEEE Std. 1003.1-2001.tjr2002-10-231-1/+17
| | | | | Also add a note to the Bugs section pointing out that strerror() and perror() share the same static buffer.
* Translate to English.des2002-10-231-13/+18
|
* Replace this wcsncpy() implementation with one based on strncpy.c to fixtjr2002-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
* C89 does not specifiy strsep(), so our strsep() implementation cannottjr2002-10-191-1/+0
| | | | | | conform to it. Obtained from: OpenBSD
* Add cross-references to the wide character counterparts of these functions.tjr2002-10-153-3/+6
|
* Remove stray comma at the end of the See Also list.tjr2002-10-151-1/+1
|
* Fix another spelling mistake.robert2002-10-101-1/+1
|
* Correct a spelling mistake.robert2002-10-101-1/+1
|
* Add a placeholder implementation of wcscoll() and wcsxfrm() which givestjr2002-10-045-4/+454
| | | | | locale-sensitive collation only in single-byte locales, and just does binary comparison for the others with extended character sets.
* Add stpcpy(3).obrien2002-10-034-2/+73
|
* Add an example showing how to use wcstok(). Fix ordering of See Also section.tjr2002-10-021-2/+15
|
* Simplify by removing unneeded local variables and explicit null termination.tjr2002-09-261-12/+8
|
* Simplify by removing useless local variables and explicit null termination.tjr2002-09-261-9/+5
|
* Remove unnecessary #include <assert.h>; it was used to bring in thetjr2002-09-2120-20/+0
| | | | _DIAGASSERT macro on NetBSD, but we don't need it.
* Replace a stray reference to strtok() with one to wcstok().tjr2002-09-081-1/+1
|
* Add an implementation of wcstok(), based on strtok_r().tjr2002-09-073-3/+213
|
* Sync prototypes with <wchar.h> with respect to the restrict qualifier.tjr2002-09-071-6/+6
|
* Add restrict qualifiers where C99 permits them. All of these already hadtjr2002-09-076-12/+12
| | | | restrict qualifiers on their prototypes in <wchar.h>.
* Call strtok_r() via a libc private name from within strtok().tjr2002-09-071-2/+6
|
* Style: One space between "restrict" qualifier and "*".tjr2002-09-068-10/+10
|
* - Let their manual pages show the reader that the bzero(3) androbert2002-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.
* Add the 'restrict' type qualifier to the function prototyperobert2002-08-301-1/+1
| | | | | of the swab(3) function in its manual page to match the standardization by POSIX.1-2001.
* - Update the manual page of bcmp(3) by replacingrobert2002-08-302-7/+12
| | | | | | | | | | .In string.h with .In strings.h and adding a sentence to the HISTORY section. - Use an ANSI-C function definition. - Include <strings.h> instead of <string.h>. - Apply style(9): Put a space after return keywords.
* - Convert the function definition to declare its argumentsrobert2002-08-301-8/+4
| | | | | | | | | | | | | | | | | | | | | | | in the ANSI-C format. - Change the code a bit to hopefully save some cycles. I.e. (simplified) change a = b + 1; while (--b & 0x7) /* ... */ to a = b; for (; b & 0x7; b--) /* ... */ and while (--a >= 0) /* ... */ to for (; a > 0; a--) /* ... */ - Equip two function arguments of swab() with the 'restrict' type qualifier in form of the '__restrict' macro. This is specified by POSIX.1-2001.
* - Update the manual pages of index() and rindex() to showrobert2002-08-304-17/+38
| | | | | | | | | | | | | | | | | | <strings.h> as the associated header file. The prototypes have been moved there from <string.h> because POSIX.1-2001 said so. - Conditionally include either <strings.h> or <string.h> based on whether the [r]index() or str[r]chr() functions are compiled, respectively. - Style(9) tells us to - put a space after the return keyword - to check for a NUL character without using the ! operator. - use NULL instead of (type *)NULL where the compiler knows the type. Apply these rules. - Rather use ANSI-C function definitions than K&R ones. - For index(3), correct second function argument's type; it was declared to be a `const char' before and is now an `int'.
* - Update the manual page to show that the associated header filerobert2002-08-302-4/+10
| | | | | | | is <strings.h> and not <string.h> anymore. - Tell the reader about this change in the HISTORY section. - Switch to use an ANSI-C function definition. - Include <strings.h> instead of <string.h> in the source file.
* - Update strcasecmp(3)/strncasecmp(3) to reflect the fact thatrobert2002-08-302-2/+9
| | | | | | | | the prototypes for both functions are now in the <strings.h> header, as required by IEEE Std 1003.1-2001. - Add one sentence about that in the HISTORY section. - Include <strings.h> in the source file to have the prototypes in scope when the _ANSI_SOURCE macro is defined.
* Add a manual page for wcswidth().tjr2002-08-202-1/+62
|
* Move just committed version of wcswidth.c here (from "locale"),ache2002-08-202-25/+31
| | | | a bit optimized now.
* - Add the 'restrict' qualifier to the definitions of the stringrobert2002-08-146-18/+8
| | | | | | | concatenation and copy functions using the '__restrict' macro. This is to satisfy IEEE Std 1003-1.2001. - Use ANSI-C function definitions. - Add the 'restrict' keyword to the manual pages, too.
* - Add the 'restrict' qualifier required by IEEE Std 1003.1-2001robert2002-08-142-5/+2
| | | | | | | to the function definition of strxfrm(3) in form of our '__restrict' macro. - Use an ANSI-C function definition for strxfrm(3). - Change the manual page accordingly.
* Correct an inaccuracy in this man page regarding detecting empty fields.archie2002-08-071-4/+5
| | | | MFC after: 2 days
* Fix off-by-one error.mini2002-07-031-1/+1
| | | | | | PR: misc/40104 Submitted by: Neal Fachan <neal@isilon.com> MFC after: 3 days
* Fix the style of the SCM ID's.obrien2002-03-2227-5/+59
| | | | I believe have made all of libc .c's as consistent as possible.
* Remove 'register' keyword.obrien2002-03-2128-76/+76
|
* Revert last commit. stdio.h include is for perror(), not strerror()jedgar2002-01-311-1/+1
|
* strerror(3) is in string.h, not stdio.hjedgar2002-01-311-1/+1
| | | | MFC after: 1 week
* Add a few cleanups from rev 1.1:mike2002-01-151-10/+12
| | | | | | | | o Restore vendor ID. o Order variable types by size. o Remove a gratuitous temporary variable. Submitted by: bde
* o Add prototype for printf(3).mike2002-01-151-9/+12
| | | | | | | style(9): o Order variables in declarations. o Move initialization out of declaration. o Fix over-indents in previous delta.
* style(9)mike2002-01-151-95/+63
| | | | | Submitted by: Joseph Mallett <jmallett@xmach.org> Reviewed by: md5(1)
* mdoc(7) police:ru2002-01-092-3/+4
| | | | Stop abusing the .%J macro for where the .Pa macro should have been used.
* Suggest using memmove(3) if src and dst may overlap.dd2002-01-071-2/+7
| | | | | PR: 33298 Submitted by: Tim J. Robbins <tim@robbins.dropbear.id.au>
* Add a new `SECURITY CONSIDERATIONS' section. Sample code similar tochris2002-01-051-0/+63
| | | | | | | | | the first revision of strcpy(3)'s section is included, but should be removed as the Security Architecture document is committed and completed. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Include a section cross-reference to `EXAMPLES' in `SECURITYchris2002-01-051-1/+3
| | | | | | | CONSIDERATIONS' as a source for relevant sample code. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
OpenPOWER on IntegriCloud