-/* $Id: mdoc.c,v 1.59 2009/03/09 13:35:09 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.63 2009/03/12 15:55:11 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
"Fo", "Fc", "Oo", "Oc",
"Bk", "Ek", "Bt", "Hf",
"Fr", "Ud", "Lb", "Ap",
- "Lp"
+ "Lp", "Lk", "Mt", "Brq",
+ "Bro", "Brc"
};
const char *const __mdoc_argnames[MDOC_ARG_MAX] = {
int i, c;
char mac[5];
- /* Comments are quickly ignored. */
+ /* Comments and empties are quickly ignored. */
+
+ if (0 == buf[1])
+ return(1);
+
+ if (isspace((unsigned char)buf[1])) {
+ i = 2;
+ while (buf[i] && isspace((unsigned char)buf[i]))
+ i++;
+ if (0 == buf[i])
+ return(1);
+ return(mdoc_perr(m, ln, 1, "invalid syntax"));
+ }
if (buf[1] && '\\' == buf[1])
if (buf[2] && '\"' == buf[2])
break;
}
- /* FIXME: be able to skip unknown macro lines! */
-
mac[i - 1] = 0;
if (i == 5 || i <= 2) {