home *** CD-ROM | disk | FTP | other *** search
/ D!Zone (Collector's Edition) / D_ZONE_CD.ISO / helps / dmijum / general.h next >
C/C++ Source or Header  |  1994-12-06  |  4KB  |  99 lines

  1. /*
  2.  *    GENERAL.H
  3.  *
  4.  *    Version 1.0.0
  5.  *
  6.  *    Abstract:
  7.  *     This module contains all the definitions used by all WADLIB source files.
  8.  *
  9.  *    History:
  10.  *     1.0.0    (March 31, 1994)
  11.  *
  12.  *  Author:
  13.  *     Michael McMahon
  14.  *
  15.  ****************************************************************************
  16.  *
  17.  *  WADLIB SOFTWARE LICENSE AGREEMENT
  18.  *
  19.  *    1. GRANT OF LICENSE. Michael McMahon and his affiliations (collectively
  20.  *       the "AUTHOR") grant you (either an individual or an entity) the
  21.  *       non-exclusive, royalty-free right to use this library source code,
  22.  *       documentation, and sample code (collectively, the "SOFTWARE") for
  23.  *       any lawful purpose subject to the terms of this license.  By using the
  24.  *       SOFTWARE you are agreeing to be bound to all the terms of this license.
  25.  *
  26.  *    2. COPYRIGHT.  The SOFTWARE is Copyright (c) 1994, Michael McMahon,
  27.  *       PO Box 14807, San Luis Nabisco, CA 93406-4807 USA. All Rights Reserved
  28.  *       Worldwide.  You may not use, modify, or distribute the SOFTWARE except
  29.  *       as otherwise provided herein.
  30.  *
  31.  *    2. DECLARATION OF PUBLIC DOMAIN DISTRIBUTION AND USE. The distribution
  32.  *       and use of the SOFTWARE is hereby designated PUBLIC DOMAIN by the
  33.  *       the AUTHOR.    You may not sell, rent, or lease this SOFTWARE.  The
  34.  *       SOFTWARE may be reproduced verbatim in part or in full by any
  35.  *       reproduction means for any lawful purpose, and may also be subject to
  36.  *       the following agreement.
  37.  *
  38.  *    3. AGREEMENT FOR USE OF SOFTWARE. The AUTHOR grants you a non-exclusive,
  39.  *       royalty-free right to incorporate the SOFTWARE into any production for
  40.  *       any legal purpose as long as you agree
  41.  *        (a) to indemnify, hold harmless, and defend the AUTHOR from and against
  42.  *            any claims or lawsuits, including attorneys' fees, that arise or
  43.  *            result from the use or distribution of your software production; and
  44.  *        (b) no matter how much the SOFTWARE is modified, the AUTHOR owns the
  45.  *            copyright and this original, unmodified copyright notice remains
  46.  *            intact in the source code; and,
  47.  *        (c) the AUTHOR is not held responsible for fixing bugs or making
  48.  *            enhancements or changes to the SOFTWARE for any reason; and,
  49.  *        (d) the SOFTWARE is not redistributed if it is modified in any way; and,
  50.  *      (e) otherwise comply with the terms of this agreement; and,
  51.  *        (f) the AUTHOR is forgiven for making so many demands.
  52.  *
  53.  *     THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE
  54.  *     AUTHOR FURTHER DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING WITHOUT
  55.  *     LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS
  56.  *     FOR A PARTICULAR PURPOSE.    THE ENTIRE RISK ARISING OUT OF THE USE
  57.  *     OR PERFORMANCE OF THE SOFTWARE REMAINS WITH YOU.
  58.  *
  59.  *     The author can be reached at:
  60.  *      Michael McMahon
  61.  *      P.O. Box 14807
  62.  *      San Luis Nabisco, CA 93406-4807 USA
  63.  *      Internet: mmcmahon@oboe.calpoly.edu
  64.  *      [Bug reports, suggestions, success stories, etc. are welcome; tech
  65.  *       support, and other unnecessary two-way mail, is not]
  66.  */
  67.  
  68. #ifndef GENERAL_DEFS
  69. #define GENERAL_DEFS
  70.  
  71. /* Some general defines */
  72. #define FALSE   0
  73. #define TRUE    1
  74.  
  75. /* Some fields need to 16 bits; others 32 bits. If this code is being compiled
  76.    on a 32-bit compiler, define _32_bits and compile. These definitions are
  77.    checked with assert statements before use in every module that uses them. */
  78. #ifdef _32_bits
  79. typedef short int16;
  80. typedef unsigned short uint16;
  81. /* 256 megs/allocation max -- increase if not sufficient */
  82. #define MALLOC_MAX    0x10000000
  83. #else
  84. typedef int int16;
  85. typedef unsigned uint16;
  86. #define MALLOC_MAX    64000L
  87. #endif
  88. typedef long   int32;
  89. typedef unsigned long uint32;
  90.  
  91. /* For DOS 16 bit platforms */
  92. #ifndef _32_bits
  93. #define malloc(x) _fmalloc(x)
  94. #define free(x)   _ffree(x)
  95. #define memcpy(x,y,z) _fmemcpy(x,y,z)
  96. #endif
  97.  
  98. #endif
  99.