Notes |
(0002614)
vda
07-21-07 07:34
|
Scary. Will this work too?
while (c = *p) {
if (c == '#') { *p = '\0'; break; }
if (c == '"' || c == '\'') {
while (1) {
c2 = *++p;
if (!c2) goto break2;
if (c2 == c) break;
if (c2 == '\\' && *p) p++;
}
}
p++;
}
break2: |
| |
(0002621)
mirabilos
07-21-07 09:06
|
I don't think so, because the different kinds of quoting
require different handling. |
| |
(0002624)
vda
07-21-07 16:19
|
Can we PLEASE discuss patches on the mailing list?
What are quoting rules for /etc/network/interfaces? |
| |
(0002628)
mirabilos
07-23-07 03:02
|
About formal rules: I think you'd have to ask the Debian people,
or whoever defined the file format for /etc/network/interfaces.
I don't know, I'm just guessing, and from a shell programmer's
point of view, single quotes and double quotes behave quite dif-
ferently.
If it's just the goto that offends you, I can rewrite the code
to not use one. But you need some kind of state machine here.
About the mailing list: feel free to make up a thread and Cc:
me, I'm not subscribed to any mailing list here. |
| |
(0005094)
vda
02-18-08 13:13
|
I believe current svn's handling is correct:
# _in first position only_ starts a comment,
empty lines are ignored,
'\' in last position concatenates lines (needs CONFIG_DESKTOP)
This should be compatible with "standard" tools. |
| |