diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /include | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) |
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile | 2 | ||||
-rw-r--r-- | include/ar.h | 2 | ||||
-rw-r--r-- | include/assert.h | 2 | ||||
-rw-r--r-- | include/ctype.h | 144 | ||||
-rw-r--r-- | include/grp.h | 2 | ||||
-rw-r--r-- | include/kvm.h | 4 | ||||
-rw-r--r-- | include/nlist.h | 2 | ||||
-rw-r--r-- | include/octype.h | 82 | ||||
-rw-r--r-- | include/protocols/dumprestore.h | 2 | ||||
-rw-r--r-- | include/pwd.h | 2 | ||||
-rw-r--r-- | include/rpcsvc/Makefile | 4 | ||||
-rw-r--r-- | include/rune.h | 66 | ||||
-rw-r--r-- | include/runetype.h | 101 | ||||
-rw-r--r-- | include/setjmp.h | 2 | ||||
-rw-r--r-- | include/skey.h | 36 | ||||
-rw-r--r-- | include/stddef.h | 12 | ||||
-rw-r--r-- | include/stdio.h | 8 | ||||
-rw-r--r-- | include/stdlib.h | 48 | ||||
-rw-r--r-- | include/time.h | 2 | ||||
-rw-r--r-- | include/utmp.h | 2 | ||||
-rw-r--r-- | include/varargs.h | 2 |
21 files changed, 443 insertions, 84 deletions
diff --git a/include/Makefile b/include/Makefile index a00e9575c3b0..545998a239d5 100644 --- a/include/Makefile +++ b/include/Makefile @@ -15,7 +15,7 @@ FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \ paths.h pwd.h queue.h ranlib.h regex.h resolv.h setjmp.h \ sgtty.h stab.h stdarg.h stddef.h stdio.h stdlib.h string.h strings.h \ struct.h sysexits.h time.h ttyent.h tzfile.h unistd.h utime.h utmp.h \ - varargs.h vis.h + varargs.h vis.h octype.h rune.h runetype.h skey.h MFILES= float.h floatingpoint.h frame.h LFILES= errno.h fcntl.h signal.h syslog.h syscall.h termios.h diff --git a/include/ar.h b/include/ar.h index 7aacb441cfd3..19bc23fbb2bc 100644 --- a/include/ar.h +++ b/include/ar.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: ar.h,v 1.1.1.1.2.1 1994/05/04 07:37:40 rgrimes Exp $ + * $Id: ar.h,v 1.2 1994/05/04 08:08:20 rgrimes Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. diff --git a/include/assert.h b/include/assert.h index 99b1d8320282..9ffd6c6e2549 100644 --- a/include/assert.h +++ b/include/assert.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: assert.h,v 1.2.2.1 1994/05/04 07:37:42 rgrimes Exp $ + * $Id: assert.h,v 1.3 1994/05/04 08:08:25 rgrimes Exp $ */ /*- * Copyright (c) 1992 The Regents of the University of California. diff --git a/include/ctype.h b/include/ctype.h index cdfddcbb81b2..f3000073c259 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -5,11 +5,14 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: ctype.h,v 1.2.2.1 1994/05/04 07:37:44 rgrimes Exp $ + * $Id: ctype.h,v 1.6 1994/05/04 08:50:12 rgrimes Exp $ */ /* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,53 +42,112 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ctype.h 5.3 (Berkeley) 4/3/91 + * @(#)ctype.h 8.1 (Berkeley) 6/6/93 */ -#ifndef _CTYPE_H_ +#ifndef _CTYPE_H_ #define _CTYPE_H_ -#include <sys/cdefs.h> +#ifndef _ANSI_SOURCE +#include <runetype.h> +#endif + +#define _A 0x00000100L /* Alpha */ +#define _C 0x00000200L /* Control */ +#define _D 0x00000400L /* Digit */ +#define _G 0x00000800L /* Graph */ +#define _L 0x00001000L /* Lower */ +#define _P 0x00002000L /* Punct */ +#define _S 0x00004000L /* Space */ +#define _U 0x00008000L /* Upper */ +#define _X 0x00010000L /* X digit */ +#define _B 0x00020000L /* Blank */ +#define _R 0x00040000L /* Print */ +#define _I 0x00080000L /* Ideogram */ +#define _T 0x00100000L /* Special */ +#define _Q 0x00200000L /* Phonogram */ -#define _U 0x01 -#define _L 0x02 -#define _N 0x04 -#define _S 0x08 -#define _P 0x10 -#define _C 0x20 -#define _X 0x40 -#define _B 0x80 +#define isalnum(c) __istype((c), (_A|_D)) +#define isalpha(c) __istype((c), _A) +#define iscntrl(c) __istype((c), _C) +#define isdigit(c) __isctype((c), _D) /* ANSI -- locale independent */ +#define isgraph(c) __istype((c), _G) +#define islower(c) __istype((c), _L) +#define isprint(c) __istype((c), _R) +#define ispunct(c) __istype((c), _P) +#define isspace(c) __istype((c), _S) +#define isupper(c) __istype((c), _U) +#define isxdigit(c) __isctype((c), _X) /* ANSI -- locale independent */ -extern char _ctype_[]; +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#define isascii(c) ((c & ~0x7F) == 0) +#define toascii(c) ((c) & 0x7F) +#define digittoint(c) __istype((c), 0xFF) +#define isideogram(c) __istype((c), _I) +#define isphonogram(c) __istype((c), _Q) +#define isspecial(c) __istype((c), _T) +#define isblank(c) __istype((c), _B) +#define isrune(c) __istype((c), 0xFFFFFF00L) +#define isnumber(c) __istype((c), _D) +#define ishexnumber(c) __istype((c), _X) +#endif +/* See comments in <machine/ansi.h> about _BSD_RUNE_T_. */ __BEGIN_DECLS -int isdigit __P((int)); -int islower __P((int)); -int isspace __P((int)); -int ispunkt __P((int)); -int isupper __P((int)); -int isalpha __P((int)); -int isxdigit __P((int)); -int isalnum __P((int)); -int isprint __P((int)); -int isgraph __P((int)); -int iscntrl __P((int)); -int toupper __P((int)); -int tolower __P((int)); +unsigned long ___runetype __P((_BSD_RUNE_T_)); +_BSD_RUNE_T_ ___tolower __P((_BSD_RUNE_T_)); +_BSD_RUNE_T_ ___toupper __P((_BSD_RUNE_T_)); __END_DECLS -#define isdigit(c) ((_ctype_ + 1)[c] & _N) -#define islower(c) ((_ctype_ + 1)[c] & _L) -#define isspace(c) ((_ctype_ + 1)[c] & _S) -#define ispunct(c) ((_ctype_ + 1)[c] & _P) -#define isupper(c) ((_ctype_ + 1)[c] & _U) -#define isalpha(c) ((_ctype_ + 1)[c] & (_U|_L)) -#define isxdigit(c) ((_ctype_ + 1)[c] & (_N|_X)) -#define isalnum(c) ((_ctype_ + 1)[c] & (_U|_L|_N)) -#define isprint(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N|_B)) -#define isgraph(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N)) -#define iscntrl(c) ((_ctype_ + 1)[c] & _C) -#define isascii(c) ((unsigned)(c) <= 0177) -#define toascii(c) ((c) & 0177) +/* + * If your compiler supports prototypes and inline functions, + * #define _USE_CTYPE_INLINE_. Otherwise, use the C library + * functions. + */ +#if !defined(_USE_CTYPE_CLIBRARY_) && defined(__GNUC__) || defined(__cplusplus) +#define _USE_CTYPE_INLINE_ 1 +#endif + +#if defined(_USE_CTYPE_INLINE_) +static __inline__ int +__istype(_BSD_RUNE_T_ __c, unsigned long __f) +{ + return((((__c & _CRMASK) ? ___runetype(__c) : + _CurrentRuneLocale->runetype[__c]) & __f) ? 1 : 0); +} + +static __inline__ int +__isctype(_BSD_RUNE_T_ __c, unsigned long __f) +{ + return((((__c & _CRMASK) ? 0 : + _DefaultRuneLocale.runetype[__c]) & __f) ? 1 : 0); +} + +/* _ANSI_LIBRARY is defined by lib/libc/gen/isctype.c. */ +#if !defined(_ANSI_LIBRARY) +static __inline__ _BSD_RUNE_T_ +toupper(_BSD_RUNE_T_ __c) +{ + return((__c & _CRMASK) ? + ___toupper(__c) : _CurrentRuneLocale->mapupper[__c]); +} + +static __inline__ _BSD_RUNE_T_ +tolower(_BSD_RUNE_T_ __c) +{ + return((__c & _CRMASK) ? + ___tolower(__c) : _CurrentRuneLocale->maplower[__c]); +} +#endif /* !_ANSI_LIBRARY */ + +#else /* !_USE_CTYPE_INLINE_ */ + +__BEGIN_DECLS +int __istype __P((_BSD_RUNE_T_, unsigned long)); +int __isctype __P((_BSD_RUNE_T_, unsigned long)); +_BSD_RUNE_T_ toupper __P((_BSD_RUNE_T_)); +_BSD_RUNE_T_ tolower __P((_BSD_RUNE_T_)); +__END_DECLS +#endif /* _USE_CTYPE_INLINE_ */ #endif /* !_CTYPE_H_ */ diff --git a/include/grp.h b/include/grp.h index 1a9afba0a521..ef2e60e183bd 100644 --- a/include/grp.h +++ b/include/grp.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: grp.h,v 1.2.2.1 1994/05/04 07:37:45 rgrimes Exp $ + * $Id: grp.h,v 1.3 1994/05/04 08:08:29 rgrimes Exp $ */ /*- * Copyright (c) 1989 The Regents of the University of California. diff --git a/include/kvm.h b/include/kvm.h index 5be440242ec1..8793b3506db9 100644 --- a/include/kvm.h +++ b/include/kvm.h @@ -36,10 +36,6 @@ #ifndef _KVM_H_ #define _KVM_H_ -/* Default version symbol. */ -#define VRS_SYM "_version" -#define VRS_KEY "VERSION" - #include <sys/cdefs.h> __BEGIN_DECLS diff --git a/include/nlist.h b/include/nlist.h index 1191e7a9d7f1..607b024aed0f 100644 --- a/include/nlist.h +++ b/include/nlist.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: nlist.h,v 1.2.2.1 1994/05/04 07:37:49 rgrimes Exp $ + * $Id: nlist.h,v 1.3 1994/05/04 08:08:32 rgrimes Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. diff --git a/include/octype.h b/include/octype.h new file mode 100644 index 000000000000..b7d292c3e670 --- /dev/null +++ b/include/octype.h @@ -0,0 +1,82 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ctype.h 5.3 (Berkeley) 4/3/91 + */ + +#ifndef _CTYPE_H_ +#define _CTYPE_H_ + +#include <sys/cdefs.h> + +#define _U 0x01 +#define _L 0x02 +#define _N 0x04 +#define _S 0x08 +#define _P 0x10 +#define _C 0x20 +#define _X 0x40 +#define _B 0x80 + +extern char _ctype_[]; + +__BEGIN_DECLS +int isdigit __P((int)); +int islower __P((int)); +int isspace __P((int)); +int ispunkt __P((int)); +int isupper __P((int)); +int isalpha __P((int)); +int isxdigit __P((int)); +int isalnum __P((int)); +int isprint __P((int)); +int isgraph __P((int)); +int iscntrl __P((int)); +int toupper __P((int)); +int tolower __P((int)); +__END_DECLS + +#define isdigit(c) ((_ctype_ + 1)[c] & _N) +#define islower(c) ((_ctype_ + 1)[c] & _L) +#define isspace(c) ((_ctype_ + 1)[c] & _S) +#define ispunct(c) ((_ctype_ + 1)[c] & _P) +#define isupper(c) ((_ctype_ + 1)[c] & _U) +#define isalpha(c) ((_ctype_ + 1)[c] & (_U|_L)) +#define isxdigit(c) ((_ctype_ + 1)[c] & (_N|_X)) +#define isalnum(c) ((_ctype_ + 1)[c] & (_U|_L|_N)) +#define isprint(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N|_B)) +#define isgraph(c) ((_ctype_ + 1)[c] & (_P|_U|_L|_N)) +#define iscntrl(c) ((_ctype_ + 1)[c] & _C) +#define isascii(c) ((unsigned)(c) <= 0177) +#define toascii(c) ((c) & 0177) + +#endif /* !_CTYPE_H_ */ diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index ff6d868be4d6..12f9432fab26 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: dumprestore.h,v 1.1.1.1.2.1 1994/05/04 07:38:27 rgrimes Exp $ + * $Id: dumprestore.h,v 1.2 1994/05/04 08:09:11 rgrimes Exp $ */ /* * Copyright (c) 1980 Regents of the University of California. diff --git a/include/pwd.h b/include/pwd.h index 7775f58ab0ee..19e56bc38e3b 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: pwd.h,v 1.3.2.1 1994/05/04 07:37:52 rgrimes Exp $ + * $Id: pwd.h,v 1.4 1994/05/04 08:08:35 rgrimes Exp $ */ /*- * Copyright (c) 1989 The Regents of the University of California. diff --git a/include/rpcsvc/Makefile b/include/rpcsvc/Makefile index 8611daefde2a..e066a09155c3 100644 --- a/include/rpcsvc/Makefile +++ b/include/rpcsvc/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 2.3 88/08/11 4.0 RPCSRC -# $Id: Makefile,v 1.1 1993/09/14 17:42:40 jtc Exp $ +# $Id: Makefile,v 1.2 1994/06/07 15:53:21 guido Exp $ .SUFFIXES: .x @@ -32,6 +32,6 @@ install: all .x.h: @echo generating $@... - @PWD=`pwd` ; cd ${.CURDIR} ; ${RPCCOM} -h $*.x -o $$PWD/$@ + @CURPWD=`pwd` ; cd ${.CURDIR} ; ${RPCCOM} -h $*.x -o $$CURPWD/$@ .include <bsd.prog.mk> diff --git a/include/rune.h b/include/rune.h new file mode 100644 index 000000000000..c1e2b88b4595 --- /dev/null +++ b/include/rune.h @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)rune.h 8.1 (Berkeley) 6/27/93 + */ + +#ifndef _RUNE_H_ +#define _RUNE_H_ + +#include <runetype.h> +#include <stdio.h> + +#define _PATH_LOCALE "/usr/share/locale" + +#define _INVALID_RUNE _CurrentRuneLocale->invalid_rune + +#define __sgetrune _CurrentRuneLocale->sgetrune +#define __sputrune _CurrentRuneLocale->sputrune + +#define sgetrune(s, n, r) (*__sgetrune)((s), (n), (r)) +#define sputrune(c, s, n, r) (*__sputrune)((c), (s), (n), (r)) + +__BEGIN_DECLS +char *mbrune __P((const char *, rune_t)); +char *mbrrune __P((const char *, rune_t)); +char *mbmb __P((const char *, char *)); +long fgetrune __P((FILE *)); +int fputrune __P((rune_t, FILE *)); +int fungetrune __P((rune_t, FILE *)); +int setrunelocale __P((char *)); +void setinvalidrune __P((rune_t)); +__END_DECLS + +#endif /*! _RUNE_H_ */ diff --git a/include/runetype.h b/include/runetype.h new file mode 100644 index 000000000000..4bce6588b8ba --- /dev/null +++ b/include/runetype.h @@ -0,0 +1,101 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Paul Borman at Krystal Technologies. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)runetype.h 8.1 (Berkeley) 6/2/93 + */ + +#ifndef _RUNETYPE_H_ +#define _RUNETYPE_H_ + +#include <machine/ansi.h> +#include <sys/cdefs.h> + +#ifdef _BSD_WCHAR_T_ +typedef _BSD_WCHAR_T_ rune_t; +typedef _BSD_WCHAR_T_ wchar_t; +#undef _BSD_WCHAR_T_ +#endif + +#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */ +#define _CRMASK (~(_CACHED_RUNES - 1)) + +/* + * The lower 8 bits of runetype[] contain the digit value of the rune. + */ +typedef struct { + rune_t min; /* First rune of the range */ + rune_t max; /* Last rune (inclusive) of the range */ + rune_t map; /* What first maps to in maps */ + unsigned long *types; /* Array of types in range */ +} _RuneEntry; + +typedef struct { + int nranges; /* Number of ranges stored */ + _RuneEntry *ranges; /* Pointer to the ranges */ +} _RuneRange; + +typedef struct { + char magic[8]; /* Magic saying what version we are */ + char encoding[32]; /* ASCII name of this encoding */ + + rune_t (*sgetrune) + __P((const char *, unsigned int, char const **)); + int (*sputrune) + __P((rune_t, char *, unsigned int, char **)); + rune_t invalid_rune; + + unsigned long runetype[_CACHED_RUNES]; + rune_t maplower[_CACHED_RUNES]; + rune_t mapupper[_CACHED_RUNES]; + + /* + * The following are to deal with Runes larger than _CACHED_RUNES - 1. + * Their data is actually contiguous with this structure so as to make + * it easier to read/write from/to disk. + */ + _RuneRange runetype_ext; + _RuneRange maplower_ext; + _RuneRange mapupper_ext; + + void *variable; /* Data which depends on the encoding */ + int variable_len; /* how long that data is */ +} _RuneLocale; + +#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */ + +extern _RuneLocale _DefaultRuneLocale; +extern _RuneLocale *_CurrentRuneLocale; + +#endif /* !_RUNETYPE_H_ */ diff --git a/include/setjmp.h b/include/setjmp.h index 7bf4e85693ee..2ef7b86110a2 100644 --- a/include/setjmp.h +++ b/include/setjmp.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: setjmp.h,v 1.2.2.1 1994/05/04 07:37:56 rgrimes Exp $ + * $Id: setjmp.h,v 1.3 1994/05/04 08:08:38 rgrimes Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. diff --git a/include/skey.h b/include/skey.h new file mode 100644 index 000000000000..030e46c41c46 --- /dev/null +++ b/include/skey.h @@ -0,0 +1,36 @@ +#ifndef _SKEY_H_ +#define _SKEY_H_ + +#include <sys/cdefs.h> + +/* Server-side data structure for reading keys file during login */ +struct skey { + FILE *keyfile; + char buf[256]; + char *logname; + int n; + char *seed; + char *val; + long recstart; /*needed so reread of buffer is efficient*/ + + +}; + +/* Client-side structure for scanning data stream for challenge */ +struct mc { + char buf[256]; + int skip; + int cnt; +}; + +void f __P((char *x)); +int keycrunch __P((char *result,char *seed,char *passwd)); +char *btoe __P((char *engout,char *c)); +char *put8 __P((char *out,char *s)); +int etob __P((char *out,char *e)); +void rip __P((char *buf)); +int skeychallenge __P((struct skey *mp,char *name, char *challenge)); +int skeylookup __P((struct skey *mp,char *name)); +int skeyverify __P((struct skey *mp,char *response)); + +#endif /* _SKEY_H_ */ diff --git a/include/stddef.h b/include/stddef.h index b5ebfd9b2fc9..0329904f2569 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -30,7 +30,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)stddef.h 5.5 (Berkeley) 4/3/91 + * From: @(#)stddef.h 5.5 (Berkeley) 4/3/91 + * $Id: stddef.h,v 1.2 1994/04/04 21:10:52 wollman Exp $ */ #ifndef _STDDEF_H_ @@ -45,9 +46,12 @@ typedef _SIZE_T_ size_t; #undef _SIZE_T_ #endif -#ifdef _WCHAR_T_ -typedef _WCHAR_T_ wchar_t; -#undef _WCHAR_T_ +#ifdef _BSD_WCHAR_T_ +#ifndef _ANSI_SOURCE +typedef _BSD_WCHAR_T_ rune_t; +#endif +typedef _BSD_WCHAR_T_ wchar_t; +#undef _BSD_WCHAR_T_ #endif #ifndef NULL diff --git a/include/stdio.h b/include/stdio.h index d9fbe98eb20d..7eff3ae7562d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -116,8 +116,8 @@ typedef struct __sFILE { unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */ unsigned char _nbuf[1]; /* guarantee a getc() buffer */ - /* separate buffer for fgetline() when line crosses buffer boundary */ - struct __sbuf _lb; /* buffer for fgetline() */ + /* separate buffer for fgetln() when line crosses buffer boundary */ + struct __sbuf _lb; /* buffer for fgetln() */ /* Unix stdio files get aligned to block boundaries on fseek() */ int _blksize; /* stat.st_blksize (may be != _bf._size) */ @@ -142,7 +142,7 @@ __END_DECLS #define __SOPT 0x0400 /* do fseek() optimisation */ #define __SNPT 0x0800 /* do not do fseek() optimisation */ #define __SOFF 0x1000 /* set iff _offset is in fact correct */ -#define __SMOD 0x2000 /* true => fgetline modified _p text */ +#define __SMOD 0x2000 /* true => fgetln modified _p text */ /* * The following three definitions are for ANSI C, which took them @@ -259,7 +259,7 @@ __END_DECLS */ #if !defined (_ANSI_SOURCE) && !defined(_POSIX_SOURCE) __BEGIN_DECLS -char *fgetline __P((FILE *, size_t *)); +char *fgetln __P((FILE *, size_t *)); int fpurge __P((FILE *)); int getw __P((FILE *)); int pclose __P((FILE *)); diff --git a/include/stdlib.h b/include/stdlib.h index b1a65e36a147..3a6e6dc1ab7d 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -30,25 +30,36 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)stdlib.h 5.13 (Berkeley) 6/4/91 - * - * PATCHES MAGIC LEVEL PATCH THAT GOT US HERE - * -------------------- ----- ---------------------- - * CURRENT PATCH LEVEL: 1 00145 - * -------------------- ----- ---------------------- - * - * 20 Apr 93 Richard Murphey stddef.h patch for XFree86 + * From: @(#)stdlib.h 5.13 (Berkeley) 6/4/91 + * $Id: stdlib.h,v 1.5 1994/04/04 21:10:52 wollman Exp $ */ #ifndef _STDLIB_H_ #define _STDLIB_H_ +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) #include <sys/types.h> +#else +#include <machine/ansi.h> +#endif #ifdef _WCHAR_T_ typedef _WCHAR_T_ wchar_t; #undef _WCHAR_T_ #endif +#ifdef _BSD_WCHAR_T_ +#ifndef _ANSI_SOURCE +typedef _BSD_WCHAR_T_ rune_t; +#endif +typedef _BSD_WCHAR_T_ wchar_t; +#undef _BSD_WCHAR_T_ +#endif + +#ifndef NULL +#define NULL 0 +#endif + + typedef struct { int quot; /* quotient */ int rem; /* remainder */ @@ -63,7 +74,8 @@ typedef struct { #define RAND_MAX 0x7fffffff -#define MB_CUR_MAX 1 /* XXX */ +extern int __mb_cur_max; +#define MB_CUR_MAX __mb_cur_max #include <sys/cdefs.h> @@ -102,7 +114,13 @@ int wctomb __P((char *, wchar_t)); int mbtowc __P((wchar_t *, const char *, size_t)); size_t wcstombs __P((char *, const wchar_t *, size_t)); -/* don't ask me where to put these -- MB XXX */ +#ifndef _ANSI_SOURCE +void cfree __P((void *)); +int putenv __P((const char *)); +int setenv __P((const char *, const char *, int)); +#endif /* not ANSI */ + +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) double drand48 __P((void)); double erand48 __P((unsigned short[3])); long lrand48 __P((void)); @@ -113,13 +131,6 @@ void srand48 __P((long)); unsigned short *seed48 __P((unsigned short[3])); void lcong48 __P((unsigned short[7])); -#ifndef _ANSI_SOURCE -void cfree __P((void *)); -int putenv __P((const char *)); -int setenv __P((const char *, const char *, int)); -#endif /* not ANSI */ - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) #ifndef alloca void *alloca __P((size_t)); #endif @@ -132,7 +143,8 @@ int getsubopt __P((char **, char * const *, char **)); int heapsort __P((void *, size_t, size_t, int (*)(const void *, const void *))); char *initstate __P((unsigned, char *, int)); -int radixsort __P((const u_char **, int, const u_char *, u_char)); +int radixsort __P((const unsigned char **, int, const unsigned char *, + unsigned char)); long random __P((void)); char *setstate __P((char *)); void srandom __P((unsigned)); diff --git a/include/time.h b/include/time.h index 4057efcb4dae..7c1351b35a73 100644 --- a/include/time.h +++ b/include/time.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: time.h,v 1.1.1.1.2.1 1994/05/04 07:37:59 rgrimes Exp $ + * $Id: time.h,v 1.2 1994/05/04 08:08:42 rgrimes Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. diff --git a/include/utmp.h b/include/utmp.h index 6976acd3c64a..a5b71156dbb6 100644 --- a/include/utmp.h +++ b/include/utmp.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: utmp.h,v 1.1.1.1.2.1 1994/05/04 07:38:03 rgrimes Exp $ + * $Id: utmp.h,v 1.2 1994/05/04 08:08:45 rgrimes Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. diff --git a/include/varargs.h b/include/varargs.h index ba91e22c73a9..f6522c46562f 100644 --- a/include/varargs.h +++ b/include/varargs.h @@ -5,7 +5,7 @@ * or UNIX System Laboratories, Inc. and are reproduced herein with * the permission of UNIX System Laboratories, Inc. * - * $Id: varargs.h,v 1.1.1.1.2.1 1994/05/04 07:38:07 rgrimes Exp $ + * $Id: varargs.h,v 1.2 1994/05/04 08:08:49 rgrimes Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. |