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

Diff for /mandoc/Attic/macro.c between version 1.38 and 1.40

version 1.38, 2009/01/16 11:50:54 version 1.40, 2009/01/17 16:15:27
Line 577  macro_text(MACRO_PROT_ARGS)
Line 577  macro_text(MACRO_PROT_ARGS)
                 return(mdoc_perr(mdoc, line, ppos, "too many arguments"));                  return(mdoc_perr(mdoc, line, ppos, "too many arguments"));
         }          }
   
         c = mdoc_elem_alloc(mdoc, line, la, tok, argc, argv);          c = mdoc_elem_alloc(mdoc, line, ppos, tok, argc, argv);
   
         if (0 == c) {          if (0 == c) {
                 mdoc_argv_free(argc, argv);                  mdoc_argv_free(argc, argv);
Line 629  macro_text(MACRO_PROT_ARGS)
Line 629  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,
                                         la, tok, argc, argv);                                          ppos, tok, argc, argv);
                         if (0 == c) {                          if (0 == c) {
                                 mdoc_argv_free(argc, argv);                                  mdoc_argv_free(argc, argv);
                                 return(0);                                  return(0);
Line 950  macro_constant_delimited(MACRO_PROT_ARGS)
Line 950  macro_constant_delimited(MACRO_PROT_ARGS)
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Ns):          case (MDOC_Ns):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
           case (MDOC_Pf):
                   /* FALLTHROUGH */
         case (MDOC_Ux):          case (MDOC_Ux):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_St):          case (MDOC_St):
Line 974  macro_constant_delimited(MACRO_PROT_ARGS)
Line 976  macro_constant_delimited(MACRO_PROT_ARGS)
                 return(0);                  return(0);
         }          }
   
         c = mdoc_elem_alloc(mdoc, line, lastarg, tok, argc, argv);          c = mdoc_elem_alloc(mdoc, line, ppos, tok, argc, argv);
         mdoc_argv_free(argc, argv);          mdoc_argv_free(argc, argv);
   
         if (0 == c)          if (0 == c)
Line 1044  macro_constant(MACRO_PROT_ARGS)
Line 1046  macro_constant(MACRO_PROT_ARGS)
         struct mdoc_arg  argv[MDOC_LINEARG_MAX];          struct mdoc_arg  argv[MDOC_LINEARG_MAX];
         char            *p;          char            *p;
   
         /* FIXME: parsing macros! */  
   
         fl = 0;          fl = 0;
         if (MDOC_QUOTABLE & mdoc_macros[tok].flags)          if (MDOC_QUOTABLE & mdoc_macros[tok].flags)
                 fl = ARGS_QUOTED;                  fl = ARGS_QUOTED;
Line 1083  macro_constant(MACRO_PROT_ARGS)
Line 1083  macro_constant(MACRO_PROT_ARGS)
                         return(0);                          return(0);
                 if (ARGS_EOLN == c)                  if (ARGS_EOLN == c)
                         break;                          break;
   
                   if (-1 == (c = lookup(mdoc, line, lastarg, tok, p)))
                           return(0);
                   else if (MDOC_MAX != c) {
                           if ( ! rewind_elem(mdoc, tok))
                                   return(0);
                           return(mdoc_macro(mdoc, c, line,
                                                   lastarg, pos, buf));
                   }
   
                 if ( ! mdoc_word_alloc(mdoc, line, lastarg, p))                  if ( ! mdoc_word_alloc(mdoc, line, lastarg, p))
                         return(0);                          return(0);

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.40

CVSweb