Commit Graph

2 Commits (b602e331418f0af3f6cbbf9abf1d47f9f5b2f7a5)

Author SHA1 Message Date
William Pitcock d67a04011f testsuite: use /test as an explicit prefix on all tests 2015-07-20 03:10:27 -05:00
Jean-Sébastien Pédron bff5f15d0a Support .pc file without a trailing newline
Some editors write text files without a newline character at the end of
the last line.

Before this change, the main loop in pkg_new_from_file() expected a
newline character at the end of the line and overwrote it with a NUL
character. In the case of the last line in a non-newline-terminated
file, this ate the last character of that line.

Now, the pkg_fgetline() function takes care of returning a line without
the newline character (or the "\r\n" sequence in case of a DOS file
format).
2014-08-02 14:07:25 +02:00