00001 #pragma once
00002 #ifndef SEXP_TYPES_H
00003 #define SEXP_TYPES_H
00004
00005 #include <stdint.h>
00006 #include <seap-debug.h>
00007
00008 typedef uint8_t SEXP_numtype_t;
00009
00010
00011 #define SEXP_NUM_NONE 0x00
00012 #define SEXP_NUM_BOOL 0x01
00013 #define SEXP_NUM_INT8 0x07
00014 #define SEXP_NUM_UINT8 0x08
00015 #define SEXP_NUM_INT16 0x0f
00016 #define SEXP_NUM_UINT16 0x10
00017 #define SEXP_NUM_INT32 0x1f
00018 #define SEXP_NUM_UINT32 0x20
00019 #define SEXP_NUM_INT64 0x3f
00020 #define SEXP_NUM_UINT64 0x40
00021 #define SEXP_NUM_DOUBLE 0x41
00022
00023
00024
00025 #define SEXP_NUM_BOOLEAN SEXP_NUM_BOOL
00026 #define SEXP_NUM_CHAR SEXP_NUM_INT8
00027 #define SEXP_NUM_UCHAR SEXP_NUM_UINT8
00028 #define SEXP_NUM_SHORTINT SEXP_NUM_INT16
00029 #define SEXP_NUM_USHORTINT SEXP_NUM_UINT16
00030 #define SEXP_NUM_SHORTUINT SEXP_NUM_UINT16
00031 #define SEXP_NUM_INT SEXP_NUM_INT32
00032 #define SEXP_NUM_LONGINT SEXP_NUM_INT32
00033 #define SEXP_NUM_UINT SEXP_NUM_UINT32
00034 #define SEXP_NUM_ULONGINT SEXP_NUM_UINT32
00035 #define SEXP_NUM_LONGUINT SEXP_NUM_UINT32
00036 #define SEXP_NUM_LONLONGINT SEXP_NUM_INT64
00037 #define SEXP_NUM_ULONGLONGINT SEXP_NUM_UINT64
00038 #define SEXP_NUM_LONGLONGUINT SEXP_NUM_UINT64
00039
00040 #if 0
00041 # define NUM_FRACT 0x0a
00042 # define NUM_BIGNUM 0x0b
00043 #endif
00044
00045 typedef struct SEXP SEXP_t;
00046
00047
00048 typedef uint8_t SEXP_format_t;
00049
00050 #define SEXP_FMT_UNDEFINED 0
00051 #define SEXP_FMT_TRANSPORT 1
00052 #define SEXP_FMT_CANONICAL 2
00053 #define SEXP_FMT_ADVANCED 3
00054 #define SEXP_FMT_AUTODETECT 4
00055
00056 #include <assert.h>
00057 #ifndef _A
00058 # define _A(x) assert(x)
00059 #endif
00060
00061 #define SEXP_TYPE_EMPTY 0
00062 #define SEXP_TYPE_STRING 1
00063 #define SEXP_TYPE_NUMBER 2
00064 #define SEXP_TYPE_LIST 3
00065
00066 typedef uint8_t SEXP_type_t;
00067
00068 #endif