The attached program and gzipped .txt files demonstrate a bug in GPC
20030507 compiled for Mac OS X. The EoLn(f) function does not recognize
Macintosh line endings (character code decimal 13), only UNIX (decimal 10)
line endings. Ideally, the EoLn behavior would recognize multiple possible
line endings (including DOS CRLF), or at least be configurable at run-time.
Running the macosx_eoln.pas on a Macintosh will result in the following
output:
file mac_eoln.txt had 0 lines.
file unix_eoln.txt had 3 lines.
Please be careful to preserve the line endings of the .txt.gz files in order
to make the test a valid one. File transfer programs will often change the
line endings of files believed to contain text, invalidating the test.
gpc -v returns
Reading specs from
/Developer/Pascal/gpc33d6/lib/gcc-lib/powerpc-apple-darwin/3.3/specs
Configured with: ../gpc-3.3d6/configure --enable-languages=pascal,c
--enable-threads=posix --prefix=/Developer/Pascal/gpc33d6
--target=powerpc-apple-darwin
Thread model: posix
gpc version 20030507, based on gcc-3.3
Thank you for your help.
--Joe oswald