[Developers] tpl2rem sensitive to dos/unix line endings
Arni Magnusson
arnima at hafro.is
Sat May 2 17:44:03 PDT 2009
I'm using ADMB 9.0.202 for GCC 4.2.4 on Linux64.
The tpl2cpp program is not sensitive to dos/unix line endings:
$ dos2unix simple.tpl; tpl2cpp simple # ok
$ unix2dos simple.tpl; tpl2cpp simple # ok
The tpl2rem program, on the other hand, is:
$ dos2unix simple.tpl; tpl2rem simple # ok
$ unix2dos simple.tpl; tpl2rem simple # Error in line 1 while reading
Robustness to dos/unix line endings is a major advantage, making it easier
for people to exchange TPL files without worrying about what operating
system the other people are using. I have more than once wondered why an
existing ADMB-RE model wouldn't compile, before realizing it had dos line
endings.
Since tpl2cpp can handle dos line endings, tpl2rem should be able to. It's
easy enough to search for "while reading" in remod11 and comment out the
exit(1) call, but that's probably not an acceptable patch.
Does anyone know how to make tpl2rem robust to dos/unix line endings? I've
also tried ADMB 9.0.202 for GCC 3.4.5 on Windows, and its tpl2rem handles
both dos and unix line endings without a problem.
Cheers,
Arni
More information about the Developers
mailing list