home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 February / PCWorld_2002-02_cd.bin / Software / Vyzkuste / pdflib / pdflib-4.0.1.sit / pdflib-4.0.1 / tiff / port.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-04  |  8.9 KB  |  264 lines  |  [TEXT/CWIE]

  1. /*
  2.  * modified by PDFlib GmbH
  3.  */
  4.  
  5. /* $Id: port.h,v 1.13 2001/04/09 13:00:02 tm Exp $ */
  6.  
  7. #ifndef _PORT_
  8. #define _PORT_ 1
  9.  
  10. /* PDFlib GmbH: identify MVS */
  11. #if defined __MVS__ && !defined MVS
  12. #define MVS
  13. #endif
  14.  
  15. /* This must be done before including the standard headers */
  16. #if defined(MVS) || defined(OS390)
  17. #define WORDS_BIGENDIAN
  18. #define BSDTYPES
  19. #define _POSIX_SOURCE
  20. #endif     /* MVS || OS390 */
  21.  
  22. /*
  23.  * Setup basic type definitions and function declaratations.
  24.  */
  25.  
  26. #include <math.h>
  27. #include <stdio.h>
  28. #include <string.h>
  29. #include <stdlib.h>
  30.  
  31. /* PDFlib GmbH: identify Mac compilers */
  32. #if (defined macintosh || defined __POWERPC__ || \
  33.         defined __CFM68K__ || defined __MC68K__) && !defined MAC
  34. #define MAC
  35. #endif
  36.  
  37. #if defined(WIN32) || defined(OS2)
  38. #include <fcntl.h> 
  39. #include <sys/types.h>
  40. #else
  41. #include <fcntl.h>     /* TODO: fix me */
  42. #endif
  43.  
  44. #if !defined(WIN32) && !defined(OS2) && !defined(MAC)
  45. #include <unistd.h>
  46. #endif
  47.  
  48. /* TODO: delete
  49. #if defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
  50. #include <types.h>
  51. #elif !defined(__MWERKS__) && !defined(THINK_C) && \
  52.     !defined(__acornriscos) && !defined(applec)
  53. #include <sys/types.h>
  54. #endif
  55. */
  56.  
  57. /*
  58.  * This maze of checks controls defines or not the
  59.  * target system has BSD-style typdedefs declared in
  60.  * an include file and/or whether or not to include
  61.  * <unistd.h> to get the SEEK_* definitions.  Some
  62.  * additional includes are also done to pull in the
  63.  * appropriate definitions we're looking for.
  64.  */
  65. #if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || \
  66.         defined(__SC__) || defined(__MRC__)
  67. #define    BSDTYPES
  68. #define    HAVE_UNISTD_H    0
  69.  
  70. #elif (defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) \
  71.         || defined(_WIN32)) && !defined(unix)
  72.  
  73. #define    BSDTYPES
  74.  
  75. #elif defined(OS2_16) || defined(OS2_32)
  76.  
  77. #define    BSDTYPES
  78. #endif
  79.  
  80. /*
  81.  * The BSD typedefs are used throughout the library.
  82.  * If your system doesn't have them in <sys/types.h>,
  83.  * then define BSDTYPES in your Makefile.
  84.  */
  85. #if defined(BSDTYPES)
  86. typedef    unsigned char u_char;
  87. typedef    unsigned short u_short;
  88. typedef    unsigned int u_int;
  89. typedef    unsigned long u_long;
  90. #endif
  91.  
  92. #ifndef O_RDONLY
  93. #define O_RDONLY    0
  94. #endif
  95.  
  96. #ifndef O_WRONLY
  97. #define O_WRONLY    1
  98. #endif
  99.  
  100. #ifndef O_RDWR
  101. #define O_RDWR      2
  102. #endif
  103.  
  104. /*
  105.  * dblparam_t is the type that a double precision
  106.  * floating point value will have on the parameter
  107.  * stack (when coerced by the compiler).
  108.  */
  109. typedef double dblparam_t;
  110.  
  111. #undef INLINE        /* PDFlib GmbH */
  112. #define    INLINE    /* */
  113.  
  114. #define GLOBALDATA(TYPE,NAME)    extern TYPE NAME
  115.  
  116. #ifdef WORDS_BIGENDIAN
  117. #undef HOST_BIGENDIAN    /* PDFlib GmbH */
  118. #define HOST_BIGENDIAN    1
  119. #endif
  120.  
  121. /* to allow the use of PDFlib inside of programs using the real TIFFlib */
  122. #define TIFFGetFieldDefaulted    pdf_TIFFGetFieldDefaulted
  123. #define TIFFVGetFieldDefaulted    pdf_TIFFVGetFieldDefaulted
  124. #define TIFFClose    pdf_TIFFClose
  125. #define TIFFFindCODEC    pdf_TIFFFindCODEC
  126. #define TIFFRegisterCODEC    pdf_TIFFRegisterCODEC
  127. #define TIFFSetCompressionScheme    pdf_TIFFSetCompressionScheme
  128. #define TIFFUnRegisterCODEC    pdf_TIFFUnRegisterCODEC
  129. #define _TIFFNoPreCode    pdf__TIFFNoPreCode
  130. #define _TIFFNoRowDecode    pdf__TIFFNoRowDecode
  131. #define _TIFFNoRowEncode    pdf__TIFFNoRowEncode
  132. #define _TIFFNoSeek    pdf__TIFFNoSeek
  133. #define _TIFFNoStripDecode    pdf__TIFFNoStripDecode
  134. #define _TIFFNoStripEncode    pdf__TIFFNoStripEncode
  135. #define _TIFFNoTileDecode    pdf__TIFFNoTileDecode
  136. #define _TIFFNoTileEncode    pdf__TIFFNoTileEncode
  137. #define _TIFFSetDefaultCompressionState    pdf__TIFFSetDefaultCompressionState
  138. #define TIFFCreateDirectory    pdf_TIFFCreateDirectory
  139. #define TIFFCurrentDirOffset    pdf_TIFFCurrentDirOffset
  140. #define TIFFDefaultDirectory    pdf_TIFFDefaultDirectory
  141. #define TIFFFreeDirectory    pdf_TIFFFreeDirectory
  142. #define TIFFGetField    pdf_TIFFGetField
  143. #define TIFFLastDirectory    pdf_TIFFLastDirectory
  144. #define TIFFNumberOfDirectories    pdf_TIFFNumberOfDirectories
  145. #define TIFFReassignTagToIgnore    pdf_TIFFReassignTagToIgnore
  146. #define TIFFSetDirectory    pdf_TIFFSetDirectory
  147. #define TIFFSetField    pdf_TIFFSetField
  148. #define TIFFSetSubDirectory    pdf_TIFFSetSubDirectory
  149. #define TIFFSetTagExtender    pdf_TIFFSetTagExtender
  150. #define TIFFUnlinkDirectory    pdf_TIFFUnlinkDirectory
  151. #define TIFFVGetField    pdf_TIFFVGetField
  152. #define TIFFVSetField    pdf_TIFFVSetField
  153. #define _TIFFsetByteArray    pdf__TIFFsetByteArray
  154. #define _TIFFsetDoubleArray    pdf__TIFFsetDoubleArray
  155. #define _TIFFsetFloatArray    pdf__TIFFsetFloatArray
  156. #define _TIFFsetLongArray    pdf__TIFFsetLongArray
  157. #define _TIFFsetNString    pdf__TIFFsetNString
  158. #define _TIFFsetShortArray    pdf__TIFFsetShortArray
  159. #define _TIFFsetString    pdf__TIFFsetString
  160. #define _TIFFFieldWithTag    pdf__TIFFFieldWithTag
  161. #define _TIFFFindFieldInfo    pdf__TIFFFindFieldInfo
  162. #define _TIFFMergeFieldInfo    pdf__TIFFMergeFieldInfo
  163. #define _TIFFPrintFieldInfo    pdf__TIFFPrintFieldInfo
  164. #define _TIFFSampleToTagType    pdf__TIFFSampleToTagType
  165. #define _TIFFSetupFieldInfo    pdf__TIFFSetupFieldInfo
  166. #define TIFFReadDirectory    pdf_TIFFReadDirectory
  167. #define TIFFWriteDirectory    pdf_TIFFWriteDirectory
  168. #define TIFFInitDumpMode    pdf_TIFFInitDumpMode
  169. #define TIFFError    pdf_TIFFError
  170. #define TIFFSetErrorHandler    pdf_TIFFSetErrorHandler
  171. #define TIFFInitCCITTFax3    pdf_TIFFInitCCITTFax3
  172. #define TIFFInitCCITTFax4    pdf_TIFFInitCCITTFax4
  173. #define TIFFInitCCITTRLE    pdf_TIFFInitCCITTRLE
  174. #define TIFFInitCCITTRLEW    pdf_TIFFInitCCITTRLEW
  175. #define _TIFFFax3fillruns    pdf__TIFFFax3fillruns
  176. #define TIFFFlush    pdf_TIFFFlush
  177. #define TIFFFlushData    pdf_TIFFFlushData
  178. #define TIFFRGBAImageBegin    pdf_TIFFRGBAImageBegin
  179. #define TIFFRGBAImageEnd    pdf_TIFFRGBAImageEnd
  180. #define TIFFRGBAImageGet    pdf_TIFFRGBAImageGet
  181. #define TIFFRGBAImageOK    pdf_TIFFRGBAImageOK
  182. #define TIFFReadRGBAImage    pdf_TIFFReadRGBAImage
  183. #define TIFFReadRGBAStrip    pdf_TIFFReadRGBAStrip
  184. #define TIFFReadRGBATile    pdf_TIFFReadRGBATile
  185. #define TIFFInitNeXT    pdf_TIFFInitNeXT
  186. #define TIFFClientOpen    pdf_TIFFClientOpen
  187. #define TIFFCurrentDirectory    pdf_TIFFCurrentDirectory
  188. #define TIFFCurrentRow    pdf_TIFFCurrentRow
  189. #define TIFFCurrentStrip    pdf_TIFFCurrentStrip
  190. #define TIFFCurrentTile    pdf_TIFFCurrentTile
  191. #define TIFFFileName    pdf_TIFFFileName
  192. #define TIFFFileno    pdf_TIFFFileno
  193. #define TIFFGetMode    pdf_TIFFGetMode
  194. #define TIFFIsByteSwapped    pdf_TIFFIsByteSwapped
  195. #define TIFFIsMSB2LSB    pdf_TIFFIsMSB2LSB
  196. #define TIFFIsTiled    pdf_TIFFIsTiled
  197. #define TIFFIsUpSampled    pdf_TIFFIsUpSampled
  198. #define TIFFInitPackBits    pdf_TIFFInitPackBits
  199. #define TIFFPredictorInit    pdf_TIFFPredictorInit
  200. #define TIFFPrintDirectory    pdf_TIFFPrintDirectory
  201. #define _TIFFprintAscii    pdf__TIFFprintAscii
  202. #define _TIFFprintAsciiTag    pdf__TIFFprintAsciiTag
  203. #define TIFFReadBufferSetup    pdf_TIFFReadBufferSetup
  204. #define TIFFReadEncodedStrip    pdf_TIFFReadEncodedStrip
  205. #define TIFFReadEncodedTile    pdf_TIFFReadEncodedTile
  206. #define TIFFReadRawStrip    pdf_TIFFReadRawStrip
  207. #define TIFFReadRawTile    pdf_TIFFReadRawTile
  208. #define TIFFReadScanline    pdf_TIFFReadScanline
  209. #define TIFFReadTile    pdf_TIFFReadTile
  210. #define _TIFFNoPostDecode    pdf__TIFFNoPostDecode
  211. #define _TIFFSwab16BitData    pdf__TIFFSwab16BitData
  212. #define _TIFFSwab32BitData    pdf__TIFFSwab32BitData
  213. #define _TIFFSwab64BitData    pdf__TIFFSwab64BitData
  214. #define TIFFComputeStrip    pdf_TIFFComputeStrip
  215. #define TIFFDefaultStripSize    pdf_TIFFDefaultStripSize
  216. #define TIFFNumberOfStrips    pdf_TIFFNumberOfStrips
  217. #define TIFFRasterScanlineSize    pdf_TIFFRasterScanlineSize
  218. #define TIFFScanlineSize    pdf_TIFFScanlineSize
  219. #define TIFFStripSize    pdf_TIFFStripSize
  220. #define TIFFVStripSize    pdf_TIFFVStripSize
  221. #define _TIFFDefaultStripSize    pdf__TIFFDefaultStripSize
  222. #define TIFFGetBitRevTable    pdf_TIFFGetBitRevTable
  223. #define TIFFReverseBits    pdf_TIFFReverseBits
  224. #define TIFFSwabArrayOfDouble    pdf_TIFFSwabArrayOfDouble
  225. #define TIFFSwabArrayOfLong    pdf_TIFFSwabArrayOfLong
  226. #define TIFFSwabArrayOfShort    pdf_TIFFSwabArrayOfShort
  227. #define TIFFSwabDouble    pdf_TIFFSwabDouble
  228. #define TIFFSwabLong    pdf_TIFFSwabLong
  229. #define TIFFSwabShort    pdf_TIFFSwabShort
  230. #define TIFFInitThunderScan    pdf_TIFFInitThunderScan
  231. #define TIFFCheckTile    pdf_TIFFCheckTile
  232. #define TIFFComputeTile    pdf_TIFFComputeTile
  233. #define TIFFDefaultTileSize    pdf_TIFFDefaultTileSize
  234. #define TIFFNumberOfTiles    pdf_TIFFNumberOfTiles
  235. #define TIFFTileRowSize    pdf_TIFFTileRowSize
  236. #define TIFFTileSize    pdf_TIFFTileSize
  237. #define TIFFVTileSize    pdf_TIFFVTileSize
  238. #define _TIFFDefaultTileSize    pdf__TIFFDefaultTileSize
  239. #define TIFFFdOpen    pdf_TIFFFdOpen
  240. #define TIFFOpen    pdf_TIFFOpen
  241. #define _TIFFfree    pdf__TIFFfree
  242. #define _TIFFmalloc    pdf__TIFFmalloc
  243. #define _TIFFmemcmp    pdf__TIFFmemcmp
  244. #define _TIFFmemcpy    pdf__TIFFmemcpy
  245. #define _TIFFmemset    pdf__TIFFmemset
  246. #define _TIFFrealloc    pdf__TIFFrealloc
  247. #define TIFFGetVersion    pdf_TIFFGetVersion
  248. #define TIFFSetWarningHandler    pdf_TIFFSetWarningHandler
  249. #define TIFFWarning    pdf_TIFFWarning
  250. #define TIFFSetWriteOffset    pdf_TIFFSetWriteOffset
  251.  
  252. /* globals */
  253. #define _TIFFBuiltinCODECS    pdf__TIFFBuiltinCODECS
  254. #define _TIFFerrorHandler    pdf__TIFFerrorHandler
  255. #define _TIFFwarningHandler    pdf__TIFFwarningHandler
  256. #define tiffDataWidth    pdf_tiffDataWidth
  257. #define TIFFFaxBlackCodes    pdf_TIFFFaxBlackCodes
  258. #define TIFFFaxWhiteCodes    pdf_TIFFFaxWhiteCodes
  259. #define TIFFFaxBlackTable    pdf_TIFFFaxBlackTable
  260. #define TIFFFaxMainTable    pdf_TIFFFaxMainTable
  261. #define TIFFFaxWhiteTable    pdf_TIFFFaxWhiteTable
  262.  
  263. #endif /* _PORT_ */
  264.