Commit 5b666c12 authored by Sebastien Timmermans's avatar Sebastien Timmermans 🎹
Browse files

Format all files according to VS2017 ST config

parent 9f2e67b9
......@@ -3,59 +3,59 @@
* - user model files:
* - UserModel.h
* - UserModel.c
* - id file
* - id file
*
* author: Nicolas Van der Noot, Aubain Verle, Nicolas Docquier
*
*
* (c) Universite catholique de Louvain
*/
*/
#include "mbs_print_user_files.h"
/**
* Find the user folder corresponding to the given *.mbs file.
*
*
* This function allocat a char* that must be freed by the user.
*
*/
char* find_user_path(char* mbsfile){
*
*/
char* find_user_path(char* mbsfile) {
char *ptr;
char* userpath;
char* c;
// allocate space for the path to the user folder
userpath = (char*)malloc(sizeof(char)*(strlen(mbsfile)+50));
userpath = (char*)malloc(sizeof(char)*(strlen(mbsfile) + 50));
// copy path to the *.mbs file
sprintf(userpath, "%s", mbsfile);
// replace '\' by '/' if any (i.e. win compatibility)
for(c=userpath ; *c !='\0' ; c++){
if(*c == '\\'){
for (c = userpath; *c != '\0'; c++) {
if (*c == '\\') {
*c = '/';
}
}
// find the last occurence of '/'
ptr = strrchr(userpath, '/');
// mark the end of path to the last occurence
*ptr = '\0';
// find the previous occurence
ptr = strrchr(userpath, '/');
// check if
if(strcmp(ptr, "/dataR")==0){
if (strcmp(ptr, "/dataR") == 0) {
*ptr = '\0';
sprintf(userpath, "%s/userfctR/", userpath);
}
else{
else {
printf("ERROR: the *.mbs file must be in the dataR folder. \n");
exit(1);
}
return userpath;
}
......@@ -63,8 +63,8 @@ char* find_user_path(char* mbsfile){
/**
* Generates 'UserModelStruct.c' and 'UserModelStruct.h'
*/
void generate_user_models(char* mbsfile){
void generate_user_models(char* mbsfile) {
// variables declaration
char *fileoutC, *fileoutH, *userpath;
MbsInfos* mbs_infos = NULL;
......@@ -74,9 +74,9 @@ void generate_user_models(char* mbsfile){
userpath = find_user_path(mbsfile);
// path to the file to be written;
fileoutC = (char*)malloc(sizeof(char)*(strlen(userpath)+50));
fileoutC = (char*)malloc(sizeof(char)*(strlen(userpath) + 50));
sprintf(fileoutC, "%suser_model.c", userpath);
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath)+50));
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath) + 50));
sprintf(fileoutH, "%suser_model.h", userpath);
// print check empty file
......@@ -102,9 +102,9 @@ void generate_user_models(char* mbsfile){
*/
// if ( (mbs_stat.st_mtime >= outC_stat.st_mtime) || (mbs_stat.st_mtime >= outH_stat.st_mtime) )
// {
mbs_infos = mbs_info_reader(mbsfile);
mbs_print_user_models(mbs_infos, fileoutC, fileoutH);
// }
mbs_infos = mbs_info_reader(mbsfile);
mbs_print_user_models(mbs_infos, fileoutC, fileoutH);
// }
printf("user_model.c: %s \n", fileoutC);
printf("user_model.h: %s \n", fileoutH);
......@@ -113,14 +113,14 @@ void generate_user_models(char* mbsfile){
free(fileoutC);
free(fileoutH);
free(userpath);
}
/**
* Generates 'user_IO.c' and 'user_IO.h'
*/
void generate_user_IOs(char* mbsfile){
void generate_user_IOs(char* mbsfile) {
// variables declaration
char *fileoutC, *fileoutH, *userpath;
MbsInfos* mbs_infos = NULL;
......@@ -130,12 +130,12 @@ void generate_user_IOs(char* mbsfile){
userpath = find_user_path(mbsfile);
// path to the file to be written;
fileoutC = (char*)malloc(sizeof(char)*(strlen(userpath)+50));
fileoutC = (char*)malloc(sizeof(char)*(strlen(userpath) + 50));
sprintf(fileoutC, "%suser_IO.c", userpath);
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath)+50));
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath) + 50));
sprintf(fileoutH, "%suser_IO.h", userpath);
mbs_infos = mbs_info_reader(mbsfile);
mbs_infos = mbs_info_reader(mbsfile);
mbs_print_user_IOs(mbs_infos, fileoutC, fileoutH);
printf("user_IO.c: %s \n", fileoutC);
......@@ -145,27 +145,27 @@ void generate_user_IOs(char* mbsfile){
free(fileoutC);
free(fileoutH);
free(userpath);
}
/*
* Generates 'user_all_id.h'
* Generates 'user_all_id.h'
*/
void generate_user_all_id(char* mbsfile)
{
// variables declaration
char *fileoutH, *userpath;
MbsInfos* mbs_infos;
//struct stat mbs_stat, outH_stat;
userpath = find_user_path(mbsfile);
mbs_infos = NULL;
// files initialization
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath)+50));
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath) + 50));
sprintf(fileoutH, "%suser_all_id.h", userpath);
// print check empty file
//print_empty_file(fileoutCheck);
/*
......@@ -175,7 +175,7 @@ void generate_user_all_id(char* mbsfile)
return;
}
if (stat(fileoutH, &outH_stat))
if (stat(fileoutH, &outH_stat))
{
printf("Problem: could not read the creation date of %s !\n", fileoutH);
return;
......@@ -183,17 +183,17 @@ void generate_user_all_id(char* mbsfile)
*/
// if (mbs_stat.st_mtime >= outH_stat.st_mtime)
// {
mbs_infos = mbs_info_reader(mbsfile);
mbs_print_user_all_id(mbs_infos, fileoutH);
// }
mbs_infos = mbs_info_reader(mbsfile);
mbs_print_user_all_id(mbs_infos, fileoutH);
// }
mbs_delete_infos(mbs_infos);
free(fileoutH);
free(userpath);
}
/*! \brief Generates 'user_hard_param.h'
*
*
* \param[in] mbsfile f.mbs file (with path) to use
*/
void generate_user_hard_param(char* mbsfile)
......@@ -201,13 +201,13 @@ void generate_user_hard_param(char* mbsfile)
// variables declaration
char *fileoutH, *userpath;
MbsInfos* mbs_infos;
//struct stat mbs_stat, outH_stat;
userpath = find_user_path(mbsfile);
mbs_infos = NULL;
// files initialization
fileoutH = (char*) malloc(sizeof(char)*(strlen(userpath)+50));
fileoutH = (char*)malloc(sizeof(char)*(strlen(userpath) + 50));
sprintf(fileoutH, "%suser_hard_param.h", userpath);
mbs_infos = mbs_info_reader(mbsfile);
......@@ -219,27 +219,27 @@ void generate_user_hard_param(char* mbsfile)
}
/**
*
*
* Print the UserModel files and/or the ID header file for
* the given mbs file.
*
*
* argv[0]: name of the program
*
*
* argv[1]: path to the *.mbs for which user files must be generated
*
*
* argv[2] (optional): flag specifying which file must be generated:
* - "user_models": user model files
* - "user_all_id": id header file
* - "all": both of the previous option
* if argv[2] is not given, the "all" option is used
*/
*/
int main(int argc, char *argv[])
{
char* mbsFile;
if (argc==1)
if (argc == 1)
{
printf("Error: function called without argument! The first argument must be the .mbs file (with its path).\n");
exit(EXIT_FAILURE);
......@@ -252,30 +252,30 @@ int main(int argc, char *argv[])
if (argc > 3)
{
printf("Error: only one argument required, but received %d arguments !\n", argc-1);
printf("Error: only one argument required, but received %d arguments !\n", argc - 1);
}
else
{
if ( argc<3 || !strcmp(argv[2], "all") )
if (argc < 3 || !strcmp(argv[2], "all"))
{
generate_user_models(mbsFile);
generate_user_IOs(mbsFile);
generate_user_all_id(mbsFile);
generate_user_hard_param(mbsFile);
}
else if ( !strcmp(argv[2], "user_models") )
else if (!strcmp(argv[2], "user_models"))
{
generate_user_models(mbsFile);
}
else if ( !strcmp(argv[2], "user_IOs") )
else if (!strcmp(argv[2], "user_IOs"))
{
generate_user_IOs(mbsFile);
}
else if ( !strcmp(argv[2], "user_all_id") )
else if (!strcmp(argv[2], "user_all_id"))
{
generate_user_all_id(mbsFile);
}
else if ( !strcmp(argv[2], "user_hard_param") )
else if (!strcmp(argv[2], "user_hard_param"))
{
generate_user_hard_param(mbsFile);
}
......
......@@ -13,12 +13,12 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
MbsDataLibInfo* mbs_load_dynamic_library(char* libpath){
MbsDataLibInfo* mbs_load_dynamic_library(char* libpath) {
MbsDataLibInfo* li = (MbsDataLibInfo*)malloc(sizeof(MbsDataLibInfo)) ;
MbsDataLibInfo* li = (MbsDataLibInfo*)malloc(sizeof(MbsDataLibInfo));
#ifdef UNIX
#ifdef UNIX
char *error;
// note : no need to call dlclose(), the library will be automatically closed at the end of the execution
......@@ -28,17 +28,17 @@ MbsDataLibInfo* mbs_load_dynamic_library(char* libpath){
{
mbs_error_msg("%s\n", dlerror());
}
#else
DWORD err;
li->lib_handle = LoadLibrary(libpath);
if(!li->lib_handle)
{
err = GetLastError();
#else
DWORD err;
li->lib_handle = LoadLibrary(libpath);
if (!li->lib_handle)
{
err = GetLastError();
mbs_error_msg(">>LOAD>> Unable to load the library from %s \n", libpath);
}
#endif
}
#endif
return li;
}
......@@ -46,24 +46,24 @@ MbsDataLibInfo* mbs_load_dynamic_library(char* libpath){
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
*
*
* Close the library pointed by MbsDataLibInfo and free the memory
* associated to the given MbsDataLibInfo.
*
*/
*
*/
void mbs_close_dynamic_library(MbsDataLibInfo* li){
void mbs_close_dynamic_library(MbsDataLibInfo* li) {
#ifdef UNIX
#ifdef UNIX
dlclose(li->lib_handle);
#else
#else
FreeLibrary(li->lib_handle);
FreeLibrary(li->lib_handle);
#endif
#endif
free(li);
}
......@@ -71,36 +71,36 @@ void mbs_close_dynamic_library(MbsDataLibInfo* li){
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef UNIX
void* mbs_load_function(MbsDataLibInfo* li, char* fct_name){
void* mbs_load_function(MbsDataLibInfo* li, char* fct_name) {
char *error;
char *error;
void* fct;
fct = dlsym(li->lib_handle, fct_name);
if ((error = dlerror()) != NULL)
{
mbs_error_msg("Impossible to load function %s: %s\n", fct_name, error);
mbs_error_msg("Impossible to load function %s: %s\n", fct_name, error);
}
return fct;
}
#else
FARPROC WINAPI mbs_load_function(MbsDataLibInfo* li, char* fct_name){
FARPROC WINAPI mbs_load_function(MbsDataLibInfo* li, char* fct_name) {
FARPROC Proc;
DWORD error;
FARPROC Proc;
DWORD error;
Proc = GetProcAddress(li->lib_handle, fct_name);
Proc = GetProcAddress(li->lib_handle, fct_name);
if(Proc == NULL)
{
error = GetLastError();
mbs_error_msg("Impossible to load function %s: error code = %d\n", fct_name, error);
exit(1);
if (Proc == NULL)
{
error = GetLastError();
mbs_error_msg("Impossible to load function %s: error code = %d\n", fct_name, error);
exit(1);
}
else return Proc;
else return Proc;
}
......@@ -112,32 +112,32 @@ void mbs_load_symbolic_functions(MbsData* mbs_data, const char* symbolicLib_path
{
char *lib_fullpath;
MbsDataLibInfo* symbLibInfo;
MbsDataLibInfo* symbLibInfo;
// allocate space for the path to the symbolic lib
lib_fullpath = (char*)malloc((strlen(symbolicLib_path)+strlen(symbolicLib_name) +50)*sizeof(char));
lib_fullpath = (char*)malloc((strlen(symbolicLib_path) + strlen(symbolicLib_name) + 50) * sizeof(char));
#ifdef UNIX
sprintf(lib_fullpath, "%s/lib%s.so", symbolicLib_path, symbolicLib_name);
#else
sprintf(lib_fullpath, "%s\\%s.dll", symbolicLib_path, symbolicLib_name);
#endif
#ifdef UNIX
sprintf(lib_fullpath, "%s/lib%s.so", symbolicLib_path, symbolicLib_name);
#else
sprintf(lib_fullpath, "%s\\%s.dll", symbolicLib_path, symbolicLib_name);
#endif
symbLibInfo = mbs_load_dynamic_library(lib_fullpath) ;
symbLibInfo = mbs_load_dynamic_library(lib_fullpath);
mbs_data->fct.symb.mbs_link = (mbs_link_ptr)mbs_load_function(symbLibInfo, "mbs_link");
mbs_data->fct.symb.mbs_link3D = (mbs_link3D_ptr)mbs_load_function(symbLibInfo, "mbs_link3D");
mbs_data->fct.symb.mbs_extforces = (mbs_extforces_ptr)mbs_load_function(symbLibInfo, "mbs_extforces");
mbs_data->fct.symb.mbs_accelred = (mbs_accelred_ptr)mbs_load_function(symbLibInfo, "mbs_accelred");
mbs_data->fct.symb.mbs_dirdyna = (mbs_dirdyna_ptr)mbs_load_function(symbLibInfo, "mbs_dirdyna");
mbs_data->fct.symb.mbs_invdyna = (mbs_invdyna_ptr)mbs_load_function(symbLibInfo, "mbs_invdyna");
mbs_data->fct.symb.mbs_cons_hJ = (mbs_cons_hJ_ptr)mbs_load_function(symbLibInfo, "mbs_cons_hJ");
mbs_data->fct.symb.mbs_cons_jdqd = (mbs_cons_jdqd_ptr)mbs_load_function(symbLibInfo, "mbs_cons_jdqd");
mbs_data->fct.symb.mbs_sensor = (mbs_sensor_ptr)mbs_load_function(symbLibInfo, "mbs_sensor");
mbs_data->fct.symb.mbs_gensensor = (mbs_gensensor_ptr)mbs_load_function(symbLibInfo, "mbs_gensensor");
mbs_data->fct.symb.mbs_link = (mbs_link_ptr) mbs_load_function(symbLibInfo, "mbs_link");
mbs_data->fct.symb.mbs_link3D = (mbs_link3D_ptr) mbs_load_function(symbLibInfo, "mbs_link3D");
mbs_data->fct.symb.mbs_extforces = (mbs_extforces_ptr) mbs_load_function(symbLibInfo, "mbs_extforces");
mbs_data->fct.symb.mbs_accelred = (mbs_accelred_ptr) mbs_load_function(symbLibInfo, "mbs_accelred");
mbs_data->fct.symb.mbs_dirdyna = (mbs_dirdyna_ptr) mbs_load_function(symbLibInfo, "mbs_dirdyna");
mbs_data->fct.symb.mbs_invdyna = (mbs_invdyna_ptr) mbs_load_function(symbLibInfo, "mbs_invdyna");
mbs_data->fct.symb.mbs_cons_hJ = (mbs_cons_hJ_ptr) mbs_load_function(symbLibInfo, "mbs_cons_hJ");
mbs_data->fct.symb.mbs_cons_jdqd = (mbs_cons_jdqd_ptr) mbs_load_function(symbLibInfo, "mbs_cons_jdqd");
mbs_data->fct.symb.mbs_sensor = (mbs_sensor_ptr) mbs_load_function(symbLibInfo, "mbs_sensor");
mbs_data->fct.symb.mbs_gensensor = (mbs_gensensor_ptr) mbs_load_function(symbLibInfo, "mbs_gensensor");
mbs_data->fct.symbolicLibHandle = symbLibInfo;
free(lib_fullpath);
......@@ -150,7 +150,7 @@ void mbs_load_user_functions(MbsData* mbs_data, const char* userfctLib_path, con
{
char *lib_fullpath;
MbsDataLibInfo* userLibInfo;
MbsDataLibInfo* userLibInfo;
// allocate space for the path to the user folder
lib_fullpath = (char*)malloc((strlen(userfctLib_path) + strlen(userfctLib_name) + 50) * sizeof(char));
......@@ -161,51 +161,51 @@ void mbs_load_user_functions(MbsData* mbs_data, const char* userfctLib_path, con
sprintf(lib_fullpath, "%s\\%s.dll", userfctLib_path, userfctLib_name);
#endif
userLibInfo = mbs_load_dynamic_library(lib_fullpath) ;
mbs_data->fct.user.user_JointForces = (user_JointForces_ptr) mbs_load_function(userLibInfo, "user_JointForces");
mbs_data->fct.user.user_load_post = (user_load_post_ptr) mbs_load_function(userLibInfo, "user_load_post");
mbs_data->fct.user.user_dirdyn_init = (user_dirdyn_init_ptr) mbs_load_function(userLibInfo, "user_dirdyn_init");
mbs_data->fct.user.user_dirdyn_loop = (user_dirdyn_loop_ptr) mbs_load_function(userLibInfo, "user_dirdyn_loop");
mbs_data->fct.user.user_dirdyn_finish = (user_dirdyn_finish_ptr) mbs_load_function(userLibInfo, "user_dirdyn_finish");
mbs_data->fct.user.user_equil_init = (user_equil_init_ptr) mbs_load_function(userLibInfo, "user_equil_init");
mbs_data->fct.user.user_equil_loop = (user_equil_loop_ptr) mbs_load_function(userLibInfo, "user_equil_loop");
mbs_data->fct.user.user_equil_finish = (user_equil_finish_ptr) mbs_load_function(userLibInfo, "user_equil_finish");
mbs_data->fct.user.user_equil_fxe = (user_equil_fxe_ptr) mbs_load_function(userLibInfo, "user_equil_fxe");
mbs_data->fct.user.user_Derivative = (user_Derivative_ptr) mbs_load_function(userLibInfo, "user_Derivative");
mbs_data->fct.user.user_DrivenJoints = (user_DrivenJoints_ptr) mbs_load_function(userLibInfo, "user_DrivenJoints");
mbs_data->fct.user.user_cons_hJ = (user_cons_hJ_ptr) mbs_load_function(userLibInfo, "user_cons_hJ");
mbs_data->fct.user.user_cons_jdqd = (user_cons_jdqd_ptr) mbs_load_function(userLibInfo, "user_cons_jdqd");
mbs_data->fct.user.user_LinkForces = (user_LinkForces_ptr) mbs_load_function(userLibInfo, "user_LinkForces");
mbs_data->fct.user.user_Link3DForces = (user_Link3DForces_ptr) mbs_load_function(userLibInfo, "user_Link3DForces");
mbs_data->fct.user.user_ExtForces = (user_ExtForces_ptr) mbs_load_function(userLibInfo, "user_ExtForces");
mbs_data->fct.user.mbs_new_user_IO = (mbs_new_user_IO_ptr) mbs_load_function(userLibInfo, "mbs_new_user_IO");
mbs_data->fct.user.mbs_new_user_model = (mbs_new_user_model_ptr) mbs_load_function(userLibInfo, "mbs_new_user_model");
mbs_data->fct.user.mbs_delete_user_model = (mbs_delete_user_model_ptr) mbs_load_function(userLibInfo, "mbs_delete_user_model");
mbs_data->fct.user.mbs_delete_user_IO = (mbs_delete_user_IO_ptr) mbs_load_function(userLibInfo, "mbs_delete_user_IO");
mbs_data->fct.user.mbs_get_user_IO_size = (mbs_get_user_IO_size_ptr) mbs_load_function(userLibInfo, "mbs_get_user_IO_size");
mbs_data->fct.user.mbs_load_user_model_xml = (mbs_load_user_model_xml_ptr) mbs_load_function(userLibInfo, "mbs_load_user_model_xml");
mbs_data->fct.user.mbs_bind_user_model = (mbs_bind_user_model_ptr) mbs_load_function(userLibInfo, "mbs_bind_user_model");
mbs_data->fct.user.mbs_print_user_model = (mbs_print_user_model_ptr) mbs_load_function(userLibInfo, "mbs_print_user_model");
mbs_data->fct.user.mbs_get_user_model_size = (mbs_get_user_model_size_ptr) mbs_load_function(userLibInfo, "mbs_get_user_model_size");
mbs_data->fct.user.mbs_get_user_model_list = (mbs_get_user_model_list_ptr) mbs_load_function(userLibInfo, "mbs_get_user_model_list");
#ifdef REAL_TIME
mbs_data->fct.user.user_realtime_options = (user_realtime_options_ptr) mbs_load_function(userLibInfo, "user_realtime_options");
#ifdef SDL
mbs_data->fct.user.user_keyboard = (user_keyboard_ptr) mbs_load_function(userLibInfo, "user_keyboard");
mbs_data->fct.user.user_realtime_plot = (user_realtime_plot_ptr) mbs_load_function(userLibInfo, "user_realtime_plot");
mbs_data->fct.user.user_joystick_axes = (user_joystick_axes_ptr) mbs_load_function(userLibInfo, "user_joystick_axes");
mbs_data->fct.user.user_joystick_buttons = (user_joystick_buttons_ptr) mbs_load_function(userLibInfo, "user_joystick_buttons");
#endif
#ifdef VISU_3D
mbs_data->fct.user.user_realtime_visu = (user_realtime_visu_ptr) mbs_load_function(userLibInfo, "user_realtime_visu");
#endif
#endif
userLibInfo = mbs_load_dynamic_library(lib_fullpath);
mbs_data->fct.user.user_JointForces = (user_JointForces_ptr)mbs_load_function(userLibInfo, "user_JointForces");
mbs_data->fct.user.user_load_post = (user_load_post_ptr)mbs_load_function(userLibInfo, "user_load_post");
mbs_data->fct.user.user_dirdyn_init = (user_dirdyn_init_ptr)mbs_load_function(userLibInfo, "user_dirdyn_init");
mbs_data->fct.user.user_dirdyn_loop = (user_dirdyn_loop_ptr)mbs_load_function(userLibInfo, "user_dirdyn_loop");
mbs_data->fct.user.user_dirdyn_finish = (user_dirdyn_finish_ptr)mbs_load_function(userLibInfo, "user_dirdyn_finish");
mbs_data->fct.user.user_equil_init = (user_equil_init_ptr)mbs_load_function(userLibInfo, "user_equil_init");
mbs_data->fct.user.user_equil_loop = (user_equil_loop_ptr)mbs_load_function(userLibInfo, "user_equil_loop");
mbs_data->fct.user.user_equil_finish = (user_equil_finish_ptr)mbs_load_function(userLibInfo, "user_equil_finish");
mbs_data->fct.user.user_equil_fxe = (user_equil_fxe_ptr)mbs_load_function(userLibInfo, "user_equil_fxe");
mbs_data->fct.user.user_Derivative = (user_Derivative_ptr)mbs_load_function(userLibInfo, "user_Derivative");
mbs_data->fct.user.user_DrivenJoints = (user_DrivenJoints_ptr)mbs_load_function(userLibInfo, "user_DrivenJoints");
mbs_data->fct.user.user_cons_hJ = (user_cons_hJ_ptr)mbs_load_function(userLibInfo, "user_cons_hJ");
mbs_data->fct.user.user_cons_jdqd = (user_cons_jdqd_ptr)mbs_load_function(userLibInfo, "user_cons_jdqd");
mbs_data->fct.user.user_LinkForces = (user_LinkForces_ptr)mbs_load_function(userLibInfo, "user_LinkForces");
mbs_data->fct.user.user_Link3DForces = (user_Link3DForces_ptr)mbs_load_function(userLibInfo, "user_Link3DForces");
mbs_data->fct.user.user_ExtForces = (user_ExtForces_ptr)mbs_load_function(userLibInfo, "user_ExtForces");
mbs_data->fct.user.mbs_new_user_IO = (mbs_new_user_IO_ptr)mbs_load_function(userLibInfo, "mbs_new_user_IO");
mbs_data->fct.user.mbs_new_user_model = (mbs_new_user_model_ptr)mbs_load_function(userLibInfo, "mbs_new_user_model");
mbs_data->fct.user.mbs_delete_user_model = (mbs_delete_user_model_ptr)mbs_load_function(userLibInfo, "mbs_delete_user_model");
mbs_data->fct.user.mbs_delete_user_IO = (mbs_delete_user_IO_ptr)mbs_load_function(userLibInfo, "mbs_delete_user_IO");
mbs_data->fct.user.mbs_get_user_IO_size = (mbs_get_user_IO_size_ptr)mbs_load_function(userLibInfo, "mbs_get_user_IO_size");
mbs_data->fct.user.mbs_load_user_model_xml = (mbs_load_user_model_xml_ptr)mbs_load_function(userLibInfo, "mbs_load_user_model_xml");
mbs_data->fct.user.mbs_bind_user_model = (mbs_bind_user_model_ptr)mbs_load_function(userLibInfo, "mbs_bind_user_model");
mbs_data->fct.user.mbs_print_user_model = (mbs_print_user_model_ptr)mbs_load_function(userLibInfo, "mbs_print_user_model");
mbs_data->fct.user.mbs_get_user_model_size = (mbs_get_user_model_size_ptr)mbs_load_function(userLibInfo, "mbs_get_user_model_size");
mbs_data->fct.user.mbs_get_user_model_list = (mbs_get_user_model_list_ptr)mbs_load_function(userLibInfo, "mbs_get_user_model_list");
#ifdef REAL_TIME
mbs_data->fct.user.user_realtime_options = (user_realtime_options_ptr)mbs_load_function(userLibInfo, "user_realtime_options");
#ifdef SDL
mbs_data->fct.user.user_keyboard = (user_keyboard_ptr)mbs_load_function(userLibInfo, "user_keyboard");
mbs_data->fct.user.user_realtime_plot = (user_realtime_plot_ptr)mbs_load_function(userLibInfo, "user_realtime_plot");
mbs_data->fct.user.user_joystick_axes = (user_joystick_axes_ptr)mbs_load_function(userLibInfo, "user_joystick_axes");
mbs_data->fct.user.user_joystick_buttons = (user_joystick_buttons_ptr)mbs_load_function(userLibInfo, "user_joystick_buttons");
#endif
#ifdef VISU_3D
mbs_data->fct.user.user_realtime_visu = (user_realtime_visu_ptr)mbs_load_function(userLibInfo, "user_realtime_visu");
#endif
#endif
mbs_data->fct.userfctLibHandle = userLibInfo;
...