include/ansi/errno.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _ERRNO_H
#define _ERRNO_H
#pragma comment(exestr, "ansi @(#) errno.h 20.1 94/12/04 ")
#ifndef _SYS_ERRNO_H
#include <sys/errno.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _REENTRANT
extern int *__thr_errno(void);
#define errno (*__thr_errno())
#else /* !_REENTRANT */
extern int errno;
#endif /* _REENTRANT */
#ifdef __cplusplus
}
#endif
#endif /* _ERRNO_H */
include/ansi/signal.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _SIGNAL_H
#define _SIGNAL_H
#pragma comment(exestr, "ansi @(#) signal.h 20.8 95/12/11 ")
#ifndef _SIG_ATOMIC_T
#define _SIG_ATOMIC_T
/* atomic entity for signal handling */
typedef int sig_atomic_t;
#endif
#ifndef _SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#if __cplusplus
extern "C" {
#endif
extern void (*signal(int, void(*)(int)))(int);
extern int raise(int);
#if __cplusplus
}
#endif
#endif /* _SIGNAL_H */
include/ansi/ctype.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _CTYPE_H
#define _CTYPE_H
#pragma comment(exestr, "ansi @(#) ctype.h 20.2 95/02/10 ")
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _U
#define _U 01 /* Upper case */
#define _L 02 /* Lower case */
#define _N 04 /* Numeral (digit) */
#define _S 010 /* Spacing character */
#define _P 020 /* Punctuation */
#define _C 040 /* Control character */
#define _B 0100 /* Blank */
#define _X 0200 /* heXadecimal digit */
#endif
#ifndef _A
/*
* New character classes for XPG4 to be used with __ctype2[].
*/
#define _A 0001 /* Alpha Character */
#define _G 0002 /* Graphic Character */
#define _R 0004 /* Print Character */
#endif
/* Very ascii dependent */
#define __todigit(n) ((char)((n)+'0'))
#define __toint(c) ((int)((c)-'0'))
#ifdef __cplusplus
/* Necessary so (islanum) yields "right" function in library */
#define isalnum(x) __inlineisalnum(x)
#define isalpha(x) __inlineisalpha(x)
#define iscntrl(x) __inlineiscntrl(x)
#define isdigit(x) __inlineisdigit(x)
#define isgraph(x) __inlineisgraph(x)
#define islower(x) __inlineislower(x)
#define isprint(x) __inlineisprint(x)
#define ispunct(x) __inlineispunct(x)
#define isspace(x) __inlineisspace(x)
#define isupper(x) __inlineisupper(x)
#define isxdigit(x) __inlineisxdigit(x)
#else
/* Use inline function in C++ */
static int __c; /* necessary to ensure param evaluated once */
#endif
#ifdef EOF
#define _EOF_ EOF
#else
#define _EOF_ (-1)
#endif
extern int (isalnum)(int);
extern int (isalpha)(int);
extern int (iscntrl)(int);
extern int (isdigit)(int);
extern int (isgraph)(int);
extern int (islower)(int);
extern int (isprint)(int);
extern int (ispunct)(int);
extern int (isspace)(int);
extern int (isupper)(int);
extern int (isxdigit)(int);
extern int tolower(int);
extern int toupper(int);
extern int isascii(int);
extern int toascii(int);
extern int __tolower(int);
extern int __toupper(int);
extern unsigned char __ctype[];
extern unsigned char __ctype2[];
#if !defined(__lint)
#ifdef __cplusplus
inline int __inlineisalpha(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)__c]) & _A); }
inline int __inlineisupper(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _U); }
inline int __inlineislower(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _L); }
inline int __inlineisdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _N); }
inline int __inlineisxdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _X); }
inline int __inlineisspace(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _S); }
inline int __inlineispunct(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _P); }
inline int __inlineisprint(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _R); }
inline int __inlineisgraph(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _G); }
inline int __inlineiscntrl(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _C); }
inline int __inlineisalnum(int __c) { return(__c == _EOF_ ?
(((__ctype + 1)[__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[__c] & _A)) :
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[(unsigned char)__c] & _A)))
; }
#else
#define isalpha(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)__c]) & _A)
#define isupper(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _U)
#define islower(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _L)
#define isdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _N)
#define isxdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _X)
#define isspace(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _S)
#define ispunct(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _P)
#define isprint(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _R)
#define isgraph(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _G)
#define iscntrl(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _C)
#define isalnum(c) ((__c = (c)) == _EOF_ ? \
(((__ctype + 1)[__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[__c] & _A)) : \
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[(unsigned char)__c] & _A)))
#endif
#define isascii(c) (!((c) & ~0177))
#define toascii(c) ((c) & 0177)
#endif /* lint */
#ifdef __cplusplus
}
#endif
#endif /* _CTYPE_H */
include/nls/i_errno.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/nls/i_errno.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/nls/i_errno.h>
#else /* Normal, default environment */
/*
* Copyright (C) 1993-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
#ifndef _I_ERRNO_H
#define _I_ERRNO_H
#pragma comment(exestr, "xpg4plus @(#) i_errno.h 20.1 94/12/04 ")
/* @)#(i_errno.h 10.1 87/07/31 sccs id by rjs */
/*
* definitions for the i_errno variable
*/
#define I_ERROR -1 /* general error return used */
#define I_EBACC 1 /* inaccessible data base */
#define I_EBADF 2 /* corrupted data base/msgcat. */
#define I_ENMEM 3 /* not enough memory */
#define I_EINTL 4 /* illegal database pointer */
#define I_EIPRP 5 /* illegal property table */
#define I_EICOL 6 /* illegal collation table */
#define I_EICNV 7 /* illegal conversion table */
#define I_EISTI 8 /* illegal string index table */
#define I_EISTR 9 /* illegal string name */
#define I_EICOD 10 /* illegal code in the database */
#define I_EICTM 11 /* illegal format in i_ctime */
#define I_EICPR 12 /* illegal conversion in doprnt */
#define I_EICSC 13 /* illegal conversion in doscan */
#define I_EIBNV 14 /* bad environment */
#define I_EREAD 15 /* read error in message cat. */
#define I_ENMSG 16 /* no message available */
#define I_EBADC 17 /* bad call of function */
#define I_ENOOP 18 /* cannot open message cat. */
extern int i_errno; /* internationalization error global */
#endif /* _I_ERRNO_H */
#endif
include/posix/errno.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _ERRNO_H
#define _ERRNO_H
#pragma comment(exestr, "posix @(#) errno.h 20.1 94/12/04 ")
#ifndef _SYS_ERRNO_H
#include <sys/errno.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _REENTRANT
extern int *__thr_errno(void);
#define errno (*__thr_errno())
#else /* !_REENTRANT */
extern int errno;
#endif /* _REENTRANT */
#ifdef __cplusplus
}
#endif
#endif /* _ERRNO_H */
include/posix/signal.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _SIGNAL_H
#define _SIGNAL_H
#pragma comment(exestr, "posix @(#) signal.h 20.8 95/12/11 ")
#ifndef _SIG_ATOMIC_T
#define _SIG_ATOMIC_T
/* atomic entity for signal handling */
typedef int sig_atomic_t;
#endif
#ifndef _SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#if !defined(_SYS_TYPES_H)
#include <sys/types.h>
#endif
#if __cplusplus
extern "C" {
#endif
extern void (*signal(int, void(*)(int)))(int);
extern int raise(int);
extern int (sigfillset)(sigset_t *);
extern int (sigemptyset)(sigset_t *);
extern int (sigaddset)(sigset_t *, int);
extern int (sigdelset)(sigset_t *, int);
extern int (sigismember)(const sigset_t *, int);
extern int sigpending(sigset_t *);
extern int sigsuspend(const sigset_t *);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int kill(pid_t, int);
extern int sigaction(int, const struct sigaction *, struct sigaction *);
#if __cplusplus
}
#endif
#define raise(sig) kill(getpid(), sig)
#endif /* _SIGNAL_H */
include/posix/ctype.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _CTYPE_H
#define _CTYPE_H
#pragma comment(exestr, "posix @(#) ctype.h 20.2 95/02/10 ")
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _U
#define _U 01 /* Upper case */
#define _L 02 /* Lower case */
#define _N 04 /* Numeral (digit) */
#define _S 010 /* Spacing character */
#define _P 020 /* Punctuation */
#define _C 040 /* Control character */
#define _B 0100 /* Blank */
#define _X 0200 /* heXadecimal digit */
#endif
#ifndef _A
/*
* New character classes for XPG4 to be used with __ctype2[].
*/
#define _A 0001 /* Alpha Character */
#define _G 0002 /* Graphic Character */
#define _R 0004 /* Print Character */
#endif
/* Very ascii dependent */
#define __todigit(n) ((char)((n)+'0'))
#define __toint(c) ((int)((c)-'0'))
#ifdef __cplusplus
/* Necessary so (islanum) yields "right" function in library */
#define isalnum(x) __inlineisalnum(x)
#define isalpha(x) __inlineisalpha(x)
#define iscntrl(x) __inlineiscntrl(x)
#define isdigit(x) __inlineisdigit(x)
#define isgraph(x) __inlineisgraph(x)
#define islower(x) __inlineislower(x)
#define isprint(x) __inlineisprint(x)
#define ispunct(x) __inlineispunct(x)
#define isspace(x) __inlineisspace(x)
#define isupper(x) __inlineisupper(x)
#define isxdigit(x) __inlineisxdigit(x)
#else
/* Use inline function in C++ */
static int __c; /* necessary to ensure param evaluated once */
#endif
#ifdef EOF
#define _EOF_ EOF
#else
#define _EOF_ (-1)
#endif
extern int (isalnum)(int);
extern int (isalpha)(int);
extern int (iscntrl)(int);
extern int (isdigit)(int);
extern int (isgraph)(int);
extern int (islower)(int);
extern int (isprint)(int);
extern int (ispunct)(int);
extern int (isspace)(int);
extern int (isupper)(int);
extern int (isxdigit)(int);
extern int tolower(int);
extern int toupper(int);
extern int isascii(int);
extern int toascii(int);
extern int __tolower(int);
extern int __toupper(int);
extern unsigned char __ctype[];
extern unsigned char __ctype2[];
#if !defined(__lint)
#ifdef __cplusplus
inline int __inlineisalpha(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)__c]) & _A); }
inline int __inlineisupper(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _U); }
inline int __inlineislower(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _L); }
inline int __inlineisdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _N); }
inline int __inlineisxdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _X); }
inline int __inlineisspace(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _S); }
inline int __inlineispunct(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _P); }
inline int __inlineisprint(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _R); }
inline int __inlineisgraph(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _G); }
inline int __inlineiscntrl(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _C); }
inline int __inlineisalnum(int __c) { return(__c == _EOF_ ?
(((__ctype + 1)[__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[__c] & _A)) :
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[(unsigned char)__c] & _A)))
; }
#else
#define isalpha(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)__c]) & _A)
#define isupper(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _U)
#define islower(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _L)
#define isdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _N)
#define isxdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _X)
#define isspace(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _S)
#define ispunct(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _P)
#define isprint(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _R)
#define isgraph(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _G)
#define iscntrl(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _C)
#define isalnum(c) ((__c = (c)) == _EOF_ ? \
(((__ctype + 1)[__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[__c] & _A)) : \
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[(unsigned char)__c] & _A)))
#endif
#define isascii(c) (!((c) & ~0177))
#define toascii(c) ((c) & 0177)
#endif /* lint */
#ifdef __cplusplus
}
#endif
#endif /* _CTYPE_H */
include/xpg4plus/errno.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _ERRNO_H
#define _ERRNO_H
#pragma comment(exestr, "xpg4plus @(#) errno.h 20.1 94/12/04 ")
#ifndef _SYS_ERRNO_H
#include <sys/errno.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _REENTRANT
extern int *__thr_errno(void);
#define errno (*__thr_errno())
#else /* !_REENTRANT */
extern int errno;
#endif /* _REENTRANT */
extern int sys_nerr;
extern char *sys_errlist[];
extern void perror(const char *);
#ifdef __cplusplus
}
#endif
#endif /* _ERRNO_H */
include/xpg4plus/nls/i_errno.h
/*
* Copyright (C) 1993-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
#ifndef _I_ERRNO_H
#define _I_ERRNO_H
#pragma comment(exestr, "xpg4plus @(#) i_errno.h 20.1 94/12/04 ")
/* @)#(i_errno.h 10.1 87/07/31 sccs id by rjs */
/*
* definitions for the i_errno variable
*/
#define I_ERROR -1 /* general error return used */
#define I_EBACC 1 /* inaccessible data base */
#define I_EBADF 2 /* corrupted data base/msgcat. */
#define I_ENMEM 3 /* not enough memory */
#define I_EINTL 4 /* illegal database pointer */
#define I_EIPRP 5 /* illegal property table */
#define I_EICOL 6 /* illegal collation table */
#define I_EICNV 7 /* illegal conversion table */
#define I_EISTI 8 /* illegal string index table */
#define I_EISTR 9 /* illegal string name */
#define I_EICOD 10 /* illegal code in the database */
#define I_EICTM 11 /* illegal format in i_ctime */
#define I_EICPR 12 /* illegal conversion in doprnt */
#define I_EICSC 13 /* illegal conversion in doscan */
#define I_EIBNV 14 /* bad environment */
#define I_EREAD 15 /* read error in message cat. */
#define I_ENMSG 16 /* no message available */
#define I_EBADC 17 /* bad call of function */
#define I_ENOOP 18 /* cannot open message cat. */
extern int i_errno; /* internationalization error global */
#endif /* _I_ERRNO_H */
include/xpg4plus/signal.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _SIGNAL_H
#define _SIGNAL_H
#pragma comment(exestr, "xpg4plus @(#) signal.h 20.8 95/12/11 ")
#ifndef _SIG_ATOMIC_T
#define _SIG_ATOMIC_T
/* atomic entity for signal handling */
typedef int sig_atomic_t;
#endif
extern const char * const _sys_siglist[];
extern const int _sys_nsig;
#ifndef _SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#if !defined(_SYS_TYPES_H)
#include <sys/types.h>
#endif
#if __cplusplus
extern "C" {
#endif
extern void (*signal(int, void(*)(int)))(int);
extern int raise(int);
extern void (*bsd_signal(int, void(*)(int)))(int);
extern int killpg(pid_t, int);
extern int sighold(int);
extern int sigignore(int);
extern int siginterrupt(int, int);
extern int sigpause(int);
extern int sigrelse(int);
extern void ( *sigset( int, void(*)(int) ) )(int);
extern int sigaltstack(const stack_t *, stack_t *);
extern int sigstack(struct sigstack *, struct sigstack *);
extern int ( *ssignal( int, int(*)(int) ) )(int);
extern int (sigfillset)(sigset_t *);
extern int (sigemptyset)(sigset_t *);
extern int (sigaddset)(sigset_t *, int);
extern int (sigdelset)(sigset_t *, int);
extern int (sigismember)(const sigset_t *, int);
extern int sigpending(sigset_t *);
extern int sigsuspend(const sigset_t *);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int kill(pid_t, int);
extern int sigaction(int, const struct sigaction *, struct sigaction *);
#if __cplusplus
}
#endif
#define raise(sig) kill(getpid(), sig)
#endif /* _SIGNAL_H */
include/xpg4plus/tam/sys/signal.h
/*
* Copyright (C) 1993-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Convergent Technologies - System V - May 1983 */
#pragma comment(exestr, "xpg4plus @(#) signal.h 20.1 94/12/04 ")
#ifndef _TAM_SYS_SIGNAL_H
#define _TAM_SYS_SIGNAL_H
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt (rubout) */
#define SIGQUIT 3 /* quit (ASCII FS) */
#define SIGILL 4 /* illegal instruction (not reset when caught)*/
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#define SIGIOT 6 /* IOT instruction */
#define SIGEMT 7 /* EMT instruction */
#define SIGFPE 8 /* floating point exception */
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#define SIGBUS 10 /* bus error */
#define SIGSEGV 11 /* segmentation violation */
#define SIGSYS 12 /* bad argument to system call */
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#define SIGALRM 14 /* alarm clock */
#define SIGTERM 15 /* software termination signal from kill */
#define SIGUSR1 16 /* user defined signal 1 */
#define SIGUSR2 17 /* user defined signal 2 */
#define SIGCLD 18 /* death of a child */
#define SIGPWR 19 /* power-fail restart */
#define SIGWIND 20 /* window change */
#define SIGPHONE 21 /* handset, line status change */
#define NSIG 32
#define SIG_DFL (int (*)())0
#if lint
#define SIG_IGN (int (*)())0
#else
#define SIG_IGN (int (*)())1
#endif
#endif /* _TAM_SYS_SIGNAL_H */
include/xpg4plus/ustat.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _USTAT_H
#define _USTAT_H
#pragma comment(exestr, "xpg4plus @(#) ustat.h 20.1 94/12/04 ")
#ifndef _SYS_TYPES_H
#include <sys/types.h>
#endif
#ifndef _SYS_USTAT_H
#include <sys/ustat.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int ustat(dev_t, struct ustat *);
#ifdef __cplusplus
};
#endif
#endif /* _USTAT_H */
include/xpg4plus/execargs.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
#ifndef _EXECARGS_H
#define _EXECARGS_H
#pragma comment(exestr, "xpg4plus @(#) execargs.h 20.1 94/12/04 ")
/*
* Intel iAPX386 Version
*/
char **execargs = (char**)(0x1880000-sizeof(char *));
#endif /* _EXECARGS_H */
include/xpg4plus/a.out.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _A_OUT_H
#define _A_OUT_H
#pragma comment(exestr, "xpg4plus @(#) a.out.h 20.1 94/12/04 ")
#if defined(__cplusplus)
extern "C" {
#endif
#ifndef _NLIST_H
#include <nlist.h> /* included for all machines */
#endif
/* COMMON OBJECT FILE FORMAT
For a description of the common object file format (COFF) see
the Common Object File Format chapter of the UNIX System V Support
Tools Guide
OBJECT FILE COMPONENTS
HEADER FILES:
/usr/include/filehdr.h
/usr/include/aouthdr.h
/usr/include/scnhdr.h
/usr/include/reloc.h
/usr/include/linenum.h
/usr/include/syms.h
/usr/include/storclass.h
STANDARD FILE:
/usr/include/a.out.h "object file"
*/
#include <filehdr.h>
#include <aouthdr.h>
#include <scnhdr.h>
#include <reloc.h>
#include <linenum.h>
#include <syms.h>
#if defined(__cplusplus)
}
#endif
#endif /* _A_OUT_H */
include/xpg4plus/aouthdr.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _AOUTHDR_H
#define _AOUTHDR_H
#pragma comment(exestr, "xpg4plus @(#) aouthdr.h 20.2 96/01/31 ")
#pragma pack(4)
typedef struct aouthdr {
short magic; /* see magic.h */
short vstamp; /* version stamp */
long tsize; /* text size in bytes, padded to FW bdry */
long dsize; /* initialized data " " */
long bsize; /* uninitialized data " " */
long entry; /* entry pt. */
long text_start; /* base of text used for this file */
long data_start; /* base of data used for this file */
} AOUTHDR;
#pragma pack()
#endif /* _AOUTHDR_H */
include/xpg4plus/ctype.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _CTYPE_H
#define _CTYPE_H
#pragma comment(exestr, "xpg4plus @(#) ctype.h 20.2 95/02/10 ")
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _U
#define _U 01 /* Upper case */
#define _L 02 /* Lower case */
#define _N 04 /* Numeral (digit) */
#define _S 010 /* Spacing character */
#define _P 020 /* Punctuation */
#define _C 040 /* Control character */
#define _B 0100 /* Blank */
#define _X 0200 /* heXadecimal digit */
#endif
#ifndef _A
/*
* New character classes for XPG4 to be used with __ctype2[].
*/
#define _A 0001 /* Alpha Character */
#define _G 0002 /* Graphic Character */
#define _R 0004 /* Print Character */
#endif
/* Very ascii dependent */
#define __todigit(n) ((char)((n)+'0'))
#define __toint(c) ((int)((c)-'0'))
#define todigit(n) ((char)((n)+'0'))
#define toint(c) ((int)((c)-'0'))
#ifdef __cplusplus
/* Necessary so (islanum) yields "right" function in library */
#define isalnum(x) __inlineisalnum(x)
#define isalpha(x) __inlineisalpha(x)
#define iscntrl(x) __inlineiscntrl(x)
#define isdigit(x) __inlineisdigit(x)
#define isgraph(x) __inlineisgraph(x)
#define islower(x) __inlineislower(x)
#define isprint(x) __inlineisprint(x)
#define ispunct(x) __inlineispunct(x)
#define isspace(x) __inlineisspace(x)
#define isupper(x) __inlineisupper(x)
#define isxdigit(x) __inlineisxdigit(x)
#else
/* Use inline function in C++ */
static int __c; /* necessary to ensure param evaluated once */
#endif
#ifdef EOF
#define _EOF_ EOF
#else
#define _EOF_ (-1)
#endif
extern int (isalnum)(int);
extern int (isalpha)(int);
extern int (iscntrl)(int);
extern int (isdigit)(int);
extern int (isgraph)(int);
extern int (islower)(int);
extern int (isprint)(int);
extern int (ispunct)(int);
extern int (isspace)(int);
extern int (isupper)(int);
extern int (isxdigit)(int);
extern int tolower(int);
extern int toupper(int);
extern int isascii(int);
extern int toascii(int);
extern int __tolower(int);
extern int __toupper(int);
extern unsigned char __ctype[];
extern unsigned char __ctype2[];
#if !defined(__lint)
#ifdef __cplusplus
inline int __inlineisalpha(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)__c]) & _A); }
inline int __inlineisupper(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _U); }
inline int __inlineislower(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _L); }
inline int __inlineisdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _N); }
inline int __inlineisxdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _X); }
inline int __inlineisspace(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _S); }
inline int __inlineispunct(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _P); }
inline int __inlineisprint(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _R); }
inline int __inlineisgraph(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _G); }
inline int __inlineiscntrl(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _C); }
inline int __inlineisalnum(int __c) { return(__c == _EOF_ ?
(((__ctype + 1)[__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[__c] & _A)) :
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[(unsigned char)__c] & _A)))
; }
#else
#define isalpha(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)__c]) & _A)
#define isupper(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _U)
#define islower(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _L)
#define isdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _N)
#define isxdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _X)
#define isspace(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _S)
#define ispunct(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _P)
#define isprint(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _R)
#define isgraph(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _G)
#define iscntrl(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _C)
#define isalnum(c) ((__c = (c)) == _EOF_ ? \
(((__ctype + 1)[__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[__c] & _A)) : \
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[(unsigned char)__c] & _A)))
#endif
#define isascii(c) (!((c) & ~0177))
#define toascii(c) ((c) & 0177)
#define _toupper(c) ((__ctype + 258)[(unsigned char)(c)])
#define _tolower(c) ((__ctype + 258)[(unsigned char)(c)])
#endif /* lint */
#ifdef __cplusplus
}
#endif
#endif /* _CTYPE_H */
include/xpg4plus/filehdr.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _FILEHDR_H
#define _FILEHDR_H
#pragma comment(exestr, "xpg4plus @(#) filehdr.h 20.3 96/01/31 ")
#pragma pack(4)
struct filehdr {
unsigned short f_magic; /* magic number */
unsigned short f_nscns; /* number of sections */
long f_timdat; /* time & date stamp */
long f_symptr; /* file pointer to symtab */
long f_nsyms; /* number of symtab entries */
unsigned short f_opthdr; /* sizeof(optional hdr) */
unsigned short f_flags; /* flags */
};
/*
* Bits for f_flags:
*
* F_RELFLG relocation info stripped from file
* F_EXEC file is executable (i.e. no unresolved
* externel references)
* F_LNNO line nunbers stripped from file
* F_LSYMS local symbols stripped from file
* F_MINMAL this is a minimal object file (".m") output of fextract
* F_UPDATE this is a fully bound update file, output of ogen
* F_SWABD this file has had its bytes swabbed (in names)
* F_AR16WR this file has the byte ordering of an AR16WR (e.g. 11/70) machine
* (it was created there, or was produced by conv)
* F_AR32W this file has the byte ordering of an AR32W machine (e.g. 3b,maxi)
* F_PATCH file contains "patch" list in optional header
* F_NODF (minimal file only) no decision functions for
* replaced functions
*/
#define F_RELFLG 0000001
#define F_EXEC 0000002
#define F_LNNO 0000004
#define F_LSYMS 0000010
#define F_MINMAL 0000020
#define F_UPDATE 0000040
#define F_SWABD 0000100
#define F_AR16WR 0000200
#define F_AR32WR 0000400
#define F_AR32W 0001000
#define F_PATCH 0002000
#define F_NODF 0002000
/*
* BELLMAC-32 Identification field
* F_BM32B file contains BM32B code (as opposed to strictly BM32A)
* F_BM32MAU file requires MAU (math arith unit) to execute
*/
#define F_BM32ID 0160000
#define F_BM32MAU 0040000
#define F_BM32B 0020000
/* F_BM32RST file has RESTORE work-around */
#define F_BM32RST 0010000
/*
* Flags for the INTEL chips. If the magic number of the object file
* is IAPX16 or IAPX16TV or IAPX20 or IAPX20TV then if F_80186
* is set, there are some 80186 instructions in the code, and hence
* and 80186 or 80286 chip must be used to run the code.
* If F_80286 is set, then the code has to be run on an 80286 chip.
* And if neither are set, then the code can run on an 8086, 80186, or
* 80286 chip.
*
*/
#define F_80186 010000
#define F_80286 020000
/*
* Magic Numbers
*/
/* iAPX - the stack frame and return registers differ from
* Basic-16 and x86 C compilers, hence new magic numbers
* are required. These are cross compilers.
*/
/* Intel */
#define IAPX16 0504
#define IAPX16TV 0505
#define IAPX20 0506
#define IAPX20TV 0507
/* 0514, 0516 and 0517 reserved for Intel */
/* Basic-16 */
#define B16MAGIC 0502
#define BTVMAGIC 0503
/* x86 */
#define X86MAGIC 0510
#define XTVMAGIC 0511
/* Intel 286 */
#define I286SMAGIC 0512
#define I286LMAGIC 0522 /* used by mc68000 (UNIX PC) and iAPX 286 */
/* Intel 386 */
#define I386MAGIC 0514
/* n3b */
/*
* NOTE: For New 3B, the old values of magic numbers
* will be in the optional header in the structure
* "aouthdr" (identical to old 3B aouthdr).
*/
#define N3BMAGIC 0550 /* 3B20 executable, no TV */
#define NTVMAGIC 0551 /* 3B20 executable with TV */
/* MAC-32, 3B15, 3B5 */
#define WE32MAGIC 0560 /* WE 32000, no TV */
#define FBOMAGIC 0560 /* WE 32000, no TV */
#define RBOMAGIC 0562 /* reserved for WE 32000 */
#define MTVMAGIC 0561 /* WE 32000 with TV */
/* VAX 11/780 and VAX 11/750 */
/* writeable text segments */
#define VAXWRMAGIC 0570
/* readonly sharable text segments */
#define VAXROMAGIC 0575
/* Motorola 68020/68030/68040 */
#define MC68MAGIC MC68MAGICV4
#define MC68MAGICV4 03146 /* AT&T UNIX System V/68 4.0 */
/* (UniSoft COFF binaries) */
#define MC68MAGICV3 0554 /* UniSoft UNIX System V/68 3.2 */
#define MC68MAGICOLD 0520 /* Older SCO systems */
/* These are from old SCO file */
#define MC68KWRMAGIC 0520 /* writeable text segments */
#define MC68TVMAGIC 0521
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
#define MC68KPGMAGIC 0522 /* demand paged text segments */
#define M68MAGIC 0210
#define M68TVMAGIC 0211
/* Motorola 88000 */
#define MC88MAGIC 0555 /* M88000 normal file */
/* IBM 370 */
#define U370WRMAGIC 0530 /* writeble text segments */
#define U370ROMAGIC 0535 /* readonly sharable text segments */
/* 0532 and 0533 reserved for u370 */
/* Amdahl 470/580 */
#define AMDWRMAGIC 0531 /* writable text segments */
#define AMDROMAGIC 0534 /* readonly sharable text segments */
/* NSC */
/* 0524 and 0525 reserved for NSC */
/* Zilog */
/* 0544 and 0545 reserved for Zilog */
/* i860 */
#define I860MAGIC 0515
#define FILHDR struct filehdr
#define FILHSZ sizeof(FILHDR)
#define ISCOFF(x) \
(((x)==B16MAGIC) || ((x)==BTVMAGIC) || ((x)==X86MAGIC) \
|| ((x)==XTVMAGIC) || ((x)==N3BMAGIC) || ((x)==NTVMAGIC) \
|| ((x)==FBOMAGIC) || ((x)==VAXROMAGIC) || ((x)==VAXWRMAGIC) \
|| ((x)==RBOMAGIC) || ((x)==MC68MAGICV3) || ((x)== MC68TVMAGIC) \
|| ((x)==MC68MAGICV4) || ((x)==MC88MAGIC) \
|| ((x)==MC68MAGIC) || ((x)==M68MAGIC) || ((x)==M68TVMAGIC) \
|| ((x)==IAPX16) || ((x)==IAPX16TV) \
|| ((x)==IAPX20) || ((x)==IAPX20TV) \
|| ((x)==AMDWRMAGIC) || ((x)==AMDROMAGIC) \
|| ((x)==U370WRMAGIC) || ((x)==U370ROMAGIC) || ((x)==MTVMAGIC) \
|| ((x)==I286SMAGIC) || ((x)==I286LMAGIC) \
|| ((x)==I860MAGIC) \
|| ((x)==I386MAGIC))
#endif /* _FILEHDR_H */
include/xpg4plus/scnhdr.h
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _SCNHDR_H
#define _SCNHDR_H
#pragma comment(exestr, "xpg4plus @(#) scnhdr.h 20.2 96/01/31 ")
#pragma pack(4)
struct scnhdr {
char s_name[8]; /* section name */
long s_paddr; /* physical address, aliased s_nlib */
long s_vaddr; /* virtual address */
long s_size; /* section size */
long s_scnptr; /* file ptr to raw data for section */
long s_relptr; /* file ptr to relocation */
long s_lnnoptr; /* file ptr to line numbers */
unsigned short s_nreloc; /* number of relocation entries */
unsigned short s_nlnno; /* number of line number entries */
long s_flags; /* flags */
};
/* the number of shared libraries in a .lib section in an absolute output file
* is put in the s_paddr field of the .lib section header, the following define
* allows it to be referenced as s_nlib
*/
#define s_nlib s_paddr
#define SCNHDR struct scnhdr
#define SCNHSZ sizeof(SCNHDR)
/*
* Define constants for names of "special" sections
*/
#define _TEXT ".text"
#define _DATA ".data"
#define _DATA1 "data1"
#define _BSS ".bss"
#define _TV ".tv"
#define _INIT ".init"
#define _RODATA ".rodata"
#define _FINI ".fini"
#define _SHADOW ".shadow"
/*
* The low 2 bytes of s_flags is used as a section "type"
*/
#define STYP_REG 0x00 /* "regular" section:
allocated, relocated, loaded */
#define STYP_DSECT 0x01 /* "dummy" section:
not allocated, relocated,
not loaded */
#define STYP_NOLOAD 0x02 /* "noload" section:
allocated, relocated,
not loaded */
#define STYP_GROUP 0x04 /* "grouped" section:
formed of input sections */
#define STYP_PAD 0x08 /* "padding" section:
not allocated, not relocated,
loaded */
#define STYP_COPY 0x10 /* "copy" section:
for decision function used
by field update; not
allocated, not relocated,
loaded; reloc & lineno
entries processed normally */
#define STYP_INFO 0x200 /* comment section : not allocated
not relocated, not loaded */
#define STYP_LIB 0x800 /* for .lib section : same as INFO */
#define STYP_OVER 0x400 /* overlay section : relocated
not allocated or loaded */
#define STYP_SHADOW 0x1000
/* shadow section:
not a cohesive section -
contains C++ initialized data.
Data is broken up and
relocated in final ld. */
#define STYP_TEXT 0x20 /* section contains text only */
#define STYP_DATA 0x40 /* section contains data only */
#define STYP_BSS 0x80 /* section contains bss only */
/*
* In a minimal file or an update file, a new function
* (as compared with a replaced function) is indicated by S_NEWFCN
*/
#define S_NEWFCN 0x100
/*
* In 3b Update Files (output of ogen), sections which appear in SHARED
* segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
* dufr that updating 1 copy of the proc. will update all process invocations.
*/
#define S_SHRSEG 0x20
#pragma pack()
#endif /* _SCNHDR_H */
include/signal.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/signal.h>
#elif defined(_XOPEN_SOURCE_EXTENDED) /* Xpg4v2 environment */
#include <xpg4v2/signal.h>
#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */
#include <xpg4/signal.h>
#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */
#include <posix/signal.h>
#elif _STRICT_ANSI /* Pure Ansi/ISO environment */
#include <ansi/signal.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/signal.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _SIGNAL_H
#define _SIGNAL_H
#pragma comment(exestr, "xpg4plus @(#) signal.h 20.8 95/12/11 ")
#ifndef _SIG_ATOMIC_T
#define _SIG_ATOMIC_T
/* atomic entity for signal handling */
typedef int sig_atomic_t;
#endif
extern const char * const _sys_siglist[];
extern const int _sys_nsig;
#ifndef _SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#if !defined(_SYS_TYPES_H)
#include <sys/types.h>
#endif
#if __cplusplus
extern "C" {
#endif
extern void (*signal(int, void(*)(int)))(int);
extern int raise(int);
extern void (*bsd_signal(int, void(*)(int)))(int);
extern int killpg(pid_t, int);
extern int sighold(int);
extern int sigignore(int);
extern int siginterrupt(int, int);
extern int sigpause(int);
extern int sigrelse(int);
extern void ( *sigset( int, void(*)(int) ) )(int);
extern int sigaltstack(const stack_t *, stack_t *);
extern int sigstack(struct sigstack *, struct sigstack *);
extern int ( *ssignal( int, int(*)(int) ) )(int);
extern int (sigfillset)(sigset_t *);
extern int (sigemptyset)(sigset_t *);
extern int (sigaddset)(sigset_t *, int);
extern int (sigdelset)(sigset_t *, int);
extern int (sigismember)(const sigset_t *, int);
extern int sigpending(sigset_t *);
extern int sigsuspend(const sigset_t *);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int kill(pid_t, int);
extern int sigaction(int, const struct sigaction *, struct sigaction *);
#if __cplusplus
}
#endif
#define raise(sig) kill(getpid(), sig)
#endif /* _SIGNAL_H */
#endif
include/tam/sys/signal.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/tam/sys/signal.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/tam/sys/signal.h>
#else /* Normal, default environment */
/*
* Copyright (C) 1993-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Copyright (c) 1988, 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
/* Convergent Technologies - System V - May 1983 */
#pragma comment(exestr, "xpg4plus @(#) signal.h 20.1 94/12/04 ")
#ifndef _TAM_SYS_SIGNAL_H
#define _TAM_SYS_SIGNAL_H
#define SIGHUP 1 /* hangup */
#define SIGINT 2 /* interrupt (rubout) */
#define SIGQUIT 3 /* quit (ASCII FS) */
#define SIGILL 4 /* illegal instruction (not reset when caught)*/
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#define SIGIOT 6 /* IOT instruction */
#define SIGEMT 7 /* EMT instruction */
#define SIGFPE 8 /* floating point exception */
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#define SIGBUS 10 /* bus error */
#define SIGSEGV 11 /* segmentation violation */
#define SIGSYS 12 /* bad argument to system call */
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#define SIGALRM 14 /* alarm clock */
#define SIGTERM 15 /* software termination signal from kill */
#define SIGUSR1 16 /* user defined signal 1 */
#define SIGUSR2 17 /* user defined signal 2 */
#define SIGCLD 18 /* death of a child */
#define SIGPWR 19 /* power-fail restart */
#define SIGWIND 20 /* window change */
#define SIGPHONE 21 /* handset, line status change */
#define NSIG 32
#define SIG_DFL (int (*)())0
#if lint
#define SIG_IGN (int (*)())0
#else
#define SIG_IGN (int (*)())1
#endif
#endif /* _TAM_SYS_SIGNAL_H */
#endif
include/ustat.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/ustat.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/ustat.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _USTAT_H
#define _USTAT_H
#pragma comment(exestr, "xpg4plus @(#) ustat.h 20.1 94/12/04 ")
#ifndef _SYS_TYPES_H
#include <sys/types.h>
#endif
#ifndef _SYS_USTAT_H
#include <sys/ustat.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int ustat(dev_t, struct ustat *);
#ifdef __cplusplus
};
#endif
#endif /* _USTAT_H */
#endif
include/execargs.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/execargs.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/execargs.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
#ifndef _EXECARGS_H
#define _EXECARGS_H
#pragma comment(exestr, "xpg4plus @(#) execargs.h 20.1 94/12/04 ")
/*
* Intel iAPX386 Version
*/
char **execargs = (char**)(0x1880000-sizeof(char *));
#endif /* _EXECARGS_H */
#endif
include/a.out.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/a.out.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/a.out.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _A_OUT_H
#define _A_OUT_H
#pragma comment(exestr, "xpg4plus @(#) a.out.h 20.1 94/12/04 ")
#if defined(__cplusplus)
extern "C" {
#endif
#ifndef _NLIST_H
#include <nlist.h> /* included for all machines */
#endif
/* COMMON OBJECT FILE FORMAT
For a description of the common object file format (COFF) see
the Common Object File Format chapter of the UNIX System V Support
Tools Guide
OBJECT FILE COMPONENTS
HEADER FILES:
/usr/include/filehdr.h
/usr/include/aouthdr.h
/usr/include/scnhdr.h
/usr/include/reloc.h
/usr/include/linenum.h
/usr/include/syms.h
/usr/include/storclass.h
STANDARD FILE:
/usr/include/a.out.h "object file"
*/
#include <filehdr.h>
#include <aouthdr.h>
#include <scnhdr.h>
#include <reloc.h>
#include <linenum.h>
#include <syms.h>
#if defined(__cplusplus)
}
#endif
#endif /* _A_OUT_H */
#endif
include/aouthdr.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/aouthdr.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/aouthdr.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _AOUTHDR_H
#define _AOUTHDR_H
#pragma comment(exestr, "xpg4plus @(#) aouthdr.h 20.2 96/01/31 ")
#pragma pack(4)
typedef struct aouthdr {
short magic; /* see magic.h */
short vstamp; /* version stamp */
long tsize; /* text size in bytes, padded to FW bdry */
long dsize; /* initialized data " " */
long bsize; /* uninitialized data " " */
long entry; /* entry pt. */
long text_start; /* base of text used for this file */
long data_start; /* base of data used for this file */
} AOUTHDR;
#pragma pack()
#endif /* _AOUTHDR_H */
#endif
include/ctype.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/ctype.h>
#elif defined(_XOPEN_SOURCE_EXTENDED) /* Xpg4v2 environment */
#include <xpg4v2/ctype.h>
#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS) /* Xpg4 environment */
#include <xpg4/ctype.h>
#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */
#include <posix/ctype.h>
#elif _STRICT_ANSI /* Pure Ansi/ISO environment */
#include <ansi/ctype.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/ctype.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _CTYPE_H
#define _CTYPE_H
#pragma comment(exestr, "xpg4plus @(#) ctype.h 20.2 95/02/10 ")
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _U
#define _U 01 /* Upper case */
#define _L 02 /* Lower case */
#define _N 04 /* Numeral (digit) */
#define _S 010 /* Spacing character */
#define _P 020 /* Punctuation */
#define _C 040 /* Control character */
#define _B 0100 /* Blank */
#define _X 0200 /* heXadecimal digit */
#endif
#ifndef _A
/*
* New character classes for XPG4 to be used with __ctype2[].
*/
#define _A 0001 /* Alpha Character */
#define _G 0002 /* Graphic Character */
#define _R 0004 /* Print Character */
#endif
/* Very ascii dependent */
#define __todigit(n) ((char)((n)+'0'))
#define __toint(c) ((int)((c)-'0'))
#define todigit(n) ((char)((n)+'0'))
#define toint(c) ((int)((c)-'0'))
#ifdef __cplusplus
/* Necessary so (islanum) yields "right" function in library */
#define isalnum(x) __inlineisalnum(x)
#define isalpha(x) __inlineisalpha(x)
#define iscntrl(x) __inlineiscntrl(x)
#define isdigit(x) __inlineisdigit(x)
#define isgraph(x) __inlineisgraph(x)
#define islower(x) __inlineislower(x)
#define isprint(x) __inlineisprint(x)
#define ispunct(x) __inlineispunct(x)
#define isspace(x) __inlineisspace(x)
#define isupper(x) __inlineisupper(x)
#define isxdigit(x) __inlineisxdigit(x)
#else
/* Use inline function in C++ */
static int __c; /* necessary to ensure param evaluated once */
#endif
#ifdef EOF
#define _EOF_ EOF
#else
#define _EOF_ (-1)
#endif
extern int (isalnum)(int);
extern int (isalpha)(int);
extern int (iscntrl)(int);
extern int (isdigit)(int);
extern int (isgraph)(int);
extern int (islower)(int);
extern int (isprint)(int);
extern int (ispunct)(int);
extern int (isspace)(int);
extern int (isupper)(int);
extern int (isxdigit)(int);
extern int tolower(int);
extern int toupper(int);
extern int isascii(int);
extern int toascii(int);
extern int __tolower(int);
extern int __toupper(int);
extern unsigned char __ctype[];
extern unsigned char __ctype2[];
#if !defined(__lint)
#ifdef __cplusplus
inline int __inlineisalpha(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)__c]) & _A); }
inline int __inlineisupper(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _U); }
inline int __inlineislower(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _L); }
inline int __inlineisdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _N); }
inline int __inlineisxdigit(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)__c]) & _X); }
inline int __inlineisspace(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _S); }
inline int __inlineispunct(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _P); }
inline int __inlineisprint(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _R); }
inline int __inlineisgraph(int __c) { return((__c == _EOF_ ?
(__ctype2 + 1)[__c] :
(__ctype2 + 1)[(unsigned char)(__c)]) & _G); }
inline int __inlineiscntrl(int __c) { return((__c == _EOF_ ?
(__ctype + 1)[__c] :
(__ctype + 1)[(unsigned char)(__c)]) & _C); }
inline int __inlineisalnum(int __c) { return(__c == _EOF_ ?
(((__ctype + 1)[__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[__c] & _A)) :
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) ||
((__ctype2 + 1)[(unsigned char)__c] & _A)))
; }
#else
#define isalpha(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)__c]) & _A)
#define isupper(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _U)
#define islower(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _L)
#define isdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _N)
#define isxdigit(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)__c]) & _X)
#define isspace(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _S)
#define ispunct(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _P)
#define isprint(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _R)
#define isgraph(c) (((__c = (c)) == _EOF_ ? \
(__ctype2 + 1)[__c] : \
(__ctype2 + 1)[(unsigned char)(__c)]) & _G)
#define iscntrl(c) (((__c = (c)) == _EOF_ ? \
(__ctype + 1)[__c] : \
(__ctype + 1)[(unsigned char)(__c)]) & _C)
#define isalnum(c) ((__c = (c)) == _EOF_ ? \
(((__ctype + 1)[__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[__c] & _A)) : \
(((__ctype + 1)[(unsigned char)__c] & (_U | _L | _N)) || \
((__ctype2 + 1)[(unsigned char)__c] & _A)))
#endif
#define isascii(c) (!((c) & ~0177))
#define toascii(c) ((c) & 0177)
#define _toupper(c) ((__ctype + 258)[(unsigned char)(c)])
#define _tolower(c) ((__ctype + 258)[(unsigned char)(c)])
#endif /* lint */
#ifdef __cplusplus
}
#endif
#endif /* _CTYPE_H */
#endif
include/filehdr.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/filehdr.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/filehdr.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _FILEHDR_H
#define _FILEHDR_H
#pragma comment(exestr, "xpg4plus @(#) filehdr.h 20.3 96/01/31 ")
#pragma pack(4)
struct filehdr {
unsigned short f_magic; /* magic number */
unsigned short f_nscns; /* number of sections */
long f_timdat; /* time & date stamp */
long f_symptr; /* file pointer to symtab */
long f_nsyms; /* number of symtab entries */
unsigned short f_opthdr; /* sizeof(optional hdr) */
unsigned short f_flags; /* flags */
};
/*
* Bits for f_flags:
*
* F_RELFLG relocation info stripped from file
* F_EXEC file is executable (i.e. no unresolved
* externel references)
* F_LNNO line nunbers stripped from file
* F_LSYMS local symbols stripped from file
* F_MINMAL this is a minimal object file (".m") output of fextract
* F_UPDATE this is a fully bound update file, output of ogen
* F_SWABD this file has had its bytes swabbed (in names)
* F_AR16WR this file has the byte ordering of an AR16WR (e.g. 11/70) machine
* (it was created there, or was produced by conv)
* F_AR32W this file has the byte ordering of an AR32W machine (e.g. 3b,maxi)
* F_PATCH file contains "patch" list in optional header
* F_NODF (minimal file only) no decision functions for
* replaced functions
*/
#define F_RELFLG 0000001
#define F_EXEC 0000002
#define F_LNNO 0000004
#define F_LSYMS 0000010
#define F_MINMAL 0000020
#define F_UPDATE 0000040
#define F_SWABD 0000100
#define F_AR16WR 0000200
#define F_AR32WR 0000400
#define F_AR32W 0001000
#define F_PATCH 0002000
#define F_NODF 0002000
/*
* BELLMAC-32 Identification field
* F_BM32B file contains BM32B code (as opposed to strictly BM32A)
* F_BM32MAU file requires MAU (math arith unit) to execute
*/
#define F_BM32ID 0160000
#define F_BM32MAU 0040000
#define F_BM32B 0020000
/* F_BM32RST file has RESTORE work-around */
#define F_BM32RST 0010000
/*
* Flags for the INTEL chips. If the magic number of the object file
* is IAPX16 or IAPX16TV or IAPX20 or IAPX20TV then if F_80186
* is set, there are some 80186 instructions in the code, and hence
* and 80186 or 80286 chip must be used to run the code.
* If F_80286 is set, then the code has to be run on an 80286 chip.
* And if neither are set, then the code can run on an 8086, 80186, or
* 80286 chip.
*
*/
#define F_80186 010000
#define F_80286 020000
/*
* Magic Numbers
*/
/* iAPX - the stack frame and return registers differ from
* Basic-16 and x86 C compilers, hence new magic numbers
* are required. These are cross compilers.
*/
/* Intel */
#define IAPX16 0504
#define IAPX16TV 0505
#define IAPX20 0506
#define IAPX20TV 0507
/* 0514, 0516 and 0517 reserved for Intel */
/* Basic-16 */
#define B16MAGIC 0502
#define BTVMAGIC 0503
/* x86 */
#define X86MAGIC 0510
#define XTVMAGIC 0511
/* Intel 286 */
#define I286SMAGIC 0512
#define I286LMAGIC 0522 /* used by mc68000 (UNIX PC) and iAPX 286 */
/* Intel 386 */
#define I386MAGIC 0514
/* n3b */
/*
* NOTE: For New 3B, the old values of magic numbers
* will be in the optional header in the structure
* "aouthdr" (identical to old 3B aouthdr).
*/
#define N3BMAGIC 0550 /* 3B20 executable, no TV */
#define NTVMAGIC 0551 /* 3B20 executable with TV */
/* MAC-32, 3B15, 3B5 */
#define WE32MAGIC 0560 /* WE 32000, no TV */
#define FBOMAGIC 0560 /* WE 32000, no TV */
#define RBOMAGIC 0562 /* reserved for WE 32000 */
#define MTVMAGIC 0561 /* WE 32000 with TV */
/* VAX 11/780 and VAX 11/750 */
/* writeable text segments */
#define VAXWRMAGIC 0570
/* readonly sharable text segments */
#define VAXROMAGIC 0575
/* Motorola 68020/68030/68040 */
#define MC68MAGIC MC68MAGICV4
#define MC68MAGICV4 03146 /* AT&T UNIX System V/68 4.0 */
/* (UniSoft COFF binaries) */
#define MC68MAGICV3 0554 /* UniSoft UNIX System V/68 3.2 */
#define MC68MAGICOLD 0520 /* Older SCO systems */
/* These are from old SCO file */
#define MC68KWRMAGIC 0520 /* writeable text segments */
#define MC68TVMAGIC 0521
#define MC68KROMAGIC 0521 /* readonly shareable text segments */
#define MC68KPGMAGIC 0522 /* demand paged text segments */
#define M68MAGIC 0210
#define M68TVMAGIC 0211
/* Motorola 88000 */
#define MC88MAGIC 0555 /* M88000 normal file */
/* IBM 370 */
#define U370WRMAGIC 0530 /* writeble text segments */
#define U370ROMAGIC 0535 /* readonly sharable text segments */
/* 0532 and 0533 reserved for u370 */
/* Amdahl 470/580 */
#define AMDWRMAGIC 0531 /* writable text segments */
#define AMDROMAGIC 0534 /* readonly sharable text segments */
/* NSC */
/* 0524 and 0525 reserved for NSC */
/* Zilog */
/* 0544 and 0545 reserved for Zilog */
/* i860 */
#define I860MAGIC 0515
#define FILHDR struct filehdr
#define FILHSZ sizeof(FILHDR)
#define ISCOFF(x) \
(((x)==B16MAGIC) || ((x)==BTVMAGIC) || ((x)==X86MAGIC) \
|| ((x)==XTVMAGIC) || ((x)==N3BMAGIC) || ((x)==NTVMAGIC) \
|| ((x)==FBOMAGIC) || ((x)==VAXROMAGIC) || ((x)==VAXWRMAGIC) \
|| ((x)==RBOMAGIC) || ((x)==MC68MAGICV3) || ((x)== MC68TVMAGIC) \
|| ((x)==MC68MAGICV4) || ((x)==MC88MAGIC) \
|| ((x)==MC68MAGIC) || ((x)==M68MAGIC) || ((x)==M68TVMAGIC) \
|| ((x)==IAPX16) || ((x)==IAPX16TV) \
|| ((x)==IAPX20) || ((x)==IAPX20TV) \
|| ((x)==AMDWRMAGIC) || ((x)==AMDROMAGIC) \
|| ((x)==U370WRMAGIC) || ((x)==U370ROMAGIC) || ((x)==MTVMAGIC) \
|| ((x)==I286SMAGIC) || ((x)==I286LMAGIC) \
|| ((x)==I860MAGIC) \
|| ((x)==I386MAGIC))
#endif /* _FILEHDR_H */
#endif
include/scnhdr.h
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */
#if defined(_NO_PROTOTYPE) /* Old, crufty environment */
#include <oldstyle/scnhdr.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <ods_30_compat/scnhdr.h>
#else /* Normal, default environment */
/*
* Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
* All Rights Reserved.
*
* The information in this file is provided for the exclusive use of
* the licensees of The Santa Cruz Operation, Inc. Such users have the
* right to use, modify, and incorporate this code into other products
* for purposes authorized by the license agreement provided they include
* this notice and the associated copyright notice with any such product.
* The information in this file is provided "AS IS" without warranty.
*/
/* Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/* Portions Copyright (c) 1979 - 1990 AT&T */
/* All Rights Reserved */
/* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
/* UNIX System Laboratories, Inc. */
/* The copyright notice above does not evidence any */
/* actual or intended publication of such source code. */
#ifndef _SCNHDR_H
#define _SCNHDR_H
#pragma comment(exestr, "xpg4plus @(#) scnhdr.h 20.2 96/01/31 ")
#pragma pack(4)
struct scnhdr {
char s_name[8]; /* section name */
long s_paddr; /* physical address, aliased s_nlib */
long s_vaddr; /* virtual address */
long s_size; /* section size */
long s_scnptr; /* file ptr to raw data for section */
long s_relptr; /* file ptr to relocation */
long s_lnnoptr; /* file ptr to line numbers */
unsigned short s_nreloc; /* number of relocation entries */
unsigned short s_nlnno; /* number of line number entries */
long s_flags; /* flags */
};
/* the number of shared libraries in a .lib section in an absolute output file
* is put in the s_paddr field of the .lib section header, the following define
* allows it to be referenced as s_nlib
*/
#define s_nlib s_paddr
#define SCNHDR struct scnhdr
#define SCNHSZ sizeof(SCNHDR)
/*
* Define constants for names of "special" sections
*/
#define _TEXT ".text"
#define _DATA ".data"
#define _DATA1 "data1"
#define _BSS ".bss"
#define _TV ".tv"
#define _INIT ".init"
#define _RODATA ".rodata"
#define _FINI ".fini"
#define _SHADOW ".shadow"
/*
* The low 2 bytes of s_flags is used as a section "type"
*/
#define STYP_REG 0x00 /* "regular" section:
allocated, relocated, loaded */
#define STYP_DSECT 0x01 /* "dummy" section:
not allocated, relocated,
not loaded */
#define STYP_NOLOAD 0x02 /* "noload" section:
allocated, relocated,
not loaded */
#define STYP_GROUP 0x04 /* "grouped" section:
formed of input sections */
#define STYP_PAD 0x08 /* "padding" section:
not allocated, not relocated,
loaded */
#define STYP_COPY 0x10 /* "copy" section:
for decision function used
by field update; not
allocated, not relocated,
loaded; reloc & lineno
entries processed normally */
#define STYP_INFO 0x200 /* comment section : not allocated
not relocated, not loaded */
#define STYP_LIB 0x800 /* for .lib section : same as INFO */
#define STYP_OVER 0x400 /* overlay section : relocated
not allocated or loaded */
#define STYP_SHADOW 0x1000
/* shadow section:
not a cohesive section -
contains C++ initialized data.
Data is broken up and
relocated in final ld. */
#define STYP_TEXT 0x20 /* section contains text only */
#define STYP_DATA 0x40 /* section contains data only */
#define STYP_BSS 0x80 /* section contains bss only */
/*
* In a minimal file or an update file, a new function
* (as compared with a replaced function) is indicated by S_NEWFCN
*/
#define S_NEWFCN 0x100
/*
* In 3b Update Files (output of ogen), sections which appear in SHARED
* segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
* dufr that updating 1 copy of the proc. will update all process invocations.
*/
#define S_SHRSEG 0x20
#pragma pack()
#endif /* _SCNHDR_H */
#endif