christos
389390f57e
pacify lint.
2008-09-24 16:58:53 +00:00
christos
0588e62651
fix newer gcc warning.
2008-09-24 16:24:30 +00:00
christos
194e105784
From Ilya Dogolazky ilya.dogolazky at teleca dot fi:
...
The new algorithm does not use any array initialisation.
Instead of that the only integer variable "index" is initialized.
It is not using any bitwise operations and shifts as well.
The well-known algorithm (an efficient representation for sparse sets) is
mentioned as exercise 2.12 in "The Design and Analysis of Computer Algorithms"
by Alfred Aho, John Hopcroft and Jeffrey Ullman. It is described here
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.30.7319
and here
http://research.swtch.com/2008/03/using-uninitialized-memory-for-fun-and.html
2008-09-24 14:36:02 +00:00
dholland
43987efbe4
Grammar police.
2008-08-29 05:48:40 +00:00
tnozaki
cd0f2012d3
SUSv3 says, if not printable wide-character exists, return -1.
2008-08-12 21:59:27 +00:00
tnozaki
b5174f925f
SUSv3 says, wcwidth(wc) returns:
...
1) wc is nul wide-character, return 0.
2) wc is printable wide-character, return column width.
3) else, return -1.
but our implementation, case 3) returns 0. it's wrong!
2008-08-12 20:51:25 +00:00
joerg
9acf218ba1
Before using the slightly more involved bitmap tables,
...
check that the charset for strspn/strcspn is non-trivial.
An empty charset is either a direct return or a strlen and
a single charset a simple loop.
2008-07-30 16:13:59 +00:00
wiz
067a770e99
Note that strndup was recently (4.0) added. Bump date.
2008-06-22 11:02:07 +00:00
haad
a3b083b6a1
Remove unneeded #include <string.h>, found by Adam Hoka.
...
Ok'ed by martin@.
2008-05-26 13:17:48 +00:00
martin
11a6dbe728
Convert TNF licenses to new 2 clause variant
2008-04-30 13:10:46 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
christos
6711b9aec7
use the proper variable.
2008-02-23 15:53:22 +00:00
christos
8fbaff1005
fix lint issues.
2008-02-23 15:18:04 +00:00
joerg
758ec1af13
Also cast before anding the characters.
2008-02-22 19:25:59 +00:00
joerg
966f3cc69d
Add some explicit casts to stop GCC complains about signed char shifts.
2008-02-22 14:40:15 +00:00
joerg
2ca83a6a31
Replace O(nm) versions of strspn, strcspn and strpbrk with O(n+m)
...
implementations based on the suggestions I made for DragonFly's libc
ages ago. For charset with more than one entry and iterating over the
first two characters of s, this is consistently faster on amd64.
2008-02-22 13:32:19 +00:00
seb
975a58878b
Fix stresep(3) handling of consecutive quoted delimiter characters.
...
Approved by christos@
2007-12-06 22:07:07 +00:00
nakayama
0c74dffd74
Add strndup(3) to libnbcompat, since estrndup(3) added into efun.c calls it.
2007-07-03 12:11:09 +00:00
christos
1418345039
Make these work with _FORTIFY_SOURCE, by overriding the fortified definitions
2007-06-03 17:39:26 +00:00
wiz
216334ea2c
Bump date for previous.
2007-02-18 00:46:47 +00:00
hubertf
002621f0bc
Try to tell what this really does.
...
Including a BUGS section on why it doesn't.
*roff code by wiz@, with some input from
Slava Semushin <slava.semushin@gmail.com>
2007-02-18 00:38:22 +00:00
wiz
c7567a33c8
Add strings(3), collecting information about strings.h.
...
Add Xr for it to string(3).
XXX: if someone could make a HISTORY section, I'd appreciate it
2007-02-17 09:32:57 +00:00
wiz
8569abace9
o Removed functions that are in strings.h, not string.h
...
o Added memmem
o Bump date
From Slava Semushin in private mail.
2007-02-17 09:04:57 +00:00
wiz
cf9a3d07af
o Removed functions which were moved to strings.h header
...
o Added some missing functions from string.h
o Update SEE ALSO and STANDARDS
o Bump date.
From Slava Semushin in private mail.
2007-02-17 09:00:37 +00:00
cbiere
9946ea710f
Avoid lint warning.
2007-01-14 23:41:24 +00:00
cbiere
3984c614f6
Look only at the first `n' characters to avoid traversing a potentially
...
huge string for nothing.
2007-01-14 18:48:28 +00:00
dyoung
e3361bb265
Add strsep(3) to libkern.
...
To avoid code duplication, move strsep.c to the kernel/userland
common files.
Soon I will commit source-address selection (options IPSELSRC).
It will use strsep(3).
2006-11-13 03:26:43 +00:00
wiz
1a64d82da5
nul/null/NULL cleanup:
...
when talking about characters/bytes, use "nul" and "nul-terminate"
when talking about pointers, use "null pointer" or ".Dv NULL"
2006-10-16 08:48:45 +00:00
wiz
353e917272
New sentence, new line.
2006-10-14 07:52:15 +00:00
tnozaki
65b88fc7e0
PR/30809 added manpages of wcswcs(3) and wcscoll(3), wcsxfrm(3)
...
(wcs?width and wprintf are already in repository).
2006-10-13 17:28:09 +00:00
apb
b70c743b65
Include nbtool_config.h for tools build. This was part of the
...
patch supplied by Wim Lewis in PR 31232.
2006-10-07 22:04:18 +00:00
elad
09256aac55
PR/31232: Wim Lewis: tools/compat doesn't check for pre-existence of
...
strmode()
Commited slightly different diff, input and okay from apb@
2006-10-07 16:19:35 +00:00
wiz
5b76ee5cd3
Mark up NULL; the character is nul, not null; sort SEE ALSO;
...
add RCS Id at top of file.
2006-09-02 23:49:02 +00:00
dsl
7fd4677bc0
fix xtos's pasto
2006-08-27 07:09:04 +00:00
christos
d37c189a03
PR/34238: Aleksey Cheusov: man pages for wcsdup, wcscasecmp and wcsncasecmp
...
functions
2006-08-26 22:48:50 +00:00
christos
a248088000
Add copyright notices.
2006-08-26 22:45:52 +00:00
christos
bfce146aaa
include one more new file.
2006-08-23 01:51:51 +00:00
christos
54097ce7af
PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions
2006-08-22 20:50:46 +00:00
wiz
31e92ca26e
stresep, not strnsep. Remove duplicate "the". Bump date for previous.
2006-08-13 23:20:52 +00:00
wiz
a5afdcde5a
Mark up NULL.
2006-08-13 23:19:45 +00:00
christos
cbfb283c65
- Add strndup and stresep
...
- Use stresep so in fstab so that we can mount paths with white space in them.
2006-08-12 23:49:53 +00:00
tnozaki
a55e9cdf1a
fix lib/33476:
...
added following manpages (derived from FreeBSD),
wcwidth(3) wcswidth(3)
wcstol(3) wcstoll(3) wcstoimax(3)
wcstoul(3) wcstoull(3) wcstoumax(3)
and update doc/TODO.i18n.
2006-06-03 04:36:43 +00:00
wiz
6f524b4705
Punctuation nit.
2006-05-22 21:55:01 +00:00
kleink
bf44a81954
Clarify that strerror() doesn't return EINVAL but stores in errno;
...
prompted by Thomas Klausner.
2006-05-22 21:40:33 +00:00
kleink
9cbc15a5b4
Must include "namespace.h" for strerror_r()'s internal name.
2006-01-26 11:13:42 +00:00
christos
e5548b402a
Use reach-over sources from common/lib/libc
2005-12-20 19:31:47 +00:00
martin
12940193e8
Fix warns=4 via __UNCONST()
2005-11-30 09:55:14 +00:00
martin
34fb53a2f7
Fix warns=4 (via __UNCONST())
2005-11-30 09:35:58 +00:00
christos
387331c600
fix warns=4
2005-11-29 18:48:02 +00:00
christos
03256c6e55
WARNS=4
2005-11-29 03:11:58 +00:00