forked from Lainports/freebsd-ports
Add a patch to stream spaces after quoted newlines
This fix .pc files with multi line fields
This commit is contained in:
parent
cd8c93613e
commit
6e16aa8e9b
2 changed files with 30 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
PORTNAME= pkgconf
|
||||
PORTVERSION= 0.9.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://rabbit.dereferenced.org/~nenolod/distfiles/ \
|
||||
http://files.etoilebsd.net/pkgconf/
|
||||
|
|
|
|||
29
devel/pkgconf/files/patch-fileio.c
Normal file
29
devel/pkgconf/files/patch-fileio.c
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff --git fileio.c fileio.c
|
||||
index fed3da9..2e15833 100644
|
||||
--- fileio.c
|
||||
+++ fileio.c
|
||||
@@ -37,13 +37,22 @@ pkg_fgetline(char *line, size_t size, FILE *stream)
|
||||
|
||||
else if (c == '\n')
|
||||
{
|
||||
- *s++ = c;
|
||||
-
|
||||
if (quoted)
|
||||
{
|
||||
+ /* Trim spaces */
|
||||
+ do {
|
||||
+ c2 = getc(stream);
|
||||
+ } while (c2 == '\t' || c2 == ' ');
|
||||
+
|
||||
+ ungetc(c2, stream);
|
||||
+
|
||||
quoted = false;
|
||||
continue;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ *s++ = c;
|
||||
+ }
|
||||
|
||||
break;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue