home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / online / source / c / compilers / Bison.sit.hqx / Bison / Source / machine.h < prev    next >
Text File  |  1992-08-21  |  2KB  |  47 lines

  1. /***********************************************************
  2.  *
  3.  * Macintosh/MPW version of GNU Bison 1.18
  4.  * Please read the README_MPW file for more information
  5.  *
  6.  ***********************************************************/
  7.  
  8. /* Define machine-dependencies for bison,
  9.    Copyright (C) 1984, 1989 Free Software Foundation, Inc.
  10.  
  11. This file is part of Bison, the GNU Compiler Compiler.
  12.  
  13. Bison is free software; you can redistribute it and/or modify
  14. it under the terms of the GNU General Public License as published by
  15. the Free Software Foundation; either version 2, or (at your option)
  16. any later version.
  17.  
  18. Bison is distributed in the hope that it will be useful,
  19. but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21. GNU General Public License for more details.
  22.  
  23. You should have received a copy of the GNU General Public License
  24. along with Bison; see the file COPYING.  If not, write to
  25. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  26.  
  27. #ifdef    eta10
  28. #define    MAXSHORT    2147483647
  29. #define    MINSHORT    -2147483648
  30. #else
  31. #define    MAXSHORT    32767
  32. #define    MINSHORT    -32768
  33. #endif
  34.  
  35. #if defined (MSDOS) && !defined (__GO32__)
  36. #define    BITS_PER_WORD    16
  37. #define MAXTABLE    16383
  38. #else
  39. #define    BITS_PER_WORD    32
  40. #define MAXTABLE    32767
  41. #endif
  42.  
  43. #define    WORDSIZE(n)    (((n) + BITS_PER_WORD - 1) / BITS_PER_WORD)
  44. #define    SETBIT(x, i)    ((x)[(i)/BITS_PER_WORD] |= (1<<((i) % BITS_PER_WORD)))
  45. #define RESETBIT(x, i)    ((x)[(i)/BITS_PER_WORD] &= ~(1<<((i) % BITS_PER_WORD)))
  46. #define BITISSET(x, i)    (((x)[(i)/BITS_PER_WORD] & (1<<((i) % BITS_PER_WORD))) != 0)
  47.