[BACK]Return to mdoc_strings.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/Attic/mdoc_strings.c between version 1.11 and 1.12

version 1.11, 2009/12/22 23:58:00 version 1.12, 2009/12/23 22:30:17
Line 121 
Line 121 
 }  }
   
   
 time_t  
 mdoc_atotime(const char *p)  
 {  
         struct tm        tm;  
         char            *pp;  
   
         memset(&tm, 0, sizeof(struct tm));  
   
         if (0 == strcmp(p, "$" "Mdocdate$"))  
                 return(time(NULL));  
         if ((pp = strptime(p, "$" "Mdocdate: %b %d %Y $", &tm)) && 0 == *pp)  
                 return(mktime(&tm));  
         /* XXX - this matches "June 1999", which is wrong. */  
         if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp)  
                 return(mktime(&tm));  
         if ((pp = strptime(p, "%b %d, %Y", &tm)) && 0 == *pp)  
                 return(mktime(&tm));  
   
         return(0);  
 }  
   
   
 /* FIXME: move this into an editable .in file. */  /* FIXME: move this into an editable .in file. */
 size_t  size_t
 mdoc_macro2len(int macro)  mdoc_macro2len(int macro)

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12