nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

strerr.h (2947B)


      1 #ifndef STRERR_H
      2 #define STRERR_H
      3 
      4 #include "noreturn.h"
      5 
      6 struct strerr
      7  {
      8   struct strerr *who;
      9   char *x;
     10   char *y;
     11   char *z;
     12  }
     13 ;
     14 
     15 extern struct strerr strerr_sys;
     16 extern void strerr_sysinit();
     17 
     18 extern char *strerr();
     19 extern void strerr_warn();
     20 extern void _noreturn_ strerr_die();
     21 
     22 #define STRERR(r,se,a) \
     23 { se.who = 0; se.x = a; se.y = 0; se.z = 0; return r; }
     24 
     25 #define STRERR_SYS(r,se,a) \
     26 { se.who = &strerr_sys; se.x = a; se.y = 0; se.z = 0; return r; }
     27 #define STRERR_SYS3(r,se,a,b,c) \
     28 { se.who = &strerr_sys; se.x = a; se.y = b; se.z = c; return r; }
     29 
     30 #define strerr_warn6(x1,x2,x3,x4,x5,x6,se) \
     31 strerr_warn((x1),(x2),(x3),(x4),(x5),(x6),(struct strerr *) (se))
     32 #define strerr_warn5(x1,x2,x3,x4,x5,se) \
     33 strerr_warn((x1),(x2),(x3),(x4),(x5),NULL,(struct strerr *) (se))
     34 #define strerr_warn4(x1,x2,x3,x4,se) \
     35 strerr_warn((x1),(x2),(x3),(x4),NULL,NULL,(struct strerr *) (se))
     36 #define strerr_warn3(x1,x2,x3,se) \
     37 strerr_warn((x1),(x2),(x3),NULL,NULL,NULL,(struct strerr *) (se))
     38 #define strerr_warn2(x1,x2,se) \
     39 strerr_warn((x1),(x2),NULL,NULL,NULL,NULL,(struct strerr *) (se))
     40 #define strerr_warn1(x1,se) \
     41 strerr_warn((x1),NULL,NULL,NULL,NULL,NULL,(struct strerr *) (se))
     42 
     43 #define strerr_die6(e,x1,x2,x3,x4,x5,x6,se) \
     44 strerr_die((e),(x1),(x2),(x3),(x4),(x5),(x6),(struct strerr *) (se))
     45 #define strerr_die5(e,x1,x2,x3,x4,x5,se) \
     46 strerr_die((e),(x1),(x2),(x3),(x4),(x5),NULL,(struct strerr *) (se))
     47 #define strerr_die4(e,x1,x2,x3,x4,se) \
     48 strerr_die((e),(x1),(x2),(x3),(x4),NULL,NULL,(struct strerr *) (se))
     49 #define strerr_die3(e,x1,x2,x3,se) \
     50 strerr_die((e),(x1),(x2),(x3),NULL,NULL,NULL,(struct strerr *) (se))
     51 #define strerr_die2(e,x1,x2,se) \
     52 strerr_die((e),(x1),(x2),NULL,NULL,NULL,NULL,(struct strerr *) (se))
     53 #define strerr_die1(e,x1,se) \
     54 strerr_die((e),(x1),NULL,NULL,NULL,NULL,NULL,(struct strerr *) (se))
     55 
     56 #define strerr_die6sys(e,x1,x2,x3,x4,x5,x6) \
     57 strerr_die((e),(x1),(x2),(x3),(x4),(x5),(x6),&strerr_sys)
     58 #define strerr_die5sys(e,x1,x2,x3,x4,x5) \
     59 strerr_die((e),(x1),(x2),(x3),(x4),(x5),NULL,&strerr_sys)
     60 #define strerr_die4sys(e,x1,x2,x3,x4) \
     61 strerr_die((e),(x1),(x2),(x3),(x4),NULL,NULL,&strerr_sys)
     62 #define strerr_die3sys(e,x1,x2,x3) \
     63 strerr_die((e),(x1),(x2),(x3),NULL,NULL,NULL,&strerr_sys)
     64 #define strerr_die2sys(e,x1,x2) \
     65 strerr_die((e),(x1),(x2),NULL,NULL,NULL,NULL,&strerr_sys)
     66 #define strerr_die1sys(e,x1) \
     67 strerr_die((e),(x1),NULL,NULL,NULL,NULL,NULL,&strerr_sys)
     68 
     69 #define strerr_die6x(e,x1,x2,x3,x4,x5,x6) \
     70 strerr_die((e),(x1),(x2),(x3),(x4),(x5),(x6),NULL)
     71 #define strerr_die5x(e,x1,x2,x3,x4,x5) \
     72 strerr_die((e),(x1),(x2),(x3),(x4),(x5),NULL,NULL)
     73 #define strerr_die4x(e,x1,x2,x3,x4) \
     74 strerr_die((e),(x1),(x2),(x3),(x4),NULL,NULL,NULL)
     75 #define strerr_die3x(e,x1,x2,x3) \
     76 strerr_die((e),(x1),(x2),(x3),NULL,NULL,NULL,NULL)
     77 #define strerr_die2x(e,x1,x2) \
     78 strerr_die((e),(x1),(x2),NULL,NULL,NULL,NULL,NULL)
     79 #define strerr_die1x(e,x1) \
     80 strerr_die((e),(x1),NULL,NULL,NULL,NULL,NULL,NULL)
     81 
     82 #endif