home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / DKBOS2.ZOO / os2conf.h < prev    next >
C/C++ Source or Header  |  1992-07-18  |  4KB  |  105 lines

  1. /*****************************************************************************
  2. *
  3. *                                     unixconf.h
  4. *
  5. *   from DKBTrace (c) 1990  David Buck
  6. *
  7. *  This header file contains all constants and types required to run on a
  8. *  UNIX system.
  9. *
  10. * This software is freely distributable. The source and/or object code may be
  11. * copied or uploaded to communications services so long as this notice remains
  12. * at the top of each file.  If any changes are made to the program, you must
  13. * clearly indicate in the documentation and in the programs startup message
  14. * who it was who made the changes. The documentation should also describe what
  15. * those changes were. This software may not be included in whole or in
  16. * part into any commercial package without the express written consent of the
  17. * author.  It may, however, be included in other public domain or freely
  18. * distributed software so long as the proper credit for the software is given.
  19. *
  20. * This software is provided as is without any guarantees or warranty. Although
  21. * the author has attempted to find and correct any bugs in the software, he
  22. * is not responsible for any damage caused by the use of the software.  The
  23. * author is under no obligation to provide service, corrections, or upgrades
  24. * to this package.
  25. *
  26. * Despite all the legal stuff above, if you do find bugs, I would like to hear
  27. * about them.  Also, if you have any comments or questions, you may contact me
  28. * at the following address:
  29. *
  30. *     David Buck
  31. *     22C Sonnet Cres.
  32. *     Nepean Ontario
  33. *     Canada, K2H 8W7
  34. *
  35. *  I can also be reached on the following bulleton boards:
  36. *
  37. *     OMX              (613) 731-3419
  38. *     Mystic           (613) 596-4249  or  (613) 596-4772
  39. *
  40. *  Fidonet:   1:163/109.9
  41. *  Internet:  dbuck@ccs.carleton.ca
  42. *  The "You Can Call Me RAY" BBS    (708) 358-5611
  43. *
  44. *  IBM Port by Aaron A. Collins. Aaron may be reached on the following BBS'es:
  45. *
  46. *     The "You Can Call Me RAY" BBS (708) 358-5611
  47. *     The Information Exchange BBS  (708) 945-5575
  48. *
  49. *****************************************************************************/
  50.  
  51. /* The following defines may be added when porting to other systems or
  52.    other compilers.  The defaults are shown here:
  53.  
  54.  
  55.    #define PARAMS(x) x                   - use 'x' for ANSI, '()' for non ANSI
  56.    #define EPSILON 1.0e-5                - a small value used for quartics
  57.    #define FILE_NAME_LENGTH 150          - default file name length
  58.    #define DBL double                    - floating point precision
  59.    #define HUGE_VAL 1.0e+17              - a really big number
  60.    #define DBL_FORMAT_STRING "%lf"       - the string to use for scanfs of doubles
  61.    #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format
  62.    #define TEST_ABORT                    - code to test for ^C or abort
  63.                                            (called on each pixel)
  64.    #define RED_RAW_FILE_EXTENSION ".red" - for +fr, this is the extension for the
  65.                                            red file
  66.    #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file
  67.    #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file
  68.    #define STARTUP_DKB_TRACE             - first executable statement of main
  69.                                            (useful for initialization)
  70.    #define PRINT_OTHER_CREDITS           - used for people who extend dkbtrace.
  71.                                            (put your own printf's here)
  72.    #define FINISH_DKB_TRACE              - last statement before exiting normally
  73.    #define FILENAME_SEPARATOR "/"        - the character that separates names
  74.                                            in a path.
  75.    #define setvbuf(w,x,y,z)              - some systems don't understand setvbuf.
  76.                                            If not, just define it away - it's
  77.                                            not critical to the raytracer.  It
  78.                                            just buffers disk accesses.
  79. */
  80.  
  81. /* By default, UNIX doesn't use ANSI prototyping */
  82.  
  83. #ifdef _STDC_
  84. #define PARAMS(x) x
  85. #else
  86. #define PARAMS(x) ()
  87. #define volatile
  88. #endif
  89.  
  90. #define ACOS acos
  91. #define SQRT sqrt
  92. #define POW pow
  93. #define COS cos
  94. #define SIN sin
  95. #define EPSILON 1.0e-5
  96.  
  97. char *getenv PARAMS((char *name));
  98. char *malloc PARAMS((int size));
  99. void free PARAMS((void *));
  100.  
  101. #define STARTUP_DKB_TRACE unix_init_dkb_trace();
  102. #ifndef max
  103. #define max(x,y) ((x<y)?y:x)
  104. #endif
  105.