summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
...
* Add restrict qualifiers to the arguments of mbstowcs, mbtowc() andtjr2002-09-014-9/+9
| | | | wcstombs().
* Fix a memory leak.mike2002-09-011-1/+3
|
* Implement the XSI extension which allows the destination string to betjr2002-08-312-6/+48
| | | | | | | NULL, and returns the number of bytes that would be required to store the result of the conversion without storing anything. PR: 17694
* Split ansi.c into a separate source file for each function.tjr2002-08-316-85/+253
|
* Use ntohl() to read cnains number in new formatache2002-08-311-2/+4
|
* 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.
* Style fixache2002-08-301-3/+3
|
* - 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.
* Prepare for switching to unlimited chains format.ache2002-08-302-23/+46
| | | | Optimize chains lookup a bit.
* - 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.
* Print a '-' sign for negative zero. Tested withschweikh2002-08-271-7/+2
| | | | | | | | | | | | | | | | | | | | | #include <stdio.h> int main(void) { printf("%+f\n", -0.0); printf("%+f\n", +0.0); printf("%+f\n", 0.0); return 0; } to output -0.000000 +0.000000 +0.000000 PR: bin/41823 Submitted by: GOTO Kentaro <gotoken@notwork.org> Liked by: bde MFC after: 3 weeks
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-253-3/+3
|
* Fix a bug in __ivaliduser_sa() which caused some rsh/rlogin attemptsjdp2002-08-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | to fail needlessly if a reverse DNS lookup of the IP address didn't come up with a hostname. As a comment in the code clearly stated, the "damn hostname" was looked up only for the purpose of netgroup matching. But if that lookup failed, the function bailed out immediately even though in many cases netgroup matching would not be used. This change marks the hostname as unknown but continues. Where netgroup matching is performed, an unknown hostname is handled conservatively. I.e., for "+@netgroup" (accept) entries an unknown hostname never matches, and for "-@netgroup" (reject) entries an unknown hostname always matches. In the lines affected (only), I also fixed a few bogus casts. There are others, and in fact this entire file would be a good candidate for a cleanup sweep. Reviewed by: imp (wearing his flourescent yellow Security Team cap) MFC after: 2 days
* Note that <sys/types.h> in no longer a prerequisite for <utime.h> andmike2002-08-248-8/+0
| | | | <sys/mman.h>.
* We cannot use an alloc with only inputs and/or locals. The kernelmarcel2002-08-231-11/+16
| | | | | | assumes that the parameters are passed in output registers. Remove the alloc entirely, but don't depend on the kernel not trashing our registers.
* Fixed getaddrinfo to honor sortlist in /etc/resolv.confpirzyk2002-08-211-0/+82
| | | | | | | PR: bin/27939 Reviewed by: ru, sheldonh (about a year ago) Obtained from: ume (via KAME, I think) MFC after: 1 month
* s/EDOFUS/EDOOFUS/phk2002-08-213-5/+5
| | | | Persuaded by: Google
* o Merge <machine/ansi.h> and <machine/types.h> into a new headermike2002-08-2110-12/+12
| | | | | | | | | | | | | | | | | | | | | called <machine/_types.h>. o <machine/ansi.h> will continue to live so it can define MD clock macros, which are only MD because of gratuitous differences between architectures. o Change all headers to make use of this. This mainly involves changing: #ifdef _BSD_FOO_T_ typedef _BSD_FOO_T_ foo_t; #undef _BSD_FOO_T_ #endif to: #ifndef _FOO_T_DECLARED typedef __foo_t foo_t; #define _FOO_T_DECLARED #endif Concept by: bde Reviewed by: jake, obrien
* Add a manual page for wcwidth().tjr2002-08-202-1/+63
|
* 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.
* Remove wcswidth.c from here (and move it to "string")ache2002-08-202-65/+1
|
* Remove space at the end of continuation line in prev. commitache2002-08-201-1/+1
|
* xdr.3 is added to MAN in ../xdr/Makefile.inc where it belongs, so don'tbde2002-08-191-1/+1
| | | | add it here.
* Implement wcswidth()ache2002-08-192-2/+66
|
* Use modern-style arguments declarationache2002-08-191-2/+1
|
* Write null wide-character as L'\0' like in other placesache2002-08-191-1/+1
|
* According to SUSv2, always return 0 for null wide-character codeache2002-08-191-1/+6
|
* s/trailing NULL/trailing NUL/jmallett2002-08-192-2/+2
|
* Move internal defines from ctype.h hereache2002-08-191-0/+4
|
* Leave room for a trailing NUL not a NULL, that's not an ASCII character.jmallett2002-08-192-2/+2
|
* Implement the ISO C90 Amd.1 restartable wide and multibyte charactertjr2002-08-1813-4/+1020
| | | | | manipulation functions mbrlen(), mbrtowc(), mbsinit(), mbsrtowcs(), wcrtomb(), wcsrtombs().
* Move wcwidth() to separate file, it doesn't belong to iswctype.c at allache2002-08-173-11/+58
|
* According to SUSv2, wcwidth() should return -1 for non-printing charactersache2002-08-171-1/+1
|
* Cosmetic - remove unneded brackets and #undefache2002-08-172-41/+40
|
* wcwidth: fix espression to work correctly with SWIDTH0ache2002-08-171-2/+4
|
* Fix libc build breakage by defining FSTYPENAMES before includingbmilekic2002-08-161-0/+1
| | | | | | | disklabel.h; broken originally by 1.87 of sys/disklabel.h, which made the split between DKTYPENAMES and FSTYPENAMES. Someone who knows disklabel.c: do we still need DKTYPENAMES to be defined here now?
* Add iswctype wcwidth function codekeichii2002-08-161-0/+10
| | | | | | | Submitted by: clkao@clkao.org Reviewed by: keichii Obtained from: NetBSD MFC after: 1 month
* - Fix a bug that wrote one char behind the end of therobert2002-08-151-6/+3
| | | | | | | | | | | | | | supplied buffer in case the size of it was equal to the number of characters the converted address consumed. The bug occurred when converting an AF_INET address. - Remove the SPRINTF macro and use sprintf instead. - Do not do string formatting using sprintf(3) and a temporary buffer which is copied when the supplied buffer provides enough space. Instead, use snprintf(3) and the real destination buffer, thus avoid the copy. Reported by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> (1) PR: misc/41289
* Put each function argument on its own line to keep lines shorterrobert2002-08-151-1/+6
| | | | than 80 columns.
* Use one line for each function argument to keep the linerobert2002-08-152-2/+11
| | | | | | | width smaller than 80 columns. Thanks to Ruslan for an explanation of multiple ways to achieve this.
* Removed duplicated MLINKS which make(1) recently started warning about.bde2002-08-151-2/+0
|
* Include <stdlib.h> to have abort() and exit() declared.robert2002-08-151-0/+1
|
* - For compliance with IEEE Std 1003.1-2001, add the 'restrict'robert2002-08-155-17/+11
| | | | | | qualifier to function prototypes and definitions where appropriate using the '__restrict' macro. - Update the manual page.
* - Introduce the 'restrict' qualifier to function prototypes androbert2002-08-155-8/+8
| | | | | definitions to comply with IEEE Std 1003.1-2001. - Update the manual pages.
* - Add the 'restrict' qualifier to the function prototypes androbert2002-08-1512-41/+17
| | | | | | | | definitions of the functions that convert strings to numbers and are defined by IEEE Std 1003-1.2001. - Use ANSI-C function definitions for all of the functions mentioned above plus strtouq and strtoq. - Update the prototypes in the manual pages.
* - Add the 'restrict' qualifier to the function definitions androbert2002-08-143-10/+4
| | | | | | | | public prototypes of setbuf(3) and setvbuf(3) using the '__restrict' macro from <sys/cdefs.h> to be compliant with IEEE Std 1003.1-2001. - Replace the K&R with ANSI-C function definitions. - Bring the manual page up-to-date.
OpenPOWER on IntegriCloud