Commit Graph

348 Commits

Author SHA1 Message Date
jym
b0471da334 Make strnlen(3) accessible in kernel. ok christos@. 2011-09-01 22:35:17 +00:00
dholland
75fea7f548 Add patch from Klaus Klein in PR 45258 to note that popcount32/64
require <stdint.h>.
2011-08-22 01:36:04 +00:00
martin
27868e15e9 Special-case the (unlikely in practice) call with len = 2 - previously
the code would not have swapped anything. Problem pointed out by
sparc64 automatic test run.
2011-01-04 17:14:07 +00:00
wiz
3d3c5d42cb Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
wiz
ecad7beb9c Bump date. 2010-10-25 07:37:11 +00:00
dholland
6d14a316d9 Mention err/warn. Note that they're generally preferred to perror().
Might want to strengthen the wording.
2010-10-24 23:10:51 +00:00
christos
6540fba480 consistency with c source 2010-07-05 00:45:19 +00:00
jruoho
c6d218be32 .Nm -> .Fn. 2010-04-30 03:52:13 +00:00
jruoho
6adec4717c Fix markup. 2010-04-29 17:17:18 +00:00
wiz
3292536e4b Add punctuation. 2010-04-29 07:27:30 +00:00
jruoho
157d0c3eea Add some STANDARDS lingo, mainly to note the functions that have been
removed from POSIX (2008).
2010-04-29 06:54:26 +00:00
jruoho
8cd9bb9479 Note the recent changes. 2010-04-29 05:42:04 +00:00
jruoho
2da6d4a4d9 Only put the actual header for the .In line. 2010-04-28 07:47:09 +00:00
jruoho
494f19760f Reference ffs32(3). Also note POSIX compliance and the movement of the
header from <string.h> to <strings.h>.
2010-04-28 07:44:04 +00:00
apb
67ca6b24d2 The number of byte pairs to swap is len/2, not len/2+1. 2010-04-18 11:39:39 +00:00
apb
fa3abaaeb7 Bitwise operations on signed types are well-defined if the values
happen to be positive, and indeed the values here were guaranteed
to be positive, but some compilers complained anyway, so convert
the bitwise operations to arithmetic operations.
2010-04-18 10:51:33 +00:00
christos
d403570167 simplify 2010-04-18 04:54:33 +00:00
christos
665a4f86a1 fix lint 2010-04-17 21:42:43 +00:00
wiz
96a3ffaf7c Remove trailing whitespace. 2010-04-17 20:29:20 +00:00
christos
885d0edc52 Change and document for POSIX compliance. 2010-04-17 17:57:39 +00:00
christos
b2cf198a4c add restrict 2010-04-17 17:50:13 +00:00
wiz
24e353786d Join URL. 2010-04-14 13:07:19 +00:00
jruoho
16a83e93ba Add the USENIX paper of Miller and de Raadt to SEE ALSO. 2010-04-14 11:07:20 +00:00
snj
550147bd6a Remove 3rd and 4th clauses in christos' license. OK christos. 2009-10-21 01:07:44 +00:00
joerg
eb96fdd9a2 ffs(3) lives in strings.h, so include the correct header. ANSIfy. 2009-08-05 16:08:00 +00:00
dsl
027bacee22 Use a 'register only' str[c]spn() on 64 bit systems. 2009-07-30 21:42:06 +00:00
dsl
0d34d14bb9 If SRCS contains any .S files then remove the corresponding .c file from
SRCS and add to LSRCS (for lint).
Change the 'string' Makefiles so that the arch/*/string/Makefile.inc
need only specify the .S files for that architecture and not the .c
files for all the files they don't override.
2009-07-30 20:57:15 +00:00
kleink
9be4603670 Declare strsignal(3) in <string.h>, per POSIX-2008, and adjust
documentation accordingly.

Fixes PR standards/41325 from Perry E. Metzger.
2009-07-22 19:48:27 +00:00
wiz
f21bef181d Add comma in enumeration. 2009-07-22 07:07:27 +00:00
joerg
0578c2ad0f Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.
2009-07-21 14:55:32 +00:00
wiz
02079c4a1c Xref popcount(3). 2009-07-21 13:22:15 +00:00
wiz
345d7916c5 Fix typo, add comma in enumeration. 2009-07-21 13:21:41 +00:00
joerg
974b291a6c Add popcount(3) and the long and long long version. Name is inspired by
gnulib, the implementation goes back to the AMD Software Optimizer
guide. A number of platforms will want to replace the C version with
assembler code using native instructions.
2009-07-21 13:18:43 +00:00
dsl
32b43c9199 Remove index() and rindex() from the list (in comment) 2009-07-18 09:41:23 +00:00
wiz
3ae928cec9 Improve formatting and punctuation for "NUL-terminate". 2009-05-02 09:37:32 +00:00
wiz
1de194650d Sort sections. 2009-05-02 09:31:08 +00:00
wiz
f6d35c037f Remove duplicate entry. 2009-05-02 09:31:01 +00:00
perry
be11851995 Add versions of stpcpy(3), stpncpy(3), strnlen(3), all from FreeBSD.
These are defined in the latest POSIX

Also make related updates to documentation, mostly from FreeBSD,
though I cleaned a few other things up along the way.

Bump shlib_version.

We are still missing strcoll_l, strerror_l, strsignal, strxfrm_l to be
POSIX conformant.
2009-05-01 17:27:01 +00:00
christos
497a527565 make this work properly, by moving to the end of the buffer before starting
the search.
remove clauses 3 + 4.
2009-04-11 21:42:16 +00:00
wiz
24e269dafa Split Nm over two lines. 2009-04-10 23:24:35 +00:00
christos
3cf907e2b2 add memrchr 2009-04-10 23:13:38 +00:00
wiz
cc2e7350a1 Bump date for new STANDARDS section. 2009-01-29 10:15:39 +00:00
gdt
04532cd1e6 Note that strdup is specified by POSIX.1. 2009-01-28 19:12:40 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
tnozaki
2af58f1cce 1. reworking PR lib/40317:
libnbcompat already contains empty fparseln.lo
so previous fix doesn't work correctly.
i've just added broken fparseln check to configure script.

2. reworking cross build breakage under FreeBSD/MacOS X.
FreeBSD/MacOS X still have public /usr/include/runetype.h
derived from 4.4BSD-Lite.  so i renamed out private header from
src/lib/libc/locale/runetype.h to src/lib/libc/locale/runetype_local.h
to solve this problems.

3. fix build breakage when CITRUS=no was set.
2009-01-05 06:11:43 +00:00
tnozaki
52ed7b035f Fixes PR lib/39662, shortcomings in LC_{MONETARY,NUMERIC,TIME,MESSAGES} db format.
ok'ed by core and releng.
(thanks for agc@, snj@ and i'm sorry for long time patience).

[libc]
- localeio.[ch] and lc*.[ch] in src/lib/libc/locale was replaced by
  new locale-db implementation using citrus_db backend,
  see src/lib/libc/citrus/citrus_lc_*.[ch].
- add citrus_bcs_strtou?l.c. don't use strtou?l locale implementation
  internally, because they're locale-aware function.
- add some stubs for multi-locale issue, see {current,global}_locale.c.
- remove some obsolete file, setrunelocale.c, ___runetype_mb.c.
- remove __savectype() from ctypeio.[ch].

[tools]
- mklocale(1): add new option ``-t'' that generates new style
  LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format.
- chrtbl(1): added ctypeio.[ch] for __savectype().

[locale-db]
- added en_US.US-ASCII locale.
- removed some shareable locale definition file:
    en_US.US-ASCII -> en_US.ISO8859-1, en_US.UTF-8
    zh_CN.eucCN -> zh_CN.GB18030
    and more...see src/share/locale/*/Makefile.
- remove obsoleted locale sr_YU, added new locale sr_ME, sr_RS.
- change locale name ja_JP.ISO2022-JP* -> ja_JP.ISO-2022-JP*
  for X11's locale.alias file alignments.
- fix regression test, wrong wcs?width(3), NAN/INF usage.

i tested release-build following arch:
  i386, amd64, hpc{mips,arm,sh}, sparc64, vax.

citrus_lc_*.[ch] also can read old-plain-text style locale-db.
so that backward compatibility is keeped, but lc*.[ch] can't read
new citrus_db'ed locale-db and localeio.c never check sanity,
so forward compatibility is broken ;-<

old mklocale(1) doesn't know -t option, so you have to rebuild toolchain.
2009-01-02 00:20:18 +00:00
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