include/ctype.h
/***
*ctype.h - character conversion macros and ctype macros
*
* Copyright (c) 1985-1989, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines macros for character classification/conversion.
* [ANSI/System V]
*
****/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/*
* This declaration allows the user access to the ctype look-up
* array _ctype defined in ctype.obj by simply including ctype.h
*/
extern unsigned char _NEAR _CDECL _ctype[];
/* set bit masks for the possible character types */
#define _UPPER 0x1 /* upper case letter */
#define _LOWER 0x2 /* lower case letter */
#define _DIGIT 0x4 /* digit[0-9] */
#define _SPACE 0x8 /* tab, carriage return, newline, */
/* vertical tab or form feed */
#define _PUNCT 0x10 /* punctuation character */
#define _CONTROL 0x20 /* control character */
#define _BLANK 0x40 /* space char */
#define _HEX 0x80 /* hexadecimal digit */
/* the character classification macro definitions */
#define isalpha(c) ( (_ctype+1)[c] & (_UPPER|_LOWER) )
#define isupper(c) ( (_ctype+1)[c] & _UPPER )
#define islower(c) ( (_ctype+1)[c] & _LOWER )
#define isdigit(c) ( (_ctype+1)[c] & _DIGIT )
#define isxdigit(c) ( (_ctype+1)[c] & _HEX )
#define isspace(c) ( (_ctype+1)[c] & _SPACE )
#define ispunct(c) ( (_ctype+1)[c] & _PUNCT )
#define isalnum(c) ( (_ctype+1)[c] & (_UPPER|_LOWER|_DIGIT) )
#define isprint(c) ( (_ctype+1)[c] & (_BLANK|_PUNCT|_UPPER|_LOWER|_DIGIT) )
#define isgraph(c) ( (_ctype+1)[c] & (_PUNCT|_UPPER|_LOWER|_DIGIT) )
#define iscntrl(c) ( (_ctype+1)[c] & _CONTROL )
#define toupper(c) ( (islower(c)) ? _toupper(c) : (c) )
#define tolower(c) ( (isupper(c)) ? _tolower(c) : (c) )
#define _tolower(c) ( (c)-'A'+'a' )
#define _toupper(c) ( (c)-'a'+'A' )
#define isascii(c) ( (unsigned)(c) < 0x80 )
#define toascii(c) ( (c) & 0x7f )
/* MS C version 2.0 extended ctype macros */
#define iscsymf(c) (isalpha(c) || ((c) == '_'))
#define iscsym(c) (isalnum(c) || ((c) == '_'))
include/errno.h
/***
*errno.h - system wide error numbers (set by system calls)
*
* Copyright (c) 1985-1989, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the system-wide error numbers (set by
* system calls). Conforms to the XENIX standard. Extended
* for compatibility with Uniforum standard.
* [System V]
*
****/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* declare reference to errno */
extern int _NEAR _CDECL errno;
/* Error Codes */
#define EZERO 0
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#define ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#define EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
#define EUCLEAN 35
#define EDEADLOCK 36
include/signal.h
/***
*signal.h - defines signal values and routines
*
* Copyright (c) 1985-1989, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the signal values and declares the signal functions.
* [ANSI/System V]
*
****/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
#ifndef _SIG_ATOMIC_T_DEFINED
typedef int sig_atomic_t;
#define _SIG_ATOMIC_T_DEFINED
#endif
#define NSIG 23 /* maximum signal number + 1 */
/* signal types */
/* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
#define SIGINT 2 /* interrupt - corresponds to DOS 3.x int 23H */
#define SIGILL 4 /* illegal instruction - invalid function image */
#define SIGFPE 8 /* floating point exception */
#define SIGSEGV 11 /* segment violation */
#define SIGTERM 15 /* Software termination signal from kill */
#define SIGUSR1 16 /* User defined signal 1 */
#define SIGUSR2 17 /* User defined signal 2 */
#define SIGUSR3 20 /* User defined signal 3 */
#define SIGBREAK 21 /* Ctrl-Break sequence */
#define SIGABRT 22 /* abnormal termination triggered by abort call */
/* signal action codes */
/* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
#define SIG_DFL (void (_CDECL *)())0 /* default signal action */
#define SIG_IGN (void (_CDECL *)())1 /* ignore */
#define SIG_SGE (void (_CDECL *)())3 /* signal gets error */
#define SIG_ACK (void (_CDECL *)())4 /* error if handler not setup */
/* signal error value (returned by signal call on error) */
#define SIG_ERR (void (_CDECL *)())-1 /* signal error value */
/* function prototypes */
void (_CDECL * _CDECL signal(int, void (_CDECL *)()))();
int _CDECL raise(int);
include/sys/stat.h
/***
*sys\stat.h - defines structure used by stat() and fstat()
*
* Copyright (c) 1985-1989, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structure used by the stat() and fstat()
* routines.
* [System V]
*
****/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define CDECL cdecl
#else /* extensions not enabled */
#define CDECL
#endif /* NO_EXT_KEYS */
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
/* define structure for returning status information */
#ifndef _STAT_DEFINED
struct stat {
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;
off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#define _STAT_DEFINED
#endif
#define S_IFMT 0170000 /* file type mask */
#define S_IFDIR 0040000 /* directory */
#define S_IFCHR 0020000 /* character special */
#define S_IFREG 0100000 /* regular */
#define S_IREAD 0000400 /* read permission, owner */
#define S_IWRITE 0000200 /* write permission, owner */
#define S_IEXEC 0000100 /* execute/search permission, owner */
/* function prototypes */
int CDECL fstat(int, struct stat *);
int CDECL stat(char *, struct stat *);