C语言15大头文件介绍

     C89(标准C)  有15个头文件 ,这些头文件包含了标准库的函数的声明

    1. assert.h

   

/*  assert.h

    assert macro

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

void _Cdecl __assertfail(char *__msg, char *__cond,
                         char *__file, int __line);

#ifdef  __cplusplus
}
#endif

#undef assert

#ifdef NDEBUG
#  define assert(p)   ((void)0)
#else
#  define _ENDL "\n"
#  define assert(p) ((p) ? (void)0 : (void) __assertfail( \
                    "Assertion failed: %s, file %s, line %d" _ENDL, \
                    #p, __FILE__, __LINE__ ) )
#endif

 

    2. float.h

 

/*  float.h

    Defines implementation specific macros for dealing with
    floating point.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __FLOAT_H
#define __FLOAT_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#define FLT_RADIX           2
#define FLT_ROUNDS          1
#define FLT_GUARD           1
#define FLT_NORMALIZE       1

#define DBL_DIG             15
#define FLT_DIG             6
#define LDBL_DIG            19

#define DBL_MANT_DIG        53
#define FLT_MANT_DIG        24
#define LDBL_MANT_DIG       64

#define DBL_EPSILON         2.2204460492503131E-16
#define FLT_EPSILON         1.19209290E-07F
#define LDBL_EPSILON        1.084202172485504E-19

/* smallest positive IEEE normal numbers */
#define DBL_MIN             2.2250738585072014E-308
#define FLT_MIN             1.17549435E-38F
#define LDBL_MIN            _tiny_ldble

#define DBL_MAX             _huge_dble
#define FLT_MAX             _huge_flt
#define LDBL_MAX            _huge_ldble

#define DBL_MAX_EXP         +1024
#define FLT_MAX_EXP         +128
#define LDBL_MAX_EXP        +16384

#define DBL_MAX_10_EXP      +308
#define FLT_MAX_10_EXP      +38
#define LDBL_MAX_10_EXP     +4932

#define DBL_MIN_10_EXP      -307
#define FLT_MIN_10_EXP      -37
#define LDBL_MIN_10_EXP     -4931

#define DBL_MIN_EXP         -1021
#define FLT_MIN_EXP         -125
#define LDBL_MIN_EXP        -16381

extern float        _Cdecl _huge_flt;
extern double       _Cdecl _huge_dble;
extern long double  _Cdecl _huge_ldble;
extern long double  _Cdecl _tiny_ldble;

#ifdef __cplusplus
extern "C" {
#endif
unsigned int _Cdecl _clear87(void);
unsigned int _Cdecl _control87(unsigned int __newcw, unsigned int __mask);
void         _Cdecl _fpreset(void);
unsigned int _Cdecl _status87(void);
#ifdef __cplusplus
}
#endif

#if !__STDC__

/* 8087/80287 Status Word format   */

#define SW_INVALID      0x0001  /* Invalid operation            */
#define SW_DENORMAL     0x0002  /* Denormalized operand         */
#define SW_ZERODIVIDE   0x0004  /* Zero divide                  */
#define SW_OVERFLOW     0x0008  /* Overflow                     */
#define SW_UNDERFLOW    0x0010  /* Underflow                    */
#define SW_INEXACT      0x0020  /* Precision (Inexact result)   */

/* 8087/80287 Control Word format */

#define MCW_EM              0x003f  /* interrupt Exception Masks*/
#define     EM_INVALID      0x0001  /*   invalid                */
#define     EM_DENORMAL     0x0002  /*   denormal               */
#define     EM_ZERODIVIDE   0x0004  /*   zero divide            */
#define     EM_OVERFLOW     0x0008  /*   overflow               */
#define     EM_UNDERFLOW    0x0010  /*   underflow              */
#define     EM_INEXACT      0x0020  /*   inexact (precision)    */

#define MCW_IC              0x1000  /* Infinity Control */
#define     IC_AFFINE       0x1000  /*   affine         */
#define     IC_PROJECTIVE   0x0000  /*   projective     */

#define MCW_RC          0x0c00  /* Rounding Control     */
#define     RC_CHOP     0x0c00  /*   chop               */
#define     RC_UP       0x0800  /*   up                 */
#define     RC_DOWN     0x0400  /*   down               */
#define     RC_NEAR     0x0000  /*   near               */

#define MCW_PC          0x0300  /* Precision Control    */
#define     PC_24       0x0000  /*    24 bits           */
#define     PC_53       0x0200  /*    53 bits           */
#define     PC_64       0x0300  /*    64 bits           */

/* 8087/80287 Initial Control Word */
/* use affine infinity, mask underflow and precision exceptions */

#define CW_DEFAULT  _default87
extern unsigned int _Cdecl _default87;

/*
    SIGFPE signal error types (for integer & float exceptions).
*/
#define FPE_INTOVFLOW       126 /* 80x86 Interrupt on overflow  */
#define FPE_INTDIV0         127 /* 80x86 Integer divide by zero */

#define FPE_INVALID         129 /* 80x87 invalid operation      */
#define FPE_ZERODIVIDE      131 /* 80x87 divide by zero         */
#define FPE_OVERFLOW        132 /* 80x87 arithmetic overflow    */
#define FPE_UNDERFLOW       133 /* 80x87 arithmetic underflow   */
#define FPE_INEXACT         134 /* 80x87 precision loss         */
#define FPE_STACKFAULT      135 /* 80x87 stack overflow         */
#define FPE_EXPLICITGEN     140 /* When SIGFPE is raise()'d     */

/*
            SIGSEGV signal error types.
*/
#define SEGV_BOUND          10  /* A BOUND violation (SIGSEGV)  */
#define SEGV_EXPLICITGEN    11  /* When SIGSEGV is raise()'d    */

/*
            SIGILL signal error types.
*/
#define ILL_EXECUTION       20  /* Illegal operation exception  */
#define ILL_EXPLICITGEN     21  /* When SIGILL is raise()'d     */

#endif  /* !__STDC__ */

#endif

 

    3. math.h

/*  math.h

    Definitions for the math floating point package.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef  __MATH_H
#define  __MATH_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#define HUGE_VAL    _huge_dble
extern double _Cdecl _huge_dble;
#define _LHUGE_VAL   _huge_ldble
extern long double _Cdecl _huge_ldble;

#ifdef __cplusplus
extern "C" {
#endif
double  _Cdecl acos  (double __x);
double  _Cdecl asin  (double __x);
double  _Cdecl atan  (double __x);
double  _Cdecl atan2 (double __y, double __x);
double  _Cdecl ceil  (double __x);
double  _Cdecl cos   (double __x);
double  _Cdecl cosh  (double __x);
double  _Cdecl exp   (double __x);
double  _Cdecl fabs  (double __x);
double  _Cdecl __fabs__  (double __x);          /* Intrinsic */
double  _Cdecl floor (double __x);
double  _Cdecl fmod  (double __x, double __y);
double  _Cdecl frexp (double __x, int *__exponent);
double  _Cdecl ldexp (double __x, int __exponent);
double  _Cdecl log   (double __x);
double  _Cdecl log10 (double __x);
double  _Cdecl modf  (double __x, double *__ipart);
double  _Cdecl pow   (double __x, double __y);
double  _Cdecl sin   (double __x);
double  _Cdecl sinh  (double __x);
double  _Cdecl sqrt  (double __x);
double  _Cdecl tan   (double __x);
double  _Cdecl tanh  (double __x);

long double _Cdecl acosl  (long double __x);
long double _Cdecl asinl  (long double __x);
long double _Cdecl atan2l (long double __x, long double __y);
long double _Cdecl atanl  (long double __x);
long double _Cdecl ceill  (long double __x);
long double _Cdecl coshl  (long double __x);
long double _Cdecl cosl   (long double __x);
long double _Cdecl expl   (long double __x);
long double _Cdecl fabsl  (long double __x);
long double _Cdecl floorl (long double __x);
long double _Cdecl fmodl  (long double __x, long double __y);
long double _Cdecl frexpl (long double __x, int *__exponent);
long double _Cdecl ldexpl (long double __x, int __exponent);
long double _Cdecl log10l (long double __x);
long double _Cdecl logl   (long double __x);
long double _Cdecl modfl  (long double __x, long double *__ipart);
long double _Cdecl powl   (long double __x, long double __y);
long double _Cdecl sinhl  (long double __x);
long double _Cdecl sinl   (long double __x);
long double _Cdecl sqrtl  (long double __x);
long double _Cdecl tanhl  (long double __x);
long double _Cdecl tanl   (long double __x);

typedef enum
{
    DOMAIN = 1,    /* argument domain error -- log (-1)        */
    SING,          /* argument singularity  -- pow (0,-2))     */
    OVERFLOW,      /* overflow range error  -- exp (1000)      */
    UNDERFLOW,     /* underflow range error -- exp (-1000)     */
    TLOSS,         /* total loss of significance -- sin(10e70) */
    PLOSS,         /* partial loss of signif. -- not used      */
    STACKFAULT     /* floating point unit stack overflow       */
}   _mexcep;

