/*
 *
 *  This file is part of
 *	MakeIndex - A formatter and format independent index processor
 *
 *  Copyright (C) 1998-2011 by the TeX Live project.
 *  Copyright (C) 1989 by Chen & Harrison International Systems, Inc.
 *  Copyright (C) 1988 by Olivetti Research Center
 *  Copyright (C) 1987 by Regents of the University of California
 *
 *  Author:
 *	Pehong Chen
 *	Chen & Harrison International Systems, Inc.
 *	Palo Alto, California
 *	USA
 *
 *  Contributors:
 *	Please refer to the CONTRIB file that comes with this release
 *	for a list of people who have contributed to this and/or previous
 *	release(s) of MakeIndex.
 *
 *  All rights reserved by the copyright holders.  See the copyright
 *  notice distributed with this software for a complete description of
 *  the conditions under which it is made available.
 *
 */

#define IND_ERROR(F) { \
    if (idx_dot) { \
	fprintf(ilg_fp, "\n"); \
	idx_dot = FALSE; \
    } \
    fprintf(ilg_fp, \
    "## Warning (input = %s, line = %d; output = %s, line = %d):\n   -- ", \
	    curr->fn, curr->lc, ind_fn, ind_lc+1); \
    fprintf(ilg_fp, F); \
    ind_ec++; \
}

#define IND_ERROR1(F, D) { \
    if (idx_dot) { \
	fprintf(ilg_fp, "\n"); \
	idx_dot = FALSE; \
    } \
    fprintf(ilg_fp, \
    "## Warning (input = %s, line = %d; output = %s, line = %d):\n   -- ", \
	    curr->fn, curr->lc, ind_fn, ind_lc+1); \
    fprintf(ilg_fp, F, D); \
    ind_ec++; \
}

#define PUTC(C) { \
    fputc(C, ind_fp); \
}

#define PUT(S) { \
    fputs(S, ind_fp); \
}

#define PUTLN(S) { \
    fputs(S, ind_fp); \
    fputc('\n', ind_fp); \
    ind_lc++; \
}

#define SAVE { \
    begin = the_end = curr; \
    prev_encap = encap; \
}

