bk: 599fa455y5YqnFoC-aazMli9vIfrFg
+---
+* [Bug 3016] wrong error position reported for bad ":config pool"
+ - fixed location counter & ntpq output <perlinger@ntp.org>
+
---
(4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn <stenn@ntp.org>
(4.2.8p10)
stream->backch = EOF;
if (stream->fpi)
conf_file_sum += ch;
+ stream->curpos.ncol++;
} else if (stream->fpi) {
/* fetch next 7-bit ASCII char (or EOF) from file */
while ((ch = fgetc(stream->fpi)) != EOF && ch > SCHAR_MAX)
col = -1;
if (1 == sscanf(resp, "column %d syntax error", &col)
&& col >= 0 && (size_t)col <= strlen(cfgcmd) + 1) {
- if (interactive) {
- printf("______"); /* "ntpq> " */
- printf("________"); /* ":config " */
- } else
+ if (interactive)
+ fputs(" *", stdout); /* "ntpq> :config " */
+ else
printf("%s\n", cfgcmd);
- for (i = 1; i < col; i++)
- putchar('_');
- printf("^\n");
+ for (i = 0; i < col; i++)
+ fputc('_', stdout);
+ fputs("^\n", stdout);
}
printf("%s\n", resp);
free(resp);