Problem: MAPGEN's mapdef program chokes when using 4.3 proj. This is caused by two problems: 1. new material created for the -V option has crept into the output of the -L option, BUT without lines with #'s. The loading procedure in mapdef will skip # lines, but ... . 2. creating the format for the coefficients was done with a dumb command that would work IF startup area contained a zero character. But, alas, although frequently the case, it cannot be guaranteed and can cause erroneous output. Solution: cd ?/PROJ.4/src patch #include --- 1,6 ---- /* print projection's list of parameters */ #ifndef lint ! static const char SCCSID[]="@(#)pj_pr_list.c 4.6 94/03/19 GIE REL"; #endif #include #include *************** *** 11,22 **** paralist *t; int l, n = 1, flag = 0; for (t = P->params; t; t = t->next) if ((!not_used && t->used) || (not_used && !t->used)) { l = strlen(t->param) + 1; if (n + l > LINE_LEN) { ! (void)putchar('\n'); ! n = 1; } (void)putchar(' '); if (*(t->param) != '+') --- 11,23 ---- paralist *t; int l, n = 1, flag = 0; + (void)putchar('#'); for (t = P->params; t; t = t->next) if ((!not_used && t->used) || (not_used && !t->used)) { l = strlen(t->param) + 1; if (n + l > LINE_LEN) { ! (void)fputs("\n#", stdout); ! n = 2; } (void)putchar(' '); if (*(t->param) != '+') *************** *** 25,38 **** n += l; } else flag = 1; ! (void)putchar('\n'); return flag; } void /* print link list of projection parameters */ pj_pr_list(PJ *P) { ! (void)puts(P->descr); if (pr_list(P, 0)) { ! (void)fputs("--- following specified but NOT used\n", stdout); (void)pr_list(P, 1); } } --- 26,48 ---- n += l; } else flag = 1; ! if (n > 1) ! (void)putchar('\n'); return flag; } void /* print link list of projection parameters */ pj_pr_list(PJ *P) { ! char const *s; ! ! (void)putchar('#'); ! for (s = P->descr; *s ; ++s) { ! (void)putchar(*s); ! if (*s == '\n') ! (void)putchar('#'); ! } ! (void)putchar('\n'); if (pr_list(P, 0)) { ! (void)fputs("#--- following specified but NOT used\n", stdout); (void)pr_list(P, 1); } } *** pr_series.c.orig Sat Mar 19 11:17:41 1994 --- pr_series.c Sat Mar 19 11:17:55 1994 *************** *** 1,6 **** /* print row coefficients of Tseries structure */ #ifndef lint ! static const char SCCSID[]="@(#)pr_series.c 4.4 93/11/14 GIE REL"; #endif #include #include --- 1,6 ---- /* print row coefficients of Tseries structure */ #ifndef lint ! static const char SCCSID[]="@(#)pr_series.c 4.5 94/03/19 GIE REL"; #endif #include #include *************** *** 13,19 **** char format[NF+1]; *format = ' '; ! strncat(format + 1, fmt, NF - 3); strcat(format, "%n"); fprintf(file, "u: %d\n", T->mu+1); for (i = 0; i <= T->mu; ++i) --- 13,19 ---- char format[NF+1]; *format = ' '; ! strncpy(format + 1, fmt, NF - 3); strcat(format, "%n"); fprintf(file, "u: %d\n", T->mu+1); for (i = 0; i <= T->mu; ++i)