Commit Graph

10 Commits (5e37b623da281132c9d5040e3682b807b61afed4)

Author SHA1 Message Date
Baptiste Daroussin 0eb31f91ee fileio: Skip the whole line after a non quoted comment 2015-04-23 22:01:00 +02:00
William Pitcock 5dc8aa361b fileio: pkg_fgetline(): handle comments properly 2015-04-20 09:24:07 -05:00
Baptiste Daroussin cae8bf2684 Trim spaces after a quoted newline
if a newline has been quoted then trim all spaces (' ' and '\t') found
on the next line
2015-02-02 17:35:32 +01: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
Baptiste Daroussin 2d5dfe7d70 do not keep the quote information when set once 2012-08-14 11:06:04 +02:00
Baptiste Daroussin c6f6cb781d Keep the backslash if not followed by \n or \r\n when parsing 2012-08-14 11:00:53 +02:00
William Pitcock ee2e6054aa fileio: add support for quoting to pkg_fgetline(). 2012-07-30 01:54:02 -05:00
William Pitcock 0a5cb4c4ec everything: update copyright to note multiple authors 2012-07-25 21:09:31 -05:00
William Pitcock 1975a2981e everything: more friendly warranty disclaimer 2012-07-20 14:29:58 -05:00
William Pitcock 130907d506 fileio: add routine for portably yanking lines out of a FILE stream 2012-05-04 03:21:51 +00:00