#ifdef __cplusplus
}
#endif


#if !__STDC__

struct  exception
{
    int type;
    char   *name;
    double  arg1, arg2, retval;
};

struct  _exceptionl
{
    int type;
    char   *name;
    long double  arg1, arg2, retval;
};

#ifdef __cplusplus
extern "C" {
#endif
int     _Cdecl abs   (int __x);
double  _Cdecl atof  (const char *__s);
double  _Cdecl hypot (double __x, double __y);
long    _Cdecl labs  (long __x);
int     _Cdecl matherr (struct exception *__e);
double  _Cdecl poly  (double __x, int __degree, double *__coeffs);
double  _Cdecl pow10 (int __p);
int     _Cdecl _matherrl (struct _exceptionl *__e);

long double _Cdecl _atold (const char *__s);
long double _Cdecl hypotl (long double __x, long double __y);
long double _Cdecl polyl  (long double __x, int __degree, long double *__coeffs);
long double _Cdecl pow10l (int __p);

#ifdef __cplusplus
    /* use class complex instead of cabs in C++ */
#else
struct complex      /* as used by "cabs" function */
{
    double  x, y;
};

struct _complexl    /* as used by "cabsl" function */
{
    long double  x, y;
};

#define cabs(z)     (hypot  ((z).x, (z).y))
#define cabsl(z)    (hypotl ((z).x, (z).y))
#endif

#ifdef __cplusplus
}
#endif

/* Constants rounded for 21 decimals. */
#define M_E         2.71828182845904523536
#define M_LOG2E     1.44269504088896340736
#define M_LOG10E    0.434294481903251827651
#define M_LN2       0.693147180559945309417
#define M_LN10      2.30258509299404568402
#define M_PI        3.14159265358979323846
#define M_PI_2      1.57079632679489661923
#define M_PI_4      0.785398163397448309616
#define M_1_PI      0.318309886183790671538
#define M_2_PI      0.636619772367581343076
#define M_1_SQRTPI  0.564189583547756286948
#define M_2_SQRTPI  1.12837916709551257390
#define M_SQRT2     1.41421356237309504880
#define M_SQRT_2    0.707106781186547524401

#define EDOM    33      /* Math argument */
#define ERANGE  34      /* Result too large */

#endif  /* !__STDC__ */

#endif

--------------------------------------------------------

    4.stdarg.h

 

/*  stdarg.h

    Definitions for accessing parameters in functions that accept
    a variable number of arguments.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __STDARG_H
#define __STDARG_H

#ifdef __VARARGS_H
#error Can't include both STDARG.H and VARARGS.H
#endif

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

typedef void *va_list;

#define __size(x) ((sizeof(x)+sizeof(int)-1) & ~(sizeof(int)-1))

#ifdef  __cplusplus
#define va_start(ap, parmN) (ap = ...)
#else
#define va_start(ap, parmN) ((void)((ap) = (va_list)((char *)(&parmN)+__size(parmN))))
#endif

#define va_arg(ap, type) (*(type *)(((*(char **)&(ap))+=__size(type))-(__size(type))))
#define va_end(ap)          ((void)0)

#if !__STDC__
#define _va_ptr             (...)
#endif

#endif

-------------------------------------------------------------------------------------

    5.stdlib.h

/*  stdlib.h

    Definitions for common types, variables, and functions.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __STDLIB_H
#define __STDLIB_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifndef NULL
#include <_null.h>
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned size_t;
#endif

#ifndef _DIV_T
#define _DIV_T
typedef struct {
        int     quot;
        int     rem;
} div_t;
#endif

#ifndef _LDIV_T
#define _LDIV_T
typedef struct {
        long    quot;
        long    rem;
} ldiv_t;
#endif

#ifndef _WCHAR_T
#define _WCHAR_T
typedef char wchar_t;
#endif

/* Old typedef
*/
typedef void _Cdecl (* atexit_t)(void);

/* Maximum value returned by "rand" function
*/
#define RAND_MAX 0x7FFFU

#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1

#define MB_CUR_MAX 1

#ifdef __cplusplus
extern "C" {
#endif

void        _Cdecl abort(void);
int         _Cdecl __abs__(int);
#ifdef __cplusplus
inline int _Cdecl  abs(int __x) { return __abs__(__x); }
#else
int         _CType abs(int __x);
#  define abs(x)   __abs__(x)
#endif
int         _Cdecl atexit(void (_Cdecl *__func)(void));
double      _Cdecl atof(const char *__s);
int         _CType atoi(const char *__s);
long        _CType atol(const char *__s);
void * _CType bsearch(const void *__key, const void *__base,
               size_t __nelem, size_t __width,
               int (_CType *fcmp)(const void *,
               const void *));
void * _Cdecl calloc(size_t __nitems, size_t __size);
div_t       _Cdecl div(int __numer, int __denom);
void        _Cdecl exit(int __status);
void        _Cdecl free(void *__block);
char * _CType getenv(const char *__name);
long        _Cdecl labs(long __x);
ldiv_t      _Cdecl ldiv(long __numer, long __denom);
void * _Cdecl malloc(size_t __size);
int         _Cdecl mblen(const char *__s, size_t __n);
size_t      _Cdecl mbstowcs(wchar_t *__pwcs, const char *__s,
            size_t __n);
int     _Cdecl mbtowc(wchar_t *__pwc, const char *__s, size_t __n);
void    _CType qsort(void *__base, size_t __nelem, size_t __width,
        int _CType (*__fcmp)(const void *, const void *));
int     _Cdecl rand(void);
void *_Cdecl realloc(void *__block, size_t __size);
void    _Cdecl srand(unsigned __seed);
double  _Cdecl strtod(const char *__s, char **__endptr);
long    _Cdecl strtol(const char *__s, char **__endptr,
              int __radix);
long double _Cdecl _strtold(const char *__s, char **__endptr);
unsigned long _Cdecl strtoul(const char *__s, char **__endptr,
                 int __radix);
int     _Cdecl system(const char *__command);
size_t  _Cdecl wcstombs(char *__s, const wchar_t *__pwcs,
            size_t __n);
int     _Cdecl wctomb(char *__s, wchar_t __wc);

#ifdef __cplusplus
}
#endif

#if !__STDC__

/* Variables */

extern  int   _Cdecl _doserrno;
extern  int   _Cdecl errno;

/*
  These 2 constants are defined in MS's stdlib.h.  Rather than defining them
  all the time and invading the ANSI programmers name space we'll only make
  them visible when __STDC__ is *off*.  Anybody using these constants ain't
  writing standard C anyway!
*/
#define DOS_MODE  0
#define OS2_MODE  1

extern  unsigned        _Cdecl _psp;

extern  char          **_Cdecl environ;
extern  int             _Cdecl _fmode;
extern  unsigned char   _Cdecl _osmajor;
extern  unsigned char   _Cdecl _osminor;
extern  unsigned int    _Cdecl _version;

extern  char           *_Cdecl sys_errlist[];
extern  int             _Cdecl sys_nerr;

/* Constants for MSC pathname functions */

#define _MAX_PATH       80
#define _MAX_DRIVE      3
#define _MAX_DIR        66
#define _MAX_FNAME      9
#define _MAX_EXT        5

#ifdef __cplusplus
inline int _Cdecl random(int __num)
                 { return(int)(((long)rand()*__num)/(RAND_MAX+1)); }
/* need prototype of time() for C++ randomize() */
extern "C" long _Cdecl time(long *); 
inline void _Cdecl randomize(void) { srand((unsigned) time(NULL)); }
inline int  _Cdecl atoi(const char *__s) { return (int) atol(__s); }
#else
#define random(num)(int)(((long)rand()*(num))/(RAND_MAX+1))
#define randomize()     srand((unsigned)time(NULL))
#define max(a,b)    (((a) > (b)) ? (a) : (b))
#define min(a,b)    (((a) < (b)) ? (a) : (b))
#define atoi(s)     ((int) atol(s))
#endif

