OPTIN.H 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /****************************************************************************
  2. * optin.h
  3. *
  4. * This module contains all defines, typedefs, and prototypes for OPTIN.C.
  5. *
  6. * from Persistence of Vision(tm) Ray Tracer
  7. * Copyright 1996,1999 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. * NOTICE: This source code file is provided so that users may experiment
  10. * with enhancements to POV-Ray and to port the software to platforms other
  11. * than those supported by the POV-Ray Team. There are strict rules under
  12. * which you are permitted to use this file. The rules are in the file
  13. * named POVLEGAL.DOC which should be distributed with this file.
  14. * If POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  15. * Team Coordinator by email to team-coord@povray.org or visit us on the web at
  16. * http://www.povray.org. The latest version of POV-Ray may be found at this site.
  17. *
  18. * This program is based on the popular DKB raytracer version 2.12.
  19. * DKBTrace was originally written by David K. Buck.
  20. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  21. *
  22. *****************************************************************************/
  23. #ifndef OPTIN_H
  24. #define OPTIN_H
  25. /*****************************************************************************
  26. * Global preprocessor defines
  27. ******************************************************************************/
  28. /* Max. number of nested ini-files. */
  29. #define MAX_NESTED_INI 10
  30. /*****************************************************************************
  31. * Global typedefs
  32. ******************************************************************************/
  33. /* Defines for the ini-parser. */
  34. typedef enum ini_op
  35. {
  36. ALL_CONSOLE_OP=0,
  37. ALL_FILE_OP,
  38. ANTIALIAS_DEPTH_OP,
  39. ANTIALIAS_OP,
  40. ANTIALIAS_THRESH_OP,
  41. BOUNDING_OP,
  42. BOUNDING_THRESH_OP,
  43. BUFFERED_OUTPUT_OP,
  44. BUF_SIZE_OP,
  45. CLOCK_OP,
  46. CONTINUE_OP,
  47. CREATE_INI_OP,
  48. CYCLIC_ANIMATION_OP,
  49. DEBUG_CONSOLE_OP,
  50. DEBUG_FILE_OP,
  51. DISPLAY_OP,
  52. DISPLAY_GAMMA_OP,
  53. DRAW_VISTAS_OP,
  54. END_COLUMN_OP,
  55. END_ROW_OP,
  56. FATAL_CONSOLE_OP,
  57. FATAL_ERROR_CMD_OP,
  58. FATAL_ERROR_RET_OP,
  59. FATAL_FILE_OP,
  60. FIELD_RENDER_OP,
  61. FILE_OUTPUT_OP,
  62. FILE_OUTPUT_TYPE_OP,
  63. FINAL_CLOCK_OP,
  64. FINAL_FRAME_OP,
  65. HEIGHT_OP,
  66. HIST_NAME_OP,
  67. HIST_SIZE_OP,
  68. HIST_TYPE_OP,
  69. INITIAL_CLOCK_OP,
  70. INITIAL_FRAME_OP,
  71. INPUT_FILE_NAME_OP,
  72. JITTER_AMOUNT_OP,
  73. JITTER_OP,
  74. LIBRARY_PATH_OP,
  75. LIGHT_BUFFER_OP,
  76. ODD_FIELD_OP,
  77. OUTPUT_ALPHA_OP,
  78. OUTPUT_FILE_NAME_OP,
  79. PALETTE_OP,
  80. PAUSE_WHEN_DONE_OP,
  81. POST_FRAME_CMD_OP,
  82. POST_FRAME_RET_OP,
  83. POST_SCENE_CMD_OP,
  84. POST_SCENE_RET_OP,
  85. PREVIEW_E_OP,
  86. PREVIEW_S_OP,
  87. PRE_FRAME_CMD_OP,
  88. PRE_FRAME_RET_OP,
  89. PRE_SCENE_CMD_OP,
  90. PRE_SCENE_RET_OP,
  91. QUALITY_OP,
  92. RAD_SWITCH_OP,
  93. REMOVE_BOUNDS_OP,
  94. RENDER_CONSOLE_OP,
  95. RENDER_FILE_OP,
  96. SAMPLING_METHOD_OP,
  97. SPLIT_UNIONS_OP,
  98. START_COLUMN_OP,
  99. START_ROW_OP,
  100. STATISTIC_CONSOLE_OP,
  101. STATISTIC_FILE_OP,
  102. SUBSET_END_FRAME_OP,
  103. SUBSET_START_FRAME_OP,
  104. TEST_ABORT_COUNT_OP,
  105. TEST_ABORT_OP,
  106. USER_ABORT_CMD_OP,
  107. USER_ABORT_RET_OP,
  108. VERBOSE_OP,
  109. VERSION_OP,
  110. VIDEO_MODE_OP,
  111. VISTA_BUFFER_OP,
  112. WARNING_CONSOLE_OP,
  113. WARNING_FILE_OP,
  114. WIDTH_OP,
  115. BITS_PER_COLOR_OP,
  116. BITS_PER_COLOUR_OP,
  117. INCLUDE_INI_OP,
  118. MAX_OPTION
  119. } INI_OP;
  120. /*****************************************************************************
  121. * Global variables
  122. ******************************************************************************/
  123. extern long Quality_Values[];
  124. extern struct Reserved_Word_Struct Option_Variable [] ;
  125. /*****************************************************************************
  126. * Global functions
  127. ******************************************************************************/
  128. char *get_ini_value (int op, int libind);
  129. void parse_switch (char *Option_String);
  130. void process_variable (TOKEN variable,char *value);
  131. void Do_Stream_Option (int i, char *value);
  132. void Do_Return_Option (SHELLTYPE Type, char *value);
  133. int parse_ini_file (char *File_Name);
  134. void parse_option_line (char *Option_Line);
  135. void Write_INI_File (void);
  136. #endif