gen.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. *
  3. * A few definitions that shouldn't have to change. Used by most programs in
  4. * this package.
  5. *
  6. */
  7. #define PROGRAMVERSION "3.3.2"
  8. #define NON_FATAL 0
  9. #define FATAL 1
  10. #define USER_FATAL 2
  11. #define OFF 0
  12. #define ON 1
  13. #define FALSE 0
  14. #define TRUE 1
  15. #define BYTE 8
  16. #define BMASK 0377
  17. #define POINTS 72.3
  18. #ifndef PI
  19. #define PI 3.141592654
  20. #endif
  21. #define ONEBYTE 0
  22. #define UTFENCODING 1
  23. #define READING ONEBYTE
  24. #define WRITING ONEBYTE
  25. /*
  26. *
  27. * DOROUND controls whether some translators include file ROUNDPAGE (path.h)
  28. * after the prologue. Used to round page dimensions obtained from the clippath
  29. * to know paper sizes. Enabled by setting DOROUND to TRUE (or 1).
  30. *
  31. */
  32. #define DOROUND TRUE
  33. /*
  34. *
  35. * Default resolution and the height and width of a page (in case we need to get
  36. * to upper left corner) - only used in BoundingBox calculations!!
  37. *
  38. */
  39. #define DEFAULT_RES 72
  40. #define PAGEHEIGHT 11.0 * DEFAULT_RES
  41. #define PAGEWIDTH 8.5 * DEFAULT_RES
  42. /*
  43. *
  44. * Simple macros.
  45. *
  46. */
  47. #define ABS(A) ((A) >= 0 ? (A) : -(A))
  48. #define MIN(A, B) ((A) < (B) ? (A) : (B))
  49. #define MAX(A, B) ((A) > (B) ? (A) : (B))