#ifdef __cplusplus
extern "C" {
#endif

long double _Cdecl _atold(const char *__s);
char   *_Cdecl ecvt(double __value, int __ndig, int *__dec,
             int *__sign);
void    _Cdecl _exit(int __status);
char   *_Cdecl fcvt(double __value, int __ndig, int *__dec,
            int *__sign);
char * _CType _fullpath( char *__buf,
                  const char *__path,
                  size_t __maxlen );
char   *_Cdecl gcvt(double __value, int __ndec, char *__buf);
char   *_CType itoa(int __value, char *__string, int __radix);
void   *_Cdecl lfind(const void *__key, const void *__base,
         size_t *__num, size_t __width,
         int _Cdecl(*__fcmp)(const void *, const void *));

unsigned long _Cdecl _lrotl(unsigned long __val, int __count);
unsigned long _Cdecl _lrotr(unsigned long __val, int __count);

void   *_Cdecl lsearch(const void *__key, void *__base,
         size_t *__num, size_t __width,
         int _Cdecl(*__fcmp)(const void *, const void *));
char * _CType ltoa(long __value, char *__string, int __radix);
void _Cdecl _makepath( char *__path,
                  const char *__drive,
                  const char *__dir,
                  const char *__name,
                  const char *__ext );
int     _Cdecl putenv(const char *__name);

unsigned    _Cdecl _rotl(unsigned __value, int __count);
unsigned    _Cdecl _rotr(unsigned __value, int __count);

unsigned    _Cdecl __rotl__(unsigned __value, int __count);     /* intrinsic */
unsigned    _Cdecl __rotr__(unsigned __value, int __count);     /* intrinsic */

void        _Cdecl _searchenv(const char *__file,
                  const char *__varname,
                  char *__pathname);
void _Cdecl _splitpath( const char *__path,
                   char *__drive,
                   char *__dir,
                   char *__name,
                   char *__ext );
void    _Cdecl swab(char *__from, char *__to, int __nbytes);
char *_CType ultoa(unsigned long __value, char *__string,
              int __radix);


#ifdef __cplusplus
}
#endif

#endif  /* !__STDC__ */

#endif  /* __STDLIB_H */

-----------------------------------------------------------------------------------

    6.ctype.h

   

/*  ctype.h

    Defines the ctype macros.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __CTYPE_H
#define __CTYPE_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#define _IS_SP  1           /* is space */
#define _IS_DIG 2           /* is digit indicator */
#define _IS_UPP 4           /* is upper case */
#define _IS_LOW 8           /* is lower case */
#define _IS_HEX 16          /* [0..9] or [A-F] or [a-f] */
#define _IS_CTL 32          /* Control */
#define _IS_PUN 64          /* punctuation */

extern  char _Cdecl _ctype[];    /* Character type array */

#ifdef __cplusplus
extern "C" {
#endif
int _Cdecl isalnum (int __c);
int _Cdecl isalpha (int __c);
int _Cdecl isascii (int __c);
int _Cdecl iscntrl (int __c);
int _Cdecl isdigit (int __c);
int _Cdecl isgraph (int __c);
int _Cdecl islower (int __c);
int _Cdecl isprint (int __c);
int _Cdecl ispunct (int __c);
int _Cdecl isspace (int __c);
int _Cdecl isupper (int __c);
int _Cdecl isxdigit(int __c);
#ifdef __cplusplus
}
#endif

#define isalnum(c)  (_ctype[(c) + 1] & (_IS_DIG | _IS_UPP | _IS_LOW))
#define isalpha(c)  (_ctype[(c) + 1] & (_IS_UPP | _IS_LOW))
#define isascii(c)  ((unsigned)(c) < 128)
#define iscntrl(c)  (_ctype[(c) + 1] & _IS_CTL)
#define isdigit(c)  (_ctype[(c) + 1] & _IS_DIG)
#define isgraph(c)  ((c) >= 0x21 && (c) <= 0x7e)
#define islower(c)  (_ctype[(c) + 1] & _IS_LOW)
#define isprint(c)  ((c) >= 0x20 && (c) <= 0x7e)
#define ispunct(c)  (_ctype[(c) + 1] & _IS_PUN)
#define isspace(c)  (_ctype[(c) + 1] & _IS_SP)
#define isupper(c)  (_ctype[(c) + 1] & _IS_UPP)
#define isxdigit(c) (_ctype[(c) + 1] & (_IS_DIG | _IS_HEX))

#define toascii(c)  ((c) & 0x7f)

#if !__STDC__
#define _toupper(c) ((c) + 'A' - 'a')
#define _tolower(c) ((c) + 'a' - 'A')
#endif

#ifdef __cplusplus
extern "C" {
#endif
int _CType tolower(int __ch);
int _CType _ftolower(int __ch);
int _CType toupper(int __ch);
int _CType _ftoupper(int __ch);
#ifdef __cplusplus
}
#endif

#endif

------------------------------------------------------------------------------

    7.limits.h

/*  limits.h

    Defines implementation specific limits on type values.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __LIMITS_H
#define __LIMITS_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#define CHAR_BIT            8

#if ('\x80' < 0)
#define CHAR_MAX            127
#define CHAR_MIN            (-128)
#else
#define CHAR_MAX            255
#define CHAR_MIN            0
#endif

#define SCHAR_MAX           127
#define SCHAR_MIN           (-128)
#define UCHAR_MAX           255

#define SHRT_MAX            0x7FFF
#define SHRT_MIN            ((int)0x8000)
#define USHRT_MAX           0xFFFFU

#define INT_MAX             0x7FFF
#define INT_MIN             ((int)0x8000)
#define UINT_MAX            0xFFFFU

#define LONG_MAX            0x7FFFFFFFL
#define LONG_MIN            ((long)0x80000000L)
#define ULONG_MAX           0xFFFFFFFFUL

#define MB_LEN_MAX          1

#endif

-------------------------------------------------------------

 

    8.setjmp.h

/*  setjmp.h

    Defines typedef and functions for setjmp/longjmp.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __SETJMP_H
#define __SETJMP_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

typedef struct __jmp_buf {
    unsigned    j_sp;
    unsigned    j_ss;
    unsigned    j_flag;
    unsigned    j_cs;
    unsigned    j_ip;
    unsigned    j_bp;
    unsigned    j_di;
    unsigned    j_es;
    unsigned    j_si;
    unsigned    j_ds;
}   jmp_buf[1];

#ifdef __cplusplus
extern "C" {
#endif

void    _CType longjmp(jmp_buf __jmpb, int __retval);
int     _CType setjmp(jmp_buf __jmpb);

#ifdef __cplusplus
}
#endif

#endif

-----------------------------------------------------------------------------

 

    9.stddef.h

/*  stddef.h

    Definitions for common types, and NULL

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __STDDEF_H
#define __STDDEF_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifndef NULL
#include <_null.h>
#endif

#ifndef _PTRDIFF_T
#define _PTRDIFF_T
#if     defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
typedef long    ptrdiff_t;
#else
typedef int     ptrdiff_t;
#endif
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned size_t;
#endif

#define offsetof( s_name, m_name )  (size_t)&(((s_name *)0)->m_name)

#ifndef _WCHAR_T
#define _WCHAR_T
typedef char wchar_t;
#endif

#endif  /* __STDDEF_H */

 

    10.string.h

/*  string.h

    Definitions for memory and string functions.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __STRING_H
#define __STRING_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifndef NULL
#include <_null.h>
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned size_t;
#endif

#ifdef __cplusplus
extern "C" {
#endif
void * _Cdecl memchr  (const void *__s, int __c, size_t __n);
int         _Cdecl memcmp(const void *__s1,
                          const void *__s2, size_t __n);
void * _Cdecl memcpy(void *__dest, const void *__src,
                          size_t __n);
void * _CType memmove(void *__dest, const void *__src,
                           size_t __n);
void * _CType memset(void *__s, int __c, size_t __n);
char * _CType strcat(char *__dest, const char *__src);
char * _CType strchr(const char *__s, int __c);
int         _CType strcmp(const char *__s1, const char *__s2);
int         _Cdecl strcoll(const char *__s1, const char *__s2);
char * _CType strcpy(char *__dest, const char *__src);
size_t      _Cdecl strcspn(const char *__s1, const char *__s2);
char * _Cdecl strerror(int __errnum);
size_t      _CType strlen(const char *__s);
char * _CType strncat(char *__dest, const char *__src,
               size_t __maxlen);
int         _CType strncmp(const char *__s1, const char *__s2,
               size_t __maxlen);
char * _CType strncpy(char *__dest, const char *__src,
                           size_t __maxlen);
char * _CType strpbrk(const char *__s1, const char *__s2);
char * _CType strrchr(const char *__s, int __c);
size_t      _Cdecl strspn(const char *__s1, const char *__s2);
char * _Cdecl strstr(const char *__s1, const char *__s2);
char * _CType strtok(char *__s1, const char *__s2);
size_t      _Cdecl strxfrm(char *__s1, const char *__s2,
               size_t __n );
char * _Cdecl _strerror(const char *__s);


#if !__STDC__
/* compatibility with other compilers */
#define strcmpi(s1,s2)      stricmp(s1,s2)
#define strncmpi(s1,s2,n)   strnicmp(s1,s2,n)

void * _Cdecl memccpy(void *__dest, const void *__src,
               int __c, size_t __n);
int         _Cdecl memicmp(const void *__s1, const void *__s2,
                           size_t __n);
void        _Cdecl movedata(unsigned __srcseg,unsigned __srcoff,
                            unsigned __dstseg,unsigned __dstoff, size_t __n);
char * _CType stpcpy(char *__dest, const char *__src);
char * _Cdecl _stpcpy(char *__dest, const char *__src);
char * _Cdecl strdup(const char *__s);
int         _CType stricmp(const char *__s1, const char *__s2);
char * _CType strlwr(char *__s);
int         _CType strnicmp(const char *__s1, const char *__s2,
                size_t __maxlen);
