Commit Graph

790 Commits

Author SHA1 Message Date
tjr
a96fc812c3 Add implementations of wscanf() and related functions: fwscanf(), swscanf(),
vfwscanf(), vswscanf(), vwscanf(). As the name suggests, these are wide-
character versions of the scanf() family of functions.
2002-09-23 12:40:06 +00:00
tjr
441dd35939 Add the remaining C99 wide character string to integer conversion functions.
Restrict qualifiers were added to the existing prototypes in <inttypes.h>
and the typedef for wchar_t was removed.
2002-09-22 08:06:45 +00:00
bde
4f42bc29f9 Whitespace cleanup (half for fixing missing whitespace before `__restrict'
again).

Removed the second pair of banal comments about `quot' and `rem'.
2002-09-21 22:05:37 +00:00
bde
afd23e410d Whitespace fixes (mainly for a space instead of a tab after #define). 2002-09-21 21:28:25 +00:00
tjr
a399903ed4 Add implementations of the wprintf() family of functions, which perform
formatted wide-character output.
2002-09-21 13:00:30 +00:00
tjr
d4d7777ee9 Restrict visibility of wcslcat() and wcslcpy() to the __BSD_VISIBLE case. 2002-09-21 08:55:16 +00:00
wollman
60551e08f5 Define constants for those POSIX options and option groups which are
(or would be) implemented (or not) exclusively in user-land.  A threads
expert should check over the values I have set to make sure that they
correctly reflect reality.

Move all sysconf() keys here from <sys/unistd.h> as they are not implemented
in the kernel.  Add new keys from 1003.1-2001 final text.  (Some additional
keys are expected in TC1.)

Add some protection against redundant declarations between <stdlib.h>
and <unistd.h> for some functions which XSI requires in the former and
BSD traditionally declares in the latter.  Restrict qualifiers and other
changes from 1003.1-2001 have not been made to the functions prototyped here.

(3 of 5)
2002-09-21 02:08:32 +00:00
wollman
3b6273dfaf Use new visibility macros. Reorder some disordered declarations. Add
new 1003.1-2001 declarations, commented out in cases where we do not
implement the function.  Note that strtoq() and strtouq() are slated
for deletion in 6.0.  (2 of 5)
2002-09-21 02:03:58 +00:00
wollman
e0dc70e091 Use new visibility macros. (1 of 5) 2002-09-21 02:00:44 +00:00
wollman
d8d5a39838 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
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
2002-09-21 01:28:41 +00:00
mike
2304e21090 Fix an error which prevented ssize_t from becoming defined. Add
restrict type-qualifier.
2002-09-20 08:22:48 +00:00
peter
458edebe8b Add dev/iicbus and dev/smbus to LSUBDIRS list 2002-09-19 03:28:52 +00:00
alfred
55ef0ca67d Install _semaphore.h. 2002-09-19 01:13:31 +00:00
mike
686a79f41c style(9): tab after #define. 2002-09-18 22:23:59 +00:00
mike
8b527a6030 o Don't include <nl_types.h>, instead provide a typedef for nl_item.
o Use relatively new visibility primitives to conditionalize some
  constants.
2002-09-18 05:54:25 +00:00
mike
77d98323f6 Move definition of nl_item type to <sys/_types.h>, so that it can be
shared.
2002-09-18 05:51:23 +00:00
mike
21e2fed64f Use relatively new visibility primitives for conditionals. Document
unimplemented functions.
2002-09-18 02:07:08 +00:00
mike
48cf66e196 style(9): line up function names 2002-09-17 22:39:43 +00:00
mike
daf51c23b8 Use the relatively new visibility primitives for conditionals. 2002-09-17 22:25:40 +00:00
peter
3c7c11fd3e Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
tjr
238ea7422c Add wcstod() as a wrapper around strtod(). It does not handle any characters
that strtod() does not (alternate digit characters, etc. are not handled).
2002-09-15 08:38:51 +00:00
tjr
e63a7cf8b4 Style: tab between #define and macro name. 2002-09-12 23:33:17 +00:00
tjr
69c5d484ee Protect arguments to the putwc and putwchar macros with parens. 2002-09-12 10:27:48 +00:00
tjr
a371cd3f71 Add an implementation of wcsftime() (wide character version of strftime()). 2002-09-11 08:57:11 +00:00
mike
3213d10c61 Conditionalize some objects to match the functions that they are used
with.  Enable `restrict' type-qualifier.
2002-09-11 05:04:06 +00:00
mike
a6dd9197a0 Fix some style bugs:
o Space used instead of a tab after `#define' and `typedef'.
o Sentences not ended with a period.
o Unaligned function names and other spacing issues.
2002-09-10 18:41:45 +00:00
mike
89d2df287d Fix namespace issues by using the relatively new visibility
primitives.
2002-09-10 18:12:16 +00:00
tjr
4d3ff5375a Replace FILE with struct __sFILE in the prototypes for the wide character
I/O functions to avoid having to bring in pollution from <stdio.h>.

Suggested by:	bde
2002-09-10 09:43:28 +00:00
wollman
91fc54b14f Without fixing the namespace issues, add prototypes for the new _Exit()
and qsort_r() functions.  Fix one other missorted declaration.
2002-09-10 02:02:49 +00:00
tjr
fbdbd4df50 Remove the typedef of wctype_t from this header; we don't support the
XSI mistake of making everything from <wctype.h> visible here.
If we did choose to support it, we could just #include <wctype.h>.
2002-09-09 07:17:55 +00:00
mike
f159fe8b29 Solve the <runetype.h> pollution problem by disabling inline
optimizations when a standard has been requested, except when the
inline optimizations are also specifically requested.
2002-09-09 05:38:05 +00:00
mike
1f51bf50aa style(9): line up function names. 2002-09-09 03:52:43 +00:00
tjr
6d330c09f5 Add wcstol() and wcstoul(), based on strtol() and strtoul(). 2002-09-08 13:27:26 +00:00
tjr
1da5db1bd1 Add an implementation of wcstok(), based on strtok_r(). 2002-09-07 08:16:57 +00:00
tjr
58ab355dc3 Add restrict qualifiers to wcsstr()'s arguments. 2002-09-07 03:38:13 +00:00
tjr
e841a730a7 Style: One space between "restrict" qualifier and "*". 2002-09-06 11:24:06 +00:00
mike
838634c022 o Fix namespace scope issues in <ctype.h> by using the relatively new
visibility primitives.
o Implement _tolower() and _toupper() POSIX.1-2001 (XSI) macros in
  <ctype.h>.
o Reduce pollution in <runetype.h> by removing typedefs and using
  implementation namespaced types.
o Add a typedef in <rune.h> to compensate for <runetype.h> losing its
  typedefs.

Reviewed by:	bde
2002-09-06 04:22:54 +00:00
alfred
6ca29ba04d remove #pragma ident 2002-09-04 23:58:23 +00:00
mike
6b443bc289 Now that _BSD_CLK_TCK_ and _BSD_CLOCKS_PER_SEC_ are the same on all
architectures, move the definition directly into <time.h> and finish
the removal of <machine/ansi.h>.
2002-09-03 00:06:58 +00:00
mike
14454c3f09 Be more explicit about a namespace by using the relatively new
visibility primitives.
2002-09-01 17:57:20 +00:00
tjr
a54a864f42 Add restrict qualifiers to the arguments of mbstowcs, mbtowc() and
wcstombs().
2002-09-01 07:08:22 +00:00
mike
2bddbca3f6 Add time_t typedef for POSIX compatibility, move an include. 2002-08-24 00:11:52 +00:00
peter
86e60b1181 Use sys/nlist_aout.h for shared-with-kernel definitions. 2002-08-22 20:37:57 +00:00
peter
725774589c Use sys/link_elf.h or sys/link_aout.h based on compile environment 2002-08-22 20:37:30 +00:00
mike
5d0fbddc4d o Merge <machine/ansi.h> and <machine/types.h> into a new header
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
2002-08-21 16:20:02 +00:00
tjr
260d9ffb0f Restrict visibility of wcwidth() and wcswidth(); they are XSI extensions. 2002-08-20 22:44:40 +00:00
ache
eee039d5de Sort unsorted prototypes 2002-08-19 21:00:13 +00:00
ache
7b5c1dee36 Activate (uncomment) wcwidth() and wcswidth() now implemented 2002-08-19 20:48:18 +00:00
ache
c3f06cc0f0 Move internal defines from here to libc/locale/wcwidth.c 2002-08-19 08:58:51 +00:00
ache
8ca3309a23 Properly define SWIDTH1, add autowidth (was SWIDTH1) 2002-08-19 08:50:41 +00:00