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

Diff for /mandoc/Attic/action.c between version 1.27 and 1.29

version 1.27, 2009/02/28 21:50:01 version 1.29, 2009/03/05 12:08:53
Line 39  struct actions {
Line 39  struct actions {
 static  int      post_bl(struct mdoc *);  static  int      post_bl(struct mdoc *);
 static  int      post_bl_width(struct mdoc *);  static  int      post_bl_width(struct mdoc *);
 static  int      post_bl_tagwidth(struct mdoc *);  static  int      post_bl_tagwidth(struct mdoc *);
 static  int      post_sh(struct mdoc *);  
 static  int      post_os(struct mdoc *);  
 static  int      post_dt(struct mdoc *);  
 static  int      post_dd(struct mdoc *);  static  int      post_dd(struct mdoc *);
   static  int      post_dt(struct mdoc *);
   static  int      post_ex(struct mdoc *);
 static  int      post_nm(struct mdoc *);  static  int      post_nm(struct mdoc *);
   static  int      post_os(struct mdoc *);
   static  int      post_sh(struct mdoc *);
   
 static  int      post_prologue(struct mdoc *);  static  int      post_prologue(struct mdoc *);
   
Line 72  const struct actions mdoc_actions[MDOC_MAX] = {
Line 73  const struct actions mdoc_actions[MDOC_MAX] = {
         { NULL }, /* Dv */          { NULL }, /* Dv */
         { NULL }, /* Er */          { NULL }, /* Er */
         { NULL }, /* Ev */          { NULL }, /* Ev */
         { NULL }, /* Ex */          { post_ex }, /* Ex */
         { NULL }, /* Fa */          { NULL }, /* Fa */
         { NULL }, /* Fd */          { NULL }, /* Fd */
         { NULL }, /* Fl */          { NULL }, /* Fl */
Line 160  const struct actions mdoc_actions[MDOC_MAX] = {
Line 161  const struct actions mdoc_actions[MDOC_MAX] = {
   
   
 static int  static int
   post_ex(struct mdoc *mdoc)
   {
   
           /*
            * If `.Ex -std' is invoked without an argument, fill it in with
            * our name (if it's been set).
            */
   
           if (0 == mdoc->last->data.elem.argc)
                   return(1);
   
           assert(1 == mdoc->last->data.elem.argc);
           if (1 == mdoc->last->data.elem.argv[0].sz)
                   return(1);
           assert(0 == mdoc->last->data.elem.argv[0].sz);
   
           if (NULL == mdoc->meta.name)
                   return(mdoc_err(mdoc, "default name not yet set"));
   
           mdoc_msg(mdoc, "writing %s argument: %s",
                           mdoc_argnames[MDOC_Std], mdoc->meta.name);
   
           mdoc->last->data.elem.argv[0].sz = 1;
           mdoc->last->data.elem.argv[0].value = xcalloc(1, sizeof(char *));
           mdoc->last->data.elem.argv[0].value[0] = xstrdup(mdoc->meta.name);
           return(1);
   }
   
   
   static int
 post_nm(struct mdoc *mdoc)  post_nm(struct mdoc *mdoc)
 {  {
         char             buf[64];          char             buf[64];
Line 395  post_bl_width(struct mdoc *mdoc)
Line 426  post_bl_width(struct mdoc *mdoc)
          * the macro's width as set in share/tmac/mdoc/doc-common.           * the macro's width as set in share/tmac/mdoc/doc-common.
          */           */
   
         if (xstrcmp(*p, "Ds")) {          if (xstrcmp(*p, "Ds"))
                 if ( ! mdoc_warn(mdoc, WARN_COMPAT,  
                                         "%s argument deprecated",  
                                         mdoc_argnames[MDOC_Width]))  
                         return(0);  
                 width = 8;                  width = 8;
         } else if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))          else if (MDOC_MAX == (tok = mdoc_find(mdoc, *p)))
                 return(1);                  return(1);
         else if (0 == (width = mdoc_macro2len(tok)))          else if (0 == (width = mdoc_macro2len(tok)))
                 return(mdoc_warn(mdoc, WARN_SYNTAX,                  return(mdoc_warn(mdoc, WARN_SYNTAX,

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.29

CVSweb