2020-04-26 15:07:30 +02:00
|
|
|
#ifndef __XTOOLSCONF_H__
|
|
|
|
#define __XTOOLSCONF_H__
|
2020-02-23 12:21:28 +01:00
|
|
|
|
2020-02-23 21:23:31 +01:00
|
|
|
|
2020-04-23 22:43:35 +02:00
|
|
|
#define xsize size_t
|
|
|
|
//#define xisize INTN
|
2020-04-25 11:59:07 +02:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define MAX_XSIZE SIZE_MAX
|
|
|
|
#else
|
2020-04-23 22:43:35 +02:00
|
|
|
#define MAX_XSIZE SIZE_T_MAX
|
2020-04-25 11:59:07 +02:00
|
|
|
#endif
|
2020-04-23 22:43:35 +02:00
|
|
|
//#define MAX_XISIZE MAX_INTN
|
2020-02-23 12:21:28 +01:00
|
|
|
|
2020-04-24 11:30:09 +02:00
|
|
|
#define XStringGrowByDefault 10
|
|
|
|
#define XArrayGrowByDefault 8
|
2020-08-13 14:07:40 +02:00
|
|
|
#define XBufferGrowByDefault 16
|
2020-02-23 12:21:28 +01:00
|
|
|
|
|
|
|
/* For convience, operator [] is define with int parameter.
|
2020-04-24 11:30:09 +02:00
|
|
|
* Defining __XTOOLS_CHECK_OVERFLOW__ make a check that the parameter is >= 0
|
|
|
|
* TODO : make new XString using __XTOOLS_CHECK_OVERFLOW__
|
2020-02-23 12:21:28 +01:00
|
|
|
*/
|
2020-04-24 11:30:09 +02:00
|
|
|
#define __XTOOLS_CHECK_OVERFLOW__
|
2020-02-23 12:21:28 +01:00
|
|
|
|
2020-04-24 11:30:09 +02:00
|
|
|
#define Xrealloc(ptr, newsize, oldsize) realloc(ptr, newsize)
|
2020-03-26 13:59:20 +01:00
|
|
|
|
2021-04-03 12:55:25 +02:00
|
|
|
#include <posix/posix.h>
|
|
|
|
|
2021-03-15 10:02:34 +01:00
|
|
|
#define XTOOLS_VA_LIST va_list
|
|
|
|
#define XTOOLS_VA_START va_start
|
|
|
|
#define XTOOLS_VA_END va_end
|
|
|
|
|
2020-02-23 12:21:28 +01:00
|
|
|
#endif
|