summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Improve three instances of questionable or confusing grammar.Tim J. Robbins2002-10-031-5/+8
| | | | Notes: svn path=/head/; revision=104409
* Add an example.Tim J. Robbins2002-10-031-1/+22
| | | | Notes: svn path=/head/; revision=104408
* Document towlower() and towupper() in separate manual pages instead ofTim J. Robbins2002-10-033-24/+89
| | | | | | | | trying to confusingly document both on the same page. The new manual pages are based on tolower(3) and toupper(3) instead of the old towlower(3). Notes: svn path=/head/; revision=104406
* Point out that although toupper() and tolower() really accept rune_t'sTim J. Robbins2002-10-032-4/+28
| | | | | | | | and not just unsigned char's, callers should use towupper() and towlower() instead when working with wide characters if portability is a concern. Notes: svn path=/head/; revision=104405
* towlower() appeared twice in the synopsis; one of the occurrences shouldTim J. Robbins2002-10-031-3/+3
| | | | | | | | | have been towupper(). Add towupper() to the Name section while I'm at it. Obtained from: NetBSD (junyoung) Notes: svn path=/head/; revision=104403
* Add an Examples section with an example of how to use the functions.Tim J. Robbins2002-10-033-3/+54
| | | | Notes: svn path=/head/; revision=104402
* Add missing const qualifier in tfind().Mike Barcroft2002-10-032-2/+2
| | | | Notes: svn path=/head/; revision=104400
* Add a man page for the KSE system calls.Archie Cobbs2002-10-022-1/+586
| | | | | | | Reviewed by: julian, ru Notes: svn path=/head/; revision=104382
* Add an example showing how to use wcstok(). Fix ordering of See Also section.Tim J. Robbins2002-10-021-2/+15
| | | | Notes: svn path=/head/; revision=104372
* Add the 'restrict' type qualifier to the prototypes of `sigaction',Robert Drehmel2002-10-024-4/+9
| | | | | | | | | `sigprocmask', `sigaltstack', and `sigwait' as well as to the prototypes of the apparantly unimplemented functions `sigtimedwait' and `sigwaitinfo'. This complies with IEEE Std 1003.1-2001. Notes: svn path=/head/; revision=104368
* Add restrict type-qualifier.Mike Barcroft2002-10-024-14/+15
| | | | Notes: svn path=/head/; revision=104358
* Too strict error checking in rev. 1.22 broke pwd_mkdb(8) in NISMaxim Konovalov2002-10-021-2/+2
| | | | | | | | | environment. An empty UID and GID are valid there. Spotted by: rwatson Notes: svn path=/head/; revision=104348
* Remove the "special processes" section. It has rotted, and the ideaDima Dorfman2002-10-021-7/+0
| | | | | | | | | | | ceased to be useful when the number of "special processes" went from 3 to one per device. I considered replacing it with a "kernel threads" section, but this seemed like the wrong place for that. PR: 40969 Notes: svn path=/head/; revision=104330
* Don't claim to return the fileid which we unloaded. The kernelDima Dorfman2002-10-011-9/+1
| | | | | | | | | | | doesn't do this, and it wouldn't be very useful if it did, since the caller supplies us with that number. PR: 41329 Submitted by: Michael Galassi <nerd@xyz.com> Notes: svn path=/head/; revision=104329
* Add getopt_long(3).Eric Melville2002-09-293-2/+771
| | | | | | | | Obtained from: NetBSD Sponsored by: Apple Notes: svn path=/head/; revision=104128
* Remove masking macros for getwc(), putwc(), putwchar() and getwchar().Tim J. Robbins2002-09-284-12/+4
| | | | | | | | | Although there was nothing wrong with getwc() and putwc(), getwchar() and putwchar() assumed that <stdio.h> had been included before <wchar.h>, which is not allowed by the standard. Notes: svn path=/head/; revision=104080
* Zap now-unused SHLIB_MINORPeter Wemm2002-09-281-1/+0
| | | | Notes: svn path=/head/; revision=104073
* Back out previous, free the buffer when __vfprintf() fails and don't botherTim J. Robbins2002-09-261-19/+13
| | | | | | | trying to shrink the buffer with realloc() before returning it. Notes: svn path=/head/; revision=104001
* Back out previous and solve the problems a different way: move va_start/Tim J. Robbins2002-09-261-20/+13
| | | | | | | | | | | va_end closer to the __vfprintf() call, free the buffer when __vfprintf() fails and don't bother trying to shrink the buffer with realloc() before returning it. Submitted by: bde Notes: svn path=/head/; revision=104000
* Simplify by removing unneeded local variables and explicit null termination.Tim J. Robbins2002-09-261-12/+8
| | | | Notes: svn path=/head/; revision=103999
* Simplify by removing useless local variables and explicit null termination.Tim J. Robbins2002-09-261-9/+5
| | | | Notes: svn path=/head/; revision=103998
* Correctly handle the case where __vfwprintf() fails because it runs outTim J. Robbins2002-09-261-1/+7
| | | | | | | of memory. Notes: svn path=/head/; revision=103997
* Sync with OpenBSD: avoid memory leak when __vfprintf() fails because itTim J. Robbins2002-09-262-24/+39
| | | | | | | runs out of memory, always call va_end. Notes: svn path=/head/; revision=103996
* <sys/types.h> is no longer needed.Mike Barcroft2002-09-251-1/+0
| | | | Notes: svn path=/head/; revision=103971
* Disqualify UID/GID with non-numeric character.Maxim Konovalov2002-09-251-3/+13
| | | | | | | | | PR: bin/41721 Reviewed by: tjr, silence on -audit MFC after: 2 weeks Notes: svn path=/head/; revision=103958
* Use the standardized CHAR_BIT constant instead of NBBY in userland.Mike Barcroft2002-09-251-2/+3
| | | | Notes: svn path=/head/; revision=103949
* Warn when setinvalidrune() is referenced for consistency with the restTim J. Robbins2002-09-241-0/+1
| | | | | | | | of the rune functions (except sgetrune() and sputrune(), which are really macros). Notes: svn path=/head/; revision=103892
* Add cross-references between wide character and single-byte characterTim J. Robbins2002-09-243-2/+6
| | | | | | | versions of printf() and scanf(). Notes: svn path=/head/; revision=103891
* Remove an unneeded call to _sfrefill() that was missed in the conversionTim J. Robbins2002-09-241-6/+0
| | | | | | | | from vfscanf() to vfwscanf(). It doesn't hurt to have it there, but it's redundant since __fgetwc() will refill the buffer if it needs to. Notes: svn path=/head/; revision=103890
* Use the new va_copy macro to copy variable argument lists instead ofTim J. Robbins2002-09-242-2/+2
| | | | | | | | | | | assignment. This is needed on powerpc but is also more correct for the other ports. Submitted by: grehan Tested on: alpha, i386, sparc64 Notes: svn path=/head/; revision=103876
* Add implementations of wscanf() and related functions: fwscanf(), swscanf(),Tim J. Robbins2002-09-239-6/+1530
| | | | | | | | vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide- character versions of the scanf() family of functions. Notes: svn path=/head/; revision=103856
* Implement the %lc, %ls and %[ conversions, which read sequences of wideTim J. Robbins2002-09-232-16/+137
| | | | | | | | characters, non-whitespace wide character strings and wide character strings in a scanset. Notes: svn path=/head/; revision=103854
* The character argument for __ungetwc() should be wint_t instead of wchar_t.Tim J. Robbins2002-09-231-1/+1
| | | | Notes: svn path=/head/; revision=103853
* Add the remaining C99 wide character string to integer conversion functions.Tim J. Robbins2002-09-226-16/+550
| | | | | | | | Restrict qualifiers were added to the existing prototypes in <inttypes.h> and the typedef for wchar_t was removed. Notes: svn path=/head/; revision=103793
* Add an unlocked version of ungetwc(), __ungetwc(), that __vfwscanf()Tim J. Robbins2002-09-222-9/+22
| | | | | | | will need to use. Notes: svn path=/head/; revision=103782
* Style cleanup:Jonathan Mini2002-09-211-14/+11
| | | | | | | | | | | | | | - Sort local variable declarations. - Protect a hand-formatted comment from indent(1). - Use portable casts, even though this is machine-dependant code. - Remove extraneous blank lines. - Remove trailing newline. - Use sigdelset(3), not SIGDELSET(9). Requested by: bde Notes: svn path=/head/; revision=103769
* Delete stray reference to vsnprintf().Tim J. Robbins2002-09-211-3/+2
| | | | Notes: svn path=/head/; revision=103740
* Add implementations of the wprintf() family of functions, which performTim J. Robbins2002-09-2110-4/+2434
| | | | | | | formatted wide-character output. Notes: svn path=/head/; revision=103739
* Initiate deorbit burn sequence for sysctl CTL_USER MIB branch.Garrett Wollman2002-09-211-105/+351
| | | | | | | | | | | | | | | | Use the correct constants directly from sysconf() rather than calling sysctl() to tell us the (still compiled-in) value. Leave the CTL_POSIX1B stuff alone for now (but I'd like to see this replaced with a single structure returning all of the relevant information). Implement all of the keys from 1003.1-2001 that we can. Ensure that the build will break if someone redefines an option constant to zero without implementing the necessary presence-detection logic here. (4 of 5) Notes: svn path=/head/; revision=103730
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structGarrett Wollman2002-09-214-34/+184
| | | | | | | | | | | | | | | | | | | hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch Notes: svn path=/head/; revision=103726
* Remove unnecessary #include <assert.h>; it was used to bring in theTim J. Robbins2002-09-2120-20/+0
| | | | | | | _DIAGASSERT macro on NetBSD, but we don't need it. Notes: svn path=/head/; revision=103724
* Revert previous commit to unbreak world until we figure out theArchie Cobbs2002-09-205-5/+5
| | | | | | | right way to do it. Notes: svn path=/head/; revision=103686
* Lock the file once per call and use the unlocked fgetwc()/fputwc() variants.Tim J. Robbins2002-09-202-9/+20
| | | | Notes: svn path=/head/; revision=103678
* Lock and unlock the file once per call and use the unlocked version ofTim J. Robbins2002-09-201-7/+11
| | | | | | | ungetc() instead of having ungetc() recurse on the lock. Notes: svn path=/head/; revision=103677
* Introduce unlocked versions of fputwc() and fgetwc() called __fputwc()Tim J. Robbins2002-09-203-18/+44
| | | | | | | and __fgetwc() which can be used when we know the file is locked. Notes: svn path=/head/; revision=103676
* Add restrict type-qualifier.Mike Barcroft2002-09-202-2/+3
| | | | Notes: svn path=/head/; revision=103668
* Don't peek into MD structures from MI code. The getcontext(3) andJonathan Mini2002-09-201-9/+1
| | | | | | | setcontext(3) functions check the validify of the mcontext_t structs. Notes: svn path=/head/; revision=103666
* Fix a problem with the definition of HUGE_VAL causing the gcc warningArchie Cobbs2002-09-195-5/+5
| | | | | | | | | "cast increases required alignment of target type" on some platforms. Reviewed by: bde Notes: svn path=/head/; revision=103653
* Implement the %ls and %lc conversions for printing wide character stringsTim J. Robbins2002-09-192-14/+110
| | | | | | | | | and wide characters. These were already documented in the manual page, with an entry mentioning that they were not implemented yet. The XSI %S and %C synoyms have not been added. Notes: svn path=/head/; revision=103633
* Add forgotten newlines in debug messages.Jacques Vidrine2002-09-191-2/+2
| | | | Notes: svn path=/head/; revision=103630