summaryrefslogtreecommitdiffstats
path: root/lib/libc/string
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Remove the example from SECURITY CONSIDERATIONS. This is mostlychris2002-01-051-54/+0
| | | | | | | duplicated code from EXAMPLES. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Copy the sample `SECURITY CONSIDERATIONS' section from sec-doc.7.chris2002-01-021-0/+66
| | | | | | | | This will be trimmed as the FreeBSD Security Architecture document is fleshed out and committed. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* mdoc(7) police: minor markup nits.ru2001-12-121-20/+20
|
* Make strerror and strerror_r use sys_errlist[0] for errnum = 0. Bewes2001-12-072-6/+32
| | | | | | | | | | | more careful about reporting truncation with ERANGE in strerror_r. Set errno to EINVAL for "unknown" errnum in strerror as required by P1003.1-200x Draft June 14, 2001. More carefully document the handling of strerrbuf when errors (ERANGE, EINVAL) are encountered in strerror_r. Reviewed by: bde (ongoing discussion)
* New, improved, more Posix-compliant strerror_r implementation,wes2001-12-062-72/+78
| | | | | | | complete with documentation. Reviewed by: mike@ gad@ MFC after: 1 week
* Must link strerror manpage to strerror_r.wes2001-11-271-0/+1
| | | | | | Thanks for the review, Mike. Submitted by: Mike Barcroft <mike@FreeBSD.org>
* Add strerror_r function per Posix prototype.wes2001-11-272-23/+107
| | | | | Reviewed by: Mike Barcroft <mike@FreeBSD.org> MFC after: 2 weeks
* mdoc(7) police: minor markup and spelling fixes.ru2001-11-201-4/+7
|
* Increment the loop counter.des2001-11-101-0/+1
| | | | | PR: bin/29218 Submitted by: Goran Lowkrantz <goran.lowkrantz@ismobile.com>
* rcsid[]->__FBSDIDobrien2001-11-0755-248/+95
|
* Note that strncmp() will not compare characters after a NUL character.mike2001-10-111-1/+8
| | | | | | | Add a missing word. Bump document date. Inspired by: IEEE Std 1003.1-200x (Draft 7) MFC after: 3 days
* Clarify that strnstr() will stop searching after in encounters a NULmike2001-10-111-5/+8
| | | | character. Bump document date. Add a missing comma.
* Implement strcasestr() which many others (f.e. Linux) already have.ache2001-10-103-2/+79
|
* Document the fact that the strnstr(3) function is not portable.mike2001-10-091-0/+5
| | | | Requested by: brian, gad
* Add a new libc function, strnstr(3), which allows one to limit themike2001-10-093-11/+122
| | | | | | | | number of characters that are searched. This is especially useful with file operations and non-NUL terminated strings. Silence from: -audit, -hackers MFC after: 5 days
* Fixed syntax errors in synopsis. The restrict keyword doesn't exist yet.bde2001-10-031-5/+5
| | | | | | The corresponding bugs in <wchar.h> have no effect because the function prototypes there don't have args so the __restrict "keyword" is misinterpreted as an arg.
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-0135-36/+36
|
* Note that strdup(3) will set errno if memory allocation fails. Thismike2001-09-231-1/+4
| | | | | | is also required by the forthcoming POSIX.1-200x standard. Obtained from: malloc.3
* o Various mdoc fixes.mike2001-08-091-10/+50
| | | | | | | | | | o Replace strncpy examples with less confusing ones from OpenBSD. These examples give more detail and also suggest using strlcpy(3). Reviewed by: des, ru, sheldonh Obtained from: OpenBSD MFC after: 3 days
* mdoc(7) police: expand plain text xrefs.ru2001-08-081-1/+2
|
* Only pull in the MD files if they exist. This allows for progressivemp2001-07-311-0/+2
| | | | implementation and compilation when bringing up a new architecture.
* Sync to OpenBSD (update comment and minor style change).kris2001-07-241-3/+4
| | | | | Obtained from: OpenBSD MFC after: 1 week
* Sync to OpenBSD:kris2001-07-241-2/+23
| | | | | | | | | | | | Clarify that if strlcat() does not find a NUL within siz byte it will not NUL terminate either. Document boundary condition when size < strlen(dst). "of", not "on" (from Henric Jungheim) Obtained from: OpenBSD MFC After: 1 week
* Don't claim that strncpy() is the same as strcpy().dd2001-07-191-6/+6
| | | | | PR: 29002 Submitted by: Joseph Mallett <jmallett@xMach.org>
* mdoc(7) police: Add strncpy() to the NAME section.ru2001-07-161-1/+1
|
OpenPOWER on IntegriCloud