fprintf(stderr, "Line %d: ", line);
vfprintf(stderr, msg, args);
fputc('\n', stderr);
+ fprintf(stderr, "Saving the email to default mailbox %s\n",
+ default_mailbox);
va_end(args);
- exit(1);
+ longjmp(env, 1);
}
char*
(c >= 'A' && c <= 'Z');
}
-int
-yylex(void)
+static int
+get_token_start(void)
{
int c;
-
- while ((c = getc(conf)) == ' ' || c == '\t' || c =='\n'){
- if (c == '\n')
+ int want_newline = 0;
+
+ for(;;) {
+ c = getc(conf);
+ if (c == EOF)
+ return c;
+ if (c == '#') {
+ want_newline = 1;
+ continue;
+ }
+ if (c == '\n') {
line++;
+ want_newline = 0;
+ continue;
+ }
+ if (c != '\n' && want_newline)
+ continue;
+ if (c != ' ' && c != '\t')
+ return c;
}
+}
+
+int
+yylex(void)
+{
+ int c;
+ c = get_token_start();
if (c == EOF)
return 0;