Annotation of researchv9/jerq/include/thinkclient.h, revision 1.1.1.1

1.1       root        1: #ifndef        THINKCLIENT_H
                      2: #define        THINKCLIENT_H
                      3: 
                      4: struct Thinksubs {
                      5:        int (*Thinkchar)();
                      6:        int (*Thinknchars)();
                      7:        int (*Thinkflush)();
                      8:        int (*Thinkmap)();
                      9:        int (*Thinkabort)();
                     10: };
                     11: 
                     12: #ifndef        THINKSHARE_C
                     13: 
                     14: #define Thfun(f)       (((struct Thinksubs *)(thclient->data))->f)
                     15: 
                     16: #define Thtest ((thclient || (thclient=getname("thinksubs"))) && thclient->proc)
                     17: 
                     18: #define Thcall0(f)             (Thtest ? Thfun(f)() : -1)
                     19: #define Thcall1(f, a)          (Thtest ? Thfun(f)(a) : -1)
                     20: #define Thcall2(f, a, b)       (Thtest ? Thfun(f)((a), (b)) : -1)
                     21: 
                     22: #define thinkchar(c)           Thcall1(Thinkchar, c)
                     23: #define thinknchars(n, p)      Thcall2(Thinknchars, n, p)
                     24: #define thinkflush()           Thcall0(Thinkflush)
                     25: #define thinkmap(b, r)         Thcall2(Thinkmap, b, r)
                     26: #define thinkabort()           Thcall0(Thinkabort)
                     27: 
                     28: struct Nqueue *thclient;
                     29: 
                     30: #endif
                     31: 
                     32: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.