#include <string.h>
#include <sys/types.h>
+#include "atoi/a2i.h"
#include "atoi/str2i.h"
#include "defines.h"
#include "prototypes.h"
if (fields[2][0] == '\0')
spwd.sp_lstchg = -1;
- else if (str2sl(&spwd.sp_lstchg, fields[2]) == -1)
- return 0;
- else if (spwd.sp_lstchg < 0)
+ else if (a2sl(&spwd.sp_lstchg, fields[2], NULL, 0, 0, LONG_MAX) == -1)
return 0;
/*
if (fields[3][0] == '\0')
spwd.sp_min = -1;
- else if (str2sl(&spwd.sp_min, fields[3]) == -1)
- return 0;
- else if (spwd.sp_min < 0)
+ else if (a2sl(&spwd.sp_min, fields[3], NULL, 0, 0, LONG_MAX) == -1)
return 0;
/*
if (fields[4][0] == '\0')
spwd.sp_max = -1;
- else if (str2sl(&spwd.sp_max, fields[4]) == -1)
- return 0;
- else if (spwd.sp_max < 0)
+ else if (a2sl(&spwd.sp_max, fields[4], NULL, 0, 0, LONG_MAX) == -1)
return 0;
/*
if (fields[5][0] == '\0')
spwd.sp_warn = -1;
- else if (str2sl(&spwd.sp_warn, fields[5]) == -1)
- return 0;
- else if (spwd.sp_warn < 0)
+ else if (a2sl(&spwd.sp_warn, fields[5], NULL, 0, 0, LONG_MAX) == -1)
return 0;
/*
if (fields[6][0] == '\0')
spwd.sp_inact = -1;
- else if (str2sl(&spwd.sp_inact, fields[6]) == -1)
- return 0;
- else if (spwd.sp_inact < 0)
+ else if (a2sl(&spwd.sp_inact, fields[6], NULL, 0, 0, LONG_MAX) == -1)
return 0;
/*
if (fields[7][0] == '\0')
spwd.sp_expire = -1;
- else if (str2sl(&spwd.sp_expire, fields[7]) == -1)
- return 0;
- else if (spwd.sp_expire < 0)
+ else if (a2sl(&spwd.sp_expire, fields[7], NULL, 0, 0, LONG_MAX) == -1)
return 0;
/*