home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / nasm_src / inputfst.h < prev    next >
C/C++ Source or Header  |  1993-01-19  |  1KB  |  30 lines

  1. /* ---------------------------------------------------------------------- */
  2. /*                   Copyright (C) 1991 by Natürlich!                     */
  3. /*                      This file is copyrighted!                         */
  4. /*                Refer to the documentation for details.                 */
  5. /* ---------------------------------------------------------------------- */
  6. #if __NSTDC__
  7. extern byte _input( void);
  8. #else
  9. extern byte _input();
  10. #endif
  11.  
  12. #define input()                                                         \
  13.    ((bp->remain--) ? *bp->p++ : _input())
  14.  
  15. #define uinput()                                                        \
  16.    ((bp->remain--) ? _uptable[ *bp->p++] : _uptable[ _input()])
  17.  
  18. #define qinput( rem, pt)                                                \
  19.    (! (rem)                                                             \
  20.       ? (bp->remain = 0, bp->p = pt, tmp = input(),                     \
  21.          (bp ? (rem = bp->remain, pt = bp->p) : 0), tmp)                \
  22.       : (rem--, *(pt)++))
  23.  
  24. #define quinput( rem, pt, tab)                                          \
  25.    (! (rem)                                                             \
  26.       ? (bp->remain = 0, bp->p = pt, tmp = tab[ input()],               \
  27.          (bp ? (rem = bp->remain, pt = bp->p) : 0), tmp)                \
  28.       : (rem--, tab[ *(pt)++]))
  29.  
  30.