37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
|
|
||
|
#ifndef CARROT_UTILITY_H
|
||
|
#define CARROT_UTILITY_H
|
||
|
|
||
|
#define FALSE ((bool_t) 0)
|
||
|
#define TRUE ((bool_t) 1)
|
||
|
|
||
|
#define NULL ((void *) 0)
|
||
|
|
||
|
|
||
|
typedef signed char s8_t;
|
||
|
typedef signed short s16_t;
|
||
|
typedef signed int s32_t;
|
||
|
typedef signed long s64_t;
|
||
|
|
||
|
typedef unsigned char u8_t;
|
||
|
typedef unsigned short u16_t;
|
||
|
typedef unsigned int u32_t;
|
||
|
typedef unsigned long u64_t;
|
||
|
|
||
|
typedef u8_t bool_t;
|
||
|
typedef struct str_s
|
||
|
{
|
||
|
u32_t len_text;
|
||
|
char *text;
|
||
|
} cstr_s;
|
||
|
|
||
|
// Not implemented
|
||
|
cstr_s cstr_join (cstr_s string1, cstr_s string2);
|
||
|
|
||
|
// Not implemented
|
||
|
bool_t cstr_split (cstr_s string, u32_t middle, cstr_s *first, cstr_s *second);
|
||
|
|
||
|
cstr_s carrot_wrap_chars (char *chars)
|
||
|
|
||
|
#endif
|