char * _Cdecl strnset(char *__s, int __ch, size_t __n);
char * _Cdecl strrev(char *__s);
char * _Cdecl strset(char *__s, int __ch);
char * _CType strupr(char *__s);

void    far * far cdecl _fmemccpy(void far *__dest, const void far *__src,
                int c, size_t __n);
void    far * far cdecl _fmemchr(const void far *__s, int c, size_t __n);
int           far cdecl _fmemcmp(const void far *__s1, const void far *__s2,
                size_t __n);
void    far * far cdecl _fmemcpy(void far *__dest, const void far *__src,
                size_t __n);
int           far cdecl _fmemicmp(const void far *__s1, const void far *__s2,
                size_t __n);
void    far * far cdecl _fmemmove(void far *__dest, const void far *__src,
                size_t __n);
void    far * far cdecl _fmemset(void far *__s, int c, size_t __n);
void          far cdecl _fmovmem(const void far *__src, void far *__dest,
                unsigned __length);
void          far cdecl _fsetmem(void far *__dest,unsigned __length,
                char __value);

char    far * far cdecl _fstrcat(char far *__dest, const char far *__src);
char    far * far cdecl _fstrchr(const char far *__s, int c);
int           far cdecl _fstrcmp(const char far *__s1, const char far *__s2);
char    far * far cdecl _fstrcpy(char far *__dest, const char far *__src);
size_t        far cdecl _fstrcspn(const char far *__s1, const char far *__s2);
char    far * far cdecl _fstrdup(const char far *__s);
int           far cdecl _fstricmp(const char far *__s1, const char far *__s2);
size_t        far cdecl _fstrlen(const char far *__s);
char    far * far cdecl _fstrlwr(char far *__s);
char    far * far cdecl _fstrncat(char far *__dest, const char far *__src,
             size_t maxlen);
int           far cdecl _fstrncmp(const char far *__s1, const char far *__s2,
             size_t maxlen);
char    far * far cdecl _fstrncpy(char far *__dest, const char far *__src,
             size_t maxlen);
int           far cdecl _fstrnicmp(const char far *__s1, const char far *__s2,
              size_t maxlen);
char    far * far cdecl _fstrnset(char far *__s, int ch, size_t __n);
char    far * far cdecl _fstrpbrk(const char far *__s1, const char far *__s2);
char    far * far cdecl _fstrrchr(const char far *__s, int c);
char    far * far cdecl _fstrrev(char far *__s);
char    far * far cdecl _fstrset(char far *__s, int ch);
size_t        far cdecl _fstrspn(const char far *__s1, const char far *__s2);
char    far * far cdecl _fstrstr(const char far *__s1, const char far *__s2);
char    far * far cdecl _fstrtok(char far *__s1, const char far *__s2);
char    far * far cdecl _fstrupr(char far *__s);

#endif  /* ! __STDC__ */

#ifdef __cplusplus
}
#endif

#endif

 

    11.errno.h

/*  errno.h

    Defines the system error variable errno and the error
    numbers set by system calls. Errors which exist in Unix(tm)
    but not MSDOS have value -1.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __ERRNO_H
#define __ERRNO_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

/*  Dos Error Codes */

#define EZERO    0      /* Error 0                  */
#define EINVFNC  1      /* Invalid function number  */
#define ENOFILE  2      /* File not found           */
#define ENOPATH  3      /* Path not found           */
#define ECONTR   7      /* Memory blocks destroyed  */
#define EINVMEM  9      /* Invalid memory block address */
#define EINVENV 10      /* Invalid environment      */
#define EINVFMT 11      /* Invalid format           */
#define EINVACC 12      /* Invalid access code      */
#define EINVDAT 13      /* Invalid data             */
#define EINVDRV 15      /* Invalid drive specified  */
#define ECURDIR 16      /* Attempt to remove CurDir */
#define ENOTSAM 17      /* Not same device          */
#define ENMFILE 18      /* No more files            */

#define ENOENT   2      /* No such file or directory*/
#define EMFILE   4      /* Too many open files      */
#define EACCES   5      /* Permission denied        */
#define EBADF    6      /* Bad file number          */
#define ENOMEM   8      /* Not enough core          */
#define ENODEV  15      /* No such device           */
#define EINVAL  19      /* Invalid argument         */
#define E2BIG   20      /* Arg list too long        */
#define ENOEXEC 21      /* Exec format error        */
#define EXDEV   22      /* Cross-device link        */
#define EDOM    33      /* Math argument            */
#define ERANGE  34      /* Result too large         */
#define EEXIST  35      /* File already exists      */
#define EDEADLOCK 36    /* Locking violation        */
#define ECHILD  -1      /* Unix/DOS                 */
#define EFAULT  -1      /* Unknown error            */
#define EPERM   -1      /* UNIX - not MSDOS         */
#define ESRCH   -1      /* UNIX - not MSDOS         */
#define EINTR   -1      /* UNIX - not MSDOS         */
#define EIO     -1      /* UNIX - not MSDOS         */
#define ENXIO   -1      /* UNIX - not MSDOS         */
#define EAGAIN  -1      /* UNIX - not MSDOS         */
#define ENOTBLK -1      /* UNIX - not MSDOS         */
#define EBUSY   -1      /* UNIX - not MSDOS         */
#define ENOTDIR -1      /* UNIX - not MSDOS         */
#define EISDIR  -1      /* UNIX - not MSDOS         */
#define ENFILE  -1      /* UNIX - not MSDOS         */
#define ENOTTY  -1      /* UNIX - not MSDOS         */
#define ETXTBSY -1      /* UNIX - not MSDOS         */
#define EFBIG   -1      /* UNIX - not MSDOS         */
#define ENOSPC  -1      /* UNIX - not MSDOS         */
#define ESPIPE  -1      /* UNIX - not MSDOS         */
#define EROFS   -1      /* UNIX - not MSDOS         */
#define EMLINK  -1      /* UNIX - not MSDOS         */
#define EPIPE   -1      /* UNIX - not MSDOS         */
#define EUCLEAN -1      /* UNIX - not MSDOS         */

extern  int _Cdecl  errno;
extern  int _Cdecl  _doserrno;

#if !__STDC__
#define _sys_nerr   35      /* highest defined system error number */
#endif

#endif

 

    12.locale.h

/*  locale.h

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __LOCALE_H
#define __LOCALE_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifndef NULL
#include <_null.h>
#endif

#define LC_ALL      0
#define LC_COLLATE  1
#define LC_CTYPE    2
#define LC_MONETARY 3
#define LC_NUMERIC  4
#define LC_TIME     5

struct lconv
   {
   char *decimal_point;
   char *thousands_sep;
   char *grouping;
   char *int_curr_symbol;
   char *currency_symbol;
   char *mon_decimal_point;
   char *mon_thousands_sep;
   char *mon_grouping;
   char *positive_sign;
   char *negative_sign;
   char int_frac_digits;
   char frac_digits;
   char p_cs_precedes;
   char p_sep_by_space;
   char n_cs_precedes;
   char n_sep_by_space;
   char p_sign_posn;
   char n_sign_posn;
   };

#ifdef __cplusplus
extern "C" {
#endif
char * _Cdecl setlocale( int __category, const char *__locale );
struct lconv * _Cdecl localeconv( void );
#ifdef __cplusplus
}
#endif

#endif

 

    13.signal.h

/*  signal.h
 
    Definitions for ANSI defined signaling capability

    Copyright (c) 1988, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __SIGNAL_H
#define __SIGNAL_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

typedef int sig_atomic_t;   /* Atomic entity type (ANSI) */
typedef void _Cdecl (* _CatcherPTR)();

#define SIG_DFL ((_CatcherPTR)0)   /* Default action   */
#define SIG_IGN ((_CatcherPTR)1)   /* Ignore action    */
#define SIG_ERR ((_CatcherPTR)-1)  /* Error return     */

#define SIGABRT 22
#define SIGFPE  8       /* Floating point trap  */
#define SIGILL  4       /* Illegal instruction  */
#define SIGINT  2
#define SIGSEGV 11      /* Memory access violation */
#define SIGTERM 15

#ifdef __cplusplus
extern "C" {
#endif
int _Cdecl raise(int __sig);
#ifdef __cplusplus
void _Cdecl (* _Cdecl signal(int __sig, void _Cdecl (* __func)(int))) (int);
}
#else
void _Cdecl (* _Cdecl signal(int __sig, void _Cdecl (* func)())) (int);
#endif

#endif

 

    14.stdio.h

/*  stdio.h

    Definitions for stream input/output.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __STDIO_H
#define __STDIO_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifndef NULL
#include <_null.h>
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned size_t;
#endif

/* Definition of the file position type
*/
typedef long    fpos_t;


