home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / makeindex.lha / makeindex-2.12 / src / genind.h < prev    next >
Text File  |  1991-07-26  |  2KB  |  74 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. #if    KCC_20
  29. /* KCC preprocessor bug collapses multiple blanks to single blank */
  30. #define IND_ERROR(F, D) { \
  31.     if (idx_dot) { \
  32.     fprintf(ilg_fp, "\n"); \
  33.     idx_dot = FALSE; \
  34.     } \
  35.     fprintf(ilg_fp, \
  36. "## Warning (input = %s, line = %d; output = %s, line = %d):\n\040\040 -- ", \
  37.         curr->fn, curr->lc, ind_fn, ind_lc+1); \
  38.     fprintf(ilg_fp, F, D); \
  39.     ind_ec++; \
  40. }
  41. #else
  42. #define IND_ERROR(F, D) { \
  43.     if (idx_dot) { \
  44.     fprintf(ilg_fp, "\n"); \
  45.     idx_dot = FALSE; \
  46.     } \
  47.     fprintf(ilg_fp, \
  48.     "## Warning (input = %s, line = %d; output = %s, line = %d):\n   -- ", \
  49.         curr->fn, curr->lc, ind_fn, ind_lc+1); \
  50.     fprintf(ilg_fp, F, D); \
  51.     ind_ec++; \
  52. }
  53. #endif
  54.  
  55. #define PUTC(C) { \
  56.     fputc(C, ind_fp); \
  57. }
  58.  
  59. #define PUT(S) { \
  60.     fputs(S, ind_fp); \
  61. }
  62.  
  63. #define PUTLN(S) { \
  64.     fputs(S, ind_fp); \
  65.     fputc('\n', ind_fp); \
  66.     ind_lc++; \
  67. }
  68.  
  69. #define SAVE { \
  70.     begin = end = curr; \
  71.     prev_encap = encap; \
  72. }
  73.  
  74.