? .foo.1.swp ? config.h ? config.log ? foo.1 ? foo.1.html ? foo.1.pdf ? foo.1.ps ? foo.3 ? foo.pdf ? mandoc ? mdoc.7.ps.gz ? patch.txt ? regress/mandoc.core ? regress/output Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.35 diff -u -r1.35 TODO --- TODO 27 Jul 2010 08:46:30 -0000 1.35 +++ TODO 7 Aug 2010 17:30:07 -0000 @@ -63,6 +63,9 @@ - prohibit `Nm' from having non-text HEAD children (e.g., NetBSD mDNSShared/dns-sd.1) (mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified) + +- allow `Qq', `Dq', `Sq', `Aq', `Bq' to have 0 arguments + noted by Alex Kozlov 08/06/10 23:05 ************************************************************************ * formatting issues: ugly output Index: mdoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v retrieving revision 1.159 diff -u -r1.159 mdoc.c --- mdoc.c 18 Jul 2010 17:00:26 -0000 1.159 +++ mdoc.c 7 Aug 2010 17:30:07 -0000 @@ -764,11 +764,11 @@ i = offs; - /* Accept whitespace after the initial control char. */ + /* Accept tabs/whitespace after the initial control char. */ - if (' ' == buf[i]) { + if (' ' == buf[i] || '\t' == buf[i]) { i++; - while (buf[i] && ' ' == buf[i]) + while (buf[i] && (' ' == buf[i] || '\t' == buf[i])) i++; if ('\0' == buf[i]) return(1); @@ -776,15 +776,19 @@ sv = i; - /* Copy the first word into a nil-terminated buffer. */ + /* + * Copy the first word into a nil-terminated buffer. Stop + * copying when a tab, space, or eoln is encountered. + */ for (j = 0; j < 4; j++, i++) { if ('\0' == (mac[j] = buf[i])) break; - else if (' ' == buf[i]) + else if (' ' == buf[i] || '\t' == buf[i]) break; /* Check for invalid characters. */ + /* TODO: remove me, already done in main.c. */ if (isgraph((u_char)buf[i])) continue; @@ -807,7 +811,12 @@ return(1); } - /* The macro is sane. Jump to the next word. */ + /* Disregard the first trailing tab, if applicable. */ + + if ('\t' == buf[i]) + i++; + + /* Jump to the next non-whitespace word. */ while (buf[i] && ' ' == buf[i]) i++;