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

Diff for /mandoc/Attic/macro.c between version 1.52 and 1.56

version 1.52, 2009/02/24 16:16:45 version 1.56, 2009/03/05 12:08:53
Line 31 
Line 31 
  * macro.   * macro.
  */   */
   
   /*
    * FIXME: don't use static mdoc_argv values, as they require us to do a
    * complicated copy-over when actually assigning them to dynamic memory.
    */
   
 #include "private.h"  #include "private.h"
   
 static int        macro_obsolete(MACRO_PROT_ARGS);  static int        macro_obsolete(MACRO_PROT_ARGS);
Line 750  macro_text(MACRO_PROT_ARGS)
Line 755  macro_text(MACRO_PROT_ARGS)
                 return(perr(mdoc, line, ppos, EARGVLIM));                  return(perr(mdoc, line, ppos, EARGVLIM));
         }          }
   
         c = mdoc_elem_alloc(mdoc, line, ppos, tok, argc, argv);          c = mdoc_elem_alloc(mdoc, line, ppos,
                           tok, (size_t)argc, argv);
   
         if (0 == c) {          if (0 == c) {
                 mdoc_argv_free(argc, argv);                  mdoc_argv_free(argc, argv);
Line 795  macro_text(MACRO_PROT_ARGS)
Line 801  macro_text(MACRO_PROT_ARGS)
                         return(0);                          return(0);
                 }                  }
   
                   /* FIXME: .Fl and .Ar handling of `|'. */
   
                 if (ARGS_QWORD != w && mdoc_isdelim(p)) {                  if (ARGS_QWORD != w && mdoc_isdelim(p)) {
                         if (0 == lastpunct && ! rewind_elem(mdoc, tok)) {                          if (0 == lastpunct && ! rewind_elem(mdoc, tok)) {
                                 mdoc_argv_free(argc, argv);                                  mdoc_argv_free(argc, argv);
Line 802  macro_text(MACRO_PROT_ARGS)
Line 810  macro_text(MACRO_PROT_ARGS)
                         }                          }
                         lastpunct = 1;                          lastpunct = 1;
                 } else if (lastpunct) {                  } else if (lastpunct) {
                         c = mdoc_elem_alloc(mdoc, line,                          c = mdoc_elem_alloc(mdoc, line, ppos,
                                         ppos, tok, argc, argv);                                          tok, (size_t)argc, argv);
                         if (0 == c) {                          if (0 == c) {
                                 mdoc_argv_free(argc, argv);                                  mdoc_argv_free(argc, argv);
                                 return(0);                                  return(0);
Line 921  macro_scoped(MACRO_PROT_ARGS)
Line 929  macro_scoped(MACRO_PROT_ARGS)
   
                 if (ARGS_ERROR == c)                  if (ARGS_ERROR == c)
                         return(0);                          return(0);
                 if (ARGS_PUNCT == c)  
                         break;  
                 if (ARGS_EOLN == c)                  if (ARGS_EOLN == c)
                         break;                          break;
   
                 if (ARGS_PHRASE == c) {                  if (ARGS_PHRASE == c) {
                         /*                          /*
                         if ( ! mdoc_phrase(mdoc, line, lastarg, buf))                          if ( ! mdoc_phrase(mdoc, line, lastarg, buf))
Line 952  macro_scoped(MACRO_PROT_ARGS)
Line 957  macro_scoped(MACRO_PROT_ARGS)
                 break;                  break;
         }          }
   
         if ( ! rewind_subblock(MDOC_HEAD, mdoc, tok, line, ppos))  
                 return(0);  
         if (1 == ppos && ! append_delims(mdoc, line, pos, buf))          if (1 == ppos && ! append_delims(mdoc, line, pos, buf))
                 return(0);                  return(0);
           if ( ! rewind_subblock(MDOC_HEAD, mdoc, tok, line, ppos))
                   return(0);
   
         if ( ! mdoc_body_alloc(mdoc, line, ppos, tok))          if ( ! mdoc_body_alloc(mdoc, line, ppos, tok))
                 return(0);                  return(0);
Line 1228  macro_constant_delimited(MACRO_PROT_ARGS)
Line 1233  macro_constant_delimited(MACRO_PROT_ARGS)
                 return(perr(mdoc, line, ppos, EARGVLIM));                  return(perr(mdoc, line, ppos, EARGVLIM));
         }          }
   
         c = mdoc_elem_alloc(mdoc, line, ppos, tok, argc, argv);          c = mdoc_elem_alloc(mdoc, line, ppos,
                           tok, (size_t)argc, argv);
   
         mdoc_argv_free(argc, argv);          mdoc_argv_free(argc, argv);
   
         if (0 == c)          if (0 == c)
Line 1319  macro_constant(MACRO_PROT_ARGS)
Line 1326  macro_constant(MACRO_PROT_ARGS)
                 return(perr(mdoc, line, ppos, EARGVLIM));                  return(perr(mdoc, line, ppos, EARGVLIM));
         }          }
   
         c = mdoc_elem_alloc(mdoc, line, ppos, tok, argc, argv);          c = mdoc_elem_alloc(mdoc, line, ppos,
                           tok, (size_t)argc, argv);
   
         mdoc_argv_free(argc, argv);          mdoc_argv_free(argc, argv);
   
         if (0 == c)          if (0 == c)

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.56

CVSweb