The atonum() function is now provied by libite.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-07-10 19:06:51 +02:00
parent b30678bbe9
commit 0fd9aa6497
3 changed files with 1 additions and 27 deletions
-24
View File
@@ -39,30 +39,6 @@
#include "private.h"
#include "libite/lite.h"
/**
* atonum - Convert string to integer
* @str: String value to convert.
*
* Returns:
* The converted (positive) number, or -1 on error, with @errno set.
*/
int atonum(char *str)
{
int val;
char *end;
if (!str)
return -1;
errno = 0;
val = strtol(str, &end, 10);
if (errno || end == str)
return -1;
return val;
}
static int encode(int lvl)
{
if (!lvl) return 0;
-2
View File
@@ -65,8 +65,6 @@ do { \
#define SETBIT(a,i) (a |= (1 << (i)))
#define CLRBIT(a,i) (a &= ~(1 << (i)))
int atonum (char *str);
void runlevel_set (int pre, int now);
int runlevel_get (void);
char *runlevel_string (int levels);
+1 -1
Submodule libite updated: 4005dd5e2c...1147e547dc