Switch to <rpm/foo.h> style for public headers
[platform/upstream/rpm.git] / build / misc.c
1 /** \ingroup rpmbuild
2  * \file build/misc.c
3  */
4 #include "system.h"
5
6 #include <rpm/rpmbuild.h>
7 #include "debug.h"
8
9 int parseNum(const char * line, int * res)
10 {
11     char * s1 = NULL;
12     unsigned long rc;
13
14     if (line == NULL) return 1;
15     rc = strtoul(line, &s1, 10);
16     if (res) *res = rc;
17     return (((*s1) || (s1 == line) || (rc == ULONG_MAX)) ? 1 : 0);
18 }