Add save_dllvar() function exported to modules
This helper function is for modules to save the contents of their module variables to a file as SET commands. It will remove the need to export the raw dll_variable list to modules.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* if we change the table below, we change this module number to the
|
||||
* current date (YYYYMMDDxx where xx is a serial number).
|
||||
*/
|
||||
#define MODULE_VERSION 2017071701UL
|
||||
#define MODULE_VERSION 2017110601UL
|
||||
|
||||
#include "struct.h"
|
||||
|
||||
@@ -92,6 +92,7 @@ char *BX_get_dllstring_var(char *);
|
||||
int BX_get_dllint_var(char *);
|
||||
void BX_set_dllstring_var(char *, char *);
|
||||
void BX_set_dllint_var(char *, unsigned int);
|
||||
void BX_save_dllvar(FILE *, char *);
|
||||
RawDll *find_raw_proc(char *, char **);
|
||||
|
||||
int check_version(unsigned long);
|
||||
@@ -418,6 +419,7 @@ enum FUNCTION_VALUE
|
||||
SET_DLLINT_VAR,
|
||||
GET_DLLSTRING_VAR,
|
||||
SET_DLLSTRING_VAR,
|
||||
SAVE_DLLVAR,
|
||||
GET_INT_VAR,
|
||||
SET_INT_VAR,
|
||||
GET_STRING_VAR,
|
||||
|
||||
@@ -463,6 +463,7 @@ extern Function_ptr *global;
|
||||
#define set_dllint_var (*(void (*)(char *, unsigned int ))global[SET_DLLINT_VAR])
|
||||
#define get_dllstring_var (*(char *(*)(char *))global[GET_DLLSTRING_VAR])
|
||||
#define set_dllstring_var (*(void (*)(char *, char *))global[SET_DLLSTRING_VAR])
|
||||
#define save_dllvar (*(void (*)(FILE *, char *))global[SAVE_DLLVAR])
|
||||
|
||||
#define get_int_var (*(int (*)(enum VAR_TYPES ))global[GET_INT_VAR])
|
||||
#define set_int_var (*(void (*)(enum VAR_TYPES , unsigned int ))global[SET_INT_VAR])
|
||||
|
||||
Reference in New Issue
Block a user