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