char devnam[MAXPATHLEN]; /* Device name */
bool nodetach = 0; /* Don't detach from controlling tty */
bool updetach = 0; /* Detach once link is up */
+bool master_detach; /* Detach when we're (only) multilink master */
int maxconnect = 0; /* Maximum connect time */
char user[MAXNAMELEN]; /* Username for PAP */
char passwd[MAXSECRETLEN]; /* Password for PAP */
"Detach from controlling tty once link is up",
OPT_PRIOSUB | OPT_A2CLR | 1, &nodetach },
+ { "master_detach", o_bool, &master_detach,
+ "Detach when we're multilink master but have no link", 1 },
+
{ "holdoff", o_int, &holdoff,
"Set time in seconds before retrying connection",
OPT_PRIO, &holdoff_specified },
len = 0;
escape = 0;
comment = 0;
+ quoted = 0;
/*
* First skip white-space and comments.
break;
}
- /*
- * Save the delimiter for quoted strings.
- */
- if (!escape && (c == '"' || c == '\'')) {
- quoted = c;
- c = getc(f);
- } else
- quoted = 0;
-
/*
* Process characters until the end of the word.
*/
if (!got)
c = getc(f);
continue;
-
}
/*
- * Not escaped: see if we've reached the end of the word.
+ * Backslash starts a new escape sequence.
*/
- if (quoted) {
- if (c == quoted)
- break;
- } else {
- if (isspace(c) || c == '#') {
- ungetc (c, f);
- break;
- }
+ if (c == '\\') {
+ escape = 1;
+ c = getc(f);
+ continue;
}
/*
- * Backslash starts an escape sequence.
+ * Not escaped: check for the start or end of a quoted
+ * section and see if we've reached the end of the word.
*/
- if (c == '\\') {
- escape = 1;
+ if (quoted) {
+ if (c == quoted) {
+ quoted = 0;
+ c = getc(f);
+ continue;
+ }
+ } else if (c == '"' || c == '\'') {
+ quoted = c;
c = getc(f);
continue;
+ } else if (isspace(c) || c == '#') {
+ ungetc (c, f);
+ break;
}
/*
*/
if (len == 0)
return 0;
+ if (quoted)
+ option_error("warning: quoted word runs to end of file (%.20s...)",
+ filename, word);
}
/*