home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / povos2.zip / gccconf.h next >
C/C++ Source or Header  |  1993-08-09  |  6KB  |  126 lines

  1. /*****************************************************************************
  2. *               gccconf.h
  3. *
  4. *  This header file contains all constants and types required to run on a
  5. *  UNIX system using the GCC compiler.
  6. *
  7. *  from Persistence of Vision Raytracer 
  8. *  Copyright 1991 Persistence of Vision Team
  9. *---------------------------------------------------------------------------
  10. *  Copying, distribution and legal info is in the file povlegal.doc which
  11. *  should be distributed with this file. If povlegal.doc is not available
  12. *  or for more info please contact:
  13. *
  14. *       Drew Wells [POV-Team Leader] 
  15. *       CIS: 73767,1244  Internet: 73767.1244@compuserve.com
  16. *       Phone: (213) 254-4041
  17. * This program is based on the popular DKB raytracer version 2.12.
  18. * DKBTrace was originally written by David K. Buck.
  19. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  20. *
  21. *****************************************************************************/
  22. /* Below are several defines needed by the generic parts of POV.  You
  23. *   may redefine them as needed in this config.h file.
  24. *
  25. *   The following constants are needed by various POV modules.  Each has
  26. *   a default (shown below) which is will be defined in frame.h if you don't 
  27. *   define them here.
  28. *
  29. *   #define EPSILON 1.0e-10               - a small value used for POLY
  30. *   #define FILE_NAME_LENGTH 150          - default file name length
  31. *   #define HUGE_VAL 1.0e+17              - a really big number
  32. *   #define DBL_FORMAT_STRING "%lf"       - the string to use for scanfs of doubles
  33. *   #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format
  34. *   #define RED_RAW_FILE_EXTENSION ".red" - for +fr, this is the extension for the
  35. *                                           red file
  36. *   #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file
  37. *   #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file
  38. *   #define FILENAME_SEPARATOR "/"        - the character that separates names
  39. *                                           in a path.
  40. *   #define CASE_SENSITIVE_DEFAULT 2     - controls case sensitivity in DAT files
  41. *   #define READ_FILE_STRING "rb"        - special binary (raw, uncooked) 
  42. *   #define WRITE_FILE_STRING "wb"         modes of fopen()
  43. *   #define APPEND_FILE_STRING "ab"
  44. *   #define NORMAL '0'                   - machine-specific PaletteOption settings 
  45. *   #define GREY   'G'
  46. *
  47. *   These routines are required by POV to compute trace times.  The defaults 
  48. *   shown below are defined in most versions of C.  You may redefine them if
  49. *   your compiler doesn't support these.  If time is completely unsupported 
  50. *   define them as 0.
  51. *
  52. *   #define START_TIME time(&tstart);     
  53. *   #define STOP_TIME  time(&tstop);
  54. *   #define TIME_ELAPSED difftime (tstop, tstart);
  55. *
  56. *   Note difftime can be replaced with: #define TIME_ELAPSED (tstop - tstart); 
  57. *   in some cases. 
  58. *
  59. *   These are optional routines that POV calls.  You may define them
  60. *   or if undefined they will be defined as empty in frame.h.
  61. *
  62. *   #define STARTUP_POVRAY             - first executable statement of main
  63. *                                           (useful for initialization)
  64. *   #define PRINT_OTHER_CREDITS           - used for people who extend the machine specific modules
  65. *                                           (put your own printf's here)
  66. *   #define TEST_ABORT                    - code to test for ^C or abort
  67. *                                           (called on each pixel)
  68. *   #define FINISH_POVRAY              - last statement before exiting normally
  69. *   #define COOPERATE                    - called for multi-tasking
  70. *  
  71. *   These items are standard on some C compilers.  If they are not defined
  72. *   on your compiler or are called something different you may define your 
  73. *   own or use the defaults supplied in frame.h as shown below.
  74. *
  75. *   #define DBL double                    - floating point precision
  76. *   #define ACOS acos                     - arc cosine of DBL
  77. *   #define SQRT sqrt                     - square root of DBL
  78. *   #define POW pow                       - x to the y power - x, y DBL
  79. *   #define COS cos                       - cosine of DBL
  80. *   #define SIN sin                       - sine of DBL
  81. *   #define labs(x) (long) ((x<0)?-x:x)   - Returns the absolute value of long integer x
  82. *   #define max (x,y) ((x<y)?y:x)         - greater of x and y
  83. *
  84. *   On some systems "sprintf" returns the string rather than the length
  85. *   of the string.  If the string is returned, define the following:
  86. *   #define STRLN(x) strlen(x)
  87. *
  88. *   #define setvbuf(w,x,y,z)              - some systems don't understand setvbuf.
  89. *                                           If not, just define it away - it's
  90. *                                           not critical to the raytracer.  It
  91. *                                           just buffers disk accesses.
  92. *   This macro controls prototyping and is required by POV.  Choose one
  93. *   of the two options below or if left undefined it will default to ANSI 
  94. *   in frame.h
  95. *
  96. *   #define PARAMS (x) x                  - do ANSI prototyping
  97. *   #define PARAMS (x) ()                 - do K&R non-ANSI prototyping
  98. *
  99. *   These allow command line vs non-command line versions and alternate
  100. *   main routines.  Normally they should be undefined.  Define them 1 if needed.
  101. *   #define ALTMAIN 1
  102. *   #define NOCMDLINE 1
  103. ****************************************************/
  104.  
  105. /* By default, UNIX doesn't use ANSI prototyping */
  106.  
  107. #ifdef _STDC_
  108. #define PARAMS(x) x
  109. #else
  110. #define PARAMS(x) ()
  111. #define volatile
  112. #endif
  113.  
  114. #define EPSILON 1.0e-5
  115.  
  116. #define STARTUP_POVRAY unix_init_povray();
  117.  
  118. /* GCC wants prototypes for these standard routines */
  119.  
  120. char *getenv PARAMS((char *name));
  121. void *malloc PARAMS((unsigned size));
  122. void free PARAMS((void *));
  123. double fmod PARAMS((double, double));
  124.  
  125.