On Friday, March 02, 2012 02:50:03 pm Petr Mikulik wrote:
> Compiling of doc2ipf is broken:
>
> $ make doc2ipf
> doc2ipf.o: In function `process_line':
> /home/mikulik/work/Software/gnuplot/gnuplot/docs/doc2ipf.c:406: undefined
> reference to `int_error'
>
> It's strange because process_line() does not call directly int_error().
> Any idea how to fix this?
> (doc2ipf is required to generate the hypertext documentation for OS/2.)
#undef assert
Or just remove the line containing assert() altogether.
Or replace it with an error message + exit.
diff -urp gnuplot/docs/doc2ipf.c gnuplot-cvs/docs/doc2ipf.c
--- gnuplot/docs/doc2ipf.c 2008-02-25 01:05:16.000000000 -0800
+++ gnuplot-cvs/docs/doc2ipf.c 2012-03-02 15:05:38.000000000 -0800
@@ -401,7 +401,10 @@ process_line(char *line, FILE *b)
if (*pt != NUL) { /* ignore null columns */
char *tagend, *tagstart;
/* this fails on format line */
- assert(j < MAX_COL);
+ if (j >= MAX_COL) {
+ fprintf(stderr,"j >= MAX_COL\n");
+ exit(-1);
+ }
while (*pt==' ') pt++; /* strip spaces */
strcpy(tableins->col[j], " ");
strcat(tableins->col[j], pt);
|