/[hydra]/hydra/src/util.c
ViewVC logotype

Diff of /hydra/src/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by nmav, Fri Sep 27 21:09:11 2002 UTC revision 1.6 by nmav, Sat Sep 28 10:05:00 2002 UTC
# Line 432  int boa_atoi(const char *s) Line 432  int boa_atoi(const char *s)
432      return retval;      return retval;
433  }  }
434    
435    long boa_atol(const char *s)
436    {
437        long int retval;
438        char reconv[22];
439    
440        if (!isdigit(*s))
441            return -1;
442    
443        retval = atol( s);
444        if (retval < 0)
445            return -1;
446    
447        simple_itoa(retval, reconv);
448        if (memcmp(s,reconv,strlen(s)) != 0) {
449            return -1;
450        }
451        return retval;
452    }
453    
454  /* returns -1 on error */  /* returns -1 on error */
455  int create_temporary_file(short want_unlink, char *storage, int size)  int create_temporary_file(short want_unlink, char *storage, int size)
456  {  {

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

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26