help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] glpk 4.26 release information


From: glpk xypron
Subject: Re: [Help-glpk] glpk 4.26 release information
Date: Sun, 17 Feb 2008 15:49:37 +0100

Hello Andrew!

RFC 4180 explicitly defines that the line separator in CSV files is CRLF (0x0d, 
0x0a). Please, add the missing CR for table output.

Best regards

Xypron

--- glpk/glpk/trunk/glpk-4.26/src/glpmpl05.c    2008/02/17 10:43:57     65
+++ glpk/glpk/trunk/glpk-4.26/src/glpmpl05.c    2008/02/17 14:44:30     67
@@ -265,8 +265,8 @@
          /* write field names */
          nf = mpl_tab_num_flds(dca);
          for (k = 1; k <= nf; k++)
-            fprintf(csv->fp, "%s%c", mpl_tab_get_name(dca, k),
-               k < nf ? ',' : '\n');
+            fprintf(csv->fp, "%s%s", mpl_tab_get_name(dca, k),
+               k < nf ? "," : "\r\n");
          csv->count++;
       }
       else
@@ -362,7 +362,7 @@
             default:
                xassert(dca != dca);
          }
-         fputc(k < nf ? ',' : '\n', csv->fp);
+         fprintf(csv->fp, "%s", k < nf ? "," : "\r\n");
       }
       csv->count++;
       if (ferror(csv->fp))
-- 
Psst! Geheimtipp: Online Games kostenlos spielen bei den GMX Free Games! 
http://games.entertainment.web.de/de/entertainment/games/free




reply via email to

[Prev in Thread] Current Thread [Next in Thread]