scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

libc.h (1170B)


      1 enum {
      2 	SUN,
      3 	MON,
      4 	TUE,
      5 	WED,
      6 	THU,
      7 	FRI,
      8 	SAT
      9 };
     10 
     11 #define JAN 0
     12 #define FEB 1
     13 #define DEC 11
     14 
     15 #define FEBDAYS(y) ((_daysyear(y) == 366) ? 29 : 28)
     16 #define EPOCH 1970
     17 #define MINYEAR 1900
     18 #define SECMIN 60
     19 #define SECHOUR (60 * SECMIN)    /* 3600 */
     20 #define SECDAY (24 * SECHOUR)   /* 86400 */
     21 
     22 struct tm;
     23 
     24 struct tzone {
     25 	char *name;
     26 	int gmtoff;
     27 	int isdst;
     28 };
     29 
     30 extern void *_getheap(void);
     31 extern int _dtoi(char c);
     32 
     33 
     34 #ifdef stdin
     35 extern int _allocbuf(FILE *);
     36 extern int _flsbuf(FILE *);
     37 extern FILE *_fpopen(const char * restrict, const char *restrict,
     38                      FILE *restrict);
     39 #endif
     40 
     41 #ifdef _TIME_H
     42 extern time_t _tzstdoff, _tzdstoff;
     43 extern time_t _tzstart, _tzend;
     44 
     45 extern time_t _systime(struct tm *);
     46 #endif
     47 
     48 extern void _tzset(void);
     49 extern int _daysyear(int);
     50 extern int _newyear(int);
     51 
     52 extern int _tzjulian;
     53 extern int _daysmon[12];
     54 extern char *_tzname[2];
     55 extern struct tzone tzones[];
     56 
     57 extern void (*_exitf[])(void);
     58 extern unsigned _exitn;
     59 extern void (*_flushall)(void);
     60 extern void (*_atexithdl)(void);
     61 
     62 #ifdef _WCHAR_H
     63 extern int _validutf8(wchar_t, int *);
     64 #ifdef _STDIO_H
     65 extern wint_t _fputwc(wchar_t, FILE *, int *);
     66 #endif
     67 #endif