/* Definition of the control structure for streams
*/
typedef struct  {
        int             level;          /* fill/empty level of buffer */
        unsigned        flags;          /* File status flags          */
        char            fd;             /* File descriptor            */
        unsigned char   hold;           /* Ungetc char if no buffer   */
        int             bsize;          /* Buffer size                */
        unsigned char   *buffer;   /* Data transfer buffer       */
        unsigned char   *curp;     /* Current active pointer     */
        unsigned        istemp;         /* Temporary file indicator   */
        short           token;          /* Used for validity checking */
}       FILE;                           /* This is the FILE object    */

/* Bufferisation type to be used as 3rd argument for "setvbuf" function
*/
#define _IOFBF  0
#define _IOLBF  1
#define _IONBF  2

/*  "flags" bits definitions
*/
#define _F_RDWR 0x0003                  /* Read/write flag       */
#define _F_READ 0x0001                  /* Read only file        */
#define _F_WRIT 0x0002                  /* Write only file       */
#define _F_BUF  0x0004                  /* Malloc'ed Buffer data */
#define _F_LBUF 0x0008                  /* line-buffered file    */
#define _F_ERR  0x0010                  /* Error indicator       */
#define _F_EOF  0x0020                  /* EOF indicator         */
#define _F_BIN  0x0040                  /* Binary file indicator */
#define _F_IN   0x0080                  /* Data is incoming      */
#define _F_OUT  0x0100                  /* Data is outgoing      */
#define _F_TERM 0x0200                  /* File is a terminal    */

/* End-of-file constant definition
*/
#define EOF (-1)            /* End of file indicator */

/* Number of files that can be open simultaneously
*/
#if __STDC__
#define FOPEN_MAX 18        /* Able to have 18 files (20 - stdaux & stdprn) */
#else
#define FOPEN_MAX 20        /* Able to have 20 files */
#define SYS_OPEN  20
#endif

#define FILENAME_MAX 80

/* Default buffer size use by "setbuf" function
*/
#define BUFSIZ  512         /* Buffer size for stdio */

/* Size of an arry large enough to hold a temporary file name string
*/
#define L_ctermid   5       /* CON: plus null byte */
#define P_tmpdir    ""      /* temporary directory */
#define L_tmpnam    13      /* tmpnam buffer size */

/* Constants to be used as 3rd argument for "fseek" function
*/
#define SEEK_CUR    1
#define SEEK_END    2
#define SEEK_SET    0

/* Number of unique file names that shall be generated by "tmpnam" function
*/
#define TMP_MAX     0xFFFF

/* Standard I/O predefined streams
*/

#if !defined( _RTLDLL )
extern  FILE    _Cdecl _streams[];
extern  unsigned    _Cdecl _nfile;

#define stdin   (&_streams[0])
#define stdout  (&_streams[1])
#define stderr  (&_streams[2])

#if !__STDC__
#define stdaux  (&_streams[3])
#define stdprn  (&_streams[4])
#endif

#else

#ifdef __cplusplus
extern "C" {
#endif
FILE far * far __getStream(int);
#ifdef __cplusplus
}
#endif

#define stdin   __getStream(0)
#define stdout  __getStream(1)
#define stderr  __getStream(2)
#define stdaux  __getStream(3)
#define stdprn  __getStream(4)

#endif

#ifdef __cplusplus
extern "C" {
#endif
void    _Cdecl clearerr(FILE *__stream);
int     _Cdecl fclose(FILE *__stream);
int     _Cdecl fflush(FILE *__stream);
int     _Cdecl fgetc(FILE *__stream);
int     _Cdecl fgetpos(FILE *__stream, fpos_t *__pos);
char   *_Cdecl fgets(char *__s, int __n, FILE *__stream);
FILE   *_Cdecl fopen(const char *__path, const char *__mode);
int     _Cdecl fprintf(FILE *__stream, const char *__format, ...);
int     _Cdecl fputc(int __c, FILE *__stream);
int     _Cdecl fputs(const char *__s, FILE *__stream);
size_t  _Cdecl fread(void *__ptr, size_t __size, size_t __n,
                     FILE *__stream);
FILE   *_Cdecl freopen(const char *__path, const char *__mode,
                            FILE *__stream);
int     _Cdecl fscanf(FILE *__stream, const char *__format, ...);
int     _Cdecl fseek(FILE *__stream, long __offset, int __whence);
int     _Cdecl fsetpos(FILE *__stream, const fpos_t *__pos);
long    _Cdecl ftell(FILE *__stream);
size_t  _Cdecl fwrite(const void *__ptr, size_t __size, size_t __n,
                      FILE *__stream);
char   *_Cdecl gets(char *__s);
void    _Cdecl perror(const char *__s);
int     _Cdecl printf(const char *__format, ...);
int     _Cdecl puts(const char *__s);
int     _CType remove(const char *__path);
int     _CType rename(const char *__oldname,const char *__newname);
void    _Cdecl rewind(FILE *__stream);
int     _Cdecl scanf(const char *__format, ...);
void    _Cdecl setbuf(FILE *__stream, char *__buf);
int     _Cdecl setvbuf(FILE *__stream, char *__buf,
                       int __type, size_t __size);
int     _Cdecl sprintf(char *__buffer, const char *__format, ...);
int     _Cdecl sscanf(const char *__buffer,
                      const char *__format, ...);
char   *_Cdecl strerror(int __errnum);
FILE   *_Cdecl tmpfile(void);
char   *_Cdecl tmpnam(char *__s);
int     _Cdecl ungetc(int __c, FILE *__stream);
int     _Cdecl vfprintf(FILE *__stream, const char *__format,
                        void *__arglist);
int     _Cdecl vfscanf(FILE *__stream, const char *__format,
                        void *__arglist);
int     _CType vprintf(const char *__format, void *__arglist);
int     _Cdecl vscanf(const char *__format, void *__arglist);
int     _Cdecl vsprintf(char *__buffer, const char *__format,
                        void *__arglist);
int     _Cdecl vsscanf(const char *__buffer, const char *__format,
                        void *__arglist);
int     _CType unlink(const char *__path);
int     _Cdecl getc(FILE *__fp);

int     _Cdecl getchar(void);
int     _Cdecl putchar(const int __c);

int     _Cdecl putc(const int __c, FILE *__fp);
int     _Cdecl feof(FILE *__fp);
int     _Cdecl ferror(FILE *__fp);


#if !__STDC__
int     _Cdecl fcloseall(void);
FILE   *_Cdecl fdopen(int __handle, char *__type);
int     _Cdecl fgetchar(void);
int     _Cdecl flushall(void);
int     _Cdecl fputchar(int __c);
FILE   * _Cdecl _fsopen (const char *__path, const char *__mode,
                  int __shflag);
int     _Cdecl getw(FILE *__stream);
int     _Cdecl putw(int __w, FILE *__stream);
int     _Cdecl rmtmp(void);
char   * _Cdecl _strerror(const char *__s);
char   * _Cdecl tempnam(char *__dir, char *__pfx);

#define fileno(f)       ((f)->fd)
#endif

int      _Cdecl _fgetc(FILE *__stream);           /* used by getc() macro */
int      _Cdecl _fputc(char __c, FILE *__stream); /* used by putc() macro */

#ifdef  __cplusplus
}
#endif

/*  The following macros provide for common functions */

#define ferror(f)   ((f)->flags & _F_ERR)
#define feof(f)     ((f)->flags & _F_EOF)

#define getc(f) \
  ((--((f)->level) >= 0) ? (unsigned char)(*(f)->curp++) : \
    _fgetc (f))

#define putc(c,f) \
  ((++((f)->level) < 0) ? (unsigned char)(*(f)->curp++=(c)) : \
    _fputc ((c),f))

#define getchar()  getc(stdin)
#define putchar(c) putc((c), stdout)

#define ungetc(c,f) ungetc((c),f)   /* traditionally a macro */

#endif

 

    15.time.h

/*  time.h

    Struct and function declarations for dealing with time.

    Copyright (c) 1987, 1991 by Borland International
    All Rights Reserved.
*/

#ifndef __TIME_H
#define __TIME_H

#if !defined( __DEFS_H )
#include <_defs.h>
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned size_t;
#endif

#ifndef  _TIME_T
#define  _TIME_T
typedef long time_t;
#endif

#ifndef  _CLOCK_T
#define  _CLOCK_T
typedef long clock_t;


#define CLOCKS_PER_SEC 18.2
#define CLK_TCK        18.2

#endif  /* _TIME_T */

struct tm
{
  int   tm_sec;
  int   tm_min;
  int   tm_hour;
  int   tm_mday;
  int   tm_mon;
  int   tm_year;
  int   tm_wday;
  int   tm_yday;
  int   tm_isdst;
};

