home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / grafik / hpcd06 / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-24  |  4.1 KB  |  175 lines

  1. /* hpcdtoppm (Hadmut's pcdtoppm) v0.6.beta
  2. *  Copyright (c) 1992, 1993, 1994 by Hadmut Danisch (danisch@ira.uka.de).
  3. *  Permission to use and distribute this software and its
  4. *  documentation for noncommercial use and without fee is hereby granted,
  5. *  provided that the above copyright notice appear in all copies and that
  6. *  both that copyright notice and this permission notice appear in
  7. *  supporting documentation. It is not allowed to sell this software in
  8. *  any way. This software is not public domain.
  9. */
  10.  
  11.  
  12.  
  13. /* define OWN_WRITE either here or by compiler-option if you don't want to use
  14.    the pbmplus-routines for writing */
  15. /* #define OWN_WRITE */
  16.  
  17.  
  18.  
  19. /* define DEBUG for some debugging informations */
  20. /* #define DEBUG */
  21.  
  22.  
  23. /* define LONG_HELP or SHORT_HELP, if you want to have an options
  24.    list if parameters are bad */
  25. #define LONG_HELP
  26.  
  27.  
  28. /* define DO_DECL_EXT for external declaration of system and library calls */
  29. /* #define DO_DECL_EXT */
  30.  
  31.  
  32. /* define FASTHUFF for faster Huffman decoding with tables.
  33. ** this makes a little speedup, but needs about 768 KByte memory
  34. */
  35. #define FASTHUFF
  36.  
  37.  
  38.  
  39. #ifdef OWN_WRITE
  40. /* If the own routines are used, this is the size of the buffer in bytes.
  41.    You can shrink if needed. */
  42. #define own_BUsize 50000
  43.  
  44. /* The header for the ppm-files */
  45. #define PPM_Header "P6\n%d %d\n255\n"
  46. #define PGM_Header "P5\n%d %d\n255\n"
  47.  
  48.  
  49. #endif
  50.  
  51.  
  52.  
  53. /* fopen Parameters, for some systems (MS-DOS :-( ) you need "wb" and "rb" */
  54. #define W_OP "wb"
  55. #define R_OP "rb"
  56.  
  57.  
  58. /* define SMALLNAMES if the filenames of PhotoCD have small letters on
  59.    your filesystem */
  60. #define SMALLNAMES
  61.  
  62. /* The separator between directory- and filenames */
  63. #define DIRSEP "/"
  64.  
  65. /* if you can't write to stdout in binary mode, you have to fdopen
  66.    a FILE * in binary mode to stdout. This is important for system,
  67.    where W_OP is something other than "w". Please define the
  68.    Macro USE_FDOPEN in this case and check the instructions, where this
  69.    macro is used.
  70. */
  71.  
  72. /* #define USE_FDOPEN */
  73.  
  74. /** Error detection **/
  75.  
  76. #define error(x) eerror(x,__FILE__,__LINE__)
  77.  
  78. /*
  79. ** Data Types
  80. ** Important: sBYTE must be a signed byte type !
  81. ** If your compiler doesn't understand "signed", remove it.
  82. */
  83.  
  84. #ifndef sBYTE
  85. typedef   signed char sBYTE;
  86. #endif
  87.  
  88. typedef unsigned char uBYTE;
  89.  
  90. /* signed and unsigned 32-bit-integers
  91. sINT and uINT must at least have 32 bit. If you
  92. don't have 32-bit-integers, take 64-bit and
  93. define the macro U_TOO_LONG !!!
  94.  
  95. uINT and sINT must be suitable to the printf/scanf-format %d
  96. and %u and to the systemcalls as fread etc.
  97.  
  98. */
  99.  
  100. #define uINT  unsigned int
  101. #define sINT           int
  102. /*
  103. #define uLONG unsigned long
  104. #define sLONG unsigned long
  105. */
  106. /* #define U_TOO_LONG */
  107.  
  108. typedef uINT dim;
  109. typedef sINT sdim;
  110.  
  111. /* Floating point data type and string for sscanf */
  112. #define FLTPT double
  113. #define SSFLTPT "%lf"
  114.  
  115.  
  116. /* Default taken when no size parameter given,
  117. ** C_DEFAULT depends on your taste and video-hardware,
  118. */
  119.  
  120. #define S_DEFAULT S_Base16
  121. /* #define O_DEFAULT O_PPM */
  122. #define O_DEFAULT O_TGA
  123. #define C_DEFAULT C_LINEAR
  124. #define T_DEFAULT T_AUTO
  125.  
  126.  
  127. /* Background for contact sheet */
  128. #define CONTLUM neutrLum
  129. #define CONTCH1 neutrCh1
  130. #define CONTCH2 neutrCh2
  131.  
  132.  
  133.  
  134.  
  135. /* Maximum Black value of frame for cutting of the
  136. ** frame. If MAX_BLACK is n, a frame is detected, when
  137. ** all Luma values are within [ 0 .. (n-1) ]
  138. */
  139. #define MAX_BLACK 1
  140.  
  141. /* Default Postscript paper size
  142. ** (German DIN A 4 )
  143. */
  144. #define DEF_PAPER_LEFT    50.0
  145. #define DEF_PAPER_BOTTOM  50.0
  146. #define DEF_PAPER_WIDTH  500.0
  147. #define DEF_PAPER_HEIGHT 750.0
  148. #define DEF_DPI          300.0
  149.  
  150.  
  151.  
  152. /* External Declarations */
  153. #ifdef DO_DECL_EXT
  154.  
  155. /*extern void *malloc(unsigned);*/
  156. extern int  sscanf(char *,char *,...);
  157.  
  158. extern int  fprintf(FILE *,char *,...);
  159. extern int  fclose(FILE *);
  160. extern int  fseek(FILE *,long,int);
  161. extern int  fread(void *,int,int,FILE *);
  162. extern int  fwrite(void *,int,int,FILE *);
  163. extern int  fputs(char *,FILE *);
  164. extern int  fputc(char  ,FILE *);
  165. extern int  fflush(FILE *);
  166.  
  167. #endif
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.