diff options
author | zakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-26 17:39:27 +0000 |
---|---|---|
committer | zakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-08-26 17:39:27 +0000 |
commit | 6bf20c78f5b69d40bcc4931df93d29198435ab67 (patch) | |
tree | e3eda937a05d7db42de725b7013bd0344b987f34 /lcc/include | |
parent | 872d4d7f55af706737ffb361bb76ad13e7496770 (diff) | |
download | ioquake3-aero-6bf20c78f5b69d40bcc4931df93d29198435ab67.tar.gz ioquake3-aero-6bf20c78f5b69d40bcc4931df93d29198435ab67.zip |
newlines fixed
git-svn-id: svn://svn.icculus.org/quake3/trunk@6 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'lcc/include')
48 files changed, 1589 insertions, 1589 deletions
diff --git a/lcc/include/alpha/osf/assert.h b/lcc/include/alpha/osf/assert.h index e7f8777..ee0b0bf 100755 --- a/lcc/include/alpha/osf/assert.h +++ b/lcc/include/alpha/osf/assert.h @@ -1,14 +1,14 @@ -#ifndef __ASSERT
-#define __ASSERT
-
-void assert(int);
-
-#endif /* __ASSERT */
-
-#undef assert
-#ifdef NDEBUG
-#define assert(ignore) ((void)0)
-#else
-extern void __assert(char *, char *, unsigned);
-#define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0)))
-#endif /* NDEBUG */
+#ifndef __ASSERT +#define __ASSERT + +void assert(int); + +#endif /* __ASSERT */ + +#undef assert +#ifdef NDEBUG +#define assert(ignore) ((void)0) +#else +extern void __assert(char *, char *, unsigned); +#define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0))) +#endif /* NDEBUG */ diff --git a/lcc/include/alpha/osf/ctype.h b/lcc/include/alpha/osf/ctype.h index 86b8149..02e0131 100755 --- a/lcc/include/alpha/osf/ctype.h +++ b/lcc/include/alpha/osf/ctype.h @@ -1,25 +1,25 @@ -#ifndef __CTYPE
-#define __CTYPE
-
-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);
-
-#define __U 01
-#define __L 02
-#define __N 04
-#define __S 010
-#define __P 020
-#define __C 040
-
-#endif /* __CTYPE */
+#ifndef __CTYPE +#define __CTYPE + +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); + +#define __U 01 +#define __L 02 +#define __N 04 +#define __S 010 +#define __P 020 +#define __C 040 + +#endif /* __CTYPE */ diff --git a/lcc/include/alpha/osf/errno.h b/lcc/include/alpha/osf/errno.h index 5ab3f0f..c914e05 100755 --- a/lcc/include/alpha/osf/errno.h +++ b/lcc/include/alpha/osf/errno.h @@ -1,8 +1,8 @@ -#ifndef __ERRNO
-#define __ERRNO
-
-#define EDOM 33
-#define ERANGE 34
-extern int errno;
-
-#endif /* __ERRNO */
+#ifndef __ERRNO +#define __ERRNO + +#define EDOM 33 +#define ERANGE 34 +extern int errno; + +#endif /* __ERRNO */ diff --git a/lcc/include/alpha/osf/float.h b/lcc/include/alpha/osf/float.h index 8a8ddb1..a3e1eb5 100755 --- a/lcc/include/alpha/osf/float.h +++ b/lcc/include/alpha/osf/float.h @@ -1,37 +1,37 @@ -#ifndef __FLOAT
-#define __FLOAT
-
-#define FLT_ROUNDS 1
-#define FLT_RADIX 2
-
-#define FLT_DIG 6
-#define FLT_EPSILON 1.19209289550781250000e-07
-#define FLT_MANT_DIG 24
-#define FLT_MAX 3.40282346638528860000e+38
-#define FLT_MAX_10_EXP 38
-#define FLT_MAX_EXP 128
-#define FLT_MIN 1.17549435082228750000e-38
-#define FLT_MIN_10_EXP -37
-#define FLT_MIN_EXP -125
-
-#define DBL_DIG 15
-#define DBL_EPSILON 2.22044604925031310000e-16
-#define DBL_MANT_DIG 53
-#define DBL_MAX 1.79769313486231570000e+308
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define DBL_MIN 2.22507385850720140000e-308
-#define DBL_MIN_10_EXP -307
-#define DBL_MIN_EXP -1021
-
-#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON DBL_EPSILON
-#define LDBL_DIG DBL_DIG
-#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN DBL_MIN
-#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
-#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX DBL_MAX
-#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
-
-#endif /* __FLOAT */
+#ifndef __FLOAT +#define __FLOAT + +#define FLT_ROUNDS 1 +#define FLT_RADIX 2 + +#define FLT_DIG 6 +#define FLT_EPSILON 1.19209289550781250000e-07 +#define FLT_MANT_DIG 24 +#define FLT_MAX 3.40282346638528860000e+38 +#define FLT_MAX_10_EXP 38 +#define FLT_MAX_EXP 128 +#define FLT_MIN 1.17549435082228750000e-38 +#define FLT_MIN_10_EXP -37 +#define FLT_MIN_EXP -125 + +#define DBL_DIG 15 +#define DBL_EPSILON 2.22044604925031310000e-16 +#define DBL_MANT_DIG 53 +#define DBL_MAX 1.79769313486231570000e+308 +#define DBL_MAX_10_EXP 308 +#define DBL_MAX_EXP 1024 +#define DBL_MIN 2.22507385850720140000e-308 +#define DBL_MIN_10_EXP -307 +#define DBL_MIN_EXP -1021 + +#define LDBL_MANT_DIG DBL_MANT_DIG +#define LDBL_EPSILON DBL_EPSILON +#define LDBL_DIG DBL_DIG +#define LDBL_MIN_EXP DBL_MIN_EXP +#define LDBL_MIN DBL_MIN +#define LDBL_MIN_10_EXP DBL_MIN_10_EXP +#define LDBL_MAX_EXP DBL_MAX_EXP +#define LDBL_MAX DBL_MAX +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP + +#endif /* __FLOAT */ diff --git a/lcc/include/alpha/osf/limits.h b/lcc/include/alpha/osf/limits.h index 06b8e28..4b4122b 100755 --- a/lcc/include/alpha/osf/limits.h +++ b/lcc/include/alpha/osf/limits.h @@ -1,24 +1,24 @@ -#ifndef __LIMITS
-#define __LIMITS
-
-#define CHAR_BIT 8
-#define MB_LEN_MAX 1
-
-#define UCHAR_MAX 0xff
-#define USHRT_MAX 0xffff
-#define UINT_MAX (~0U)
-#define ULONG_MAX (~0UL)
-
-#define CHAR_MAX SCHAR_MAX
-#define SCHAR_MAX 0x7f
-#define SHRT_MAX 0x7fff
-#define INT_MAX 0x7fffffff
-#define LONG_MAX 0x7fffffffffffffffL
-
-#define CHAR_MIN SCHAR_MIN
-#define SCHAR_MIN (-SCHAR_MAX-1)
-#define SHRT_MIN (-SHRT_MAX-1)
-#define INT_MIN (-INT_MAX-1)
-#define LONG_MIN (-LONG_MAX-1)
-
-#endif /* __LIMITS */
+#ifndef __LIMITS +#define __LIMITS + +#define CHAR_BIT 8 +#define MB_LEN_MAX 1 + +#define UCHAR_MAX 0xff +#define USHRT_MAX 0xffff +#define UINT_MAX (~0U) +#define ULONG_MAX (~0UL) + +#define CHAR_MAX SCHAR_MAX +#define SCHAR_MAX 0x7f +#define SHRT_MAX 0x7fff +#define INT_MAX 0x7fffffff +#define LONG_MAX 0x7fffffffffffffffL + +#define CHAR_MIN SCHAR_MIN +#define SCHAR_MIN (-SCHAR_MAX-1) +#define SHRT_MIN (-SHRT_MAX-1) +#define INT_MIN (-INT_MAX-1) +#define LONG_MIN (-LONG_MAX-1) + +#endif /* __LIMITS */ diff --git a/lcc/include/alpha/osf/locale.h b/lcc/include/alpha/osf/locale.h index a861b47..acce293 100755 --- a/lcc/include/alpha/osf/locale.h +++ b/lcc/include/alpha/osf/locale.h @@ -1,36 +1,36 @@ -#ifndef __LOCALE
-#define __LOCALE
-
-#define LC_ALL 0
-#define LC_COLLATE 1
-#define LC_CTYPE 2
-#define LC_MONETARY 3
-#define LC_NUMERIC 4
-#define LC_TIME 5
-#define NULL 0
-
-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;
-};
-
-char *setlocale(int, const char *);
-struct lconv *localeconv(void);
-
-#endif /* __LOCALE */
+#ifndef __LOCALE +#define __LOCALE + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 +#define NULL 0 + +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; +}; + +char *setlocale(int, const char *); +struct lconv *localeconv(void); + +#endif /* __LOCALE */ diff --git a/lcc/include/alpha/osf/math.h b/lcc/include/alpha/osf/math.h index bb39d69..d2a31f4 100755 --- a/lcc/include/alpha/osf/math.h +++ b/lcc/include/alpha/osf/math.h @@ -1,29 +1,29 @@ -#ifndef __MATH
-#define __MATH
-
-#define HUGE_VAL 1.79769313486231570000e+308
-
-extern double acos(double);
-extern double asin(double);
-extern double atan(double);
-extern double atan2(double, double);
-extern double cos(double);
-extern double sin(double);
-extern double tan(double);
-extern double cosh(double);
-extern double sinh(double);
-extern double tanh(double);
-extern double exp(double);
-extern double frexp(double, int *);
-extern double ldexp(double, int);
-extern double log(double);
-extern double log10(double);
-extern double modf(double, double *);
-extern double pow(double, double);
-extern double sqrt(double);
-extern double ceil(double);
-extern double fabs(double);
-extern double floor(double);
-extern double fmod(double, double);
-
-#endif /* __MATH */
+#ifndef __MATH +#define __MATH + +#define HUGE_VAL 1.79769313486231570000e+308 + +extern double acos(double); +extern double asin(double); +extern double atan(double); +extern double atan2(double, double); +extern double cos(double); +extern double sin(double); +extern double tan(double); +extern double cosh(double); +extern double sinh(double); +extern double tanh(double); +extern double exp(double); +extern double frexp(double, int *); +extern double ldexp(double, int); +extern double log(double); +extern double log10(double); +extern double modf(double, double *); +extern double pow(double, double); +extern double sqrt(double); +extern double ceil(double); +extern double fabs(double); +extern double floor(double); +extern double fmod(double, double); + +#endif /* __MATH */ diff --git a/lcc/include/alpha/osf/setjmp.h b/lcc/include/alpha/osf/setjmp.h index 83216dd..48caf9e 100755 --- a/lcc/include/alpha/osf/setjmp.h +++ b/lcc/include/alpha/osf/setjmp.h @@ -1,10 +1,10 @@ -#ifndef __SETJMP
-#define __SETJMP
-
-
-
-typedef int jmp_buf[35+1+48];
-int setjmp(jmp_buf);
-void longjmp(jmp_buf, int);
-
-#endif /* __SETJMP */
+#ifndef __SETJMP +#define __SETJMP + + + +typedef int jmp_buf[35+1+48]; +int setjmp(jmp_buf); +void longjmp(jmp_buf, int); + +#endif /* __SETJMP */ diff --git a/lcc/include/alpha/osf/signal.h b/lcc/include/alpha/osf/signal.h index 22f98bc..c208a6b 100755 --- a/lcc/include/alpha/osf/signal.h +++ b/lcc/include/alpha/osf/signal.h @@ -1,20 +1,20 @@ -#ifndef __SIGNAL
-#define __SIGNAL
-
-typedef int sig_atomic_t;
-
-#define SIG_DFL ((void (*)(int))0)
-#define SIG_ERR ((void (*)(int))-1)
-#define SIG_IGN ((void (*)(int))1)
-
-#define SIGABRT 6
-#define SIGFPE 8
-#define SIGILL 4
-#define SIGINT 2
-#define SIGSEGV 11
-#define SIGTERM 15
-
-void (*signal(int, void (*)(int)))(int);
-int raise(int);
-
-#endif /* __SIGNAL */
+#ifndef __SIGNAL +#define __SIGNAL + +typedef int sig_atomic_t; + +#define SIG_DFL ((void (*)(int))0) +#define SIG_ERR ((void (*)(int))-1) +#define SIG_IGN ((void (*)(int))1) + +#define SIGABRT 6 +#define SIGFPE 8 +#define SIGILL 4 +#define SIGINT 2 +#define SIGSEGV 11 +#define SIGTERM 15 + +void (*signal(int, void (*)(int)))(int); +int raise(int); + +#endif /* __SIGNAL */ diff --git a/lcc/include/alpha/osf/stdarg.h b/lcc/include/alpha/osf/stdarg.h index 1b4947e..a05c92b 100755 --- a/lcc/include/alpha/osf/stdarg.h +++ b/lcc/include/alpha/osf/stdarg.h @@ -1,28 +1,28 @@ -#ifndef __STDARG
-#define __STDARG
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef struct {
- char *_a0; /* pointer to first homed integer arg */
- int _offset; /* byte offset of next param */
- float _tmp;
-} __va_list;
-#endif
-typedef __va_list va_list;
-
-#define va_start(list, start) ((void)( \
- (list)._a0 = (__typecode(__firstarg)==1 ? \
- (char*)&__firstarg+48 : (char *)&__firstarg), \
- (list)._offset = (__typecode(start)==1 ? \
- (char*)&start+56 : (char *)&start+8)-(list)._a0))
-#define va_arg(list, mode) (*(mode *)( \
- (list)._offset += (int)((sizeof(mode)+7)&~7), \
- (__typecode(mode)==1 && sizeof(mode)==4) ? \
- ((list)._tmp = (float)*(double *)((list)._a0 + (list)._offset - \
- ((list)._offset <= 48 ? 56 : 8))), (char *)&(list)._tmp : \
- (__typecode(mode)==1 && (list)._offset <= 48) ? \
- (list)._a0 + (list)._offset - 56 : \
- (list)._a0 + (list)._offset - (int)((sizeof(mode)+7)&~7)))
-#define va_end(list) ((void)0)
-#endif
+#ifndef __STDARG +#define __STDARG + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef struct { + char *_a0; /* pointer to first homed integer arg */ + int _offset; /* byte offset of next param */ + float _tmp; +} __va_list; +#endif +typedef __va_list va_list; + +#define va_start(list, start) ((void)( \ + (list)._a0 = (__typecode(__firstarg)==1 ? \ + (char*)&__firstarg+48 : (char *)&__firstarg), \ + (list)._offset = (__typecode(start)==1 ? \ + (char*)&start+56 : (char *)&start+8)-(list)._a0)) +#define va_arg(list, mode) (*(mode *)( \ + (list)._offset += (int)((sizeof(mode)+7)&~7), \ + (__typecode(mode)==1 && sizeof(mode)==4) ? \ + ((list)._tmp = (float)*(double *)((list)._a0 + (list)._offset - \ + ((list)._offset <= 48 ? 56 : 8))), (char *)&(list)._tmp : \ + (__typecode(mode)==1 && (list)._offset <= 48) ? \ + (list)._a0 + (list)._offset - 56 : \ + (list)._a0 + (list)._offset - (int)((sizeof(mode)+7)&~7))) +#define va_end(list) ((void)0) +#endif diff --git a/lcc/include/alpha/osf/stddef.h b/lcc/include/alpha/osf/stddef.h index 459bfd6..4e87e1c 100755 --- a/lcc/include/alpha/osf/stddef.h +++ b/lcc/include/alpha/osf/stddef.h @@ -1,22 +1,22 @@ -#ifndef __STDDEF
-#define __STDDEF
-
-
-#define NULL 0
-#define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0))
-
-typedef long ptrdiff_t;
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
-#define _WCHAR_T
-#define _WCHAR_T_
-typedef unsigned short wchar_t;
-#endif
-
-#endif /* __STDDEF */
+#ifndef __STDDEF +#define __STDDEF + + +#define NULL 0 +#define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) + +typedef long ptrdiff_t; + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_) +#define _WCHAR_T +#define _WCHAR_T_ +typedef unsigned short wchar_t; +#endif + +#endif /* __STDDEF */ diff --git a/lcc/include/alpha/osf/stdio.h b/lcc/include/alpha/osf/stdio.h index 6777a8f..216bec7 100755 --- a/lcc/include/alpha/osf/stdio.h +++ b/lcc/include/alpha/osf/stdio.h @@ -1,113 +1,113 @@ -#ifndef __STDIO
-#define __STDIO
-
-#define _IOFBF 0
-#define _IOLBF 0200
-#define _IONBF 04
-#define BUFSIZ 8192
-#define EOF (-1)
-
-typedef struct _iobuf {
- int _cnt;
- unsigned char *_ptr;
- unsigned char *_base;
- int _bufsiz;
- short _flag;
- short _file;
- char *__newbase;
- void *_lock;
- unsigned char *_bufendp;
-} FILE;
-extern FILE _iob[];
-#define FILENAME_MAX 255
-#define FOPEN_MAX 64
-
-#if !defined(_FPOS_T) && !defined(_FPOS_T_)
-#define _FPOS_T
-#define _FPOS_T_
-typedef long fpos_t;
-#endif
-
-#define L_tmpnam 21
-#define NULL 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#define SEEK_SET 0
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef struct {
- char *_a0; /* pointer to first homed integer arg */
- int _offset; /* byte offset of next param */
- float _tmp;
-} __va_list;
-#endif
-
-#define stderr (&_iob[2])
-#define stdin (&_iob[0])
-#define stdout (&_iob[1])
-#define TMP_MAX 16384
-
-extern int remove(const char *);
-extern int rename(const char *, const char *);
-extern FILE *tmpfile(void);
-extern char *tmpnam(char *);
-extern int fclose(FILE *);
-extern int fflush(FILE *);
-extern FILE *fopen(const char *, const char *);
-extern FILE *freopen(const char *, const char *, FILE *);
-extern void setbuf(FILE *, char *);
-extern int setvbuf(FILE *, char *, int, size_t);
-extern int fprintf(FILE *, const char *, ...);
-extern int fscanf(FILE *, const char *, ...);
-extern int printf(const char *, ...);
-extern int scanf(const char *, ...);
-extern int sprintf(char *, const char *, ...);
-extern int sscanf(const char *, const char *, ...);
-extern int vfprintf(FILE *, const char *, __va_list);
-extern int vprintf(const char *, __va_list);
-extern int vsprintf(char *, const char *, __va_list);
-extern int fgetc(FILE *);
-extern char *fgets(char *, int, FILE *);
-extern int fputc(int, FILE *);
-extern int fputs(const char *, FILE *);
-extern int getc(FILE *);
-extern int getchar(void);
-extern char *gets(char *);
-extern int putc(int, FILE *);
-extern int putchar(int);
-extern int puts(const char *);
-extern int ungetc(int, FILE *);
-extern size_t fread(void *, size_t, size_t, FILE *);
-extern size_t fwrite(const void *, size_t, size_t, FILE *);
-extern int fgetpos(FILE *, fpos_t *);
-extern int fseek(FILE *, long int, int);
-extern int fsetpos(FILE *, const fpos_t *);
-extern long int ftell(FILE *);
-extern void rewind(FILE *);
-extern void clearerr(FILE *);
-extern int feof(FILE *);
-extern int ferror(FILE *);
-extern void perror(const char *);
-
-#define _IOEOF 020
-#define _IOERR 040
-
-#define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++)
-#define putc(x, p) (--(p)->_cnt < 0 ? \
- _flsbuf((unsigned char) (x), p) : \
- (int) (*(p)->_ptr++ = (unsigned char) (x)))
-extern int _filbuf(FILE *), _flsbuf(unsigned, FILE *);
-#define feof(p) ((p)->_flag&_IOEOF)
-#define ferror(p) ((p)->_flag&_IOERR)
-#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF))
-#define getchar() getc(stdin)
-#define putchar(x) putc((x),stdout)
-
-#endif /* __STDIO */
+#ifndef __STDIO +#define __STDIO + +#define _IOFBF 0 +#define _IOLBF 0200 +#define _IONBF 04 +#define BUFSIZ 8192 +#define EOF (-1) + +typedef struct _iobuf { + int _cnt; + unsigned char *_ptr; + unsigned char *_base; + int _bufsiz; + short _flag; + short _file; + char *__newbase; + void *_lock; + unsigned char *_bufendp; +} FILE; +extern FILE _iob[]; +#define FILENAME_MAX 255 +#define FOPEN_MAX 64 + +#if !defined(_FPOS_T) && !defined(_FPOS_T_) +#define _FPOS_T +#define _FPOS_T_ +typedef long fpos_t; +#endif + +#define L_tmpnam 21 +#define NULL 0 +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef struct { + char *_a0; /* pointer to first homed integer arg */ + int _offset; /* byte offset of next param */ + float _tmp; +} __va_list; +#endif + +#define stderr (&_iob[2]) +#define stdin (&_iob[0]) +#define stdout (&_iob[1]) +#define TMP_MAX 16384 + +extern int remove(const char *); +extern int rename(const char *, const char *); +extern FILE *tmpfile(void); +extern char *tmpnam(char *); +extern int fclose(FILE *); +extern int fflush(FILE *); +extern FILE *fopen(const char *, const char *); +extern FILE *freopen(const char *, const char *, FILE *); +extern void setbuf(FILE *, char *); +extern int setvbuf(FILE *, char *, int, size_t); +extern int fprintf(FILE *, const char *, ...); +extern int fscanf(FILE *, const char *, ...); +extern int printf(const char *, ...); +extern int scanf(const char *, ...); +extern int sprintf(char *, const char *, ...); +extern int sscanf(const char *, const char *, ...); +extern int vfprintf(FILE *, const char *, __va_list); +extern int vprintf(const char *, __va_list); +extern int vsprintf(char *, const char *, __va_list); +extern int fgetc(FILE *); +extern char *fgets(char *, int, FILE *); +extern int fputc(int, FILE *); +extern int fputs(const char *, FILE *); +extern int getc(FILE *); +extern int getchar(void); +extern char *gets(char *); +extern int putc(int, FILE *); +extern int putchar(int); +extern int puts(const char *); +extern int ungetc(int, FILE *); +extern size_t fread(void *, size_t, size_t, FILE *); +extern size_t fwrite(const void *, size_t, size_t, FILE *); +extern int fgetpos(FILE *, fpos_t *); +extern int fseek(FILE *, long int, int); +extern int fsetpos(FILE *, const fpos_t *); +extern long int ftell(FILE *); +extern void rewind(FILE *); +extern void clearerr(FILE *); +extern int feof(FILE *); +extern int ferror(FILE *); +extern void perror(const char *); + +#define _IOEOF 020 +#define _IOERR 040 + +#define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++) +#define putc(x, p) (--(p)->_cnt < 0 ? \ + _flsbuf((unsigned char) (x), p) : \ + (int) (*(p)->_ptr++ = (unsigned char) (x))) +extern int _filbuf(FILE *), _flsbuf(unsigned, FILE *); +#define feof(p) ((p)->_flag&_IOEOF) +#define ferror(p) ((p)->_flag&_IOERR) +#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF)) +#define getchar() getc(stdin) +#define putchar(x) putc((x),stdout) + +#endif /* __STDIO */ diff --git a/lcc/include/alpha/osf/stdlib.h b/lcc/include/alpha/osf/stdlib.h index e224f65..ac1204c 100755 --- a/lcc/include/alpha/osf/stdlib.h +++ b/lcc/include/alpha/osf/stdlib.h @@ -1,54 +1,54 @@ -#ifndef __STDLIB
-#define __STDLIB
-
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-#define MB_CUR_MAX 1
-#define NULL 0
-#define RAND_MAX 32767
-
-typedef struct { int quot, rem; } div_t;
-typedef struct { long quot, rem; } ldiv_t;
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
-#define _WCHAR_T
-#define _WCHAR_T_
-typedef unsigned char wchar_t;
-#endif
-
-extern double atof(const char *);
-extern int atoi(const char *);
-extern long int atol(const char *);
-extern double strtod(const char *, char **);
-extern long int strtol(const char *, char **, int);
-extern unsigned long int strtoul(const char *, char **, int);
-extern int rand(void);
-extern void srand(unsigned int);
-extern void *calloc(size_t, size_t);
-extern void free(void *);
-extern void *malloc(size_t);
-extern void *realloc(void *, size_t);
-extern void abort(void);
-extern int atexit(void (*)(void));
-extern void exit(int);
-extern char *getenv(const char *);
-extern int system(const char *);
-extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
-extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
-extern int abs(int);
-extern div_t div(int, int);
-extern long int labs(long int);
-extern ldiv_t ldiv(long int, long int);
-extern int mblen(const char *, size_t);
-extern int mbtowc(wchar_t *, const char *, size_t);
-extern int wctomb(char *, wchar_t);
-extern size_t mbstowcs(wchar_t *, const char *, size_t);
-extern size_t wcstombs(char *, const wchar_t *, size_t);
-
-#endif /* __STDLIB */
+#ifndef __STDLIB +#define __STDLIB + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define MB_CUR_MAX 1 +#define NULL 0 +#define RAND_MAX 32767 + +typedef struct { int quot, rem; } div_t; +typedef struct { long quot, rem; } ldiv_t; + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_) +#define _WCHAR_T +#define _WCHAR_T_ +typedef unsigned char wchar_t; +#endif + +extern double atof(const char *); +extern int atoi(const char *); +extern long int atol(const char *); +extern double strtod(const char *, char **); +extern long int strtol(const char *, char **, int); +extern unsigned long int strtoul(const char *, char **, int); +extern int rand(void); +extern void srand(unsigned int); +extern void *calloc(size_t, size_t); +extern void free(void *); +extern void *malloc(size_t); +extern void *realloc(void *, size_t); +extern void abort(void); +extern int atexit(void (*)(void)); +extern void exit(int); +extern char *getenv(const char *); +extern int system(const char *); +extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); +extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); +extern int abs(int); +extern div_t div(int, int); +extern long int labs(long int); +extern ldiv_t ldiv(long int, long int); +extern int mblen(const char *, size_t); +extern int mbtowc(wchar_t *, const char *, size_t); +extern int wctomb(char *, wchar_t); +extern size_t mbstowcs(wchar_t *, const char *, size_t); +extern size_t wcstombs(char *, const wchar_t *, size_t); + +#endif /* __STDLIB */ diff --git a/lcc/include/alpha/osf/string.h b/lcc/include/alpha/osf/string.h index f19b1e4..8432820 100755 --- a/lcc/include/alpha/osf/string.h +++ b/lcc/include/alpha/osf/string.h @@ -1,35 +1,35 @@ -#ifndef __STRING
-#define __STRING
-
-#define NULL 0
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-void *memcpy(void *, const void *, size_t);
-void *memmove(void *, const void *, size_t);
-char *strcpy(char *, const char *);
-char *strncpy(char *, const char *, size_t);
-char *strcat(char *, const char *);
-char *strncat(char *, const char *, size_t);
-int memcmp(const void *, const void *, size_t);
-int strcmp(const char *, const char *);
-int strcoll(const char *, const char *);
-int strncmp(const char *, const char *, size_t);
-size_t strxfrm(char *, const char *, size_t);
-void *memchr(const void *, int, size_t);
-char *strchr(const char *, int);
-size_t strcspn(const char *, const char *);
-char *strpbrk(const char *, const char *);
-char *strrchr(const char *, int);
-size_t strspn(const char *, const char *);
-char *strstr(const char *, const char *);
-char *strtok(char *, const char *);
-void *memset(void *, int, size_t);
-char *strerror(int);
-size_t strlen(const char *);
-
-#endif /* __STRING */
+#ifndef __STRING +#define __STRING + +#define NULL 0 + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +void *memcpy(void *, const void *, size_t); +void *memmove(void *, const void *, size_t); +char *strcpy(char *, const char *); +char *strncpy(char *, const char *, size_t); +char *strcat(char *, const char *); +char *strncat(char *, const char *, size_t); +int memcmp(const void *, const void *, size_t); +int strcmp(const char *, const char *); +int strcoll(const char *, const char *); +int strncmp(const char *, const char *, size_t); +size_t strxfrm(char *, const char *, size_t); +void *memchr(const void *, int, size_t); +char *strchr(const char *, int); +size_t strcspn(const char *, const char *); +char *strpbrk(const char *, const char *); +char *strrchr(const char *, int); +size_t strspn(const char *, const char *); +char *strstr(const char *, const char *); +char *strtok(char *, const char *); +void *memset(void *, int, size_t); +char *strerror(int); +size_t strlen(const char *); + +#endif /* __STRING */ diff --git a/lcc/include/alpha/osf/time.h b/lcc/include/alpha/osf/time.h index 019c624..a855400 100755 --- a/lcc/include/alpha/osf/time.h +++ b/lcc/include/alpha/osf/time.h @@ -1,50 +1,50 @@ -#ifndef __TIME
-#define __TIME
-
-#define CLOCKS_PER_SEC 1000000
-#ifndef NULL
-#define NULL 0
-#endif
-
-#if !defined(_CLOCK_T) && !defined(_CLOCK_T_)
-#define _CLOCK_T
-#define _CLOCK_T_
-typedef long clock_t;
-#endif
-
-#if !defined(_TIME_T) && !defined(_TIME_T_)
-#define _TIME_T
-#define _TIME_T_
-typedef long time_t;
-#endif
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-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;
-long __tm_gmtoff;
- char *__tm_zone;
-};
-extern clock_t clock(void);
-extern double difftime(time_t, time_t);
-extern time_t mktime(struct tm *);
-extern time_t time(time_t *);
-extern char *asctime(const struct tm *);
-extern char *ctime(const time_t *);
-extern struct tm *gmtime(const time_t *);
-extern struct tm *localtime(const time_t *);
-extern size_t strftime(char *, size_t, const char *, const struct tm *);
-
-#endif /* __TIME */
+#ifndef __TIME +#define __TIME + +#define CLOCKS_PER_SEC 1000000 +#ifndef NULL +#define NULL 0 +#endif + +#if !defined(_CLOCK_T) && !defined(_CLOCK_T_) +#define _CLOCK_T +#define _CLOCK_T_ +typedef long clock_t; +#endif + +#if !defined(_TIME_T) && !defined(_TIME_T_) +#define _TIME_T +#define _TIME_T_ +typedef long time_t; +#endif + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +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; +long __tm_gmtoff; + char *__tm_zone; +}; +extern clock_t clock(void); +extern double difftime(time_t, time_t); +extern time_t mktime(struct tm *); +extern time_t time(time_t *); +extern char *asctime(const struct tm *); +extern char *ctime(const time_t *); +extern struct tm *gmtime(const time_t *); +extern struct tm *localtime(const time_t *); +extern size_t strftime(char *, size_t, const char *, const struct tm *); + +#endif /* __TIME */ diff --git a/lcc/include/mips/irix/assert.h b/lcc/include/mips/irix/assert.h index 5b4776c..04b0e3a 100755 --- a/lcc/include/mips/irix/assert.h +++ b/lcc/include/mips/irix/assert.h @@ -1,14 +1,14 @@ -#ifndef __ASSERT
-#define __ASSERT
-
-void assert(int);
-
-#endif /* __ASSERT */
-
-#undef assert
-#ifdef NDEBUG
-#define assert(ignore) ((void)0)
-#else
-extern int _assert(char *, char *, unsigned);
-#define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__)))
-#endif /* NDEBUG */
+#ifndef __ASSERT +#define __ASSERT + +void assert(int); + +#endif /* __ASSERT */ + +#undef assert +#ifdef NDEBUG +#define assert(ignore) ((void)0) +#else +extern int _assert(char *, char *, unsigned); +#define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__))) +#endif /* NDEBUG */ diff --git a/lcc/include/mips/irix/ctype.h b/lcc/include/mips/irix/ctype.h index 7239547..2a43440 100755 --- a/lcc/include/mips/irix/ctype.h +++ b/lcc/include/mips/irix/ctype.h @@ -1,40 +1,40 @@ -#ifndef __CTYPE
-#define __CTYPE
-
-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);
-
-#define __U 01
-#define __L 02
-#define __N 04
-#define __S 010
-#define __P 020
-#define __C 040
-#define __B 0100
-#define __X 0200
-
-extern unsigned char _ctype[];
-#define isalnum(c) ((_ctype+1)[c]&(__U|__L|__N))
-#define isalpha(c) ((_ctype+1)[c]&(__U|__L))
-#define iscntrl(c) ((_ctype+1)[c]&__C)
-#define isdigit(c) ((_ctype+1)[c]&__N)
-#define isgraph(c) ((_ctype+1)[c]&(__P|__U|__L|__N))
-#define islower(c) ((_ctype+1)[c]&__L)
-#define isprint(c) ((_ctype+1)[c]&(__P|__U|__L|__N|__B))
-#define ispunct(c) ((_ctype+1)[c]&__P)
-#define isspace(c) ((_ctype+1)[c]&__S)
-#define isupper(c) ((_ctype+1)[c]&__U)
-#define isxdigit(c) ((_ctype+1)[c]&__X)
-
-#endif /* __CTYPE */
+#ifndef __CTYPE +#define __CTYPE + +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); + +#define __U 01 +#define __L 02 +#define __N 04 +#define __S 010 +#define __P 020 +#define __C 040 +#define __B 0100 +#define __X 0200 + +extern unsigned char _ctype[]; +#define isalnum(c) ((_ctype+1)[c]&(__U|__L|__N)) +#define isalpha(c) ((_ctype+1)[c]&(__U|__L)) +#define iscntrl(c) ((_ctype+1)[c]&__C) +#define isdigit(c) ((_ctype+1)[c]&__N) +#define isgraph(c) ((_ctype+1)[c]&(__P|__U|__L|__N)) +#define islower(c) ((_ctype+1)[c]&__L) +#define isprint(c) ((_ctype+1)[c]&(__P|__U|__L|__N|__B)) +#define ispunct(c) ((_ctype+1)[c]&__P) +#define isspace(c) ((_ctype+1)[c]&__S) +#define isupper(c) ((_ctype+1)[c]&__U) +#define isxdigit(c) ((_ctype+1)[c]&__X) + +#endif /* __CTYPE */ diff --git a/lcc/include/mips/irix/errno.h b/lcc/include/mips/irix/errno.h index 5ab3f0f..c914e05 100755 --- a/lcc/include/mips/irix/errno.h +++ b/lcc/include/mips/irix/errno.h @@ -1,8 +1,8 @@ -#ifndef __ERRNO
-#define __ERRNO
-
-#define EDOM 33
-#define ERANGE 34
-extern int errno;
-
-#endif /* __ERRNO */
+#ifndef __ERRNO +#define __ERRNO + +#define EDOM 33 +#define ERANGE 34 +extern int errno; + +#endif /* __ERRNO */ diff --git a/lcc/include/mips/irix/float.h b/lcc/include/mips/irix/float.h index 8a8ddb1..a3e1eb5 100755 --- a/lcc/include/mips/irix/float.h +++ b/lcc/include/mips/irix/float.h @@ -1,37 +1,37 @@ -#ifndef __FLOAT
-#define __FLOAT
-
-#define FLT_ROUNDS 1
-#define FLT_RADIX 2
-
-#define FLT_DIG 6
-#define FLT_EPSILON 1.19209289550781250000e-07
-#define FLT_MANT_DIG 24
-#define FLT_MAX 3.40282346638528860000e+38
-#define FLT_MAX_10_EXP 38
-#define FLT_MAX_EXP 128
-#define FLT_MIN 1.17549435082228750000e-38
-#define FLT_MIN_10_EXP -37
-#define FLT_MIN_EXP -125
-
-#define DBL_DIG 15
-#define DBL_EPSILON 2.22044604925031310000e-16
-#define DBL_MANT_DIG 53
-#define DBL_MAX 1.79769313486231570000e+308
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define DBL_MIN 2.22507385850720140000e-308
-#define DBL_MIN_10_EXP -307
-#define DBL_MIN_EXP -1021
-
-#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON DBL_EPSILON
-#define LDBL_DIG DBL_DIG
-#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN DBL_MIN
-#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
-#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX DBL_MAX
-#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
-
-#endif /* __FLOAT */
+#ifndef __FLOAT +#define __FLOAT + +#define FLT_ROUNDS 1 +#define FLT_RADIX 2 + +#define FLT_DIG 6 +#define FLT_EPSILON 1.19209289550781250000e-07 +#define FLT_MANT_DIG 24 +#define FLT_MAX 3.40282346638528860000e+38 +#define FLT_MAX_10_EXP 38 +#define FLT_MAX_EXP 128 +#define FLT_MIN 1.17549435082228750000e-38 +#define FLT_MIN_10_EXP -37 +#define FLT_MIN_EXP -125 + +#define DBL_DIG 15 +#define DBL_EPSILON 2.22044604925031310000e-16 +#define DBL_MANT_DIG 53 +#define DBL_MAX 1.79769313486231570000e+308 +#define DBL_MAX_10_EXP 308 +#define DBL_MAX_EXP 1024 +#define DBL_MIN 2.22507385850720140000e-308 +#define DBL_MIN_10_EXP -307 +#define DBL_MIN_EXP -1021 + +#define LDBL_MANT_DIG DBL_MANT_DIG +#define LDBL_EPSILON DBL_EPSILON +#define LDBL_DIG DBL_DIG +#define LDBL_MIN_EXP DBL_MIN_EXP +#define LDBL_MIN DBL_MIN +#define LDBL_MIN_10_EXP DBL_MIN_10_EXP +#define LDBL_MAX_EXP DBL_MAX_EXP +#define LDBL_MAX DBL_MAX +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP + +#endif /* __FLOAT */ diff --git a/lcc/include/mips/irix/limits.h b/lcc/include/mips/irix/limits.h index 98251f8..30944a5 100755 --- a/lcc/include/mips/irix/limits.h +++ b/lcc/include/mips/irix/limits.h @@ -1,24 +1,24 @@ -#ifndef __LIMITS
-#define __LIMITS
-
-#define CHAR_BIT 8
-#define MB_LEN_MAX 1
-
-#define UCHAR_MAX 0xff
-#define USHRT_MAX 0xffff
-#define UINT_MAX (~0U)
-#define ULONG_MAX (~0UL)
-
-#define CHAR_MAX SCHAR_MAX
-#define SCHAR_MAX 0x7f
-#define SHRT_MAX 0x7fff
-#define INT_MAX 0x7fffffff
-#define LONG_MAX 0x7fffffffL
-
-#define CHAR_MIN SCHAR_MIN
-#define SCHAR_MIN (-SCHAR_MAX-1)
-#define SHRT_MIN (-SHRT_MAX-1)
-#define INT_MIN (-INT_MAX-1)
-#define LONG_MIN (-LONG_MAX-1)
-
-#endif /* __LIMITS */
+#ifndef __LIMITS +#define __LIMITS + +#define CHAR_BIT 8 +#define MB_LEN_MAX 1 + +#define UCHAR_MAX 0xff +#define USHRT_MAX 0xffff +#define UINT_MAX (~0U) +#define ULONG_MAX (~0UL) + +#define CHAR_MAX SCHAR_MAX +#define SCHAR_MAX 0x7f +#define SHRT_MAX 0x7fff +#define INT_MAX 0x7fffffff +#define LONG_MAX 0x7fffffffL + +#define CHAR_MIN SCHAR_MIN +#define SCHAR_MIN (-SCHAR_MAX-1) +#define SHRT_MIN (-SHRT_MAX-1) +#define INT_MIN (-INT_MAX-1) +#define LONG_MIN (-LONG_MAX-1) + +#endif /* __LIMITS */ diff --git a/lcc/include/mips/irix/locale.h b/lcc/include/mips/irix/locale.h index a861b47..acce293 100755 --- a/lcc/include/mips/irix/locale.h +++ b/lcc/include/mips/irix/locale.h @@ -1,36 +1,36 @@ -#ifndef __LOCALE
-#define __LOCALE
-
-#define LC_ALL 0
-#define LC_COLLATE 1
-#define LC_CTYPE 2
-#define LC_MONETARY 3
-#define LC_NUMERIC 4
-#define LC_TIME 5
-#define NULL 0
-
-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;
-};
-
-char *setlocale(int, const char *);
-struct lconv *localeconv(void);
-
-#endif /* __LOCALE */
+#ifndef __LOCALE +#define __LOCALE + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 +#define NULL 0 + +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; +}; + +char *setlocale(int, const char *); +struct lconv *localeconv(void); + +#endif /* __LOCALE */ diff --git a/lcc/include/mips/irix/math.h b/lcc/include/mips/irix/math.h index bb39d69..d2a31f4 100755 --- a/lcc/include/mips/irix/math.h +++ b/lcc/include/mips/irix/math.h @@ -1,29 +1,29 @@ -#ifndef __MATH
-#define __MATH
-
-#define HUGE_VAL 1.79769313486231570000e+308
-
-extern double acos(double);
-extern double asin(double);
-extern double atan(double);
-extern double atan2(double, double);
-extern double cos(double);
-extern double sin(double);
-extern double tan(double);
-extern double cosh(double);
-extern double sinh(double);
-extern double tanh(double);
-extern double exp(double);
-extern double frexp(double, int *);
-extern double ldexp(double, int);
-extern double log(double);
-extern double log10(double);
-extern double modf(double, double *);
-extern double pow(double, double);
-extern double sqrt(double);
-extern double ceil(double);
-extern double fabs(double);
-extern double floor(double);
-extern double fmod(double, double);
-
-#endif /* __MATH */
+#ifndef __MATH +#define __MATH + +#define HUGE_VAL 1.79769313486231570000e+308 + +extern double acos(double); +extern double asin(double); +extern double atan(double); +extern double atan2(double, double); +extern double cos(double); +extern double sin(double); +extern double tan(double); +extern double cosh(double); +extern double sinh(double); +extern double tanh(double); +extern double exp(double); +extern double frexp(double, int *); +extern double ldexp(double, int); +extern double log(double); +extern double log10(double); +extern double modf(double, double *); +extern double pow(double, double); +extern double sqrt(double); +extern double ceil(double); +extern double fabs(double); +extern double floor(double); +extern double fmod(double, double); + +#endif /* __MATH */ diff --git a/lcc/include/mips/irix/setjmp.h b/lcc/include/mips/irix/setjmp.h index d4247f9..384a1ca 100755 --- a/lcc/include/mips/irix/setjmp.h +++ b/lcc/include/mips/irix/setjmp.h @@ -1,10 +1,10 @@ -#ifndef __SETJMP
-#define __SETJMP
-
-
-
-typedef int jmp_buf[28];
-int setjmp(jmp_buf);
-void longjmp(jmp_buf, int);
-
-#endif /* __SETJMP */
+#ifndef __SETJMP +#define __SETJMP + + + +typedef int jmp_buf[28]; +int setjmp(jmp_buf); +void longjmp(jmp_buf, int); + +#endif /* __SETJMP */ diff --git a/lcc/include/mips/irix/signal.h b/lcc/include/mips/irix/signal.h index 22f98bc..c208a6b 100755 --- a/lcc/include/mips/irix/signal.h +++ b/lcc/include/mips/irix/signal.h @@ -1,20 +1,20 @@ -#ifndef __SIGNAL
-#define __SIGNAL
-
-typedef int sig_atomic_t;
-
-#define SIG_DFL ((void (*)(int))0)
-#define SIG_ERR ((void (*)(int))-1)
-#define SIG_IGN ((void (*)(int))1)
-
-#define SIGABRT 6
-#define SIGFPE 8
-#define SIGILL 4
-#define SIGINT 2
-#define SIGSEGV 11
-#define SIGTERM 15
-
-void (*signal(int, void (*)(int)))(int);
-int raise(int);
-
-#endif /* __SIGNAL */
+#ifndef __SIGNAL +#define __SIGNAL + +typedef int sig_atomic_t; + +#define SIG_DFL ((void (*)(int))0) +#define SIG_ERR ((void (*)(int))-1) +#define SIG_IGN ((void (*)(int))1) + +#define SIGABRT 6 +#define SIGFPE 8 +#define SIGILL 4 +#define SIGINT 2 +#define SIGSEGV 11 +#define SIGTERM 15 + +void (*signal(int, void (*)(int)))(int); +int raise(int); + +#endif /* __SIGNAL */ diff --git a/lcc/include/mips/irix/stdarg.h b/lcc/include/mips/irix/stdarg.h index 6c3a486..594db32 100755 --- a/lcc/include/mips/irix/stdarg.h +++ b/lcc/include/mips/irix/stdarg.h @@ -1,22 +1,22 @@ -#ifndef __STDARG
-#define __STDARG
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef char *__va_list;
-#endif
-typedef __va_list va_list;
-
-#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
- (char *)((int *)&(start)+1) : (char *)(&(start)+1))))
-#define __va_arg(list, mode, n) \
- (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
-#define _bigendian_va_arg(list, mode, n) (\
- sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
- sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
-#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
-#define va_end(list) ((void)0)
-#define va_arg(list, mode) (sizeof(mode)==8 ? \
- *(mode *)(&(list = (char*)(((int)list + 15)&~7U))[-8]) : \
- _bigendian_va_arg(list, mode, 3U))
-#endif
+#ifndef __STDARG +#define __STDARG + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef char *__va_list; +#endif +typedef __va_list va_list; + +#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ + (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) +#define __va_arg(list, mode, n) \ + (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) +#define _bigendian_va_arg(list, mode, n) (\ + sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ + sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) +#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) +#define va_end(list) ((void)0) +#define va_arg(list, mode) (sizeof(mode)==8 ? \ + *(mode *)(&(list = (char*)(((int)list + 15)&~7U))[-8]) : \ + _bigendian_va_arg(list, mode, 3U)) +#endif diff --git a/lcc/include/mips/irix/stddef.h b/lcc/include/mips/irix/stddef.h index 459bfd6..4e87e1c 100755 --- a/lcc/include/mips/irix/stddef.h +++ b/lcc/include/mips/irix/stddef.h @@ -1,22 +1,22 @@ -#ifndef __STDDEF
-#define __STDDEF
-
-
-#define NULL 0
-#define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0))
-
-typedef long ptrdiff_t;
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
-#define _WCHAR_T
-#define _WCHAR_T_
-typedef unsigned short wchar_t;
-#endif
-
-#endif /* __STDDEF */
+#ifndef __STDDEF +#define __STDDEF + + +#define NULL 0 +#define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) + +typedef long ptrdiff_t; + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_) +#define _WCHAR_T +#define _WCHAR_T_ +typedef unsigned short wchar_t; +#endif + +#endif /* __STDDEF */ diff --git a/lcc/include/mips/irix/stdio.h b/lcc/include/mips/irix/stdio.h index 77d996a..2668465 100755 --- a/lcc/include/mips/irix/stdio.h +++ b/lcc/include/mips/irix/stdio.h @@ -1,103 +1,103 @@ -#ifndef __STDIO
-#define __STDIO
-
-#define _IOFBF 0
-#define _IOLBF 0100
-#define _IONBF 04
-#define BUFSIZ 1024
-#define EOF (-1)
-
-extern struct _iobuf {
- int _cnt;
- unsigned char *_ptr;
- unsigned char *_base;
- char _flag;
- char _file;
-} _iob[];
-#define FILE struct _iobuf
-#define FILENAME_MAX 256
-#define FOPEN_MAX 100
-
-#if !defined(_FPOS_T) && !defined(_FPOS_T_)
-#define _FPOS_T
-#define _FPOS_T_
-typedef long fpos_t;
-#endif
-
-#define L_tmpnam 25
-#define NULL 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#define SEEK_SET 0
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef char *__va_list;
-#endif
-
-#define stderr (&_iob[2])
-#define stdin (&_iob[0])
-#define stdout (&_iob[1])
-#define TMP_MAX 17576
-
-extern int remove(const char *);
-extern int rename(const char *, const char *);
-extern FILE *tmpfile(void);
-extern char *tmpnam(char *);
-extern int fclose(FILE *);
-extern int fflush(FILE *);
-extern FILE *fopen(const char *, const char *);
-extern FILE *freopen(const char *, const char *, FILE *);
-extern void setbuf(FILE *, char *);
-extern int setvbuf(FILE *, char *, int, size_t);
-extern int fprintf(FILE *, const char *, ...);
-extern int fscanf(FILE *, const char *, ...);
-extern int printf(const char *, ...);
-extern int scanf(const char *, ...);
-extern int sprintf(char *, const char *, ...);
-extern int sscanf(const char *, const char *, ...);
-extern int vfprintf(FILE *, const char *, __va_list);
-extern int vprintf(const char *, __va_list);
-extern int vsprintf(char *, const char *, __va_list);
-extern int fgetc(FILE *);
-extern char *fgets(char *, int, FILE *);
-extern int fputc(int, FILE *);
-extern int fputs(const char *, FILE *);
-extern int getc(FILE *);
-extern int getchar(void);
-extern char *gets(char *);
-extern int putc(int, FILE *);
-extern int putchar(int);
-extern int puts(const char *);
-extern int ungetc(int, FILE *);
-extern size_t fread(void *, size_t, size_t, FILE *);
-extern size_t fwrite(const void *, size_t, size_t, FILE *);
-extern int fgetpos(FILE *, fpos_t *);
-extern int fseek(FILE *, long int, int);
-extern int fsetpos(FILE *, const fpos_t *);
-extern long int ftell(FILE *);
-extern void rewind(FILE *);
-extern void clearerr(FILE *);
-extern int feof(FILE *);
-extern int ferror(FILE *);
-extern void perror(const char *);
-
-#define _IOEOF 020
-#define _IOERR 040
-
-#define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++)
-#define putc(x, p) (--(p)->_cnt < 0 ? _flsbuf((unsigned char) (x), p) : (int) (*(p)->_ptr++ = (unsigned char) (x)))
-extern int _filbuf(FILE *), _flsbuf(unsigned, FILE *);
-#define feof(p) ((p)->_flag&_IOEOF)
-#define ferror(p) ((p)->_flag&_IOERR)
-#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF))
-#define getchar() getc(stdin)
-#define putchar(x) putc((x),stdout)
-
-#endif /* __STDIO */
+#ifndef __STDIO +#define __STDIO + +#define _IOFBF 0 +#define _IOLBF 0100 +#define _IONBF 04 +#define BUFSIZ 1024 +#define EOF (-1) + +extern struct _iobuf { + int _cnt; + unsigned char *_ptr; + unsigned char *_base; + char _flag; + char _file; +} _iob[]; +#define FILE struct _iobuf +#define FILENAME_MAX 256 +#define FOPEN_MAX 100 + +#if !defined(_FPOS_T) && !defined(_FPOS_T_) +#define _FPOS_T +#define _FPOS_T_ +typedef long fpos_t; +#endif + +#define L_tmpnam 25 +#define NULL 0 +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef char *__va_list; +#endif + +#define stderr (&_iob[2]) +#define stdin (&_iob[0]) +#define stdout (&_iob[1]) +#define TMP_MAX 17576 + +extern int remove(const char *); +extern int rename(const char *, const char *); +extern FILE *tmpfile(void); +extern char *tmpnam(char *); +extern int fclose(FILE *); +extern int fflush(FILE *); +extern FILE *fopen(const char *, const char *); +extern FILE *freopen(const char *, const char *, FILE *); +extern void setbuf(FILE *, char *); +extern int setvbuf(FILE *, char *, int, size_t); +extern int fprintf(FILE *, const char *, ...); +extern int fscanf(FILE *, const char *, ...); +extern int printf(const char *, ...); +extern int scanf(const char *, ...); +extern int sprintf(char *, const char *, ...); +extern int sscanf(const char *, const char *, ...); +extern int vfprintf(FILE *, const char *, __va_list); +extern int vprintf(const char *, __va_list); +extern int vsprintf(char *, const char *, __va_list); +extern int fgetc(FILE *); +extern char *fgets(char *, int, FILE *); +extern int fputc(int, FILE *); +extern int fputs(const char *, FILE *); +extern int getc(FILE *); +extern int getchar(void); +extern char *gets(char *); +extern int putc(int, FILE *); +extern int putchar(int); +extern int puts(const char *); +extern int ungetc(int, FILE *); +extern size_t fread(void *, size_t, size_t, FILE *); +extern size_t fwrite(const void *, size_t, size_t, FILE *); +extern int fgetpos(FILE *, fpos_t *); +extern int fseek(FILE *, long int, int); +extern int fsetpos(FILE *, const fpos_t *); +extern long int ftell(FILE *); +extern void rewind(FILE *); +extern void clearerr(FILE *); +extern int feof(FILE *); +extern int ferror(FILE *); +extern void perror(const char *); + +#define _IOEOF 020 +#define _IOERR 040 + +#define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++) +#define putc(x, p) (--(p)->_cnt < 0 ? _flsbuf((unsigned char) (x), p) : (int) (*(p)->_ptr++ = (unsigned char) (x))) +extern int _filbuf(FILE *), _flsbuf(unsigned, FILE *); +#define feof(p) ((p)->_flag&_IOEOF) +#define ferror(p) ((p)->_flag&_IOERR) +#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF)) +#define getchar() getc(stdin) +#define putchar(x) putc((x),stdout) + +#endif /* __STDIO */ diff --git a/lcc/include/mips/irix/stdlib.h b/lcc/include/mips/irix/stdlib.h index e224f65..ac1204c 100755 --- a/lcc/include/mips/irix/stdlib.h +++ b/lcc/include/mips/irix/stdlib.h @@ -1,54 +1,54 @@ -#ifndef __STDLIB
-#define __STDLIB
-
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-#define MB_CUR_MAX 1
-#define NULL 0
-#define RAND_MAX 32767
-
-typedef struct { int quot, rem; } div_t;
-typedef struct { long quot, rem; } ldiv_t;
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
-#define _WCHAR_T
-#define _WCHAR_T_
-typedef unsigned char wchar_t;
-#endif
-
-extern double atof(const char *);
-extern int atoi(const char *);
-extern long int atol(const char *);
-extern double strtod(const char *, char **);
-extern long int strtol(const char *, char **, int);
-extern unsigned long int strtoul(const char *, char **, int);
-extern int rand(void);
-extern void srand(unsigned int);
-extern void *calloc(size_t, size_t);
-extern void free(void *);
-extern void *malloc(size_t);
-extern void *realloc(void *, size_t);
-extern void abort(void);
-extern int atexit(void (*)(void));
-extern void exit(int);
-extern char *getenv(const char *);
-extern int system(const char *);
-extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
-extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
-extern int abs(int);
-extern div_t div(int, int);
-extern long int labs(long int);
-extern ldiv_t ldiv(long int, long int);
-extern int mblen(const char *, size_t);
-extern int mbtowc(wchar_t *, const char *, size_t);
-extern int wctomb(char *, wchar_t);
-extern size_t mbstowcs(wchar_t *, const char *, size_t);
-extern size_t wcstombs(char *, const wchar_t *, size_t);
-
-#endif /* __STDLIB */
+#ifndef __STDLIB +#define __STDLIB + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define MB_CUR_MAX 1 +#define NULL 0 +#define RAND_MAX 32767 + +typedef struct { int quot, rem; } div_t; +typedef struct { long quot, rem; } ldiv_t; + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_) +#define _WCHAR_T +#define _WCHAR_T_ +typedef unsigned char wchar_t; +#endif + +extern double atof(const char *); +extern int atoi(const char *); +extern long int atol(const char *); +extern double strtod(const char *, char **); +extern long int strtol(const char *, char **, int); +extern unsigned long int strtoul(const char *, char **, int); +extern int rand(void); +extern void srand(unsigned int); +extern void *calloc(size_t, size_t); +extern void free(void *); +extern void *malloc(size_t); +extern void *realloc(void *, size_t); +extern void abort(void); +extern int atexit(void (*)(void)); +extern void exit(int); +extern char *getenv(const char *); +extern int system(const char *); +extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); +extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); +extern int abs(int); +extern div_t div(int, int); +extern long int labs(long int); +extern ldiv_t ldiv(long int, long int); +extern int mblen(const char *, size_t); +extern int mbtowc(wchar_t *, const char *, size_t); +extern int wctomb(char *, wchar_t); +extern size_t mbstowcs(wchar_t *, const char *, size_t); +extern size_t wcstombs(char *, const wchar_t *, size_t); + +#endif /* __STDLIB */ diff --git a/lcc/include/mips/irix/string.h b/lcc/include/mips/irix/string.h index f19b1e4..8432820 100755 --- a/lcc/include/mips/irix/string.h +++ b/lcc/include/mips/irix/string.h @@ -1,35 +1,35 @@ -#ifndef __STRING
-#define __STRING
-
-#define NULL 0
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-void *memcpy(void *, const void *, size_t);
-void *memmove(void *, const void *, size_t);
-char *strcpy(char *, const char *);
-char *strncpy(char *, const char *, size_t);
-char *strcat(char *, const char *);
-char *strncat(char *, const char *, size_t);
-int memcmp(const void *, const void *, size_t);
-int strcmp(const char *, const char *);
-int strcoll(const char *, const char *);
-int strncmp(const char *, const char *, size_t);
-size_t strxfrm(char *, const char *, size_t);
-void *memchr(const void *, int, size_t);
-char *strchr(const char *, int);
-size_t strcspn(const char *, const char *);
-char *strpbrk(const char *, const char *);
-char *strrchr(const char *, int);
-size_t strspn(const char *, const char *);
-char *strstr(const char *, const char *);
-char *strtok(char *, const char *);
-void *memset(void *, int, size_t);
-char *strerror(int);
-size_t strlen(const char *);
-
-#endif /* __STRING */
+#ifndef __STRING +#define __STRING + +#define NULL 0 + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +void *memcpy(void *, const void *, size_t); +void *memmove(void *, const void *, size_t); +char *strcpy(char *, const char *); +char *strncpy(char *, const char *, size_t); +char *strcat(char *, const char *); +char *strncat(char *, const char *, size_t); +int memcmp(const void *, const void *, size_t); +int strcmp(const char *, const char *); +int strcoll(const char *, const char *); +int strncmp(const char *, const char *, size_t); +size_t strxfrm(char *, const char *, size_t); +void *memchr(const void *, int, size_t); +char *strchr(const char *, int); +size_t strcspn(const char *, const char *); +char *strpbrk(const char *, const char *); +char *strrchr(const char *, int); +size_t strspn(const char *, const char *); +char *strstr(const char *, const char *); +char *strtok(char *, const char *); +void *memset(void *, int, size_t); +char *strerror(int); +size_t strlen(const char *); + +#endif /* __STRING */ diff --git a/lcc/include/mips/irix/time.h b/lcc/include/mips/irix/time.h index 55a4922..07d8b41 100755 --- a/lcc/include/mips/irix/time.h +++ b/lcc/include/mips/irix/time.h @@ -1,48 +1,48 @@ -#ifndef __TIME
-#define __TIME
-
-#define CLOCKS_PER_SEC 1000000
-#ifndef NULL
-#define NULL 0
-#endif
-
-#if !defined(_CLOCK_T) && !defined(_CLOCK_T_)
-#define _CLOCK_T
-#define _CLOCK_T_
-typedef long clock_t;
-#endif
-
-#if !defined(_TIME_T) && !defined(_TIME_T_)
-#define _TIME_T
-#define _TIME_T_
-typedef long time_t;
-#endif
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-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;
-};
-extern clock_t clock(void);
-extern double difftime(time_t, time_t);
-extern time_t mktime(struct tm *);
-extern time_t time(time_t *);
-extern char *asctime(const struct tm *);
-extern char *ctime(const time_t *);
-extern struct tm *gmtime(const time_t *);
-extern struct tm *localtime(const time_t *);
-extern size_t strftime(char *, size_t, const char *, const struct tm *);
-
-#endif /* __TIME */
+#ifndef __TIME +#define __TIME + +#define CLOCKS_PER_SEC 1000000 +#ifndef NULL +#define NULL 0 +#endif + +#if !defined(_CLOCK_T) && !defined(_CLOCK_T_) +#define _CLOCK_T +#define _CLOCK_T_ +typedef long clock_t; +#endif + +#if !defined(_TIME_T) && !defined(_TIME_T_) +#define _TIME_T +#define _TIME_T_ +typedef long time_t; +#endif + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +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; +}; +extern clock_t clock(void); +extern double difftime(time_t, time_t); +extern time_t mktime(struct tm *); +extern time_t time(time_t *); +extern char *asctime(const struct tm *); +extern char *ctime(const time_t *); +extern struct tm *gmtime(const time_t *); +extern struct tm *localtime(const time_t *); +extern size_t strftime(char *, size_t, const char *, const struct tm *); + +#endif /* __TIME */ diff --git a/lcc/include/sparc/solaris/assert.h b/lcc/include/sparc/solaris/assert.h index e7f8777..ee0b0bf 100755 --- a/lcc/include/sparc/solaris/assert.h +++ b/lcc/include/sparc/solaris/assert.h @@ -1,14 +1,14 @@ -#ifndef __ASSERT
-#define __ASSERT
-
-void assert(int);
-
-#endif /* __ASSERT */
-
-#undef assert
-#ifdef NDEBUG
-#define assert(ignore) ((void)0)
-#else
-extern void __assert(char *, char *, unsigned);
-#define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0)))
-#endif /* NDEBUG */
+#ifndef __ASSERT +#define __ASSERT + +void assert(int); + +#endif /* __ASSERT */ + +#undef assert +#ifdef NDEBUG +#define assert(ignore) ((void)0) +#else +extern void __assert(char *, char *, unsigned); +#define assert(e) ((void)((e)||(__assert(#e, __FILE__, __LINE__),0))) +#endif /* NDEBUG */ diff --git a/lcc/include/sparc/solaris/ctype.h b/lcc/include/sparc/solaris/ctype.h index 368c736..b25b2a4 100755 --- a/lcc/include/sparc/solaris/ctype.h +++ b/lcc/include/sparc/solaris/ctype.h @@ -1,46 +1,46 @@ -#ifndef __CTYPE
-#define __CTYPE
-
-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);
-
-#define __U 01
-#define __L 02
-#define __N 04
-#define __S 010
-#define __P 020
-#define __C 040
-#define _U 01
-#define _L 02
-#define _N 04
-#define _S 010
-#define _P 020
-#define _C 040
-#define _B 0100
-#define _X 0200
-
-extern unsigned char __ctype[];
-#define isalpha(c) ((__ctype + 1)[c] & (_U | _L))
-#define isupper(c) ((__ctype + 1)[c] & _U)
-#define islower(c) ((__ctype + 1)[c] & _L)
-#define isdigit(c) ((__ctype + 1)[c] & _N)
-#define isxdigit(c) ((__ctype + 1)[c] & _X)
-#define isalnum(c) ((__ctype + 1)[c] & (_U | _L | _N))
-#define isspace(c) ((__ctype + 1)[c] & _S)
-#define ispunct(c) ((__ctype + 1)[c] & _P)
-#define isprint(c) ((__ctype + 1)[c] & (_P | _U | _L | _N | _B))
-#define isgraph(c) ((__ctype + 1)[c] & (_P | _U | _L | _N))
-#define iscntrl(c) ((__ctype + 1)[c] & _C)
-
-#endif /* __CTYPE */
+#ifndef __CTYPE +#define __CTYPE + +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); + +#define __U 01 +#define __L 02 +#define __N 04 +#define __S 010 +#define __P 020 +#define __C 040 +#define _U 01 +#define _L 02 +#define _N 04 +#define _S 010 +#define _P 020 +#define _C 040 +#define _B 0100 +#define _X 0200 + +extern unsigned char __ctype[]; +#define isalpha(c) ((__ctype + 1)[c] & (_U | _L)) +#define isupper(c) ((__ctype + 1)[c] & _U) +#define islower(c) ((__ctype + 1)[c] & _L) +#define isdigit(c) ((__ctype + 1)[c] & _N) +#define isxdigit(c) ((__ctype + 1)[c] & _X) +#define isalnum(c) ((__ctype + 1)[c] & (_U | _L | _N)) +#define isspace(c) ((__ctype + 1)[c] & _S) +#define ispunct(c) ((__ctype + 1)[c] & _P) +#define isprint(c) ((__ctype + 1)[c] & (_P | _U | _L | _N | _B)) +#define isgraph(c) ((__ctype + 1)[c] & (_P | _U | _L | _N)) +#define iscntrl(c) ((__ctype + 1)[c] & _C) + +#endif /* __CTYPE */ diff --git a/lcc/include/sparc/solaris/errno.h b/lcc/include/sparc/solaris/errno.h index 5ab3f0f..c914e05 100755 --- a/lcc/include/sparc/solaris/errno.h +++ b/lcc/include/sparc/solaris/errno.h @@ -1,8 +1,8 @@ -#ifndef __ERRNO
-#define __ERRNO
-
-#define EDOM 33
-#define ERANGE 34
-extern int errno;
-
-#endif /* __ERRNO */
+#ifndef __ERRNO +#define __ERRNO + +#define EDOM 33 +#define ERANGE 34 +extern int errno; + +#endif /* __ERRNO */ diff --git a/lcc/include/sparc/solaris/float.h b/lcc/include/sparc/solaris/float.h index 8a8ddb1..a3e1eb5 100755 --- a/lcc/include/sparc/solaris/float.h +++ b/lcc/include/sparc/solaris/float.h @@ -1,37 +1,37 @@ -#ifndef __FLOAT
-#define __FLOAT
-
-#define FLT_ROUNDS 1
-#define FLT_RADIX 2
-
-#define FLT_DIG 6
-#define FLT_EPSILON 1.19209289550781250000e-07
-#define FLT_MANT_DIG 24
-#define FLT_MAX 3.40282346638528860000e+38
-#define FLT_MAX_10_EXP 38
-#define FLT_MAX_EXP 128
-#define FLT_MIN 1.17549435082228750000e-38
-#define FLT_MIN_10_EXP -37
-#define FLT_MIN_EXP -125
-
-#define DBL_DIG 15
-#define DBL_EPSILON 2.22044604925031310000e-16
-#define DBL_MANT_DIG 53
-#define DBL_MAX 1.79769313486231570000e+308
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define DBL_MIN 2.22507385850720140000e-308
-#define DBL_MIN_10_EXP -307
-#define DBL_MIN_EXP -1021
-
-#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON DBL_EPSILON
-#define LDBL_DIG DBL_DIG
-#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN DBL_MIN
-#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
-#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX DBL_MAX
-#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
-
-#endif /* __FLOAT */
+#ifndef __FLOAT +#define __FLOAT + +#define FLT_ROUNDS 1 +#define FLT_RADIX 2 + +#define FLT_DIG 6 +#define FLT_EPSILON 1.19209289550781250000e-07 +#define FLT_MANT_DIG 24 +#define FLT_MAX 3.40282346638528860000e+38 +#define FLT_MAX_10_EXP 38 +#define FLT_MAX_EXP 128 +#define FLT_MIN 1.17549435082228750000e-38 +#define FLT_MIN_10_EXP -37 +#define FLT_MIN_EXP -125 + +#define DBL_DIG 15 +#define DBL_EPSILON 2.22044604925031310000e-16 +#define DBL_MANT_DIG 53 +#define DBL_MAX 1.79769313486231570000e+308 +#define DBL_MAX_10_EXP 308 +#define DBL_MAX_EXP 1024 +#define DBL_MIN 2.22507385850720140000e-308 +#define DBL_MIN_10_EXP -307 +#define DBL_MIN_EXP -1021 + +#define LDBL_MANT_DIG DBL_MANT_DIG +#define LDBL_EPSILON DBL_EPSILON +#define LDBL_DIG DBL_DIG +#define LDBL_MIN_EXP DBL_MIN_EXP +#define LDBL_MIN DBL_MIN +#define LDBL_MIN_10_EXP DBL_MIN_10_EXP +#define LDBL_MAX_EXP DBL_MAX_EXP +#define LDBL_MAX DBL_MAX +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP + +#endif /* __FLOAT */ diff --git a/lcc/include/sparc/solaris/limits.h b/lcc/include/sparc/solaris/limits.h index 98251f8..30944a5 100755 --- a/lcc/include/sparc/solaris/limits.h +++ b/lcc/include/sparc/solaris/limits.h @@ -1,24 +1,24 @@ -#ifndef __LIMITS
-#define __LIMITS
-
-#define CHAR_BIT 8
-#define MB_LEN_MAX 1
-
-#define UCHAR_MAX 0xff
-#define USHRT_MAX 0xffff
-#define UINT_MAX (~0U)
-#define ULONG_MAX (~0UL)
-
-#define CHAR_MAX SCHAR_MAX
-#define SCHAR_MAX 0x7f
-#define SHRT_MAX 0x7fff
-#define INT_MAX 0x7fffffff
-#define LONG_MAX 0x7fffffffL
-
-#define CHAR_MIN SCHAR_MIN
-#define SCHAR_MIN (-SCHAR_MAX-1)
-#define SHRT_MIN (-SHRT_MAX-1)
-#define INT_MIN (-INT_MAX-1)
-#define LONG_MIN (-LONG_MAX-1)
-
-#endif /* __LIMITS */
+#ifndef __LIMITS +#define __LIMITS + +#define CHAR_BIT 8 +#define MB_LEN_MAX 1 + +#define UCHAR_MAX 0xff +#define USHRT_MAX 0xffff +#define UINT_MAX (~0U) +#define ULONG_MAX (~0UL) + +#define CHAR_MAX SCHAR_MAX +#define SCHAR_MAX 0x7f +#define SHRT_MAX 0x7fff +#define INT_MAX 0x7fffffff +#define LONG_MAX 0x7fffffffL + +#define CHAR_MIN SCHAR_MIN +#define SCHAR_MIN (-SCHAR_MAX-1) +#define SHRT_MIN (-SHRT_MAX-1) +#define INT_MIN (-INT_MAX-1) +#define LONG_MIN (-LONG_MAX-1) + +#endif /* __LIMITS */ diff --git a/lcc/include/sparc/solaris/locale.h b/lcc/include/sparc/solaris/locale.h index a861b47..acce293 100755 --- a/lcc/include/sparc/solaris/locale.h +++ b/lcc/include/sparc/solaris/locale.h @@ -1,36 +1,36 @@ -#ifndef __LOCALE
-#define __LOCALE
-
-#define LC_ALL 0
-#define LC_COLLATE 1
-#define LC_CTYPE 2
-#define LC_MONETARY 3
-#define LC_NUMERIC 4
-#define LC_TIME 5
-#define NULL 0
-
-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;
-};
-
-char *setlocale(int, const char *);
-struct lconv *localeconv(void);
-
-#endif /* __LOCALE */
+#ifndef __LOCALE +#define __LOCALE + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 +#define NULL 0 + +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; +}; + +char *setlocale(int, const char *); +struct lconv *localeconv(void); + +#endif /* __LOCALE */ diff --git a/lcc/include/sparc/solaris/math.h b/lcc/include/sparc/solaris/math.h index 13740db..93b8bdc 100755 --- a/lcc/include/sparc/solaris/math.h +++ b/lcc/include/sparc/solaris/math.h @@ -1,30 +1,30 @@ -#ifndef __MATH
-#define __MATH
-
-extern double infinity(void);
-#define HUGE_VAL (infinity())
-
-extern double acos(double);
-extern double asin(double);
-extern double atan(double);
-extern double atan2(double, double);
-extern double cos(double);
-extern double sin(double);
-extern double tan(double);
-extern double cosh(double);
-extern double sinh(double);
-extern double tanh(double);
-extern double exp(double);
-extern double frexp(double, int *);
-extern double ldexp(double, int);
-extern double log(double);
-extern double log10(double);
-extern double modf(double, double *);
-extern double pow(double, double);
-extern double sqrt(double);
-extern double ceil(double);
-extern double fabs(double);
-extern double floor(double);
-extern double fmod(double, double);
-
-#endif /* __MATH */
+#ifndef __MATH +#define __MATH + +extern double infinity(void); +#define HUGE_VAL (infinity()) + +extern double acos(double); +extern double asin(double); +extern double atan(double); +extern double atan2(double, double); +extern double cos(double); +extern double sin(double); +extern double tan(double); +extern double cosh(double); +extern double sinh(double); +extern double tanh(double); +extern double exp(double); +extern double frexp(double, int *); +extern double ldexp(double, int); +extern double log(double); +extern double log10(double); +extern double modf(double, double *); +extern double pow(double, double); +extern double sqrt(double); +extern double ceil(double); +extern double fabs(double); +extern double floor(double); +extern double fmod(double, double); + +#endif /* __MATH */ diff --git a/lcc/include/sparc/solaris/setjmp.h b/lcc/include/sparc/solaris/setjmp.h index b6a9ca3..c5a063b 100755 --- a/lcc/include/sparc/solaris/setjmp.h +++ b/lcc/include/sparc/solaris/setjmp.h @@ -1,10 +1,10 @@ -#ifndef __SETJMP
-#define __SETJMP
-
-
-
-typedef int jmp_buf[12];
-int setjmp(jmp_buf);
-void longjmp(jmp_buf, int);
-
-#endif /* __SETJMP */
+#ifndef __SETJMP +#define __SETJMP + + + +typedef int jmp_buf[12]; +int setjmp(jmp_buf); +void longjmp(jmp_buf, int); + +#endif /* __SETJMP */ diff --git a/lcc/include/sparc/solaris/signal.h b/lcc/include/sparc/solaris/signal.h index 22f98bc..c208a6b 100755 --- a/lcc/include/sparc/solaris/signal.h +++ b/lcc/include/sparc/solaris/signal.h @@ -1,20 +1,20 @@ -#ifndef __SIGNAL
-#define __SIGNAL
-
-typedef int sig_atomic_t;
-
-#define SIG_DFL ((void (*)(int))0)
-#define SIG_ERR ((void (*)(int))-1)
-#define SIG_IGN ((void (*)(int))1)
-
-#define SIGABRT 6
-#define SIGFPE 8
-#define SIGILL 4
-#define SIGINT 2
-#define SIGSEGV 11
-#define SIGTERM 15
-
-void (*signal(int, void (*)(int)))(int);
-int raise(int);
-
-#endif /* __SIGNAL */
+#ifndef __SIGNAL +#define __SIGNAL + +typedef int sig_atomic_t; + +#define SIG_DFL ((void (*)(int))0) +#define SIG_ERR ((void (*)(int))-1) +#define SIG_IGN ((void (*)(int))1) + +#define SIGABRT 6 +#define SIGFPE 8 +#define SIGILL 4 +#define SIGINT 2 +#define SIGSEGV 11 +#define SIGTERM 15 + +void (*signal(int, void (*)(int)))(int); +int raise(int); + +#endif /* __SIGNAL */ diff --git a/lcc/include/sparc/solaris/stdarg.h b/lcc/include/sparc/solaris/stdarg.h index cbdf869..5a99f45 100755 --- a/lcc/include/sparc/solaris/stdarg.h +++ b/lcc/include/sparc/solaris/stdarg.h @@ -1,22 +1,22 @@ -#ifndef __STDARG
-#define __STDARG
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef char *__va_list;
-#endif
-typedef __va_list va_list;
-
-#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
- (char *)((int *)&(start)+1) : (char *)(&(start)+1))))
-#define __va_arg(list, mode, n) \
- (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
-#define _bigendian_va_arg(list, mode, n) (\
- sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
- sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
-#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
-#define va_end(list) ((void)0)
-#define va_arg(list, mode) (sizeof(mode)>8 ? \
- **(mode **)(&(list += 4)[-4]) : \
- _bigendian_va_arg(list, mode, 3U))
-#endif
+#ifndef __STDARG +#define __STDARG + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef char *__va_list; +#endif +typedef __va_list va_list; + +#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ + (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) +#define __va_arg(list, mode, n) \ + (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) +#define _bigendian_va_arg(list, mode, n) (\ + sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ + sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) +#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) +#define va_end(list) ((void)0) +#define va_arg(list, mode) (sizeof(mode)>8 ? \ + **(mode **)(&(list += 4)[-4]) : \ + _bigendian_va_arg(list, mode, 3U)) +#endif diff --git a/lcc/include/sparc/solaris/stddef.h b/lcc/include/sparc/solaris/stddef.h index 459bfd6..4e87e1c 100755 --- a/lcc/include/sparc/solaris/stddef.h +++ b/lcc/include/sparc/solaris/stddef.h @@ -1,22 +1,22 @@ -#ifndef __STDDEF
-#define __STDDEF
-
-
-#define NULL 0
-#define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0))
-
-typedef long ptrdiff_t;
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
-#define _WCHAR_T
-#define _WCHAR_T_
-typedef unsigned short wchar_t;
-#endif
-
-#endif /* __STDDEF */
+#ifndef __STDDEF +#define __STDDEF + + +#define NULL 0 +#define offsetof(ty,mem) ((size_t)((char*)&((ty*)0)->mem - (char*)0)) + +typedef long ptrdiff_t; + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_) +#define _WCHAR_T +#define _WCHAR_T_ +typedef unsigned short wchar_t; +#endif + +#endif /* __STDDEF */ diff --git a/lcc/include/sparc/solaris/stdio.h b/lcc/include/sparc/solaris/stdio.h index 4e4a629..b0e3232 100755 --- a/lcc/include/sparc/solaris/stdio.h +++ b/lcc/include/sparc/solaris/stdio.h @@ -1,104 +1,104 @@ -#ifndef __STDIO
-#define __STDIO
-
-#define _IOFBF 0
-#define _IOLBF 0100
-#define _IONBF 04
-#define BUFSIZ 1024
-#define EOF (-1)
-
-typedef struct {
- int _cnt;
- unsigned char *_ptr;
- unsigned char *_base;
- unsigned char _flag;
- unsigned char _file;
-} FILE;
-extern FILE __iob[];
-#define FILENAME_MAX 1024
-#define FOPEN_MAX 20
-
-#if !defined(_FPOS_T) && !defined(_FPOS_T_)
-#define _FPOS_T
-#define _FPOS_T_
-typedef long fpos_t;
-#endif
-
-#define L_tmpnam 25
-#define NULL 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-#define SEEK_SET 0
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef char *__va_list;
-#endif
-
-#define stderr (&__iob[2])
-#define stdin (&__iob[0])
-#define stdout (&__iob[1])
-#define TMP_MAX 17576
-
-extern int remove(const char *);
-extern int rename(const char *, const char *);
-extern FILE *tmpfile(void);
-extern char *tmpnam(char *);
-extern int fclose(FILE *);
-extern int fflush(FILE *);
-extern FILE *fopen(const char *, const char *);
-extern FILE *freopen(const char *, const char *, FILE *);
-extern void setbuf(FILE *, char *);
-extern int setvbuf(FILE *, char *, int, size_t);
-extern int fprintf(FILE *, const char *, ...);
-extern int fscanf(FILE *, const char *, ...);
-extern int printf(const char *, ...);
-extern int scanf(const char *, ...);
-extern int sprintf(char *, const char *, ...);
-extern int sscanf(const char *, const char *, ...);
-extern int vfprintf(FILE *, const char *, __va_list);
-extern int vprintf(const char *, __va_list);
-extern int vsprintf(char *, const char *, __va_list);
-extern int fgetc(FILE *);
-extern char *fgets(char *, int, FILE *);
-extern int fputc(int, FILE *);
-extern int fputs(const char *, FILE *);
-extern int getc(FILE *);
-extern int getchar(void);
-extern char *gets(char *);
-extern int putc(int, FILE *);
-extern int putchar(int);
-extern int puts(const char *);
-extern int ungetc(int, FILE *);
-extern size_t fread(void *, size_t, size_t, FILE *);
-extern size_t fwrite(const void *, size_t, size_t, FILE *);
-extern int fgetpos(FILE *, fpos_t *);
-extern int fseek(FILE *, long int, int);
-extern int fsetpos(FILE *, const fpos_t *);
-extern long int ftell(FILE *);
-extern void rewind(FILE *);
-extern void clearerr(FILE *);
-extern int feof(FILE *);
-extern int ferror(FILE *);
-extern void perror(const char *);
-
-#define _IOEOF 020
-#define _IOERR 040
-
-#define getc(p) (--(p)->_cnt < 0 ? __filbuf(p) : (int)*(p)->_ptr++)
-#define putc(x, p) (--(p)->_cnt < 0 ? __flsbuf((unsigned char) (x), (p)) \
- : (int)(*(p)->_ptr++ = (x)))
-extern int __filbuf(FILE *), __flsbuf(unsigned, FILE *);
-#define feof(p) ((p)->_flag&_IOEOF)
-#define ferror(p) ((p)->_flag&_IOERR)
-#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF))
-#define getchar() getc(stdin)
-#define putchar(x) putc((x),stdout)
-
-#endif /* __STDIO */
+#ifndef __STDIO +#define __STDIO + +#define _IOFBF 0 +#define _IOLBF 0100 +#define _IONBF 04 +#define BUFSIZ 1024 +#define EOF (-1) + +typedef struct { + int _cnt; + unsigned char *_ptr; + unsigned char *_base; + unsigned char _flag; + unsigned char _file; +} FILE; +extern FILE __iob[]; +#define FILENAME_MAX 1024 +#define FOPEN_MAX 20 + +#if !defined(_FPOS_T) && !defined(_FPOS_T_) +#define _FPOS_T +#define _FPOS_T_ +typedef long fpos_t; +#endif + +#define L_tmpnam 25 +#define NULL 0 +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef char *__va_list; +#endif + +#define stderr (&__iob[2]) +#define stdin (&__iob[0]) +#define stdout (&__iob[1]) +#define TMP_MAX 17576 + +extern int remove(const char *); +extern int rename(const char *, const char *); +extern FILE *tmpfile(void); +extern char *tmpnam(char *); +extern int fclose(FILE *); +extern int fflush(FILE *); +extern FILE *fopen(const char *, const char *); +extern FILE *freopen(const char *, const char *, FILE *); +extern void setbuf(FILE *, char *); +extern int setvbuf(FILE *, char *, int, size_t); +extern int fprintf(FILE *, const char *, ...); +extern int fscanf(FILE *, const char *, ...); +extern int printf(const char *, ...); +extern int scanf(const char *, ...); +extern int sprintf(char *, const char *, ...); +extern int sscanf(const char *, const char *, ...); +extern int vfprintf(FILE *, const char *, __va_list); +extern int vprintf(const char *, __va_list); +extern int vsprintf(char *, const char *, __va_list); +extern int fgetc(FILE *); +extern char *fgets(char *, int, FILE *); +extern int fputc(int, FILE *); +extern int fputs(const char *, FILE *); +extern int getc(FILE *); +extern int getchar(void); +extern char *gets(char *); +extern int putc(int, FILE *); +extern int putchar(int); +extern int puts(const char *); +extern int ungetc(int, FILE *); +extern size_t fread(void *, size_t, size_t, FILE *); +extern size_t fwrite(const void *, size_t, size_t, FILE *); +extern int fgetpos(FILE *, fpos_t *); +extern int fseek(FILE *, long int, int); +extern int fsetpos(FILE *, const fpos_t *); +extern long int ftell(FILE *); +extern void rewind(FILE *); +extern void clearerr(FILE *); +extern int feof(FILE *); +extern int ferror(FILE *); +extern void perror(const char *); + +#define _IOEOF 020 +#define _IOERR 040 + +#define getc(p) (--(p)->_cnt < 0 ? __filbuf(p) : (int)*(p)->_ptr++) +#define putc(x, p) (--(p)->_cnt < 0 ? __flsbuf((unsigned char) (x), (p)) \ + : (int)(*(p)->_ptr++ = (x))) +extern int __filbuf(FILE *), __flsbuf(unsigned, FILE *); +#define feof(p) ((p)->_flag&_IOEOF) +#define ferror(p) ((p)->_flag&_IOERR) +#define clearerr(p) ((p)->_flag &= ~(_IOERR|_IOEOF)) +#define getchar() getc(stdin) +#define putchar(x) putc((x),stdout) + +#endif /* __STDIO */ diff --git a/lcc/include/sparc/solaris/stdlib.h b/lcc/include/sparc/solaris/stdlib.h index e224f65..ac1204c 100755 --- a/lcc/include/sparc/solaris/stdlib.h +++ b/lcc/include/sparc/solaris/stdlib.h @@ -1,54 +1,54 @@ -#ifndef __STDLIB
-#define __STDLIB
-
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-#define MB_CUR_MAX 1
-#define NULL 0
-#define RAND_MAX 32767
-
-typedef struct { int quot, rem; } div_t;
-typedef struct { long quot, rem; } ldiv_t;
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_)
-#define _WCHAR_T
-#define _WCHAR_T_
-typedef unsigned char wchar_t;
-#endif
-
-extern double atof(const char *);
-extern int atoi(const char *);
-extern long int atol(const char *);
-extern double strtod(const char *, char **);
-extern long int strtol(const char *, char **, int);
-extern unsigned long int strtoul(const char *, char **, int);
-extern int rand(void);
-extern void srand(unsigned int);
-extern void *calloc(size_t, size_t);
-extern void free(void *);
-extern void *malloc(size_t);
-extern void *realloc(void *, size_t);
-extern void abort(void);
-extern int atexit(void (*)(void));
-extern void exit(int);
-extern char *getenv(const char *);
-extern int system(const char *);
-extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
-extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
-extern int abs(int);
-extern div_t div(int, int);
-extern long int labs(long int);
-extern ldiv_t ldiv(long int, long int);
-extern int mblen(const char *, size_t);
-extern int mbtowc(wchar_t *, const char *, size_t);
-extern int wctomb(char *, wchar_t);
-extern size_t mbstowcs(wchar_t *, const char *, size_t);
-extern size_t wcstombs(char *, const wchar_t *, size_t);
-
-#endif /* __STDLIB */
+#ifndef __STDLIB +#define __STDLIB + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define MB_CUR_MAX 1 +#define NULL 0 +#define RAND_MAX 32767 + +typedef struct { int quot, rem; } div_t; +typedef struct { long quot, rem; } ldiv_t; + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +#if !defined(_WCHAR_T) && !defined(_WCHAR_T_) +#define _WCHAR_T +#define _WCHAR_T_ +typedef unsigned char wchar_t; +#endif + +extern double atof(const char *); +extern int atoi(const char *); +extern long int atol(const char *); +extern double strtod(const char *, char **); +extern long int strtol(const char *, char **, int); +extern unsigned long int strtoul(const char *, char **, int); +extern int rand(void); +extern void srand(unsigned int); +extern void *calloc(size_t, size_t); +extern void free(void *); +extern void *malloc(size_t); +extern void *realloc(void *, size_t); +extern void abort(void); +extern int atexit(void (*)(void)); +extern void exit(int); +extern char *getenv(const char *); +extern int system(const char *); +extern void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); +extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); +extern int abs(int); +extern div_t div(int, int); +extern long int labs(long int); +extern ldiv_t ldiv(long int, long int); +extern int mblen(const char *, size_t); +extern int mbtowc(wchar_t *, const char *, size_t); +extern int wctomb(char *, wchar_t); +extern size_t mbstowcs(wchar_t *, const char *, size_t); +extern size_t wcstombs(char *, const wchar_t *, size_t); + +#endif /* __STDLIB */ diff --git a/lcc/include/sparc/solaris/string.h b/lcc/include/sparc/solaris/string.h index f19b1e4..8432820 100755 --- a/lcc/include/sparc/solaris/string.h +++ b/lcc/include/sparc/solaris/string.h @@ -1,35 +1,35 @@ -#ifndef __STRING
-#define __STRING
-
-#define NULL 0
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-void *memcpy(void *, const void *, size_t);
-void *memmove(void *, const void *, size_t);
-char *strcpy(char *, const char *);
-char *strncpy(char *, const char *, size_t);
-char *strcat(char *, const char *);
-char *strncat(char *, const char *, size_t);
-int memcmp(const void *, const void *, size_t);
-int strcmp(const char *, const char *);
-int strcoll(const char *, const char *);
-int strncmp(const char *, const char *, size_t);
-size_t strxfrm(char *, const char *, size_t);
-void *memchr(const void *, int, size_t);
-char *strchr(const char *, int);
-size_t strcspn(const char *, const char *);
-char *strpbrk(const char *, const char *);
-char *strrchr(const char *, int);
-size_t strspn(const char *, const char *);
-char *strstr(const char *, const char *);
-char *strtok(char *, const char *);
-void *memset(void *, int, size_t);
-char *strerror(int);
-size_t strlen(const char *);
-
-#endif /* __STRING */
+#ifndef __STRING +#define __STRING + +#define NULL 0 + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +void *memcpy(void *, const void *, size_t); +void *memmove(void *, const void *, size_t); +char *strcpy(char *, const char *); +char *strncpy(char *, const char *, size_t); +char *strcat(char *, const char *); +char *strncat(char *, const char *, size_t); +int memcmp(const void *, const void *, size_t); +int strcmp(const char *, const char *); +int strcoll(const char *, const char *); +int strncmp(const char *, const char *, size_t); +size_t strxfrm(char *, const char *, size_t); +void *memchr(const void *, int, size_t); +char *strchr(const char *, int); +size_t strcspn(const char *, const char *); +char *strpbrk(const char *, const char *); +char *strrchr(const char *, int); +size_t strspn(const char *, const char *); +char *strstr(const char *, const char *); +char *strtok(char *, const char *); +void *memset(void *, int, size_t); +char *strerror(int); +size_t strlen(const char *); + +#endif /* __STRING */ diff --git a/lcc/include/sparc/solaris/time.h b/lcc/include/sparc/solaris/time.h index 55a4922..07d8b41 100755 --- a/lcc/include/sparc/solaris/time.h +++ b/lcc/include/sparc/solaris/time.h @@ -1,48 +1,48 @@ -#ifndef __TIME
-#define __TIME
-
-#define CLOCKS_PER_SEC 1000000
-#ifndef NULL
-#define NULL 0
-#endif
-
-#if !defined(_CLOCK_T) && !defined(_CLOCK_T_)
-#define _CLOCK_T
-#define _CLOCK_T_
-typedef long clock_t;
-#endif
-
-#if !defined(_TIME_T) && !defined(_TIME_T_)
-#define _TIME_T
-#define _TIME_T_
-typedef long time_t;
-#endif
-
-#if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#define _SIZE_T
-#define _SIZE_T_
-typedef unsigned long size_t;
-#endif
-
-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;
-};
-extern clock_t clock(void);
-extern double difftime(time_t, time_t);
-extern time_t mktime(struct tm *);
-extern time_t time(time_t *);
-extern char *asctime(const struct tm *);
-extern char *ctime(const time_t *);
-extern struct tm *gmtime(const time_t *);
-extern struct tm *localtime(const time_t *);
-extern size_t strftime(char *, size_t, const char *, const struct tm *);
-
-#endif /* __TIME */
+#ifndef __TIME +#define __TIME + +#define CLOCKS_PER_SEC 1000000 +#ifndef NULL +#define NULL 0 +#endif + +#if !defined(_CLOCK_T) && !defined(_CLOCK_T_) +#define _CLOCK_T +#define _CLOCK_T_ +typedef long clock_t; +#endif + +#if !defined(_TIME_T) && !defined(_TIME_T_) +#define _TIME_T +#define _TIME_T_ +typedef long time_t; +#endif + +#if !defined(_SIZE_T) && !defined(_SIZE_T_) +#define _SIZE_T +#define _SIZE_T_ +typedef unsigned long size_t; +#endif + +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; +}; +extern clock_t clock(void); +extern double difftime(time_t, time_t); +extern time_t mktime(struct tm *); +extern time_t time(time_t *); +extern char *asctime(const struct tm *); +extern char *ctime(const time_t *); +extern struct tm *gmtime(const time_t *); +extern struct tm *localtime(const time_t *); +extern size_t strftime(char *, size_t, const char *, const struct tm *); + +#endif /* __TIME */ diff --git a/lcc/include/x86/linux/assert.h b/lcc/include/x86/linux/assert.h index 5b4776c..04b0e3a 100755 --- a/lcc/include/x86/linux/assert.h +++ b/lcc/include/x86/linux/assert.h @@ -1,14 +1,14 @@ -#ifndef __ASSERT
-#define __ASSERT
-
-void assert(int);
-
-#endif /* __ASSERT */
-
-#undef assert
-#ifdef NDEBUG
-#define assert(ignore) ((void)0)
-#else
-extern int _assert(char *, char *, unsigned);
-#define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__)))
-#endif /* NDEBUG */
+#ifndef __ASSERT +#define __ASSERT + +void assert(int); + +#endif /* __ASSERT */ + +#undef assert +#ifdef NDEBUG +#define assert(ignore) ((void)0) +#else +extern int _assert(char *, char *, unsigned); +#define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__))) +#endif /* NDEBUG */ diff --git a/lcc/include/x86/linux/float.h b/lcc/include/x86/linux/float.h index 1c0197f..fde462b 100755 --- a/lcc/include/x86/linux/float.h +++ b/lcc/include/x86/linux/float.h @@ -1,37 +1,37 @@ -#ifndef __FLOAT
-#define __FLOAT
-
-#define FLT_ROUNDS (__flt_rounds())
-#define FLT_RADIX 2
-
-#define FLT_DIG 6
-#define FLT_EPSILON 1.19209289550781250000e-07
-#define FLT_MANT_DIG 24
-#define FLT_MAX 3.40282346638528860000e+38
-#define FLT_MAX_10_EXP 38
-#define FLT_MAX_EXP 128
-#define FLT_MIN 1.17549435082228750000e-38
-#define FLT_MIN_10_EXP -37
-#define FLT_MIN_EXP -125
-
-#define DBL_DIG 15
-#define DBL_EPSILON 2.22044604925031310000e-16
-#define DBL_MANT_DIG 53
-#define DBL_MAX 1.79769313486231570000e+308
-#define DBL_MAX_10_EXP 308
-#define DBL_MAX_EXP 1024
-#define DBL_MIN 2.22507385850720140000e-308
-#define DBL_MIN_10_EXP -307
-#define DBL_MIN_EXP -1021
-
-#define LDBL_MANT_DIG DBL_MANT_DIG
-#define LDBL_EPSILON DBL_EPSILON
-#define LDBL_DIG DBL_DIG
-#define LDBL_MIN_EXP DBL_MIN_EXP
-#define LDBL_MIN DBL_MIN
-#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
-#define LDBL_MAX_EXP DBL_MAX_EXP
-#define LDBL_MAX DBL_MAX
-#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
-
-#endif /* __FLOAT */
+#ifndef __FLOAT +#define __FLOAT + +#define FLT_ROUNDS (__flt_rounds()) +#define FLT_RADIX 2 + +#define FLT_DIG 6 +#define FLT_EPSILON 1.19209289550781250000e-07 +#define FLT_MANT_DIG 24 +#define FLT_MAX 3.40282346638528860000e+38 +#define FLT_MAX_10_EXP 38 +#define FLT_MAX_EXP 128 +#define FLT_MIN 1.17549435082228750000e-38 +#define FLT_MIN_10_EXP -37 +#define FLT_MIN_EXP -125 + +#define DBL_DIG 15 +#define DBL_EPSILON 2.22044604925031310000e-16 +#define DBL_MANT_DIG 53 +#define DBL_MAX 1.79769313486231570000e+308 +#define DBL_MAX_10_EXP 308 +#define DBL_MAX_EXP 1024 +#define DBL_MIN 2.22507385850720140000e-308 +#define DBL_MIN_10_EXP -307 +#define DBL_MIN_EXP -1021 + +#define LDBL_MANT_DIG DBL_MANT_DIG +#define LDBL_EPSILON DBL_EPSILON +#define LDBL_DIG DBL_DIG +#define LDBL_MIN_EXP DBL_MIN_EXP +#define LDBL_MIN DBL_MIN +#define LDBL_MIN_10_EXP DBL_MIN_10_EXP +#define LDBL_MAX_EXP DBL_MAX_EXP +#define LDBL_MAX DBL_MAX +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP + +#endif /* __FLOAT */ diff --git a/lcc/include/x86/linux/stdarg.h b/lcc/include/x86/linux/stdarg.h index 504ee48..a68f1a9 100755 --- a/lcc/include/x86/linux/stdarg.h +++ b/lcc/include/x86/linux/stdarg.h @@ -1,21 +1,21 @@ -#ifndef __STDARG
-#define __STDARG
-
-#if !defined(_VA_LIST)
-#define _VA_LIST
-typedef char *__va_list;
-#endif
-typedef __va_list va_list;
-
-#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \
- (char *)((int *)&(start)+1) : (char *)(&(start)+1))))
-#define __va_arg(list, mode, n) \
- (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)]))
-#define _bigendian_va_arg(list, mode, n) (\
- sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \
- sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n))
-#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n)
-#define va_end(list) ((void)0)
-#define va_arg(list, mode) _littleendian_va_arg(list, mode, 3U)
-typedef void *__gnuc_va_list;
-#endif
+#ifndef __STDARG +#define __STDARG + +#if !defined(_VA_LIST) +#define _VA_LIST +typedef char *__va_list; +#endif +typedef __va_list va_list; + +#define va_start(list, start) ((void)((list) = (sizeof(start)<4 ? \ + (char *)((int *)&(start)+1) : (char *)(&(start)+1)))) +#define __va_arg(list, mode, n) \ + (*(mode *)(&(list += ((sizeof(mode)+n)&~n))[-(int)((sizeof(mode)+n)&~n)])) +#define _bigendian_va_arg(list, mode, n) (\ + sizeof(mode)==1 ? *(mode *)(&(list += 4)[-1]) : \ + sizeof(mode)==2 ? *(mode *)(&(list += 4)[-2]) : __va_arg(list, mode, n)) +#define _littleendian_va_arg(list, mode, n) __va_arg(list, mode, n) +#define va_end(list) ((void)0) +#define va_arg(list, mode) _littleendian_va_arg(list, mode, 3U) +typedef void *__gnuc_va_list; +#endif |