From c068f22329d5cc722622a2183bbb22eef2093df7 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 24 Aug 2026 11:16:07 +0200 Subject: initial import --- src/parsec_server/include/con_int_sv.h | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/parsec_server/include/con_int_sv.h (limited to 'src/parsec_server/include/con_int_sv.h') diff --git a/src/parsec_server/include/con_int_sv.h b/src/parsec_server/include/con_int_sv.h new file mode 100644 index 0000000..e51f5d2 --- /dev/null +++ b/src/parsec_server/include/con_int_sv.h @@ -0,0 +1,59 @@ +/* + * PARSEC HEADER: con_int_sv.h + */ + +#ifndef _CON_INT_SV_H_ +#define _CON_INT_SV_H_ + + +// integer commands table entry + +struct int_command_s { + + int persistence; // persistent int commands are saved on exit + const char* command; // name of command + int bmin; // lower bound + int bmax; // upper bound + int* intref; // pointer to actual int var + void (*realize)(); // will be called after modification (optional) + int (*fetch)(); // will be called before reading (optional) + int default_val; // default value for int var +}; + + +// integer commands list +extern int_command_s * int_commands; + +// number of integer variable commands +extern int num_int_commands; + +// integer input/output configuration +extern const char * int_print_base; +extern int int_calc_base; + + +// macro to retrieve intvar command strings +#define ICMSTR(x) (int_commands[x].command) + +// macro to retrieve string length of intvar commmands +#define ICMLEN(x) strlen(int_commands[x].command) + + +// position of console geometry variables in table +enum { + + CONINFOINDX_CONWINX = 0, + CONINFOINDX_CONWINY = 1, + CONINFOINDX_CONWIDTH = 2, + CONINFOINDX_CONHEIGHT = 3 +}; + + +// external functions + +void CON_RegisterIntCommand( int_command_s *regcom ); + + +#endif // _CON_INT_SV_H_ + + -- cgit v1.2.3