2005-11-18 18:54:58 +03:00
|
|
|
/*
|
|
|
|
* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
|
|
|
|
* See LICENSE file for license details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "cext.h"
|
|
|
|
#include "blitz.h"
|
|
|
|
|
2005-12-05 01:45:59 +03:00
|
|
|
long long _strtonum(const char *numstr, long long minval, long long maxval)
|
2005-11-18 18:54:58 +03:00
|
|
|
{
|
2005-12-05 01:45:59 +03:00
|
|
|
const char *errstr;
|
|
|
|
long long ret = __strtonum(numstr, minval, maxval, &errstr);
|
2005-11-18 18:54:58 +03:00
|
|
|
if (errstr)
|
|
|
|
fprintf(stderr,
|
2005-12-05 01:45:59 +03:00
|
|
|
"liblitz: cannot convert '%s' into integer: %s\n",
|
|
|
|
numstr, errstr);
|
2005-11-18 18:54:58 +03:00
|
|
|
return ret;
|
|
|
|
}
|