rpm 5.2.1

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

- File List
- Globals

misc.c
Go to the documentation of this file.
1
4 #include "system.h"
5
6 #include <rpmio.h>
7 #include <rpmiotypes.h>
8 #include "rpmbuild.h"
9 #include "debug.h"
10
11 int parseNum(const char * line, rpmuint32_t * res)
12 {
13 char * s1 = NULL;
14 unsigned long rc;
15
16 if (line == NULL) return 1;
17 rc = strtoul(line, &s1, 10);
18 if (res) *res = rc;
19 return (((*s1) || (s1 == line) || (rc == ULONG_MAX)) ? 1 : 0);
20 }