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

Diff for /mandoc/man_validate.c between version 1.148 and 1.150

version 1.148, 2019/03/13 18:29:18 version 1.150, 2020/01/19 16:44:50
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010, 2012-2020 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * 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 185  check_root(CHKARGS)
Line 185  check_root(CHKARGS)
   
                 man->meta.title = mandoc_strdup("");                  man->meta.title = mandoc_strdup("");
                 man->meta.msec = mandoc_strdup("");                  man->meta.msec = mandoc_strdup("");
                 man->meta.date = man->quick ? mandoc_strdup("") :                  man->meta.date = mandoc_normdate(NULL, NULL);
                     mandoc_normdate(man, NULL, n->line, n->pos);  
         }          }
   
         if (man->meta.os_e &&          if (man->meta.os_e &&
Line 369  post_TH(CHKARGS)
Line 368  post_TH(CHKARGS)
         /* ->TITLE<- MSEC DATE OS VOL */          /* ->TITLE<- MSEC DATE OS VOL */
   
         n = n->child;          n = n->child;
         if (n && n->string) {          if (n != NULL && n->string != NULL) {
                 for (p = n->string; '\0' != *p; p++) {                  for (p = n->string; *p != '\0'; p++) {
                         /* Only warn about this once... */                          /* Only warn about this once... */
                         if (isalpha((unsigned char)*p) &&                          if (isalpha((unsigned char)*p) &&
                             ! isupper((unsigned char)*p)) {                              ! isupper((unsigned char)*p)) {
Line 388  post_TH(CHKARGS)
Line 387  post_TH(CHKARGS)
   
         /* TITLE ->MSEC<- DATE OS VOL */          /* TITLE ->MSEC<- DATE OS VOL */
   
         if (n)          if (n != NULL)
                 n = n->next;                  n = n->next;
         if (n && n->string)          if (n != NULL && n->string != NULL)
                 man->meta.msec = mandoc_strdup(n->string);                  man->meta.msec = mandoc_strdup(n->string);
         else {          else {
                 man->meta.msec = mandoc_strdup("");                  man->meta.msec = mandoc_strdup("");
Line 400  post_TH(CHKARGS)
Line 399  post_TH(CHKARGS)
   
         /* TITLE MSEC ->DATE<- OS VOL */          /* TITLE MSEC ->DATE<- OS VOL */
   
         if (n)          if (n != NULL)
                 n = n->next;                  n = n->next;
         if (n && n->string && '\0' != n->string[0]) {          if (man->quick && n != NULL)
                 man->meta.date = man->quick ?  
                     mandoc_strdup(n->string) :  
                     mandoc_normdate(man, n->string, n->line, n->pos);  
         } else {  
                 man->meta.date = mandoc_strdup("");                  man->meta.date = mandoc_strdup("");
                 mandoc_msg(MANDOCERR_DATE_MISSING,          else
                     n ? n->line : nb->line,                  man->meta.date = mandoc_normdate(n, nb);
                     n ? n->pos : nb->pos, "TH");  
         }  
   
         /* TITLE MSEC DATE ->OS<- VOL */          /* TITLE MSEC DATE ->OS<- VOL */
   

Legend:
Removed from v.1.148  
changed lines
  Added in v.1.150

CVSweb