arohl / gdis

A visualization program for the display, manipulation, and analysis of isolated molecules and periodic structures
GNU General Public License v2.0
43 stars 17 forks source link

EOF on ARM #3

Closed ovhpa closed 6 years ago

ovhpa commented 6 years ago

Hello,

On an ARMv7 machine (tegra2), gdis fails to detect EOF while loading help file (gdis.manual), which results in a infinite loop.

Replacing (c == EOF) by (feof(fp)) and (c != EOF) by (!feof(fp)) in the file_read_line function of file.c seems to be a workaround.

Sincerely,

PS: it’s really a pleasure to see gdis running nicely on this kind of small machine!

https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1120 https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1125 https://github.com/arohl/gdis/blob/9f192f51753ff1b6e6cdb4f5b63b83ded349571a/src/file.c#L1132

arohl commented 6 years ago

suggested fix implemented