#ifdef __cplusplus
extern "C" {
#endif
char *     _Cdecl asctime(const struct tm *__tblock);
char *     _Cdecl ctime(const time_t *__time);
double      _Cdecl difftime(time_t __time2, time_t __time1);
struct tm * _Cdecl gmtime(const time_t *__timer);
struct tm * _Cdecl localtime(const time_t *__timer);
time_t      _Cdecl time(time_t *__timer);
time_t      _Cdecl mktime(struct tm *__timeptr);
clock_t     _Cdecl clock(void);
size_t      _Cdecl strftime(char *__s, size_t __maxsize,
                        const char *__fmt, const struct tm *__t);

#if !__STDC__

extern int  _Cdecl  daylight;
extern long _Cdecl  timezone;
extern char * const _Cdecl tzname[2];

int         _Cdecl  stime(time_t *__tp);
void        _Cdecl  tzset(void);
char * _Cdecl  _strdate(char *datestr);
char * _Cdecl  _strtime(char *timestr);
#endif

#ifdef __cplusplus
}
#endif

#endif

 

    另外 C95(C89修正案1) 增加了3个头文件

    1

     iso646.h

   

/* Copyright (C) 1997, 1999 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */

/* As a special exception, if you include this header file into source
   files compiled by GCC, this header file does not by itself cause
   the resulting executable to be covered by the GNU General Public
   License.  This exception does not however invalidate any other
   reasons why the executable file might be covered by the GNU General
   Public License.  */

/*
 * ISO C Standard:  7.9  Alternative spellings  <iso646.h>
 */

#ifndef _ISO646_H
#define _ISO646_H

#ifndef __cplusplus
#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=
#endif

#endif

     2 . wchar.h   

/*
 * wchar.h
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is a part of the mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER within the package.
 *
 * Defines of all functions for supporting wide characters. Actually it
 * just includes all those headers, which is not a good thing to do from a
 * processing time point of view, but it does mean that everything will be
 * in sync.
 *
 */

#ifndef _WCHAR_H_
#define _WCHAR_H_

/* All the headers include this file. */
#include <_mingw.h>

#ifndef RC_INVOKED

#define __need_size_t
#define __need_wint_t
#define __need_wchar_t
#define __need_NULL
#include <stddef.h>

#ifndef __VALIST
#if defined __GNUC__ && __GNUC__ >= 3
#define __need___va_list
#include <stdarg.h>
#define __VALIST __builtin_va_list
#else
#define __VALIST char*
#endif
#endif

#endif /* Not RC_INVOKED */

/*
 * MSDN says that isw* char classifications are in wchar.h and wctype.h.
 * Although the wctype names are ANSI, their exposure in this header is
 * not.
 */
#include <wctype.h>

#ifndef __STRICT_ANSI__
/* This is necessary to support the the non-ANSI wchar declarations
   here. */
#include <sys/types.h>
#endif /* __STRICT_ANSI__ */

#define WCHAR_MIN 0
#define WCHAR_MAX ((wchar_t)-1)

#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif

#ifndef RC_INVOKED

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _FILE_DEFINED  /* Also in stdio.h */
#define _FILE_DEFINED
typedef struct _iobuf
{
 char* _ptr;
 int _cnt;
 char* _base;
 int _flag;
 int _file;
 int _charbuf;
 int _bufsiz;
 char* _tmpfname;
} FILE;
#endif /* Not _FILE_DEFINED */

#ifndef _TIME_T_DEFINED  /* Also in time.h */
typedef long time_t;
#define _TIME_T_DEFINED
#endif

#ifndef _TM_DEFINED /* Also in time.h */
struct tm {
        int tm_sec;     /* seconds after the minute - [0,59] */
        int tm_min;     /* minutes after the hour - [0,59] */
        int tm_hour;    /* hours since midnight - [0,23] */
        int tm_mday;    /* day of the month - [1,31] */
        int tm_mon;     /* months since January - [0,11] */
        int tm_year;    /* years since 1900 */
        int tm_wday;    /* days since Sunday - [0,6] */
        int tm_yday;    /* days since January 1 - [0,365] */
        int tm_isdst;   /* daylight savings time flag */
        };
#define _TM_DEFINED
#endif

#ifndef _WSTDIO_DEFINED
/*  Also in stdio.h - keep in sync */
_CRTIMP int __cdecl fwprintf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl wprintf (const wchar_t*, ...);
_CRTIMP int __cdecl swprintf (wchar_t*, const wchar_t*, ...);
_CRTIMP int __cdecl _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
_CRTIMP int __cdecl vfwprintf (FILE*, const wchar_t*, __VALIST);
_CRTIMP int __cdecl vwprintf (const wchar_t*, __VALIST);
_CRTIMP int __cdecl vswprintf (wchar_t*, const wchar_t*, __VALIST);
_CRTIMP int __cdecl _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
_CRTIMP int __cdecl fwscanf (FILE*, const wchar_t*, ...);
_CRTIMP int __cdecl wscanf (const wchar_t*, ...);
_CRTIMP int __cdecl swscanf (const wchar_t*, const wchar_t*, ...);
_CRTIMP wint_t __cdecl fgetwc (FILE*);
_CRTIMP wint_t __cdecl fputwc (wchar_t, FILE*);
_CRTIMP wint_t __cdecl ungetwc (wchar_t, FILE*);

