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

Diff for /mandoc/Attic/strings.c between version 1.4 and 1.6

version 1.4, 2008/12/29 18:08:44 version 1.6, 2009/01/14 11:58:24
Line 133  mdoc_atotime(const char *p)
Line 133  mdoc_atotime(const char *p)
 {  {
         struct tm        tm;          struct tm        tm;
   
           (void)memset(&tm, 0, sizeof(struct tm));
   
         if (strptime(p, "%b %d %Y", &tm))          if (strptime(p, "%b %d %Y", &tm))
                 return(mktime(&tm));                  return(mktime(&tm));
         if (strptime(p, "%b %d, %Y", &tm))          if (strptime(p, "%b %d, %Y", &tm))
Line 304  mdoc_atoatt(const char *p)
Line 306  mdoc_atoatt(const char *p)
                 return(ATT_V4);                  return(ATT_V4);
   
         return(ATT_DEFAULT);          return(ATT_DEFAULT);
   }
   
   
   char *
   mdoc_type2a(enum mdoc_type type)
   {
           switch (type) {
           case (MDOC_ROOT):
                   return("root");
           case (MDOC_BLOCK):
                   return("block");
           case (MDOC_HEAD):
                   return("block-head");
           case (MDOC_BODY):
                   return("block-body");
           case (MDOC_TAIL):
                   return("block-tail");
           case (MDOC_ELEM):
                   return("elem");
           case (MDOC_TEXT):
                   return("text");
           default:
                   break;
           }
   
           abort();
           /* NOTREACHED */
 }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

CVSweb