strtonum.h (512B)
1 /* This program is licensed under the terms of GNU GPL v3 or (at your option) 2 * any later version. Copyright (C) 2026 Страхиња Радић. 3 * See the file LICENSE for exact copyright and license details. */ 4 5 enum { 6 STN_NONE, 7 STN_NOTNUM, 8 STN_INVLIMITS, 9 STN_UNDERFLOW, 10 STN_OVERFLOW, 11 }; 12 13 int stn_handle_error(const char* str, const long long minval, 14 const long long maxval, const int errornum); 15 long long strtonumber(const char* str, const long long minval, 16 const long long maxval, int* errornum);