home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / makeindex.lha / makeindex-2.12 / src / mkind.h < prev    next >
C/C++ Source or Header  |  1994-04-02  |  21KB  |  778 lines

  1. /*
  2.  *
  3.  *  This file is part of
  4.  *    MakeIndex - A formatter and format independent index processor
  5.  *
  6.  *  Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
  7.  *  Copyright (C) 1988 by Olivetti Research Center
  8.  *  Copyright (C) 1987 by Regents of the University of California
  9.  *
  10.  *  Author:
  11.  *    Pehong Chen
  12.  *    Chen & Harrison International Systems, Inc.
  13.  *    Palo Alto, California
  14.  *    USA
  15.  *    (phc@renoir.berkeley.edu or chen@orc.olivetti.com)
  16.  *
  17.  *  Contributors:
  18.  *    Please refer to the CONTRIB file that comes with this release
  19.  *    for a list of people who have contributed to this and/or previous
  20.  *    release(s) of MakeIndex.
  21.  *
  22.  *  All rights reserved by the copyright holders.  See the copyright
  23.  *  notice distributed with this software for a complete description of
  24.  *  the conditions under which it is made available.
  25.  *
  26.  */
  27.  
  28. /***********************************************************************
  29.  
  30.                INSTALLATION NOTES
  31.                   <11-Nov-1989>
  32.  
  33.    At compile-time (or here, if compile-time definition is not
  34.    available), set non-zero ONE OS_xxxx operating system flag, and if
  35.    more than one compiler is available, ONE compiler flag:
  36.  
  37.     Operating Systems        Compiler(s)
  38.     =================        ===========
  39.     OS_AMIGA                 SAS/C v6.x
  40.     OS_ATARI
  41.     OS_BS2000                CCD_2000
  42.     OS_BSD
  43.     OS_MVSXA                 IBM_C370
  44.     OS_VMCMS                 IBM_C370
  45.     OS_PCDOS                 IBM_PC_MICROSOFT
  46.     OS_SYSV
  47.     OS_TOPS20                KCC_20 or PCC_20
  48.     OS_VAXVMS
  49.     OS_XENIX
  50.     =================        ===========
  51.  
  52.    If no OS_xxxx symbol is defined, OS_BSD is assumed.
  53.  
  54.    If Standard C prototypes are supported, define the symbol
  55.    STDC_PROTOTYPES in the appropriate OS_xxxx section below, and insert
  56.    #include's for the standard system files which define library
  57.    prototypes.  STDC_PROTOTYPES will be defined automatically if
  58.    __STDC__ is; the latter must be defined by all Standard C conformant
  59.    implementations.
  60.  
  61.    All function declarations in MakeIndex are contained at the end of
  62.    this file.  If 185STDC_PROTOTYPES is not selected, then all the standard
  63.    library functions must be declared explicitly.
  64.  
  65.    If the host system restricts external names to 6 characters, set
  66.    SHORTNAMES non-zero in the appropriate OS_xxxx section below.
  67.  
  68.    Installing MakeIndex under BS2000 requires at least Version 8.5
  69.    supporting Multiple Public Volume Sets (MPVS). Define WORK in this
  70.    file to your CATID (default :w:) for temporary files (.ilg, .ind),
  71.    in case of no MPVS support define WORK to NIL.
  72.  
  73. */
  74.  
  75. /**********************************************************************/
  76.  
  77. #define STDC    (__STDC__ || __cplusplus)
  78.  
  79. /*
  80.  * Establish needed operating symbols (defaulting to OS_BSD if none
  81.  * specified at compile time).  If you add one, add it to the check
  82.  * list at the end of this section, too.
  83.  */
  84.  
  85. #ifndef    OS_AMIGA
  86. #define OS_AMIGA 0
  87. #endif
  88.  
  89. #ifndef    OS_ATARI
  90. #define OS_ATARI 0
  91. #endif
  92.  
  93. #ifndef    OS_PCDOS
  94. #define OS_PCDOS 0
  95. #endif
  96.  
  97. #ifndef    IBM_PC_MICROSOFT
  98. #define IBM_PC_MICROSOFT 0
  99. #endif
  100.  
  101. #ifndef    IBM_PC_TURBO
  102. #define IBM_PC_TURBO 0
  103. #endif
  104.  
  105. #ifdef __TURBOC__
  106. #define IBM_PC_TURBO 1
  107. #endif
  108.  
  109. #ifndef    OS_SYSV
  110. #define OS_SYSV 0
  111. #endif
  112.  
  113. #ifndef    OS_TOPS20
  114. #define OS_TOPS20 0
  115. #endif
  116.  
  117. #ifndef    KCC_20
  118. #define KCC_20 0
  119. #endif
  120.  
  121. #ifndef    PCC_20
  122. #define PCC_20 0
  123. #endif
  124.  
  125. #ifndef    OS_BSD
  126. #define OS_BSD 0
  127. #endif
  128.  
  129. #ifndef    OS_VAXVMS
  130. #define OS_VAXVMS 0
  131. #endif
  132.  
  133. #ifndef    IBM_C370
  134. #define IBM_C370 0
  135. #endif
  136.  
  137. #ifndef    CCD_2000
  138. #define CCD_2000 0
  139. #endif
  140.  
  141. #if    OS_TOPS20
  142. #if    (KCC_20 || PCC_20)
  143. #else
  144. #undef PCC_20
  145. #define PCC_20 1                       /* PCC-20 is default for Tops-20 */
  146. #endif                                 /* KCC_20 || PCC_20) */
  147. #endif                                 /* OS_TOPS20 */
  148.  
  149. #ifndef    OS_BS2000
  150. #define OS_BS2000 0
  151. #endif
  152.  
  153. #ifndef    OS_MVSXA
  154. #define OS_MVSXA 0
  155. #endif
  156.  
  157. #ifndef    OS_VMCMS
  158. #define OS_VMCMS 0
  159. #endif
  160.  
  161. #ifndef    OS_XENIX
  162. #define OS_XENIX 0
  163. #endif
  164.  
  165. #if    (OS_ATARI || OS_BSD || OS_BS2000 || OS_MVSXA || OS_PCDOS || OS_VMCMS)
  166. #else
  167. #if    (OS_SYSV || OS_TOPS20 || OS_VAXVMS || OS_XENIX || OS_AMIGA)
  168. #else
  169. #undef OS_BSD
  170. #define OS_BSD 1                      /* Unix is default operating system */
  171. #endif
  172. #endif
  173.  
  174. #if    (OS_MVSXA || OS_VMCMS)
  175. #undef IBM_C370
  176. #define IBM_C370 1    /* IBM_C370 is default for OS_MVSXA and OS_VMCMS */
  177. #endif
  178.  
  179. #if    OS_BS2000
  180. #undef CCD_2000
  181. #define CCD_2000 1                     /* CCD_2000 is default for OS_BS2000 */
  182. #endif
  183.  
  184. #if    (CCD_2000 || OS_MVSXA || OS_TOPS20 || OS_VMCMS)
  185. #define SHORTNAMES 1
  186. #else
  187. #define SHORTNAMES 0
  188. #endif
  189.  
  190. #define STDC_PROTOTYPES STDC
  191.  
  192. /**********************************************************************/
  193.  
  194. #include    <stdio.h>
  195. #include    <ctype.h>
  196.  
  197. #if    (CCD_2000 || OS_SYSV || OS_PCDOS || STDC || _AIX || ardent )
  198. #include    <string.h>
  199. #else
  200.  
  201. #if    (OS_ATARI || OS_BSD || PCC_20 || OS_XENIX)
  202. #define strchr  index                  /* convert STDC form to old K&R form */
  203. #define strrchr rindex                 /* convert STDC form to old K&R form */
  204. #endif /* (OS_ATARI || OS_BSD || PCC_20 || OS_XENIX) */
  205.  
  206. #endif /* CCD_2000 || OS_SYSV || OS_PCDOS || STDC || _AIX || ardent) */
  207.  
  208. #if    OS_PCDOS
  209.  
  210. #if    (IBM_PC_MICROSOFT || IBM_PC_TURBO)
  211. #include    <io.h>                     /* for function declarations */
  212. #endif /* (IBM_PC_MICROSOFT || IBM_PC_TURBO) */
  213.  
  214. #include    <stddef.h>                 /* for function declarations */
  215. #include    <stdlib.h>                 /* for function declarations */
  216. #undef STDC_PROTOTYPES
  217. #define STDC_PROTOTYPES    1           /* so we get full argument
  218.                       type checking */
  219. #endif                    /* OS_PCDOS */
  220.  
  221. #if    (OS_VMCMS || OS_MVSXA)
  222. #include    <stdefs.h>                 /* for function declarations */
  223. #include    <string.h>                 /* for function declarations */
  224. #undef STDC_PROTOTYPES
  225. #define STDC_PROTOTYPES    1           /* so we get full argument
  226.                                           type checking */
  227. #if 0
  228. #undef __STDC__
  229. #define __STDC__           1
  230. #endif
  231. #endif                                 /* OS_MVSXA || OS_VMCMS */
  232.  
  233. #if    OS_ATARI
  234.  
  235. #if    ATARI_ST_TURBO
  236. #define access(fn, mode) 0             /* function not available */
  237. #endif
  238.  
  239. #if    __GNUC__
  240. #include <string.h>
  241. #include <types.h>
  242. #endif
  243.  
  244. #undef STDC_PROTOTYPES
  245. #define STDC_PROTOTYPES    1           /* so we get full argument checking */
  246.  
  247. #endif                     /* OS_ATARI */
  248.  
  249. #if    IBM_C370
  250. #define access(fn, mode) 0             /* function not available */
  251. #endif
  252.  
  253. #if    CCD_2000                        /* function not available */
  254. #define getenv(P) 0
  255. #endif                                 /* CCD_2000 */
  256.  
  257. #if    OS_AMIGA
  258. #include    <stddef.h>                 /* for function declarations */
  259. #undef STDC_PROTOTYPES
  260. #define STDC_PROTOTYPES    1           /* so we get full argument
  261.                                           type checking */
  262. #endif                                 /* OS_AMIGA */
  263.  
  264. #if    SHORTNAMES
  265. /*
  266.  * Provide alternate external names which are unique in the first SIX
  267.  * characters as required for portability (and Standard C)
  268.  */
  269. #define check_all          chk_all
  270. #define check_idx          chk_idx
  271. #define check_mixsym       chk_mix
  272. #define compare_one        cmp_one
  273. #define compare_page       cmp_page
  274. #define compare_string     cmp_string
  275. #define delim_n            dlm_n
  276. #define delim_p            dlm_p
  277. #define delim_r            dlm_r
  278. #define delim_t            dlm_t
  279. #define encap_i            ecp_i
  280. #define encap_p            ecp_p
  281. #define encap_range        ecp_range
  282. #define encap_s            ecp_s
  283. #define group_skip         grp_skip
  284. #define group_type         grp_type
  285. #define idx_aclose         idxaclose
  286. #define idx_actual         idxactual
  287. #define idx_keyword        idx_kwd
  288. #define indent_length      ind_length
  289. #define indent_space       ind_space
  290. #define headings_flag      hd_flag
  291. #define heading_pre        hd_pre
  292. #define heading_suf        hd_suf
  293. #define symhead_pos        sym_pos
  294. #define symhead_neg        sym_neg
  295. #define numhead_pos        num_pos
  296. #define numhead_neg        num_neg
  297. #define process_idx        prc_idx
  298. #define process_precedence prc_pre
  299. #define range_ptr