Support .pc file without a trailing newline #70
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "support-non-newline-terminated-pc-file"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
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).This happens with
cppunit.pc
from the CppUnit project.Merged thank you
Pull request closed