/***********************************************************************/ /* GLOBAL.H: Declaration file used by all CONNECT implementations. */ /* (C) Copyright MariaDB Corporation Ab */ /* Author Olivier Bertrand 1993-2020 */ /***********************************************************************/
/***********************************************************************/ /* Included C-definition files common to all Plug routines */ /***********************************************************************/ #include <string.h> /* String manipulation declares */ #include <stdlib.h> /* C standard library */ #include <ctype.h> /* C language specific types */ #include <stdio.h> /* FOPEN_MAX declaration */ #include <time.h> /* time_t type declaration */ #include <setjmp.h> /* Long jump declarations */
#ifdefined(XMSG) //#error Option XMSG is not yet fully implemented // Definition used to read messages from message file. #include"msgid.h" #define MSG(I) PlugReadMessage(NULL, MSG_##I, #I) #define STEP(I) PlugReadMessage(g, MSG_##I, #I) #elifdefined(NEWMSG) //#error Option NEWMSG is not yet fully implemented // Definition used to get messages from resource. #include"msgid.h" #define MSG(I) PlugGetMessage(NULL, MSG_##I) #define STEP(I) PlugGetMessage(g, MSG_##I) #else// !XMSG and !NEWMSG // Definition used to replace messages ID's by their definition. #include"messages.h" #define MSG(I) MSG_##I #define STEP(I) MSG_##I #endif// !XMSG and !NEWMSG
/***********************************************************************/ /* General purpose type definitions. */ /***********************************************************************/ #include"os.h"
/***********************************************************************/ /* Segment Sub-Allocation block structure declares. */ /* Next block is an implementation dependent segment suballoc save */ /* structure used to keep the suballocation system offsets and to */ /* restore them if needed. This scheme implies that no SubFree be used */ /***********************************************************************/ typedefstruct { /* Plug Area SubAlloc header */
size_t To_Free; /* Offset of next free block */
size_t FreeBlk; /* Size of remaining free memory */
} POOLHEADER, *PPOOLHEADER;
/***********************************************************************/ /* Language block. Containing all global information for the language */ /* this block is saved and retrieved with the language. Information */ /* in this block can be set and modified under Grammar editing. */ /***********************************************************************/ #ifdefined(BIT64) typedefint TIME_T; /* Lang block size must not change */ #else// BIT32 typedef time_t TIME_T; /* time_t */ #endif// BIT32
typedefstruct Lang_block {
NAME LangName; /* Language name */
NAME Application; /* Application name */
} LANG, *PLANG;
/***********************************************************************/ /* Application block. It contains all global information for the */ /* current parse and execution using the corresponding language. */ /* This block is dynamically allocated and set at language init. */ /***********************************************************************/ typedefstruct _activity { /* Describes activity and language */ void *Aptr; /* Points to user work area(s) */
NAME Ap_Name; /* Current application name */
} ACTIVITY;
/*---------------- UNIT ?????????? VERSION ? ----------------------*/ typedefstruct _parm { union { void *Value; int Intval;
}; // end union short Type, Domain;
PPARM Next;
} PARM;
/***********************************************************************/ /* Global Structure Block. This block contains, or points to, all */ /* information used by CONNECT tables. Passed as an argument */ /* to any routine allows it to have access to the entire information */ /* currently available for the whole set of loaded languages. */ /***********************************************************************/ typedefstruct _global { /* Global structure */ void *Sarea; /* Points to work area */
size_t Sarea_Size; /* Work area size */
PACTIVITY Activityp; char Message[MAX_STR]; /* Message (result, error, trace) */
size_t More; /* Used by jsonudf */
size_t Saved_Size; /* Saved work area to_free */ bool Createas; /* To pass multi to ext tables */ void *Xchk; /* indexes in create/alter */ short Alchecked; /* Checked for ALTER */ short Mrr; /* True when doing mrr */ int N; /* Utility */ int jump_level;
jmp_buf jumper[MAX_JUMP + 2];
} GLOBAL;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.