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

Diff for /mandoc/Attic/mdoc_action.c between version 1.48 and 1.52

version 1.48, 2009/10/31 06:10:58 version 1.52, 2010/04/05 09:03:12
Line 14 
Line 14 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #ifdef HAVE_CONFIG_H
   #include "config.h"
   #endif
   
 #ifndef OSNAME  #ifndef OSNAME
 #include <sys/utsname.h>  #include <sys/utsname.h>
 #endif  #endif
Line 42  static int   concat(struct mdoc *, char *,
Line 46  static int   concat(struct mdoc *, char *,
                         const struct mdoc_node *, size_t);                          const struct mdoc_node *, size_t);
 static  inline int order_rs(int);  static  inline int order_rs(int);
   
 #ifdef __linux__  
 extern  size_t    strlcat(char *, const char *, size_t);  
 #endif  
   
 static  int       post_ar(POST_ARGS);  static  int       post_ar(POST_ARGS);
 static  int       post_at(POST_ARGS);  static  int       post_at(POST_ARGS);
 static  int       post_bl(POST_ARGS);  static  int       post_bl(POST_ARGS);
Line 420  post_sh(POST_ARGS)
Line 420  post_sh(POST_ARGS)
         if ( ! concat(m, buf, n->child, BUFSIZ))          if ( ! concat(m, buf, n->child, BUFSIZ))
                 return(0);                  return(0);
         sec = mdoc_atosec(buf);          sec = mdoc_atosec(buf);
         if (SEC_CUSTOM != sec)          /*
            * The first section should always make us move into a non-new
            * state.
            */
           if (SEC_NONE == m->lastnamed || SEC_CUSTOM != sec)
                 m->lastnamed = sec;                  m->lastnamed = sec;
   
         /* Some sections only live in certain manual sections. */          /* Some sections only live in certain manual sections. */
Line 647  static int
Line 651  static int
 post_bl_width(POST_ARGS)  post_bl_width(POST_ARGS)
 {  {
         size_t            width;          size_t            width;
         int               i, tok;          int               i;
           enum mdoct        tok;
         char              buf[NUMSIZ];          char              buf[NUMSIZ];
         char             *p;          char             *p;
   
Line 818  post_ar(POST_ARGS)
Line 823  post_ar(POST_ARGS)
   
   
 /*  /*
  * Parse the date field in `Dd', primarily through mdoc_atotime().   * Parse the date field in `Dd'.
  * FIXME: push mdoc_atotime() into here.  
  */   */
 static int  static int
 post_dd(POST_ARGS)  post_dd(POST_ARGS)
Line 829  post_dd(POST_ARGS)
Line 833  post_dd(POST_ARGS)
         if ( ! concat(m, buf, n->child, DATESIZ))          if ( ! concat(m, buf, n->child, DATESIZ))
                 return(0);                  return(0);
   
         m->meta.date = mdoc_atotime(buf);          m->meta.date = mandoc_a2time
                   (MTIME_MDOCDATE | MTIME_CANONICAL, buf);
   
         if (0 == m->meta.date) {          if (0 == m->meta.date) {
                 if ( ! mdoc_nwarn(m, n, EBADDATE))                  if ( ! mdoc_nwarn(m, n, EBADDATE))
                         return(0);                          return(0);

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

CVSweb