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

Diff for /mandoc/mandoc.c between version 1.53 and 1.54

version 1.53, 2011/05/24 21:31:23 version 1.54, 2011/07/21 15:21:13
Line 698  mandoc_getcontrol(const char *cp, int *ppos)
Line 698  mandoc_getcontrol(const char *cp, int *ppos)
  * If the string is invalid, or is less than 0, return -1.   * If the string is invalid, or is less than 0, return -1.
  */   */
 int  int
 mandoc_strntou(const char *p, size_t sz, int base)  mandoc_strntoi(const char *p, size_t sz, int base)
 {  {
         char             buf[32];          char             buf[32];
         char            *ep;          char            *ep;
Line 716  mandoc_strntou(const char *p, size_t sz, int base)
Line 716  mandoc_strntou(const char *p, size_t sz, int base)
         if (buf[0] == '\0' || *ep != '\0')          if (buf[0] == '\0' || *ep != '\0')
                 return(-1);                  return(-1);
   
         if ((errno == ERANGE &&          if (v > INT_MAX)
                         (v == LONG_MAX || v == LONG_MIN)) ||                  v = INT_MAX;
                         (v > INT_MAX || v < 0))          if (v < INT_MIN)
                 return(-1);                  v = INT_MIN;
   
         return((int)v);          return((int)v);
 }  }
   

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54

CVSweb