home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / unix / unix_mw2.sha / gen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1985-04-26  |  918 b   |  52 lines

  1.  
  2.  
  3. #define    FALSE    (0)
  4. #define    TRUE    (!FALSE)
  5.  
  6. #define    L_SET    0
  7. #define    L_CURR    1
  8. #define    L_EOF    2
  9.  
  10. #define    REG    register
  11. #define    LOCAL    static
  12.  
  13.  
  14. #define    Debug        if( debflg )
  15. #define    skip(fd,count)    (fseek(fd, (FILEPTR)(count), L_CURR))
  16. #define    set(fd,pos)    (fseek(fd, (FILEPTR)(pos), L_SET))
  17. #define    pos(fd)        (ftell(fd))
  18. #define    align(fd)    if( pos(fd) % 2 ) Skip( 1 )
  19.  
  20. #define    Skip(count)    (skip(stdin,count))
  21. #define    Set(pos)    set(stdin,pos)
  22. #define    Get_int()    get_int(stdin)
  23. #define    Get_byte()    get_byte(stdin)
  24. #define    Pos()        (pos(stdin))
  25. #define    Align()        align(stdin)
  26.  
  27. #define    max(a,b)    ( (a) > (b) ? (a) : (b) )
  28.  
  29.  
  30. typedef    unsigned char    byte;
  31. typedef    byte    bool;
  32.  
  33. typedef    long    RSU, FIX, SP;        /* tex units */
  34. typedef    long    FILEPTR;
  35.  
  36. typedef    struct
  37.     {
  38.     short    c_char;
  39.     short    c_font;
  40.     byte    c_size;
  41.     byte    c_style;
  42.     } Char;
  43.  
  44.  
  45. extern    long    get_long();
  46. extern    int    get_int();
  47. extern    int    get_byte();
  48.  
  49. extern    char    * Style();
  50.  
  51. extern    bool    debflg;
  52.