Move atoi_safe() from editor.h to compat.h and #define Batoi atoi_safe

They were the same thing so they might as well be in the same place.

git-svn-id: https://svn.eduke32.com/eduke32@8374 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/editor.h
This commit is contained in:
terminx 2019-12-07 23:50:27 +00:00 committed by Christoph Oelckers
parent 0af13dcde0
commit fd1656fbf2

View file

@ -568,7 +568,10 @@ typedef FILE BFILE;
// parsing the decimal representation of 0xffffffff,
// 4294967295 -- long is signed, so strtol would
// return LONG_MAX (== 0x7fffffff on 32-bit archs))
#define Batoi(str) ((int32_t)strtol(str, NULL, 10))
static FORCE_INLINE int32_t atoi_safe(const char *str) { return (int32_t)Bstrtol(str, NULL, 10); }
#define Batoi(x) atoi_safe(x)
#define Batol(str) (strtol(str, NULL, 10))
#define Batof(str) (strtod(str, NULL))