version 1.35, 2009/09/16 20:49:06 |
version 1.39, 2010/01/01 13:17:58 |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
|
#include <time.h> |
|
|
#include "libmdoc.h" |
#include "libmdoc.h" |
|
|
Line 174 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
Line 175 const struct mdoc_macro __mdoc_macros[MDOC_MAX] = { |
|
{ in_line_eoln, 0 }, /* %Q */ |
{ in_line_eoln, 0 }, /* %Q */ |
{ in_line_eoln, 0 }, /* br */ |
{ in_line_eoln, 0 }, /* br */ |
{ in_line_eoln, 0 }, /* sp */ |
{ in_line_eoln, 0 }, /* sp */ |
|
{ in_line_eoln, 0 }, /* %U */ |
}; |
}; |
|
|
const struct mdoc_macro * const mdoc_macros = __mdoc_macros; |
const struct mdoc_macro * const mdoc_macros = __mdoc_macros; |
Line 260 mdoc_macroend(struct mdoc *m) |
|
Line 262 mdoc_macroend(struct mdoc *m) |
|
static int |
static int |
lookup(int from, const char *p) |
lookup(int from, const char *p) |
{ |
{ |
|
/* FIXME: make -diag lists be un-PARSED. */ |
|
|
if ( ! (MDOC_PARSED & mdoc_macros[from].flags)) |
if ( ! (MDOC_PARSED & mdoc_macros[from].flags)) |
return(MDOC_MAX); |
return(MDOC_MAX); |
Line 805 in_line(MACRO_PROT_ARGS) |
|
Line 808 in_line(MACRO_PROT_ARGS) |
|
cnt++; |
cnt++; |
if ( ! mdoc_word_alloc(m, line, la, p)) |
if ( ! mdoc_word_alloc(m, line, la, p)) |
return(0); |
return(0); |
|
|
|
/* |
|
* `Fl' macros have their scope re-opened with each new |
|
* word so that the `-' can be added to each one without |
|
* having to parse out spaces. |
|
*/ |
|
if (0 == lastpunct && MDOC_Fl == tok) { |
|
if ( ! rew_elem(m, tok)) |
|
return(0); |
|
lastpunct = 1; |
|
} |
} |
} |
|
|
if (0 == lastpunct && ! rew_elem(m, tok)) |
if (0 == lastpunct && ! rew_elem(m, tok)) |