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

Diff for /mandoc/Attic/action.c between version 1.34 and 1.42

version 1.34, 2009/03/08 12:40:27 version 1.42, 2009/03/16 22:19:19
Line 23 
Line 23 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <time.h>  
   
 #include "private.h"  #include "private.h"
   
Line 60  static int  post_dt(struct mdoc *);
Line 59  static int  post_dt(struct mdoc *);
 static  int      post_nm(struct mdoc *);  static  int      post_nm(struct mdoc *);
 static  int      post_os(struct mdoc *);  static  int      post_os(struct mdoc *);
 static  int      post_sh(struct mdoc *);  static  int      post_sh(struct mdoc *);
 static  int      post_ex(struct mdoc *);  static  int      post_std(struct mdoc *);
 static  int      post_prologue(struct mdoc *);  static  int      post_prologue(struct mdoc *);
   
   #define merr(m, t) nerr((m), (m)->last, (t))
   #define mwarn(m, t) nwarn((m), (m)->last, (t))
   
 const   struct actions mdoc_actions[MDOC_MAX] = {  const   struct actions mdoc_actions[MDOC_MAX] = {
         { NULL }, /* \" */          { NULL }, /* \" */
         { post_dd }, /* Dd */          { post_dd }, /* Dd */
Line 86  const struct actions mdoc_actions[MDOC_MAX] = {
Line 88  const struct actions mdoc_actions[MDOC_MAX] = {
         { NULL }, /* Dv */          { NULL }, /* Dv */
         { NULL }, /* Er */          { NULL }, /* Er */
         { NULL }, /* Ev */          { NULL }, /* Ev */
         { post_ex }, /* Ex */          { post_std }, /* Ex */
         { NULL }, /* Fa */          { NULL }, /* Fa */
         { NULL }, /* Fd */          { NULL }, /* Fd */
         { NULL }, /* Fl */          { NULL }, /* Fl */
Line 100  const struct actions mdoc_actions[MDOC_MAX] = {
Line 102  const struct actions mdoc_actions[MDOC_MAX] = {
         { NULL }, /* Op */          { NULL }, /* Op */
         { NULL }, /* Ot */          { NULL }, /* Ot */
         { NULL }, /* Pa */          { NULL }, /* Pa */
         { NULL }, /* Rv */          { post_std }, /* Rv */
         { NULL }, /* St */          { NULL }, /* St */
         { NULL }, /* Va */          { NULL }, /* Va */
         { NULL }, /* Vt */          { NULL }, /* Vt */
Line 171  const struct actions mdoc_actions[MDOC_MAX] = {
Line 173  const struct actions mdoc_actions[MDOC_MAX] = {
         { NULL }, /* Fr */          { NULL }, /* Fr */
         { NULL }, /* Ud */          { NULL }, /* Ud */
         { NULL }, /* Lb */          { NULL }, /* Lb */
           { NULL }, /* Ap */
           { NULL }, /* Lp */
           { NULL }, /* Lk */
           { NULL }, /* Mt */
           { NULL }, /* Brq */
           { NULL }, /* Bro */
           { NULL }, /* Brc */
           { NULL }, /* %C */
           { NULL }, /* Es */
           { NULL }, /* En */
 };  };
   
   
 #define merr(m, t) nerr((m), (m)->last, (t))  
 static int  static int
 nerr(struct mdoc *m, const struct mdoc_node *n, enum merr type)  nerr(struct mdoc *m, const struct mdoc_node *n, enum merr type)
 {  {
Line 193  nerr(struct mdoc *m, const struct mdoc_node *n, enum m
Line 204  nerr(struct mdoc *m, const struct mdoc_node *n, enum m
 }  }
   
   
 #define mwarn(m, t) nwarn((m), (m)->last, (t))  
 static int  static int
 nwarn(struct mdoc *m, const struct mdoc_node *n, enum mwarn type)  nwarn(struct mdoc *m, const struct mdoc_node *n, enum mwarn type)
 {  {
Line 222  nwarn(struct mdoc *m, const struct mdoc_node *n, enum 
Line 232  nwarn(struct mdoc *m, const struct mdoc_node *n, enum 
   
   
 static int  static int
 post_ex(struct mdoc *mdoc)  post_std(struct mdoc *mdoc)
 {  {
   
         /*          /*
          * If `.Ex -std' is invoked without an argument, fill it in with           * If '-std' is invoked without an argument, fill it in with our
          * our name (if it's been set).           * name (if it's been set).
          */           */
   
         if (NULL == mdoc->last->args)          if (NULL == mdoc->last->args)
Line 241  post_ex(struct mdoc *mdoc)
Line 251  post_ex(struct mdoc *mdoc)
                         mdoc_argnames[MDOC_Std],                          mdoc_argnames[MDOC_Std],
                         mdoc->meta.name);                          mdoc->meta.name);
   
         assert(1 == mdoc->last->args->argv[0].sz);  
   
         mdoc->last->args->argv[0].sz = 1;  
         mdoc->last->args->argv[0].value = xcalloc(1, sizeof(char *));          mdoc->last->args->argv[0].value = xcalloc(1, sizeof(char *));
           mdoc->last->args->argv[0].sz = 1;
         mdoc->last->args->argv[0].value[0] = xstrdup(mdoc->meta.name);          mdoc->last->args->argv[0].value[0] = xstrdup(mdoc->meta.name);
         return(1);          return(1);
 }  }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.42

CVSweb