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

Diff for /mandoc/Attic/man_action.c between version 1.29 and 1.32

version 1.29, 2010/03/24 20:10:53 version 1.32, 2010/05/15 16:27:23
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>   * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 124  post_de(struct man *m)
Line 124  post_de(struct man *m)
          */           */
         if (MAN_BLOCK == m->last->type)          if (MAN_BLOCK == m->last->type)
                 man_node_delete(m, m->last);                  man_node_delete(m, m->last);
   
         return(1);          return(1);
 }  }
   
Line 145  static int
Line 144  static int
 post_TH(struct man *m)  post_TH(struct man *m)
 {  {
         struct man_node *n;          struct man_node *n;
         char            *ep;  
         long             lval;  
   
         if (m->meta.title)          if (m->meta.title)
                 free(m->meta.title);                  free(m->meta.title);
Line 154  post_TH(struct man *m)
Line 151  post_TH(struct man *m)
                 free(m->meta.vol);                  free(m->meta.vol);
         if (m->meta.source)          if (m->meta.source)
                 free(m->meta.source);                  free(m->meta.source);
           if (m->meta.msec)
                   free(m->meta.msec);
   
         m->meta.title = m->meta.vol = m->meta.source = NULL;          m->meta.title = m->meta.vol =
         m->meta.msec = 0;                  m->meta.msec = m->meta.source = NULL;
         m->meta.date = 0;          m->meta.date = 0;
   
         /* ->TITLE<- MSEC DATE SOURCE VOL */          /* ->TITLE<- MSEC DATE SOURCE VOL */
Line 169  post_TH(struct man *m)
Line 168  post_TH(struct man *m)
   
         n = n->next;          n = n->next;
         assert(n);          assert(n);
           m->meta.msec = mandoc_strdup(n->string);
   
         lval = strtol(n->string, &ep, 10);  
         if (n->string[0] != '\0' && *ep == '\0')  
                 m->meta.msec = (int)lval;  
         else if ( ! man_nwarn(m, n, WMSEC))  
                 return(0);  
   
         /* TITLE MSEC ->DATE<- SOURCE VOL */          /* TITLE MSEC ->DATE<- SOURCE VOL */
   
         n = n->next;          n = n->next;
         if (n) {          if (n) {
                 m->meta.date = mandoc_a2time                  m->meta.date = mandoc_a2time
                         (MTIME_ISO_8601, n->string);                          (MTIME_ISO_8601, n->string);
   
                 if (0 == m->meta.date) {                  if (0 == m->meta.date) {
                         if ( ! man_nwarn(m, n, WDATE))                          if ( ! man_nwarn(m, n, WDATE))
                                 return(0);                                  return(0);

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

CVSweb