summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-15 15:18:07 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-15 15:18:07 +0000
commit62b7efaec2d75a03ab390b68dc70c53a6521c2f2 (patch)
tree1df939f23cca49ca310c7280e4332dc681b80332 /Build/source/texk
parenta13fa3342001a13e250113815da70344a009380e (diff)
avoid compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@13759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/makeindexk/ChangeLog20
-rw-r--r--Build/source/texk/makeindexk/genind.c24
-rw-r--r--Build/source/texk/makeindexk/genind.h14
-rw-r--r--Build/source/texk/makeindexk/mkind.c68
-rw-r--r--Build/source/texk/makeindexk/mkind.h24
-rw-r--r--Build/source/texk/makeindexk/scanid.c29
-rw-r--r--Build/source/texk/makeindexk/scanid.h15
-rw-r--r--Build/source/texk/makeindexk/scanst.c24
-rw-r--r--Build/source/texk/makeindexk/scanst.h14
-rw-r--r--Build/source/texk/makeindexk/sortid.c4
10 files changed, 153 insertions, 83 deletions
diff --git a/Build/source/texk/makeindexk/ChangeLog b/Build/source/texk/makeindexk/ChangeLog
index ad9793c8b71..77314478b2b 100644
--- a/Build/source/texk/makeindexk/ChangeLog
+++ b/Build/source/texk/makeindexk/ChangeLog
@@ -1,3 +1,23 @@
+2009-06-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CFLAGS): enable compiler warnings.
+
+ * genind.c (gen_ind): FIXME: `let' may be used uninitialized ,
+ probably a bug.
+
+ Avoid compiler warnings.
+
+ * genind.h: rename IND_ERROR(F,S) to IND_ERROR1(F,S) and define
+ IND_ERROR(F).
+ * mkind.h: same for MESSAGE, MESSAGE1 and FATAL, FATAL1.
+ * scanid.h: same for IDX_ERROR, IDX_ERROR1.
+ * scanst.h: same for STY_ERROR, STY_ERROR1.
+ * genind.c, mkind.c, scanid.c, scanst.c, sortid.c: always use
+ fprintf (via IND_ERROR etc.) with correct number of args.
+
+ * mkind.c (open_sty): avoid unused variables.
+ (check_idx): add explict braces to avoid ambiguous `else'.
+
2009-05-07 Peter Breitenlohner <peb@mppmu.mpg.de>
Adapt to TL2009 build system.
diff --git a/Build/source/texk/makeindexk/genind.c b/Build/source/texk/makeindexk/genind.c
index dd03593d186..8c9aef2b434 100644
--- a/Build/source/texk/makeindexk/genind.c
+++ b/Build/source/texk/makeindexk/genind.c
@@ -66,7 +66,7 @@ gen_ind(VOID_ARG)
int n;
int tmp_lc;
- MESSAGE("Generating output file %s...", ind_fn);
+ MESSAGE1("Generating output file %s...", ind_fn);
PUT(preamble);
ind_lc += prelen;
if (init_page)
@@ -83,7 +83,7 @@ gen_ind(VOID_ARG)
tmp_lc = ind_lc;
if (in_range) {
curr = range_ptr;
- IND_ERROR("Unmatched range opening operator %c.\n", idx_ropen);
+ IND_ERROR1("Unmatched range opening operator %c.\n", idx_ropen);
}
prev = curr;
flush_line(TRUE);
@@ -137,7 +137,7 @@ int n;
if (*curr->encap == idx_ropen)
if (in_range) {
- IND_ERROR("Extra range opening operator %c.\n", idx_ropen);
+ IND_ERROR1("Extra range opening operator %c.\n", idx_ropen);
} else {
in_range = TRUE;
range_ptr = curr;
@@ -147,15 +147,15 @@ int n;
in_range = FALSE;
if (STRNEQ(&(curr->encap[1]), "") &&
STRNEQ(prev_encap, &(curr->encap[1]))) {
-IND_ERROR("Range closing operator has an inconsistent encapsulator %s.\n",
+IND_ERROR1("Range closing operator has an inconsistent encapsulator %s.\n",
&(curr->encap[1]));
}
} else {
- IND_ERROR("Unmatched range closing operator %c.\n", idx_rclose);
+ IND_ERROR1("Unmatched range closing operator %c.\n", idx_rclose);
}
else if ((*curr->encap != NUL) &&
STRNEQ(curr->encap, prev_encap) && in_range)
- IND_ERROR("Inconsistent page encapsulator %s within range.\n",
+ IND_ERROR1("Inconsistent page encapsulator %s within range.\n",
curr->encap);
return (1);
}
@@ -232,7 +232,7 @@ new_entry(VOID_ARG)
if (in_range) {
ptr = curr;
curr = range_ptr;
- IND_ERROR("Unmatched range opening operator %c.\n", idx_ropen);
+ IND_ERROR1("Unmatched range opening operator %c.\n", idx_ropen);
in_range = FALSE;
curr = ptr;
}
@@ -251,6 +251,7 @@ new_entry(VOID_ARG)
PUT(group_skip);
ind_lc += skiplen;
/* beginning of a new letter? */
+ /* FIXME: let may be uninitialized. Probably a BUG. */
put_header(let);
make_item(NIL);
} else
@@ -290,16 +291,13 @@ old_entry(VOID_ARG)
flush_line(FALSE);
if ((diff == 0) && (prev->type == curr->type)) {
IND_ERROR(
-"Conflicting entries: multiple encaps for the same page under same key.\n",
-"");
+"Conflicting entries: multiple encaps for the same page under same key.\n");
} else if (in_range && (prev->type != curr->type)) {
IND_ERROR(
-"Illegal range formation: starting & ending pages are of different types.\n",
-"");
+"Illegal range formation: starting & ending pages are of different types.\n");
} else if (in_range && (diff == -1)) {
IND_ERROR(
-"Illegal range formation: starting & ending pages cross chap/sec breaks.\n",
-"");
+"Illegal range formation: starting & ending pages cross chap/sec breaks.\n");
}
SAVE;
}
diff --git a/Build/source/texk/makeindexk/genind.h b/Build/source/texk/makeindexk/genind.h
index 445f52d7ae9..76235b066fc 100644
--- a/Build/source/texk/makeindexk/genind.h
+++ b/Build/source/texk/makeindexk/genind.h
@@ -25,7 +25,19 @@
*
*/
-#define IND_ERROR(F, D) { \
+#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; \
diff --git a/Build/source/texk/makeindexk/mkind.c b/Build/source/texk/makeindexk/mkind.c
index 7bcc3231e76..28e5eb0fd9c 100644
--- a/Build/source/texk/makeindexk/mkind.c
+++ b/Build/source/texk/makeindexk/mkind.c
@@ -151,7 +151,7 @@ char *argv[];
case 's':
argc--;
if (argc <= 0)
- FATAL("Expected -s <stylefile>\n","");
+ FATAL("Expected -s <stylefile>\n");
open_sty(*++argv);
sty_given = TRUE;
break;
@@ -160,7 +160,7 @@ char *argv[];
case 'o':
argc--;
if (argc <= 0)
- FATAL("Expected -o <ind>\n","");
+ FATAL("Expected -o <ind>\n");
ind_fn = *++argv;
ind_given = TRUE;
break;
@@ -169,7 +169,7 @@ char *argv[];
case 't':
argc--;
if (argc <= 0)
- FATAL("Expected -t <logfile>\n","");
+ FATAL("Expected -t <logfile>\n");
ilg_fn = *++argv;
ilg_given = TRUE;
break;
@@ -178,9 +178,9 @@ char *argv[];
case 'p':
argc--;
if (argc <= 0)
- FATAL("Expected -p <num>\n","");
+ FATAL("Expected -p <num>\n");
if (strlen(*++argv) >= sizeof(pageno))
- FATAL("Page number too high\n","");
+ FATAL("Page number too high\n");
strcpy(pageno, *argv);
init_page = TRUE;
if (STREQ(pageno, EVEN)) {
@@ -214,7 +214,7 @@ char *argv[];
/* bad option */
default:
- FATAL("Unknown option -%c.\n", *ap);
+ FATAL1("Unknown option -%c.\n", *ap);
break;
}
} else {
@@ -222,7 +222,7 @@ char *argv[];
check_idx(*argv, FALSE);
fns[++fn_no] = *argv;
} else {
- FATAL("Too many input files (max %d).\n", ARRAY_MAX);
+ FATAL1("Too many input files (max %d).\n", ARRAY_MAX);
}
}
}
@@ -246,11 +246,11 @@ char *argv[];
prepare_idx();
sort_idx();
gen_ind();
- MESSAGE("Output written in %s.\n", ind_fn);
+ MESSAGE1("Output written in %s.\n", ind_fn);
} else
- MESSAGE("Nothing written in %s.\n", ind_fn);
+ MESSAGE1("Nothing written in %s.\n", ind_fn);
- MESSAGE("Transcript written in %s.\n", ilg_fn);
+ MESSAGE1("Transcript written in %s.\n", ilg_fn);
CLOSE(ind_fp);
CLOSE(ilg_fp);
EXIT(0);
@@ -273,10 +273,10 @@ prepare_idx(VOID_ARG)
#endif /* DEBUG */
if (head == (NODE_PTR)NULL)
- FATAL("No valid index entries collected.\n", "");
+ FATAL("No valid index entries collected.\n");
if ((idx_key = (FIELD_PTR *) calloc(idx_gt, sizeof(FIELD_PTR))) == NULL) {
- FATAL("Not enough core...abort.\n", "");
+ FATAL("Not enough core...abort.\n");
}
for (i = 0; i < idx_gt; i++) {
idx_key[i] = &(ptr->data);
@@ -310,7 +310,7 @@ int log_given;
if (sty_given)
scan_sty();
if (german_sort && (idx_quote == '"'))
-FATAL("Option -g invalid, quote character must be different from '%c'.\n",
+FATAL1("Option -g invalid, quote character must be different from '%c'.\n",
'"');
scan_idx();
ind_given = TRUE;
@@ -327,7 +327,7 @@ FATAL("Option -g invalid, quote character must be different from '%c'.\n",
if (ind_given) {
if (!ind_fp && ((ind_fp = OPEN_OUT(ind_fn)) == NULL))
- FATAL("Can't create output index file %s.\n", ind_fn);
+ FATAL1("Can't create output index file %s.\n", ind_fn);
} else {
ind_fn = "stdout";
ind_fp = stdout;
@@ -335,7 +335,7 @@ FATAL("Option -g invalid, quote character must be different from '%c'.\n",
if (ilg_given) {
if (!ilg_fp && ((ilg_fp = OPEN_OUT(ilg_fn)) == NULL))
- FATAL("Can't create transcript file %s.\n", ilg_fn);
+ FATAL1("Can't create transcript file %s.\n", ilg_fn);
} else {
ilg_fn = "stderr";
ilg_fp = stderr;
@@ -346,7 +346,7 @@ FATAL("Option -g invalid, quote character must be different from '%c'.\n",
if ((fn_no == -1) && (sty_given))
scan_sty();
if (german_sort && (idx_quote == '"'))
-FATAL("Option -g ignored, quote character must be different from '%c'.\n",
+FATAL1("Option -g ignored, quote character must be different from '%c'.\n",
'"');
if (need_version) {
@@ -396,9 +396,9 @@ int open_fn;
if ( ( open_fn &&
((idx_fp = OPEN_IN(idx_fn)) == NULL)
) ||
- ((!open_fn) && (access(idx_fn, R_OK) != 0)))
+ ((!open_fn) && (access(idx_fn, R_OK) != 0))) {
if (with_ext) {
- FATAL("Input index file %s not found.\n", idx_fn);
+ FATAL1("Input index file %s not found.\n", idx_fn);
} else {
#ifdef DEBUG
@@ -408,16 +408,17 @@ int open_fn;
#endif /* DEBUG */
if ((idx_fn = (char *) malloc(STRING_MAX+5)) == NULL)
- FATAL("Not enough core...abort.\n", "");
+ FATAL("Not enough core...abort.\n");
snprintf(idx_fn, STRING_MAX+5, "%s%s", base, INDEX_IDX);
if ((open_fn &&
- ((idx_fp = OPEN_IN(idx_fn)) == NULL)
- ) ||
+ ((idx_fp = OPEN_IN(idx_fn)) == NULL)
+ ) ||
((!open_fn) && (access(idx_fn, R_OK) != 0))) {
FATAL2("Couldn't find input index file %s nor %s.\n", base,
idx_fn);
}
}
+ }
}
@@ -440,7 +441,7 @@ int log_given;
ind_fn = ind;
}
if ((ind_fp = OPEN_OUT(ind_fn)) == NULL)
- FATAL("Can't create output index file %s.\n", ind_fn);
+ FATAL1("Can't create output index file %s.\n", ind_fn);
/* index transcript file */
if (!ilg_given) {
@@ -448,12 +449,12 @@ int log_given;
ilg_fn = ilg;
}
if ((ilg_fp = OPEN_OUT(ilg_fn)) == NULL)
- FATAL("Can't create transcript file %s.\n", ilg_fn);
+ FATAL1("Can't create transcript file %s.\n", ilg_fn);
if (log_given) {
snprintf(log_fn, sizeof(log_fn), "%s%s", base, INDEX_LOG);
if ((log_fp = OPEN_IN(log_fn)) == NULL) {
- FATAL("Source log file %s not found.\n", log_fn);
+ FATAL1("Source log file %s not found.\n", log_fn);
} else {
find_pageno();
CLOSE(log_fp);
@@ -497,28 +498,29 @@ open_sty(fn)
char *fn;
#endif
{
- char *path;
- char *ptr;
- int i;
- int len;
#if USE_KPATHSEA
char *found;
if ((found = kpse_find_file (fn, kpse_ist_format, 1)) == NULL) {
- FATAL("Index style file %s not found.\n", fn);
+ FATAL1("Index style file %s not found.\n", fn);
} else {
if (strlen(found) >= sizeof(sty_fn)) {
- FATAL("Style file name %s too long.\n", found);
+ FATAL1("Style file name %s too long.\n", found);
}
strcpy(sty_fn,found);
if ((sty_fp = OPEN_IN(sty_fn)) == NULL) {
- FATAL("Could not open style file %s.\n", sty_fn);
+ FATAL1("Could not open style file %s.\n", sty_fn);
}
}
#else
+ char *path;
+ char *ptr;
+ int i;
+ int len;
+
if ((path = getenv(STYLE_PATH)) == NULL) {
if (strlen(fn) >= sizeof(sty_fn)) {
- FATAL("Style file name %s too long.\n", fn);
+ FATAL1("Style file name %s too long.\n", fn);
}
/* style input path not defined */
strcpy(sty_fn, fn);
@@ -555,7 +557,7 @@ char *fn;
}
if (sty_fp == NULL)
- FATAL("Index style file %s not found.\n", fn);
+ FATAL1("Index style file %s not found.\n", fn);
#endif
}
diff --git a/Build/source/texk/makeindexk/mkind.h b/Build/source/texk/makeindexk/mkind.h
index 714b923754c..bff29ff099c 100644
--- a/Build/source/texk/makeindexk/mkind.h
+++ b/Build/source/texk/makeindexk/mkind.h
@@ -253,7 +253,13 @@
#define STREQ(A, B) (strcmp(A, B) == 0)
#define STRNEQ(A, B) (strcmp(A, B) != 0)
-#define MESSAGE(F, S) { \
+#define MESSAGE(F) { \
+ if (verbose) \
+ fprintf(stderr, F); \
+ fprintf(ilg_fp, F); \
+}
+
+#define MESSAGE1(F, S) { \
if (verbose) \
fprintf(stderr, F, S); \
fprintf(ilg_fp, F, S); \
@@ -263,7 +269,17 @@
#undef FATAL
#endif
-#define FATAL(F, S) { \
+#define FATAL(F) { \
+ fprintf(stderr, F); \
+ fprintf(stderr, USAGE, pgm_fn); \
+ EXIT(1); \
+}
+
+#if USE_KPATHSEA /* kpathsea defines a different FATAL1 */
+#undef FATAL1
+#endif
+
+#define FATAL1(F, S) { \
fprintf(stderr, F, S); \
fprintf(stderr, USAGE, pgm_fn); \
EXIT(1); \
@@ -348,8 +364,8 @@ ensuing.
#endif
#define PUT_VERSION { \
- MESSAGE("This is %s, ", pgm_fn); \
- MESSAGE("%s.\n", VERSION); \
+ MESSAGE1("This is %s, ", pgm_fn); \
+ MESSAGE1("%s.\n", VERSION); \
need_version = FALSE; \
}
diff --git a/Build/source/texk/makeindexk/scanid.c b/Build/source/texk/makeindexk/scanid.c
index 73cd90eaea6..a55f71a03d9 100644
--- a/Build/source/texk/makeindexk/scanid.c
+++ b/Build/source/texk/makeindexk/scanid.c
@@ -71,7 +71,7 @@ scan_idx(VOID_ARG)
int not_eof = TRUE;
int arg_count = -1;
- MESSAGE("Scanning input file %s...", idx_fn);
+ MESSAGE1("Scanning input file %s...", idx_fn);
idx_lc = idx_tc = idx_ec = idx_dc = 0;
comp_len = strlen(page_comp);
while (not_eof) {
@@ -93,8 +93,7 @@ scan_idx(VOID_ARG)
IDX_DOT(DOT_MAX);
arg_count = -1;
} else if (arg_count > -1) {
- IDX_ERROR("Missing arguments -- need two (premature LFD).\n",
- NULL);
+ IDX_ERROR("Missing arguments -- need two (premature LFD).\n");
arg_count = -1;
}
case TAB:
@@ -119,7 +118,7 @@ scan_idx(VOID_ARG)
}
} else {
IDX_SKIPLINE;
- IDX_ERROR("Unknown index keyword %s.\n", keyword);
+ IDX_ERROR1("Unknown index keyword %s.\n", keyword);
}
} else {
if (i < ARRAY_MAX)
@@ -139,13 +138,13 @@ scan_idx(VOID_ARG)
}
} else {
IDX_SKIPLINE;
-IDX_ERROR(
+IDX_ERROR1(
"No opening delimiter for second argument (illegal character `%c').\n", c);
}
break;
case 2:
IDX_SKIPLINE;
-IDX_ERROR(
+IDX_ERROR1(
"No closing delimiter for second argument (illegal character `%c').\n", c);
break;
}
@@ -409,12 +408,12 @@ int ck_actual;
{
FIELD_OVERFLOW:
if (!ck_encap) {
- IDX_ERROR("Encapsulator of page number too long (max. %d).\n",
+ IDX_ERROR1("Encapsulator of page number too long (max. %d).\n",
len_field);
} else if (ck_actual) {
- IDX_ERROR("Index sort key too long (max. %d).\n", len_field);
+ IDX_ERROR1("Index sort key too long (max. %d).\n", len_field);
} else {
- IDX_ERROR("Text of key entry too long (max. %d).\n", len_field);
+ IDX_ERROR1("Text of key entry too long (max. %d).\n", len_field);
}
return (FALSE);
}
@@ -481,7 +480,7 @@ short *type;
if (!scan_alpha_upper(no, npg, count))
return (FALSE);
} else {
- IDX_ERROR("Illegal page number %s.\n", no);
+ IDX_ERROR1("Illegal page number %s.\n", no);
return (FALSE);
}
return (TRUE);
@@ -717,7 +716,7 @@ scan_arg1(VOID_ARG)
{
case LFD:
idx_lc++;
- IDX_ERROR("Incomplete first argument (premature LFD).\n", "");
+ IDX_ERROR("Incomplete first argument (premature LFD).\n");
return (FALSE);
case TAB:
case SPC:
@@ -738,7 +737,7 @@ scan_arg1(VOID_ARG)
flush_to_eol(); /* Skip to end of line */
idx_lc++;
- IDX_ERROR("First argument too long (max %d).\n", ARGUMENT_MAX);
+ IDX_ERROR1("First argument too long (max %d).\n", ARGUMENT_MAX);
return (FALSE);
}
@@ -760,7 +759,7 @@ scan_arg2(VOID_ARG)
switch (a) {
case LFD:
idx_lc++;
-IDX_ERROR("Incomplete second argument (premature LFD).\n", "");
+IDX_ERROR("Incomplete second argument (premature LFD).\n");
return (FALSE);
case TAB:
case SPC:
@@ -770,7 +769,7 @@ IDX_ERROR("Incomplete second argument (premature LFD).\n", "");
if (hit_blank) {
flush_to_eol(); /* Skip to end of line */
idx_lc++;
-IDX_ERROR("Illegal space within numerals in second argument.\n", "");
+IDX_ERROR("Illegal space within numerals in second argument.\n");
return (FALSE);
}
no[i++] = (char) a;
@@ -780,7 +779,7 @@ IDX_ERROR("Illegal space within numerals in second argument.\n", "");
}
flush_to_eol(); /* Skip to end of line */
idx_lc++;
- IDX_ERROR("Second argument too long (max %d).\n", NUMBER_MAX);
+ IDX_ERROR1("Second argument too long (max %d).\n", NUMBER_MAX);
return (FALSE);
}
diff --git a/Build/source/texk/makeindexk/scanid.h b/Build/source/texk/makeindexk/scanid.h
index 62a9de32758..43824068b9d 100644
--- a/Build/source/texk/makeindexk/scanid.h
+++ b/Build/source/texk/makeindexk/scanid.h
@@ -97,11 +97,22 @@
}
#define NULL_RTN { \
- IDX_ERROR("Illegal null field.\n", NULL); \
+ IDX_ERROR("Illegal null field.\n"); \
return (FALSE); \
}
-#define IDX_ERROR(F, D) { \
+#define IDX_ERROR(F) { \
+ if (idx_dot) { \
+ fprintf(ilg_fp, "\n"); \
+ idx_dot = FALSE; \
+ } \
+ fprintf(ilg_fp, "!! Input index error (file = %s, line = %d):\n -- ", \
+ idx_fn, idx_lc); \
+ fprintf(ilg_fp, F); \
+ idx_ec++; \
+}
+
+#define IDX_ERROR1(F, D) { \
if (idx_dot) { \
fprintf(ilg_fp, "\n"); \
idx_dot = FALSE; \
diff --git a/Build/source/texk/makeindexk/scanst.c b/Build/source/texk/makeindexk/scanst.c
index b626c20d051..02bb6c96927 100644
--- a/Build/source/texk/makeindexk/scanst.c
+++ b/Build/source/texk/makeindexk/scanst.c
@@ -118,7 +118,7 @@ scan_sty(VOID_ARG)
char spec[STRING_MAX];
int tmp;
- MESSAGE("Scanning style file %s", sty_fn);
+ MESSAGE1("Scanning style file %s", sty_fn);
while (scan_spec(spec)) {
sty_tc++;
put_dot = TRUE;
@@ -253,7 +253,7 @@ scan_sty(VOID_ARG)
else {
(void) next_nonblank();
STY_SKIPLINE;
- STY_ERROR("Unknown specifier %s.\n", spec);
+ STY_ERROR1("Unknown specifier %s.\n", spec);
put_dot = FALSE;
}
if (put_dot) {
@@ -263,7 +263,7 @@ scan_sty(VOID_ARG)
/* check if quote and escape are distinct */
if (idx_quote == idx_escape) {
- STY_ERROR(
+ STY_ERROR1(
"Quote and escape symbols must be distinct (both `%c' now).\n",
idx_quote);
idx_quote = IDX_QUOTE;
@@ -299,7 +299,7 @@ char spec[];
if (i < STRING_MAX) {
spec[i] = NUL;
if (c == EOF) {
- STY_ERROR(
+ STY_ERROR1(
"No attribute for specifier %s (premature EOF)\n",
spec);
return (-1);
@@ -354,7 +354,7 @@ char str[];
while (TRUE)
switch (c = GET_CHAR(sty_fp)) {
case EOF:
- STY_ERROR("No closing delimiter in %s.\n",
+ STY_ERROR1("No closing delimiter in %s.\n",
clone);
return (FALSE);
case STR_DELIM:
@@ -395,7 +395,7 @@ char str[];
break;
default:
STY_SKIPLINE;
- STY_ERROR("No opening delimiter.\n", "");
+ STY_ERROR("No opening delimiter.\n");
return (FALSE);
}
return (TRUE); /* function value no longer used */
@@ -417,12 +417,12 @@ char *c;
switch (clone = GET_CHAR(sty_fp)) {
case CHR_DELIM:
STY_SKIPLINE;
- STY_ERROR("Premature closing delimiter.\n", "");
+ STY_ERROR("Premature closing delimiter.\n");
return (FALSE);
case LFD:
sty_lc++;
case EOF:
- STY_ERROR("No character (premature EOF).\n", "");
+ STY_ERROR("No character (premature EOF).\n");
return (FALSE);
case BSH:
clone = GET_CHAR(sty_fp);
@@ -431,7 +431,7 @@ char *c;
*c = (char) clone;
return (TRUE);
} else {
- STY_ERROR("No closing delimiter or too many letters.\n", "");
+ STY_ERROR("No closing delimiter or too many letters.\n");
return (FALSE);
}
}
@@ -441,7 +441,7 @@ char *c;
break;
default:
STY_SKIPLINE;
- STY_ERROR("No opening delimiter.\n", "");
+ STY_ERROR("No opening delimiter.\n");
return (FALSE);
}
return (TRUE); /* function value no longer used */
@@ -516,7 +516,7 @@ process_precedence(VOID_ARG)
break;
default:
STY_SKIPLINE;
- STY_ERROR("Unknow type `%c' in page precedence specification.\n",
+ STY_ERROR1("Unknow type `%c' in page precedence specification.\n",
page_prec[i]);
return (FALSE);
}
@@ -524,7 +524,7 @@ process_precedence(VOID_ARG)
}
if (page_prec[i] != NUL) {
STY_SKIPLINE;
- STY_ERROR("Page precedence specification string too long.\n", "");
+ STY_ERROR("Page precedence specification string too long.\n");
return (FALSE);
}
last = i;
diff --git a/Build/source/texk/makeindexk/scanst.h b/Build/source/texk/makeindexk/scanst.h
index 6b4eb135a64..017d6461d70 100644
--- a/Build/source/texk/makeindexk/scanst.h
+++ b/Build/source/texk/makeindexk/scanst.h
@@ -145,7 +145,19 @@
#define INDENTLEN_DEF 16
-#define STY_ERROR(F, D) { \
+#define STY_ERROR(F) { \
+ if (idx_dot) { \
+ fprintf(ilg_fp, "\n"); \
+ idx_dot = FALSE; \
+ } \
+ fprintf(ilg_fp, "** Input style error (file = %s, line = %d):\n -- ", \
+ sty_fn, sty_lc); \
+ fprintf(ilg_fp, F); \
+ sty_ec++; \
+ put_dot = FALSE; \
+}
+
+#define STY_ERROR1(F, D) { \
if (idx_dot) { \
fprintf(ilg_fp, "\n"); \
idx_dot = FALSE; \
diff --git a/Build/source/texk/makeindexk/sortid.c b/Build/source/texk/makeindexk/sortid.c
index db1f25609bd..c38ebcefb0f 100644
--- a/Build/source/texk/makeindexk/sortid.c
+++ b/Build/source/texk/makeindexk/sortid.c
@@ -48,7 +48,7 @@ sort_idx(VOID_ARG)
char *prev_locale;
#endif
- MESSAGE("Sorting entries...", "");
+ MESSAGE("Sorting entries...");
#ifdef HAVE_SETLOCALE
prev_locale = setlocale(LC_COLLATE, NULL);
setlocale(LC_COLLATE, "");
@@ -60,7 +60,7 @@ sort_idx(VOID_ARG)
#ifdef HAVE_SETLOCALE
setlocale(LC_COLLATE, prev_locale);
#endif
- MESSAGE("done (%ld comparisons).\n", idx_gc);
+ MESSAGE1("done (%ld comparisons).\n", idx_gc);
}
static int