--- ray/src/cal/total.c 2014/03/09 20:07:27 1.9 +++ ray/src/cal/total.c 2014/03/25 05:36:22 1.10 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: total.c,v 1.9 2014/03/09 20:07:27 greg Exp $"; +static const char RCSid[] = "$Id: total.c,v 1.10 2014/03/25 05:36:22 greg Exp $"; #endif /* * total.c - program to reduce columns of data. @@ -213,8 +213,10 @@ putrecord( /* write out results record */ return; } /* ASCII output */ - while (n-- > 0) - fprintf(fp, "%.9g%c", *field++, tabc); + while (n-- > 0) { + fprintf(fp, "%.9g", *field++); + if (n) fputc(tabc, fp); + } fputc('\n', fp); }