Back to index

lightning-sunbird  0.9+nobinonly
ansi.h
Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1990, 1993
00003  *     The Regents of the University of California.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * [3 Deleted as of 22Jul99, see
00014  *     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
00015  *        for details]
00016  * 4. Neither the name of the University nor the names of its contributors
00017  *    may be used to endorse or promote products derived from this software
00018  *    without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00021  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00022  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00023  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00024  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00025  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00026  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00027  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00028  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00029  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00030  * SUCH DAMAGE.
00031  *
00032  *     @(#)ansi.h    8.2 (Berkeley) 1/4/94
00033  */
00034 
00035 /* Adapted for GUSI by Matthias Neeracher <neeri@iis.ee.ethz.ch> */
00036 
00037 #ifndef       _ANSI_H_
00038 #define       _ANSI_H_
00039 
00040 /*
00041  * Types which are fundamental to the implementation and may appear in
00042  * more than one standard header are defined here.  Standard headers
00043  * then use:
00044  *     #ifdef _BSD_SIZE_T_
00045  *     typedef       _BSD_SIZE_T_ size_t;
00046  *     #undef _BSD_SIZE_T_
00047  *     #endif
00048  */
00049 #define       _BSD_CLOCK_T_ unsigned long        /* clock() */
00050 #define       _BSD_PTRDIFF_T_      int                  /* ptr1 - ptr2 */
00051 #define       _BSD_SIZE_T_  unsigned long        /* sizeof() */
00052 #define       _BSD_SSIZE_T_ long                 /* byte count or error */
00053 #define       _BSD_TIME_T_  unsigned long        /* time() */
00054 #define       _BSD_VA_LIST_ char *               /* va_list */
00055 
00056 /*
00057  * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
00058  * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
00059  * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
00060  * it looks like 10646 will be a 31 bit standard.  This means that if your
00061  * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
00062  * chosen over a long is that the is*() and to*() routines take ints (says
00063  * ANSI C), but they use _RUNE_T_ instead of int.  By changing it here, you
00064  * lose a bit of ANSI conformance, but your programs will still work.
00065  *    
00066  * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type.  When wchar_t
00067  * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
00068  * defined for ctype.h.
00069  */
00070 #define       _BSD_WCHAR_T_ int                  /* wchar_t */
00071 #define       _BSD_RUNE_T_  int                  /* rune_t */
00072 
00073 #endif /* _ANSI_H_ */