theBrain 10.0
NHI1 -
theKernel -
theLink -
theConfig -
theSq3Lite -
theCompiler -
theBrain -
theGuard
|
abrain.c - 25 Aug 2024 - aotto1968 More...
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include "sqlite3.h"
#include "msgque_mq.h"
#include "debug_mq.h"
Go to the source code of this file.
Data Structures | |
struct | BrainCtxS |
the local context of the server tool More... | |
Macros | |
#define | META_FILE_NAME "abrain.c" |
#define | BrainT ((typeof(MqContextST)) BrainTT) |
#define | BRAINCTX ((struct BrainCtxS*const)mqctx) |
#define | MQCTX ((MQ_CTX*const)brain) |
#define | META_CONTEXT_S mqctx |
#define | SETUP_brain struct BrainCtxS*const brain = BRAINCTX |
#define | SETUP_db sqlite3*const db = brain->db |
#define | SETUP_W(sh) |
#define | SETUP_C(sh) |
#define | DbErrorCheck(f) |
#define | CHECK_ARGS(s) |
#define | check_sqlite(E) |
#define | check_NULL(E) |
#define | DB_PREPARE_MAX 100 |
#define | READ_C(n) |
#define | IdxGet(...) |
#define | IdxFinalize(...) |
#define | HdlGet(...) |
#define | ctxCleanup(...) |
#define | case1(t, f, c) |
#define | GetFromDBnat(...) |
#define | GetFromDBary(...) |
Functions | |
static void | BrainHelp (const char *base) |
display help using -h or --help command-line option | |
static enum MkErrorE | IdxGet_RT (MK_RT const mkrt, MQ_CTX const mqctx, MK_I32 *pidx) |
static enum MkErrorE | IdxFinalize_RT (MK_RT const mkrt, MQ_CTX const mqctx, MK_I32 idx) |
static enum MkErrorE | HdlGet_RT (MK_RT const mkrt, MQ_CTX const mqctx, sqlite3_stmt **phdl, MK_STRN *pInType, MK_STRN *pInEnd, MK_STRN *pOutType, MK_STRN *pOutEnd) |
static enum MkErrorE | ctxCleanup_RT (MK_RT const mkrt, MQ_CTX const mqctx) |
static enum MkTypeE | GetTypeE (MK_STRB t) |
static MK_STRB | GetTypeS (enum MkTypeE const ntype) |
static enum MkTypeE | GetTypeD (sqlite3_stmt *hdl, MK_I32 idx) |
static enum MkErrorE | GetFromDBnat_RT (MK_RT const mkrt, MQ_CTX const mqctx, enum MkTypeE ntype, sqlite3_stmt *hdl, MK_I32 idx) |
static enum MkErrorE | GetFromDBary_RT (MK_RT const mkrt, MQ_CTX const mqctx, enum MkTypeE ntype, sqlite3_stmt *hdl, MK_I32 idx) |
static enum MkErrorE | STEP (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | EXEC (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | PREP (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | FINA (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | OPEN (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | CLOS (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | BrainCleanup (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | BrainSetup (MQ_SERVICE_CALL_ARGS) |
static enum MkErrorE | BrainFactory (MQ_CALLBACK_FACTORY_CTOR_ARGS) |
int | main (const int argc, MK_STRN argv[]) |
main entry-point for the tool | |
Variables | |
static MK_TYP | BrainTT = NULL |
link to the MqErrorS object | |
abrain.c - 25 Aug 2024 - aotto1968
Definition in file abrain.c.
#define BrainT ((typeof(MqContextST)) BrainTT) |
#define case1 | ( | t, | |
f, | |||
c ) |
Definition at line 246 of file abrain.c.
#define CHECK_ARGS | ( | s | ) |
Definition at line 50 of file abrain.c.
#define check_NULL | ( | E | ) |
#define check_sqlite | ( | E | ) |
#define ctxCleanup | ( | ... | ) |
#define DbErrorCheck | ( | f | ) |
Definition at line 45 of file abrain.c.
#define GetFromDBary | ( | ... | ) |
#define GetFromDBnat | ( | ... | ) |
#define HdlGet | ( | ... | ) |
#define IdxFinalize | ( | ... | ) |
#define IdxGet | ( | ... | ) |
#define READ_C | ( | n | ) |
#define SETUP_C | ( | sh | ) |
Definition at line 41 of file abrain.c.
#define SETUP_W | ( | sh | ) |
|
static |
Definition at line 568 of file abrain.c.
|
static |
|
static |
display help using -h or --help command-line option
base | the executable usually: basename(argv[0]) |
Definition at line 84 of file abrain.c.
|
static |
Definition at line 580 of file abrain.c.
|
static |
Definition at line 520 of file abrain.c.
Definition at line 169 of file abrain.c.
|
static |
Definition at line 418 of file abrain.c.
|
static |
Definition at line 510 of file abrain.c.
|
inlinestatic |
Definition at line 279 of file abrain.c.
|
inlinestatic |
Definition at line 254 of file abrain.c.
|
inlinestatic |
Definition at line 142 of file abrain.c.
|
inlinestatic |
Definition at line 125 of file abrain.c.
Definition at line 112 of file abrain.c.
int main | ( | const int | argc, |
MK_STRN | argv[] ) |
main entry-point for the tool
argc | the number of command-line arguments |
argv | the command-line arguments as an array of strings |
Definition at line 616 of file abrain.c.
|
static |
Definition at line 529 of file abrain.c.
|
static |
Definition at line 428 of file abrain.c.
|
static |
Definition at line 305 of file abrain.c.