home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / general / convrtrs / pbmplus / ntpbmsr1.lha / netpbm / libtiff / tiffcomp.h < prev    next >
C/C++ Source or Header  |  1993-10-04  |  3KB  |  110 lines

  1. /* $Header: /usr/people/sam/tiff/libtiff/RCS/tiffcomp.h,v 1.34 93/08/25 09:45:30 sam Exp $ */
  2.  
  3. /*
  4.  * Copyright (c) 1990, 1991, 1992 Sam Leffler
  5.  * Copyright (c) 1991, 1992 Silicon Graphics, Inc.
  6.  *
  7.  * Permission to use, copy, modify, distribute, and sell this software and 
  8.  * its documentation for any purpose is hereby granted without fee, provided
  9.  * that (i) the above copyright notices and this permission notice appear in
  10.  * all copies of the software and related documentation, and (ii) the names of
  11.  * Sam Leffler and Silicon Graphics may not be used in any advertising or
  12.  * publicity relating to the software without the specific, prior written
  13.  * permission of Sam Leffler and Silicon Graphics.
  14.  * 
  15.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  16.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  17.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  18.  * 
  19.  * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  20.  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  21.  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  22.  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  23.  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  24.  * OF THIS SOFTWARE.
  25.  */
  26.  
  27. #ifndef _COMPAT_
  28. #define    _COMPAT_
  29. /*
  30.  * This file contains a hodgepodge of definitions and
  31.  * declarations that are needed to provide compatibility
  32.  * between the native system and the base implementation
  33.  * that the library assumes.
  34.  *
  35.  * NB: This file is a mess.
  36.  */
  37.  
  38. /*
  39.  * Setup basic type definitions and function declaratations.
  40.  */
  41. #ifdef THINK_C
  42. #include <unix.h>
  43. #include <math.h>
  44. #endif
  45. #include <stdio.h>
  46. #ifdef applec
  47. #include <types.h>
  48. #else
  49. #ifndef THINK_C
  50. #include <sys/types.h>
  51. #endif
  52. #endif
  53. #ifdef VMS
  54. #include <file.h>
  55. #include <unixio.h>
  56. #else
  57. #include <fcntl.h>
  58. #endif
  59. #if defined(THINK_C) || defined(applec)
  60. #include <stdlib.h>
  61. #define    BSDTYPES
  62. #endif
  63.  
  64. /*
  65.  * Workarounds for BSD lseek definitions.
  66.  */
  67. #if defined(SYSV) || defined(VMS)
  68. #if defined(SYSV)
  69. #include <unistd.h>
  70. #endif
  71. #define    L_SET    SEEK_SET
  72. #define    L_INCR    SEEK_CUR
  73. #define    L_XTND    SEEK_END
  74. #endif /* defined(SYSV) || defined(VMS) */
  75. #ifndef L_SET
  76. #define L_SET    0
  77. #define L_INCR    1
  78. #define L_XTND    2
  79. #endif
  80.  
  81. /*
  82.  * The library uses memset, memcpy, and memcmp.
  83.  * ANSI C and System V define these in string.h.
  84.  */
  85. #include <string.h>
  86.  
  87. /*
  88.  * The BSD typedefs are used throughout the library.
  89.  * If your system doesn't have them in <sys/types.h>,
  90.  * then define BSDTYPES in your Makefile.
  91.  */
  92. #ifdef BSDTYPES
  93. typedef    unsigned char u_char;
  94. typedef    unsigned short u_short;
  95. typedef    unsigned int u_int;
  96. typedef    unsigned long u_long;
  97. #endif
  98.  
  99. /*
  100.  * dblparam_t is the type that a double precision
  101.  * floating point value will have on the parameter
  102.  * stack (when coerced by the compiler).
  103.  */
  104. #ifdef applec
  105. typedef extended dblparam_t;
  106. #else
  107. typedef double dblparam_t;
  108. #endif
  109. #endif /* _COMPAT_ */
  110.