patch-src_netrc.c - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
patch-src_netrc.c
---
1 $NetBSD$
2
3 Handle `'' and `"' like any other characters not as quotes.
4
5 --- src/netrc.c.orig 2018-12-12 22:49:10.000000000 +0000
6 +++ src/netrc.c
7 @@ -130,7 +130,6 @@ parse_netrc (const char *file)
8 /* If we are defining macros, then skip parsing the line. */
9 while (*p && last_token != tok_macdef)
10 {
11 - char quote_char = 0;
12 char *pp;
13
14 /* Skip any whitespace. */
15 @@ -144,33 +143,11 @@ parse_netrc (const char *file)
16 tok = pp = p;
17
18 /* Find the end of the token. */
19 - while (*p && (quote_char || !isspace ((unsigned char)*p)))
20 + while (*p && !isspace ((unsigned char)*p))
21 {
22 - if (quote_char)
23 - {
24 - if (quote_char == *p)
25 - {
26 - quote_char = 0;
27 - p ++;
28 - }
29 - else
30 - {
31 - *pp = *p;
32 - p ++;
33 - pp ++;
34 - }
35 - }
36 - else
37 - {
38 - if (*p == '"' || *p == '\'')
39 - quote_char = *p;
40 - else
41 - {
42 - *pp = *p;
43 - pp ++;
44 - }
45 - p ++;
46 - }
47 + *pp = *p;
48 + pp ++;
49 + p ++;
50 }
51 /* Null-terminate the token, if it isn't already. */
52 if (*p)