mirror of
https://github.com/0intro/wmii
synced 2024-11-22 22:02:30 +03:00
18 lines
468 B
C
18 lines
468 B
C
/*
|
|
* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com>
|
|
* See LICENSE file for license details.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "blitz.h"
|
|
|
|
long long blitz_strtonum(const char *numstr, long long minval, long long maxval)
|
|
{
|
|
const char *errstr;
|
|
long long ret = cext_strtonum(numstr, minval, maxval, &errstr);
|
|
if (errstr)
|
|
fprintf(stderr, "liblitz: cannot convert '%s' into integer: %s [%lld..%lld]\n", numstr, errstr, minval, maxval);
|
|
return ret;
|
|
}
|