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