00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024 #ifndef _SEXP_DATATYPE
00025 #define _SEXP_DATATYPE
00026
00027 #include "public/sexp-datatype.h"
00028 #include "generic/redblack.h"
00029 #include "../../../common/util.h"
00030
00031 OSCAP_HIDDEN_START;
00032
00033 typedef struct {
00034 uint8_t arity;
00035 SEXP_datatype_opfn_t fn[3];
00036 } SEXP_dtype_op_t;
00037
00038 struct SEXP_datatype {
00039 char *name;
00040 uint16_t name_len;
00041 uint16_t op_cnt;
00042 SEXP_dtype_op_t *op;
00043 };
00044
00045 DEFRBTREE(datatype, SEXP_datatype_t datatype);
00046
00047 struct SEXP_datatypetbl {
00048 TREETYPE(datatype) tree;
00049 };
00050
00051 SEXP_datatypetbl_t *SEXP_datatypetbl_new (void);
00052 int SEXP_datatypetbl_init (SEXP_datatypetbl_t *t);
00053
00054 SEXP_datatype_t *SEXP_datatype_get (SEXP_datatypetbl_t *t, const char *name);
00055 SEXP_datatype_t *SEXP_datatype_add (SEXP_datatypetbl_t *t, SEXP_datatype_t *datatype);
00056 int SEXP_datatype_del (SEXP_datatypetbl_t *t, const char *name);
00057
00058 OSCAP_HIDDEN_END;
00059
00060 #endif