das
ebb4763b7f
Add restrict qualifiers.
...
I missed this file in my previous commit.
2009-02-28 06:05:37 +00:00
das
a67fbaa46c
- Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(),
...
wcscasecmp(), and wcsncasecmp().
- Make some previously non-standard extensions visible
if POSIX_VISIBLE >= 200809.
- Use restrict qualifiers in stpcpy().
- Declare off_t and size_t in stdio.h.
- Bump __FreeBSD_version in case the new symbols (particularly
getline()) cause issues with ports.
Reviewed by: standards@
2009-02-28 06:00:58 +00:00
das
28465baaf0
Add restrict qualifiers to the parameters to strlcpy() and strlcat().
...
The annotation mainly just serves as a hint that they're not intended
for use with overlapping strings.
2009-02-28 05:15:02 +00:00
imp
af311d8149
Make sure the comparison is done with an unsigned char.
2009-02-07 19:34:44 +00:00
imp
8d1a287c1a
Fix the functions to match prototypes. The K&R definitions differ
...
from the ANSI-C prototype due to the 'int promotion' rule.
2009-02-03 20:25:36 +00:00
danger
ff17de3853
- ANSIfy function definitions
...
- use nul when we are looking for a terminating character where appropriate
Approved by: imp
2009-02-03 17:58:20 +00:00
delphij
26e9024044
- Fix grammar. [1]
...
- Use the correct term 'long mode'. [2]
- style(9) for return value. [3]
Submitted by: Ben Kaduk <minimarmot gmail com> [1],
obrien [2], scf [3]
2009-01-26 07:31:28 +00:00
delphij
12e5c4fd4c
Rewrite of MI strlen(3) in a way that can better utilize modern hardware by
...
reducing branches and doing word-sized operation.
The idea is taken from J.T. Conklin's x86_64 optimized version of strlen(3)
for NetBSD, and reimplemented in C by me.
Discussed on: -arch@
2009-01-25 23:08:47 +00:00
kib
3afbde34ac
Document that ffsll(3) and flsll(3) functions first appeared in
...
FreeBSD 7.1
Submitted by: Jan Henrik Sylvester <me janh de>
MFC after: 3 days
2009-01-13 13:19:42 +00:00
delphij
bd0b9c72c6
o Language improvements from OpenBSD;
...
o Use an ISC-style license as did by the author.
Obtained from: OpenBSD
2009-01-12 06:10:48 +00:00
delphij
9277245887
o ANSIfy.
...
o Use ISC style copyright as did by the author.
Obtained from: OpenBSD
2009-01-12 06:09:34 +00:00
ru
8e46243b4c
Sort MLINKS.
2009-01-09 16:24:10 +00:00
maxim
c7da9a0995
o Use full month name in .Dd macro.
2008-12-09 09:24:25 +00:00
kib
723ad6dc01
Import the strndup(3) function.
...
Copyright attribution is kept the same as in original NetBSD source.
Submitted by: Florian Smeets <flo kasimir com>
Obtained from: NetBSD
MFC after: 2 weeks
2008-12-06 09:37:54 +00:00
kib
55095b18c6
Order the str*.c files mostly alphabetical.
...
Submitted by: Florian Smeets <flo kasimir com>
MFC after: 2 weeks
2008-12-06 09:28:46 +00:00
pjd
8653cc8d08
Add an easier example.
...
Reviewed by: trasz
2008-12-05 15:50:59 +00:00
kib
8b86595849
Add the ffsll and flsll functions. These are ffs and fls operating
...
on long long arguments.
Reviewed by: bde (previous version, that included asm implementation
for all ffs and fls functions on i386 and amd64)
MFC after: 2 weeks
2008-11-03 10:22:19 +00:00
kib
2f0fec26d1
Fix style.
2008-11-03 10:14:47 +00:00
delphij
4360de0fd4
- License change to a less restrictive one;
...
- ANSIfy;
- Convert do {} while loop -> while {} for clarity;
- Sync RCS ID with OpenBSD;
Obtained from: OpenBSD
2008-10-19 10:11:35 +00:00
delphij
84a6bd24ee
Further simplify the code.
...
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
2008-10-19 09:10:44 +00:00
delphij
cae7e20d60
Use strlcpy() in !localized case to avoid the -1's.
2008-10-17 21:29:05 +00:00
delphij
b65786c8a8
Add memrchr(3).
...
Obtained from: OpenBSD
2008-04-10 00:12:44 +00:00
wes
9c13fe545e
Remove license clause 3 to agree with the now-standard BSD license.
...
Prompted by: Glenn Halperin, Symbian Software
2007-12-12 18:33:06 +00:00
deischen
2a7306fdc5
Use C comments since we now preprocess these files with CPP.
2007-04-29 14:05:22 +00:00
imp
cd1f140ae4
Per Regents of the University of Calfornia letter, remove advertising
...
clause.
# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
ru
d510dd202f
Don't say "rightmost" when referring to the least significant bit.
...
PR: docs/94803
MFC after: 3 days
2006-10-12 15:08:41 +00:00
dd
04502e68b1
Improve the wording. Remove the appositive about strcmp, putting the
...
first sentence back to the way it was. Add a second sentence that
explains the case when strcmp is called.
2006-08-14 08:21:27 +00:00
maxim
3e4e0ea538
o Make grep ^strlcpy work: put a return value type on separate line.
2006-06-15 15:56:55 +00:00
deischen
a0f6b0f1d0
Add each directory's symbol map file to SYM_MAPS.
2006-03-13 01:15:01 +00:00
deischen
138dd54357
Add symbol maps and initial symbol version definitions to libc.
...
Reviewed by: davidxu
2006-03-13 00:53:21 +00:00
ru
07d744857c
Fix prototype.
2005-11-24 06:56:21 +00:00
ru
0a30497782
Fix up markup.
2005-11-18 11:54:14 +00:00
tjr
95970c2863
Remove references to nonexistent "FreeBSD Security Architecture" document.
2005-09-05 09:49:33 +00:00
garys
48a5274239
Added a sentence to explain what "span" means.
...
PR: docs/84850
Submitted by: garys
MFC after: 3 days
Approved by: keramida
2005-08-29 20:41:58 +00:00
andre
45fd598f49
Add the function memmem(3) as found in glibc and others.
...
It is the binary equivalent to strstr(3).
void *memmem(const void *big, size_t big_len,
const void *little, size_t little_len);
Submitted by: Pascal Gloor <pascal.gloor at spale.com>
MFC after: 3 days
2005-08-25 18:26:58 +00:00
tjr
d0e833a8a7
Add an implementation of the semi-standard wcsdup() function, as found
...
on Microsoft and GNU systems.
2005-08-13 05:54:33 +00:00
das
87aa297030
Replace the current strspn() and strcspn() with significantly faster
...
implementations inspired by the ones in DragonFly. Unlike the
DragonFly versions, these have a small data cache footprint, and my
tests show that they're never slower than the old code except when the
charset or the span is 0 or 1 characters. This implementation is
generally faster than DragonFly until either the charset or the span
gets in the ballpark of 32 to 64 characters.
2005-04-02 18:52:44 +00:00
mux
91ab1502ac
Unbreak strsignal(). This is an MFC candidate.
...
Reported by: Sean McNeil <sean@mcneil.com>
2005-03-06 03:19:19 +00:00
phantom
0420842c6b
Unbreak !NLS case
2005-02-27 21:17:22 +00:00
phantom
31ef43753e
Add NLS catalogs support to strerror(), strerror_r() and strsignal().
...
Controlled by NLS define, currently disabled by default.
Idea obtained from: NetBSD
2005-02-27 16:58:28 +00:00
pjd
6ce8df8f98
Don't read more than the given 'len' bytes from the 'big' string.
...
PR: misc/77369
Submitted by: Ed Maste <emaste@phaedrus.sandvine.ca>
MFC after: 1 week
2005-02-11 21:07:51 +00:00
ru
ed72feddcb
Sort sections.
2005-01-20 09:17:07 +00:00
trhodes
e10b3efba5
Date business, update.
2004-12-10 15:27:06 +00:00
trhodes
a659824fbd
According to the information on:
...
http://www.opengroup.org/onlinepubs/009695399/functions/swab.html
the prototype for swab() should be in <unistd.h> and not in <string.h>.
Move it, and update to match SUS. Leave the prototype in string.h for
now, for backwards compat.
PR: 74751
Submitted by: Craig Rodrigues <rodrigc@crodrigues.org>
Discussed with: das
2004-12-10 15:24:40 +00:00
obrien
3d93a60e7f
Enable building with LIBC_SCCS defined.
...
Bug submitted by: Andrea Campi <andrea+freebsd_current@webcom.it>
2004-10-16 06:32:43 +00:00
stefanf
bcc253c058
Remove extra closing parenthesis added in revision 1.4.
...
Noticed by: Andrea Campi
2004-10-14 21:31:42 +00:00
keramida
c857f72425
Correctly document the return value of strerror() and strerror_r() and
...
the contents of the returned buffer for unknown error codes.
PR: docs/72578
Submitted by: Jilles Tjoelker <jilles@stack.nl>
MFC after: 3 days
2004-10-12 14:52:52 +00:00
ru
01548ace15
Mechanically kill hard sentence breaks.
2004-07-02 23:52:20 +00:00
ru
95168a499a
Markup, grammar, and spelling fixes.
2004-06-30 20:09:10 +00:00
tjr
47b6d3f343
Prepare to handle state-dependent encodings. This mainly involves not
...
taking shortcuts when it comes to storing and passing around conversion
states.
2004-04-07 09:47:56 +00:00