From: Arjen M. <arj...@de...> - 2011-06-06 07:33:17
|
Hi Alan, when I developed this patch, based on the first patch by Thorsten, I tested it with .pal files I had edited: - Windows format (carriage-return-line-feed endings) - Trailing blanks and a very long line with text beyond the 30th column - Invalid hex numbers - Even files without an end-of-line marker for the last line (on Windows this is pitifully common, it seems the end-of-line marker is regarded as a line-separator) With all these variations the reading routines did their work fine. I will not claim that all possible issues have been solved with this code, but the routines appear quite robust. Regards, Arjen PS On Windows the C runtime library is supposed to convert \r\n in a file to \n in the string. A problem might appear on Linux, where this is not the case, but that ought to be taken care of now. On 2011-06-01 23:02, Alan W. Irwin wrote: > On 2011-05-31 16:46+0200 Arjen Markus wrote: > >> Hi Thorsten, >> >> I implemented the patch (with a bit more code to make it robust >> against a variety of issues), with this patch line endings are >> no longer a problem for the palette files. > > Thanks to both of you for dealing with this issue. I have changed the > svn properties of *.pal files (svn revision 11761) to native (i.e., > checked out *.pal files will have Unix line endings on Linux, but > Windows line endings on Windows). Revision 11761 works fine on Linux. > From Arjen's previous tests revision 11761 should also work on > Windows, but will you both confirm that? Of course, for our next > release if somebody unpacks the tarball with Windows line endings that > should also work, which takes care of the original issue. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state implementation > for stellar interiors (freeeos.sf.net); PLplot scientific plotting software > package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of > Linux Links project (loll.sf.net); and the Linux Brochure Project > (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ > DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. |