RFsimulator C++ conversion

Convert rfsimulator C source code to C++ to access to STL.
This commit is contained in:
Bartosz Podrygajlo
2025-12-17 22:24:12 +01:00
parent 479be40b30
commit 6bd3545a78
16 changed files with 73 additions and 71 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ load_module_shlib_exit:
return ret;
}
void * get_shlibmodule_fptr(char *modname, char *fname)
void * get_shlibmodule_fptr(const char *modname, const char *fname)
{
for (int i=0; i<loader_data.numshlibs && loader_data.shlibs[i].name != NULL; i++) {
if ( strcmp(loader_data.shlibs[i].name, modname) == 0) {
+1 -1
View File
@@ -82,7 +82,7 @@ extern loader_data_t loader_data;
// clang-format on
int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *farray, int numf, void *initfunc_arg);
void *get_shlibmodule_fptr(char *modname, char *fname);
void *get_shlibmodule_fptr(const char *modname, const char *fname);
#define load_module_shlib(M, F, N, I) load_module_version_shlib(M, NULL, F, N, I)
void loader_reset();
#endif
+2 -2
View File
@@ -76,7 +76,7 @@ typedef struct webdatadef {
typedef void(*telnet_printfunc_t)(const char* format, ...);
typedef int(*cmdfunc_t)(char*, int, telnet_printfunc_t prnt);
typedef int (*webfunc_t)(char *cmdbuff, int debug, telnet_printfunc_t prnt, ...);
typedef int (*webfunc_getdata_t)(char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt);
typedef int (*webfunc_getdata_t)(const char *cmdbuff, int debug, void *data, telnet_printfunc_t prnt);
typedef int(*qcmdfunc_t)(char*, int, telnet_printfunc_t prnt,void *arg);
#define TELNETSRV_CMDFLAG_PUSHINTPOOLQ (1 << 0) // ask the telnet server to push the command in a thread pool queue
@@ -195,7 +195,7 @@ VT escape sequence definition, for smarter display....
#define TELNET_ADDCMD_FNAME "add_telnetcmd"
#define TELNET_POLLCMDQ_FNAME "poll_telnetcmdq"
#define TELNET_PUSHCMD_FNAME "telnet_pushcmd"
typedef int(*add_telnetcmd_func_t)(char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
typedef int(*add_telnetcmd_func_t)(const char *, telnetshell_vardef_t *, telnetshell_cmddef_t *);
typedef void(*poll_telnetcmdq_func_t)(void *qid,void *arg);
typedef void (*push_telnetcmd_func_t)(telnetshell_cmddef_t *cmd, char *cmdbuff, telnet_printfunc_t prnt);
#ifdef TELNETSERVERCODE