- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# build/misc.c

Go to the documentation of this file.

    00001
    00004 #include "system.h"
    00005
    00006 #include <rpmio.h>
    00007 #include "rpmbuild.h"
    00008 #include "debug.h"
    00009
    00010 int parseNum(const char * line, uint32_t * 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 }