Commit Graph

32 Commits

Author SHA1 Message Date
Ed Schouten
10bc3a7f42 ANSIfy almost all applications that use WARNS=6.
I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.
2009-12-29 22:53:27 +00:00
Xin LI
821df508e8 Revert most part of 200420 as requested, as more review and polish is
needed.
2009-12-13 03:14:06 +00:00
Xin LI
6f2d322192 Remove unneeded header includes from usr.bin/ except contributed code.
Tested with:	make universe
2009-12-11 23:35:38 +00:00
Ed Schouten
523a386d23 Make mklocale work again, now that fwrite()'s return codes are different.
Submitted by:	Navdeep Parhar <nparhar gmail com>
Approved by:	re (kib)
2009-07-14 09:19:33 +00:00
Andrey A. Chernov
8d4b16f8bb Understand newly introduced "ASCII" encoding 2008-01-22 00:04:50 +00:00
Kevin Lo
8bcd62f2ff Use NULL instead of 0 for the return value of fopen().
Approved by: re (kensmith)
2007-09-21 01:55:11 +00:00
Kevin Lo
9c20ad30e0 getopt(3) returns -1, not EOF. 2007-02-06 08:48:28 +00:00
Ruslan Ermilov
228f8c4f8b Make <runefile.h> internal to libc.
Suggested by:	phantom
2005-05-16 09:32:41 +00:00
Ruslan Ermilov
3fb3a43079 Make the format of LC_CTYPE files architecture independent by
introducing the disk formats for _RuneLocale and friends.

The disk formats do not have (useless) pointers and have 32-bit
quantities instead of rune_t and long.  (htonl(3) only works
with 32-bit quantities, so there's no loss).

Bootstrap mklocale(1) when necessary.  (Bootstrapping from 4.x
would be trivial (verified), but we no longer provide pre-5.3
source upgrades and this is the first commit to actually break
it.)
2005-02-26 21:47:54 +00:00
Tim J. Robbins
79db6648d6 Use <runetype.h> instead of <rune.h> since the latter is going away. 2004-10-17 03:02:50 +00:00
Tim J. Robbins
f25843fddd Remove explicit support for generating LC_CTYPE data files that specify
the obsolete "UTF2" encoding.
2004-10-17 01:08:11 +00:00
Tim J. Robbins
ddc1eded85 Prefix the names of members of _RuneLocale and its sub-structures
with ``__'' to avoid polluting the namespace. This doesn't change the
documented rune interface at all, but breaks applications that accessed
_RuneLocale directly.
2004-06-23 07:01:44 +00:00
David Xu
6d7a04b013 Add gb2312 encoding. 2003-11-05 22:52:51 +00:00
Andrey A. Chernov
6557df8216 Allow GB18030 locale 2003-07-29 07:56:05 +00:00
Philippe Charnier
d4d2557dc5 Bump WARNS to 6. Add usage(). Use provided xmalloc() instead of malloc().
Use err().
2003-06-17 19:58:33 +00:00
Andrey A. Chernov
3146eb4004 Change fatal to warnx() for unknown encoding 2003-06-03 16:58:31 +00:00
Andrey A. Chernov
92b49d4efa Hardcore supported encodings list 2003-06-02 19:54:29 +00:00
Tim J. Robbins
148f804340 Mark the INVALID keyword as being deprecated since the concept of
"invalid runes" is useless without the rest of the deprecated rune interface.
2002-12-21 11:37:05 +00:00
Andrey A. Chernov
72d26fe4c9 Use more verbose diagnostics for wrong DIGIT range 2002-10-20 23:09:26 +00:00
Andrey A. Chernov
4bcccb2ebd Add checks for DIGIT set consistency to prevent common misinterpretation
automatically.
Remove output file on error.
Staticize functions declared as static.
2002-10-20 19:56:15 +00:00
Alfred Perlstein
da8de1e204 WARNS=4 2002-07-14 18:23:22 +00:00
Alfred Perlstein
12c9f2fd76 WARNS=2, de-__P() 2002-07-14 18:16:06 +00:00
Mark Murray
046f5106a7 Declarations cleanup; make sure externs are in a common header.
Fix declarations, casts and return values.
2002-04-28 12:34:54 +00:00
Dag-Erling Smørgrav
d397408818 Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Mike Barcroft
fd8e4ebc8c o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
  source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
  Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
  POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
  and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
  complexities associated with having MD (asm and inline) versions, and
  having to prevent exposure of these functions in other headers that
  happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
  third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on:	alpha, i386
Reviewed by:	bde, jake, tmm
2002-02-18 20:35:27 +00:00
Peter Wemm
ec26f57025 Initialize fp in main() 2001-08-13 21:57:12 +00:00
David E. O'Brien
f506ed7467 There is a problem in that one cannot use ctype.h at the same time as parts
of the C++ stdlib.  Our ctype.h uses symbols of the form _<X> to denote the
various character classes.  Our ctype.h also extends the usual ctype.h
offering by adding the "_T" (special) class.  Problem is parts of the STL
also use the symbol "_T" as its parameterized type.  These two uses are
incompatible.

Thus change the form of the symbols used in ctype to something that fixes
the current problem and is less likely to cause conflicts in the future.

Requested by:	Tomoaki NISHIYAMA <tomoaki@biol.s.u-tokyo.ac.jp>
Ok'ed by:	JKH
2000-02-08 07:43:26 +00:00
Bruce Evans
c513aafea1 Fixed printf format errors. 1998-08-02 15:18:45 +00:00
John Birrell
32744e40cd Add #include <string.h> to get prototypes. 1998-02-20 04:48:37 +00:00
Andrey A. Chernov
5e572a7e34 Fix bugs in runes data handling
Should go into 2.2
Submitted by: Mitsuru IWASAKI <iwasaki@pc.jaring.my>
1997-01-07 09:58:32 +00:00
Bruce Evans
8b69568f11 u_long -> unsigned long so that we don't depend on namespace pollution
in <stdio.h>.
1994-09-05 14:02:42 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00