#ifdef __MSVCRT__
_CRTIMP wchar_t* __cdecl fgetws (wchar_t*, int, FILE*);
_CRTIMP int __cdecl fputws (const wchar_t*, FILE*);
_CRTIMP wint_t __cdecl getwc (FILE*);
_CRTIMP wint_t __cdecl getwchar (void);
_CRTIMP wint_t __cdecl putwc (wint_t, FILE*);
_CRTIMP wint_t __cdecl putwchar (wint_t);
#ifndef __STRICT_ANSI__
_CRTIMP wchar_t* __cdecl _getws (wchar_t*);
_CRTIMP int __cdecl _putws (const wchar_t*);
_CRTIMP FILE* __cdecl _wfdopen(int, wchar_t *);
_CRTIMP FILE* __cdecl _wfopen (const wchar_t*, const wchar_t*);
_CRTIMP FILE* __cdecl _wfreopen (const wchar_t*, const wchar_t*, FILE*);
_CRTIMP FILE* __cdecl _wfsopen (const wchar_t*, const wchar_t*, int);
_CRTIMP wchar_t* __cdecl _wtmpnam (wchar_t*);
_CRTIMP wchar_t* __cdecl _wtempnam (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl _wrename (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl _wremove (const wchar_t*);
_CRTIMP void __cdecl _wperror (const wchar_t*);
_CRTIMP FILE* __cdecl _wpopen (const wchar_t*, const wchar_t*);
#endif  /* __STRICT_ANSI__ */
#endif /* __MSVCRT__ */

#ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t*  format, ...);
__CRT_INLINE int __cdecl
vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
  { return _vsnwprintf ( s, n, format, arg);}
int __cdecl vwscanf (const wchar_t * __restrict__, __VALIST);
int __cdecl vfwscanf (FILE * __restrict__,
         const wchar_t * __restrict__, __VALIST);
int __cdecl vswscanf (const wchar_t * __restrict__,
         const wchar_t * __restrict__, __VALIST);
#endif

#define _WSTDIO_DEFINED
#endif /* _WSTDIO_DEFINED */

#ifndef _WSTDLIB_DEFINED /* also declared in stdlib.h */
_CRTIMP long __cdecl   wcstol (const wchar_t*, wchar_t**, int);
_CRTIMP unsigned long __cdecl wcstoul (const wchar_t*, wchar_t**, int);
_CRTIMP double __cdecl  wcstod (const wchar_t*, wchar_t**);
#if !defined __NO_ISOCEXT /* extern stub in static libmingwex.a */
__CRT_INLINE float __cdecl wcstof( const wchar_t *nptr, wchar_t **endptr)
{  return (wcstod(nptr, endptr)); }
long double __cdecl wcstold (const wchar_t * __restrict__, wchar_t ** __restrict__);
#endif /* __NO_ISOCEXT */
#define  _WSTDLIB_DEFINED
#endif /* _WSTDLIB_DEFINED */

#ifndef _WTIME_DEFINED
#ifndef __STRICT_ANSI__
#ifdef __MSVCRT__
/* wide function prototypes, also declared in time.h */
_CRTIMP wchar_t* __cdecl _wasctime (const struct tm*);
_CRTIMP wchar_t* __cdecl _wctime (const time_t*);
_CRTIMP wchar_t* __cdecl _wstrdate (wchar_t*);
_CRTIMP wchar_t* __cdecl _wstrtime (wchar_t*);
#if __MSVCRT_VERSION__ >= 0x601
_CRTIMP wchar_t* __cdecl _wctime64 (const __time64_t*);
#endif
#endif /* __MSVCRT__ */
#endif /* __STRICT_ANSI__ */
_CRTIMP size_t __cdecl wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*);
#define _WTIME_DEFINED
#endif /* _WTIME_DEFINED */


#ifndef _WSTRING_DEFINED
/*
 * Unicode versions of the standard string calls.
 * Also in string.h.
 */
_CRTIMP wchar_t* __cdecl wcscat (wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl wcschr (const wchar_t*, wchar_t);
_CRTIMP int __cdecl wcscmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl wcscoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl wcscpy (wchar_t*, const wchar_t*);
_CRTIMP size_t __cdecl wcscspn (const wchar_t*, const wchar_t*);
/* Note:  _wcserror requires __MSVCRT_VERSION__ >= 0x0700.  */
_CRTIMP size_t __cdecl wcslen (const wchar_t*);
_CRTIMP wchar_t* __cdecl wcsncat (wchar_t*, const wchar_t*, size_t);
_CRTIMP int __cdecl wcsncmp(const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl wcsncpy(wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl wcspbrk(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl wcsrchr(const wchar_t*, wchar_t);
_CRTIMP size_t __cdecl wcsspn(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl wcsstr(const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl wcstok(wchar_t*, const wchar_t*);
_CRTIMP size_t __cdecl wcsxfrm(wchar_t*, const wchar_t*, size_t);

#ifndef __STRICT_ANSI__
/*
 * Unicode versions of non-ANSI functions provided by CRTDLL.
 */

/* NOTE: _wcscmpi not provided by CRTDLL, this define is for portability */
#define  _wcscmpi _wcsicmp

_CRTIMP wchar_t* __cdecl _wcsdup (const wchar_t*);
_CRTIMP int __cdecl _wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl _wcsicoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl _wcslwr (wchar_t*);
_CRTIMP int __cdecl _wcsnicmp (const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl _wcsnset (wchar_t*, wchar_t, size_t);
_CRTIMP wchar_t* __cdecl _wcsrev (wchar_t*);
_CRTIMP wchar_t* __cdecl _wcsset (wchar_t*, wchar_t);
_CRTIMP wchar_t* __cdecl _wcsupr (wchar_t*);

#ifdef __MSVCRT__
_CRTIMP int __cdecl  _wcsncoll(const wchar_t*, const wchar_t*, size_t);
_CRTIMP int   __cdecl _wcsnicoll(const wchar_t*, const wchar_t*, size_t);
#if __MSVCRT_VERSION__ >= 0x0700
_CRTIMP  wchar_t* __cdecl _wcserror(int);
_CRTIMP  wchar_t* __cdecl __wcserror(const wchar_t*);
#endif
#endif

#ifndef _NO_OLDNAMES
/* NOTE: There is no _wcscmpi, but this is for compatibility. */
__CRT_INLINE int __cdecl
wcscmpi (const wchar_t * __ws1, const wchar_t * __ws2)
  {return _wcsicmp (__ws1, __ws2);}
_CRTIMP wchar_t* __cdecl wcsdup (const wchar_t*);
_CRTIMP int __cdecl wcsicmp (const wchar_t*, const wchar_t*);
_CRTIMP int __cdecl wcsicoll (const wchar_t*, const wchar_t*);
_CRTIMP wchar_t* __cdecl wcslwr (wchar_t*);
_CRTIMP int __cdecl wcsnicmp (const wchar_t*, const wchar_t*, size_t);
_CRTIMP wchar_t* __cdecl wcsnset (wchar_t*, wchar_t, size_t);
_CRTIMP wchar_t* __cdecl wcsrev (wchar_t*);
_CRTIMP wchar_t* __cdecl wcsset (wchar_t*, wchar_t);
_CRTIMP wchar_t* __cdecl wcsupr (wchar_t*);
#endif /* Not _NO_OLDNAMES */

#endif /* Not strict ANSI */

#define _WSTRING_DEFINED
#endif  /* _WSTRING_DEFINED */

/* These are resolved by -lmsvcp60 */
/* If you don't have msvcp60.dll in your windows system directory, you can
   easily obtain it with a search from your favorite search engine. */
#ifndef __STRICT_ANSI__
typedef wchar_t _Wint_t;
#endif

typedef int mbstate_t;

wint_t __cdecl btowc(int);
size_t __cdecl mbrlen(const char *, size_t, mbstate_t *);
size_t __cdecl mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
size_t __cdecl mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);

size_t __cdecl wcrtomb(char *, wchar_t, mbstate_t *);
size_t __cdecl wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
int __cdecl wctob(wint_t);

#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
__CRT_INLINE int __cdecl fwide(FILE* __UNUSED_PARAM(stream), int __UNUSED_PARAM(mode))
  {return -1;} /* limited to byte orientation */
__CRT_INLINE int __cdecl mbsinit(const mbstate_t* __UNUSED_PARAM(ps))
  {return 1;}
wchar_t* __cdecl wmemset(wchar_t* s, wchar_t c, size_t n);
wchar_t* __cdecl wmemchr(const wchar_t* s, wchar_t c, size_t n);
int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n);
wchar_t* __cdecl wmemcpy(wchar_t* __restrict__ s1, const wchar_t* __restrict__ s2,
   size_t n);
wchar_t* __cdecl wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
long long __cdecl wcstoll(const wchar_t* __restrict__ nptr,
    wchar_t** __restrict__ endptr, int base);
unsigned long long __cdecl wcstoull(const wchar_t* __restrict__ nptr,
       wchar_t ** __restrict__ endptr, int base);
#endif /* __NO_ISOCEXT */

#ifndef __STRICT_ANSI__
/* non-ANSI wide char functions from io.h, direct.h, sys/stat.h and locale.h.  */

#ifndef _FSIZE_T_DEFINED
typedef unsigned long _fsize_t;
#define _FSIZE_T_DEFINED
#endif

#ifndef _WFINDDATA_T_DEFINED
struct _wfinddata_t {
 unsigned attrib;
 time_t  time_create; /* -1 for FAT file systems */
 time_t  time_access; /* -1 for FAT file systems */
 time_t  time_write;
 _fsize_t size;
 wchar_t  name[260]; /* may include spaces. */
};
struct _wfinddatai64_t {
 unsigned    attrib;
 time_t      time_create;
 time_t      time_access;
 time_t      time_write;
 __int64     size;
 wchar_t     name[260];
};
struct __wfinddata64_t {
        unsigned    attrib;
        __time64_t  time_create;   
        __time64_t  time_access;
        __time64_t  time_write;
        _fsize_t    size;
        wchar_t     name[260];
};
#define _WFINDDATA_T_DEFINED
#endif

/* Wide character versions. Also defined in io.h. */
/* CHECK: I believe these only exist in MSVCRT, and not in CRTDLL. Also
   applies to other wide character versions? */
#if !defined (_WIO_DEFINED)
#if defined (__MSVCRT__)
#include <stdint.h>  /* For intptr_t.  */
_CRTIMP int __cdecl _waccess (const wchar_t*, int);
_CRTIMP int __cdecl _wchmod (const wchar_t*, int);
_CRTIMP int __cdecl _wcreat (const wchar_t*, int);
_CRTIMP long __cdecl _wfindfirst (const wchar_t*, struct _wfinddata_t *);
_CRTIMP int __cdecl _wfindnext (long, struct _wfinddata_t *);
_CRTIMP int __cdecl _wunlink (const wchar_t*);
_CRTIMP int __cdecl _wopen (const wchar_t*, int, ...);
_CRTIMP int __cdecl _wsopen (const wchar_t*, int, int, ...);
_CRTIMP wchar_t* __cdecl _wmktemp (wchar_t*);
_CRTIMP long __cdecl _wfindfirsti64 (const wchar_t*, struct _wfinddatai64_t*);
_CRTIMP int __cdecl  _wfindnexti64 (long, struct _wfinddatai64_t*);
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t*, struct __wfinddata64_t*);
_CRTIMP intptr_t __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#endif /* defined (__MSVCRT__) */
#define _WIO_DEFINED
#endif /* _WIO_DEFINED */

#ifndef _WDIRECT_DEFINED
/* Also in direct.h */
#ifdef __MSVCRT__
_CRTIMP int __cdecl   _wchdir (const wchar_t*);
_CRTIMP wchar_t* __cdecl  _wgetcwd (wchar_t*, int);
_CRTIMP wchar_t* __cdecl  _wgetdcwd (int, wchar_t*, int);
_CRTIMP int __cdecl   _wmkdir (const wchar_t*);
_CRTIMP int __cdecl   _wrmdir (const wchar_t*);
#endif /* __MSVCRT__ */
#define _WDIRECT_DEFINED
#endif /* _WDIRECT_DEFINED */

#ifndef _STAT_DEFINED
/*
 * The structure manipulated and returned by stat and fstat.
 *
 * NOTE: If called on a directory the values in the time fields are not only
 * invalid, they will cause localtime et. al. to return NULL. And calling
 * asctime with a NULL pointer causes an Invalid Page Fault. So watch it!
 */
struct _stat
{
 _dev_t st_dev;  /* Equivalent to drive number 0=A 1=B ... */
 _ino_t st_ino;  /* Always zero ? */
 _mode_t st_mode; /* See above constants */
 short st_nlink; /* Number of links. */
 short st_uid;  /* User: Maybe significant on NT ? */
 short st_gid;  /* Group: Ditto */
 _dev_t st_rdev; /* Seems useless (not even filled in) */
 _off_t st_size; /* File size in bytes */
 time_t st_atime; /* Accessed date (always 00:00 hrs local
     * on FAT) */
 time_t st_mtime; /* Modified time */
 time_t st_ctime; /* Creation time */
};

struct stat
{
 _dev_t st_dev;  /* Equivalent to drive number 0=A 1=B ... */
 _ino_t st_ino;  /* Always zero ? */
 _mode_t st_mode; /* See above constants */
 short st_nlink; /* Number of links. */
 short st_uid;  /* User: Maybe significant on NT ? */
 short st_gid;  /* Group: Ditto */
 _dev_t st_rdev; /* Seems useless (not even filled in) */
 _off_t st_size; /* File size in bytes */
 time_t st_atime; /* Accessed date (always 00:00 hrs local
     * on FAT) */
 time_t st_mtime; /* Modified time */
 time_t st_ctime; /* Creation time */
};

#if defined (__MSVCRT__)
struct _stati64 {
    _dev_t st_dev;
    _ino_t st_ino;
    unsigned short st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    _dev_t st_rdev;
    __int64 st_size;
    time_t st_atime;
    time_t st_mtime;
    time_t st_ctime;
    };

struct __stat64
{
    _dev_t st_dev;
    _ino_t st_ino;
    _mode_t st_mode;
    short st_nlink;
    short st_uid;
    short st_gid;
    _dev_t st_rdev;
    _off_t st_size;
    __time64_t st_atime;
    __time64_t st_mtime;
    __time64_t st_ctime;
};
#endif  /* __MSVCRT__ */
#define _STAT_DEFINED
#endif /* _STAT_DEFINED */

#if !defined ( _WSTAT_DEFINED)
/* also declared in sys/stat.h */
#if defined __MSVCRT__
_CRTIMP int __cdecl _wstat (const wchar_t*, struct _stat*);
_CRTIMP int __cdecl _wstati64 (const wchar_t*, struct _stati64*);
#if __MSVCRT_VERSION__ >= 0x0601
_CRTIMP int __cdecl _wstat64 (const wchar_t*, struct __stat64*);
#endif /* __MSVCRT_VERSION__ >= 0x0601 */
#endif  /* __MSVCRT__ */
#define _WSTAT_DEFINED
#endif /* ! _WSTAT_DEFIND  */

#ifndef _WLOCALE_DEFINED  /* also declared in locale.h */
_CRTIMP wchar_t* __cdecl _wsetlocale (int, const wchar_t*);
#define _WLOCALE_DEFINED
#endif

#endif /* not __STRICT_ANSI__ */

#ifdef __cplusplus
} /* end of extern "C" */
#endif

#endif /* Not RC_INVOKED */

#endif /* not _WCHAR_H_ */

  3.wctype.h

/*
 * wctype.h
 *
 * Functions for testing wide character types and converting characters.
 *
 * This file is part of the Mingw32 package.
 *
 * Contributors:
 *  Created by Mumit Khan <
[email protected]>
 *
 *  THIS SOFTWARE IS NOT COPYRIGHTED
 *
 *  This source code is offered for use in the public domain. You may
 *  use, modify or distribute it freely.
 *
 *  This code is distributed in the hope that it will be useful but
 *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
 *  DISCLAIMED. This includes but is not limited to warranties of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 */

#ifndef _WCTYPE_H_
#define _WCTYPE_H_

/* All the headers include this file. */
#include <_mingw.h>

#define __need_wchar_t
#define __need_wint_t
#ifndef RC_INVOKED
#include <stddef.h>
#endif /* Not RC_INVOKED */

/*
 * The following flags are used to tell iswctype and _isctype what character
 * types you are looking for.
 */
#define _UPPER  0x0001
#define _LOWER  0x0002
#define _DIGIT  0x0004
#define _SPACE  0x0008
#define _PUNCT  0x0010
#define _CONTROL 0x0020
#define _BLANK  0x0040
#define _HEX  0x0080
#define _LEADBYTE 0x8000

#define _ALPHA  0x0103

#ifndef RC_INVOKED

#ifdef __cplusplus
extern "C" {
#endif

#ifndef WEOF
#define WEOF (wchar_t)(0xFFFF)
#endif

#ifndef _WCTYPE_T_DEFINED
typedef wchar_t wctype_t;
#define _WCTYPE_T_DEFINED
#endif

/* Wide character equivalents - also in ctype.h */
_CRTIMP int __cdecl iswalnum(wint_t);
_CRTIMP int __cdecl iswalpha(wint_t);
_CRTIMP int __cdecl iswascii(wint_t);
_CRTIMP int __cdecl iswcntrl(wint_t);
_CRTIMP int __cdecl iswctype(wint_t, wctype_t);
_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); /* Obsolete! */
_CRTIMP int __cdecl iswdigit(wint_t);
_CRTIMP int __cdecl iswgraph(wint_t);
_CRTIMP int __cdecl iswlower(wint_t);
_CRTIMP int __cdecl iswprint(wint_t);
_CRTIMP int __cdecl iswpunct(wint_t);
_CRTIMP int __cdecl iswspace(wint_t);
_CRTIMP int __cdecl iswupper(wint_t);
_CRTIMP int __cdecl iswxdigit(wint_t);

_CRTIMP wchar_t __cdecl towlower(wchar_t);
_CRTIMP wchar_t __cdecl towupper(wchar_t);

_CRTIMP int __cdecl isleadbyte (int);

/* Also in ctype.h */

#ifdef __DECLSPEC_SUPPORTED
__MINGW_IMPORT unsigned short _ctype[];
# ifdef __MSVCRT__
  __MINGW_IMPORT unsigned short* _pctype;
# else /* CRTDLL */
  __MINGW_IMPORT unsigned short* _pctype_dll;
# define  _pctype _pctype_dll
# endif

#else  /* ! __DECLSPEC_SUPPORTED */
extern unsigned short** _imp___ctype;
#define _ctype (*_imp___ctype)
# ifdef __MSVCRT__
  extern unsigned short** _imp___pctype;
# define _pctype (*_imp___pctype)
# else /* CRTDLL */
  extern unsigned short** _imp___pctype_dll;
# define _pctype (*_imp___pctype_dll)
# endif /* CRTDLL */
#endif  /*  __DECLSPEC_SUPPORTED */


#if !(defined (__NO_INLINE__) || defined(__NO_CTYPE_INLINES) \
      || defined(__WCTYPE_INLINES_DEFINED))
#define __WCTYPE_INLINES_DEFINED
__CRT_INLINE int __cdecl iswalnum(wint_t wc) {return (iswctype(wc,_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl iswalpha(wint_t wc) {return (iswctype(wc,_ALPHA));}
__CRT_INLINE int __cdecl iswascii(wint_t wc) {return ((wc & ~0x7F) ==0);}
__CRT_INLINE int __cdecl iswcntrl(wint_t wc) {return (iswctype(wc,_CONTROL));}
__CRT_INLINE int __cdecl iswdigit(wint_t wc) {return (iswctype(wc,_DIGIT));}
__CRT_INLINE int __cdecl iswgraph(wint_t wc) {return (iswctype(wc,_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl iswlower(wint_t wc) {return (iswctype(wc,_LOWER));}
__CRT_INLINE int __cdecl iswprint(wint_t wc) {return (iswctype(wc,_BLANK|_PUNCT|_ALPHA|_DIGIT));}
__CRT_INLINE int __cdecl iswpunct(wint_t wc) {return (iswctype(wc,_PUNCT));}
__CRT_INLINE int __cdecl iswspace(wint_t wc) {return (iswctype(wc,_SPACE));}
__CRT_INLINE int __cdecl iswupper(wint_t wc) {return (iswctype(wc,_UPPER));}
__CRT_INLINE int __cdecl iswxdigit(wint_t wc) {return (iswctype(wc,_HEX));}
__CRT_INLINE int __cdecl isleadbyte(int c) {return (_pctype[(unsigned char)(c)] & _LEADBYTE);}
#endif /* !(defined(__NO_CTYPE_INLINES) || defined(__WCTYPE_INLINES_DEFINED)) */


typedef wchar_t wctrans_t;
_CRTIMP wint_t __cdecl  towctrans(wint_t, wctrans_t);
_CRTIMP wctrans_t __cdecl wctrans(const char*);
_CRTIMP wctype_t __cdecl wctype(const char*);

#ifdef __cplusplus
}
#endif

#endif /* Not RC_INVOKED */

#endif /* Not _WCTYPE_H_ */

 

-----------------------------------------------------------------------------------------------------

    后来C99又增加了6标准库头文件,由于不常用,就不详细列出其源码了,这六个分别是

    1.complex.h

    2.fenv.h

    3.inttypes.h

    4.stdbool.h

    5.stdint.h

    6.  tgmath.h

 

 

 

 

 

 

  

你可能感兴趣的:(C语言15大头文件介绍)