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

Diff for /mandoc/Attic/mdoc_strings.c between version 1.12 and 1.13

version 1.12, 2009/10/27 08:26:12 version 1.13, 2009/11/02 06:22:46
Line 56  static const struct mdoc_secname secnames[SECNAME_MAX]
Line 56  static const struct mdoc_secname secnames[SECNAME_MAX]
         { "SECURITY CONSIDERATIONS", SEC_SECURITY }          { "SECURITY CONSIDERATIONS", SEC_SECURITY }
 };  };
   
 #ifdef __linux__  
 extern  char            *strptime(const char *, const char *, struct tm *);  
 #endif  
   
   
 int  int
 mdoc_iscdelim(char p)  mdoc_iscdelim(char p)
 {  {
Line 122  mdoc_atosec(const char *p)
Line 118  mdoc_atosec(const char *p)
                         return(secnames[i].sec);                          return(secnames[i].sec);
   
         return(SEC_CUSTOM);          return(SEC_CUSTOM);
 }  
   
   
 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);  
 }  }
   
   

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

CVSweb