scc.h - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
       scc.h (1322B)
       ---
            1 #include <stddef.h>
            2 
            3 extern int enadebug;
            4 
            5 #ifndef NDEBUG
            6 #define DBG(...) dbg(__VA_ARGS__)
            7 #define DBGON() (enadebug = 1)
            8 #else
            9 #define DBG(...)
           10 #define DBGON()
           11 #endif
           12 
           13 #define TINT        long long
           14 #define TUINT       unsigned long long
           15 #define TUINT_MAX   ULLONG_MAX
           16 #define TINT_MAX    LLONG_MAX
           17 #define TFLOAT      double
           18 #define SIZET       size_t
           19 
           20 struct items {
           21         char **s;
           22         unsigned n;
           23 };
           24 
           25 #ifdef CLOCKS_PER_SEC
           26 struct fprop {
           27         unsigned uid;
           28         unsigned gid;
           29         unsigned long mode;
           30         long size;
           31         time_t time;
           32 };
           33 #endif
           34 
           35 typedef struct alloc Alloc;
           36 
           37 extern void die(const char *fmt, ...);
           38 extern void dbg(const char *fmt, ...);
           39 extern void newitem(struct items *items, char *item);
           40 extern void *xmalloc(size_t size);
           41 extern void *xcalloc(size_t nmemb, size_t size);
           42 extern char *xstrdup(const char *s);
           43 extern void *xrealloc(void *buff, size_t size);
           44 extern Alloc *alloc(size_t size, size_t nmemb);
           45 extern void dealloc(Alloc *allocp);
           46 extern void *new(Alloc *allocp);
           47 extern void delete(Alloc *allocp, void *p);
           48 extern int casecmp(const char *s1, const char *s2);
           49 extern unsigned genhash(char *name);
           50 extern char *canonical(char *);
           51 
           52 #ifdef CLOCKS_PER_SEC
           53 extern long long fromepoch(time_t);
           54 extern time_t totime(long long);
           55 extern int getstat(char *, struct fprop *);
           56 extern int setstat(char *, struct fprop *);
           57 #endif