[BACK]Return to mdoc.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc.c between version 1.138 and 1.143

version 1.138, 2010/05/25 12:37:20 version 1.143, 2010/05/31 15:50:48
Line 69  const char *const __mdoc_macronames[MDOC_MAX] = {   
Line 69  const char *const __mdoc_macronames[MDOC_MAX] = {   
         /* LINTED */          /* LINTED */
         "Dx",           "%Q",           "br",           "sp",          "Dx",           "%Q",           "br",           "sp",
         /* LINTED */          /* LINTED */
         "%U"          "%U",           "Ta"
         };          };
   
 const   char *const __mdoc_argnames[MDOC_ARG_MAX] = {  const   char *const __mdoc_argnames[MDOC_ARG_MAX] = {
Line 276  mdoc_macro(struct mdoc *m, enum mdoct tok, 
Line 276  mdoc_macro(struct mdoc *m, enum mdoct tok, 
                 if ( ! mdoc_pmsg(m, ln, pp, MANDOCERR_BADPROLOG))                  if ( ! mdoc_pmsg(m, ln, pp, MANDOCERR_BADPROLOG))
                         return(0);                          return(0);
                 if (NULL == m->meta.title)                  if (NULL == m->meta.title)
                         m->meta.title = mandoc_strdup("unknown");                          m->meta.title = mandoc_strdup("UNKNOWN");
                 if (NULL == m->meta.vol)                  if (NULL == m->meta.vol)
                         m->meta.vol = mandoc_strdup("local");                          m->meta.vol = mandoc_strdup("LOCAL");
                 if (NULL == m->meta.os)                  if (NULL == m->meta.os)
                         m->meta.os = mandoc_strdup("local");                          m->meta.os = mandoc_strdup("LOCAL");
                 if (0 == m->meta.date)                  if (0 == m->meta.date)
                         m->meta.date = time(NULL);                          m->meta.date = time(NULL);
                 m->flags |= MDOC_PBODY;                  m->flags |= MDOC_PBODY;
Line 542  mdoc_node_delete(struct mdoc *m, struct mdoc_node *p)
Line 542  mdoc_node_delete(struct mdoc *m, struct mdoc_node *p)
 static int  static int
 mdoc_ptext(struct mdoc *m, int line, char *buf, int offs)  mdoc_ptext(struct mdoc *m, int line, char *buf, int offs)
 {  {
         char            *c, *ws, *end;          char             *c, *ws, *end;
           struct mdoc_node *n;
   
         /* Ignore bogus comments. */          /* Ignore bogus comments. */
   
Line 556  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
Line 557  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
         if (SEC_NONE == m->lastnamed)          if (SEC_NONE == m->lastnamed)
                 return(mdoc_pmsg(m, line, offs, MANDOCERR_NOTEXT));                  return(mdoc_pmsg(m, line, offs, MANDOCERR_NOTEXT));
   
           assert(m->last);
           n = m->last;
   
         /*          /*
            * Diver directly into list processing if we're encountering a
            * columnar MDOC_BLOCK with or without a prior MDOC_BLOCK entry
            * (if it's a MDOC_BODY that means it's open, in which case we
            * should process within its context).
            */
   
           if (MDOC_Bl == n->tok && MDOC_BODY == n->type &&
                           LIST_column == n->data.list) {
                   m->flags |= MDOC_FREECOL;
                   return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));
           }
   
           if (MDOC_It == n->tok && MDOC_BLOCK == n->type &&
                           NULL != n->parent &&
                           MDOC_Bl == n->parent->tok &&
                           LIST_column == n->parent->data.list) {
                   m->flags |= MDOC_FREECOL;
                   return(mdoc_macro(m, MDOC_It, line, offs, &offs, buf));
           }
   
           /*
          * Search for the beginning of unescaped trailing whitespace (ws)           * Search for the beginning of unescaped trailing whitespace (ws)
          * and for the first character not to be output (end).           * and for the first character not to be output (end).
          */           */
   
           /* FIXME: replace with strcspn(). */
         ws = NULL;          ws = NULL;
         for (c = end = buf + offs; *c; c++) {          for (c = end = buf + offs; *c; c++) {
                 switch (*c) {                  switch (*c) {

Legend:
Removed from v.1.138  
changed lines
  Added in v.1.143

CVSweb