Main Page Modules Data Structures File List Data Fields Globals Related Pages

# build/misc.c

Go to the documentation of this file.

    00001
    00004 #include "system.h"
    00005
    00006 #include "rpmbuild.h"
    00007 #include "debug.h"
    00008
    00009 /*@-boundswrite@*/
    00010 int parseNum(const char * line, int * res)
    00011 {
    00012     char * s1 = NULL;
    00013     unsigned long rc;
    00014
    00015     if (line == NULL) return 1;
    00016     rc = strtoul(line, &s1, 10);
    00017     if (res) *res = rc;
    00018     return (((*s1) || (s1 == line) || (rc == ULONG_MAX)) ? 1 : 0);
    00019 }
    00020 /*@=boundswrite@*/