renamed qse_runmain() to qse_run_main()

This commit is contained in:
hyung-hwan 2018-09-13 03:16:23 +00:00
parent 0dd7cc2d65
commit c09a0161eb
47 changed files with 60 additions and 60 deletions

View File

@ -1243,7 +1243,7 @@ int qse_main (int argc, qse_achar_t* argv[])
open_mpi (&mpi, argc, argv);
ret = qse_runmain (argc, argv, awk_main);
ret = qse_run_main(argc, argv, awk_main);
close_mpi (&mpi);

View File

@ -2899,7 +2899,7 @@ int qse_main (int argc, qse_achar_t* argv[])
SSL_library_init ();
#endif
ret = qse_runmain (argc, argv, httpd_main);
ret = qse_run_main (argc, argv, httpd_main);
#if defined(USE_SSL)
/* ERR_remove_state() should be called for each thread if the application is thread */

View File

@ -1036,7 +1036,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
qse_open_stdsios ();
ret = qse_runmain (argc, argv, httpd_main);
ret = qse_run_main (argc, argv, httpd_main);
qse_close_stdsios ();

View File

@ -1008,7 +1008,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
qse_open_stdsios ();
ret = qse_runmain (argc, argv, sed_main);
ret = qse_run_main (argc, argv, sed_main);
qse_close_stdsios ();
return ret;

View File

@ -631,7 +631,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, xli_main);
x = qse_run_main(argc, argv, xli_main);
qse_close_stdsios ();
return x;

View File

@ -39,7 +39,7 @@
* @def qse_main
* The qse_main macro defines a main function wrapper for an underlying
* platform. It is defined to @b main or @b wmain depending on the choice of
* the default character type #qse_char_t. Combined with the qse_runmain()
* the default character type #qse_char_t. Combined with the qse_run_main()
* function, it provides a consistant view to the main function.
*
* @typedef qse_achar_t
@ -69,16 +69,16 @@
#endif
/**
* The qse_runmain_handler_t type defines the actual function to be
* executed by qse_runmain(). Unlike the standard main(), it is passed
* The qse_run_main_handler_t type defines the actual function to be
* executed by qse_run_main(). Unlike the standard main(), it is passed
* arguments in the #qse_char_t type.
*/
typedef int (*qse_runmain_handler_t) (
typedef int (*qse_run_main_handler_t) (
int argc,
qse_char_t* argv[]
);
typedef int (*qse_runmainwithenv_handler_t) (
typedef int (*qse_run_main_with_env_handler_t) (
int argc,
qse_char_t* argv[],
qse_char_t* envp[]
@ -89,25 +89,25 @@ extern "C" {
#endif
/**
* The qse_runmain() function helps to invoke a main function independent of
* The qse_run_main() function helps to invoke a main function independent of
* the character mode configured for the library.
*/
QSE_EXPORT int qse_runmain (
QSE_EXPORT int qse_run_main (
int argc,
qse_achar_t* argv[],
qse_runmain_handler_t handler
qse_run_main_handler_t handler
);
/**
* The qse_runmainwithenv() function helps to invoke a main function
* The qse_run_main_with_env() function helps to invoke a main function
* independent of the character mode configured for the library providing
* the enviroment list.
*/
QSE_EXPORT int qse_runmainwithenv (
QSE_EXPORT int qse_run_main_with_env (
int argc,
qse_achar_t* argv[],
qse_achar_t* envp[],
qse_runmainwithenv_handler_t handler
qse_run_main_with_env_handler_t handler
);
/* TODO: support more weird main functions. for example,

View File

@ -49,7 +49,7 @@ public:
};
App (Mmgr* mmgr) QSE_CPP_NOEXCEPT;
App (Mmgr* mmgr = QSE_NULL) QSE_CPP_NOEXCEPT;
virtual ~App () QSE_CPP_NOEXCEPT;
int daemonize (bool chdir_to_root = true, int fork_count = 1, bool root_only = false) QSE_CPP_NOEXCEPT;

View File

@ -29,8 +29,8 @@
#include "mem-prv.h"
int qse_runmain (
int argc, qse_achar_t* argv[], qse_runmain_handler_t handler)
int qse_run_main (
int argc, qse_achar_t* argv[], qse_run_main_handler_t handler)
{
#if (defined(QSE_ACHAR_IS_MCHAR) && defined(QSE_CHAR_IS_MCHAR)) || \
(defined(QSE_ACHAR_IS_WCHAR) && defined(QSE_CHAR_IS_WCHAR))
@ -71,9 +71,9 @@ oops:
#endif
}
int qse_runmainwithenv (
int qse_run_main_with_env (
int argc, qse_achar_t* argv[],
qse_achar_t* envp[], qse_runmainwithenv_handler_t handler)
qse_achar_t* envp[], qse_run_main_with_env_handler_t handler)
{
#if (defined(QSE_ACHAR_IS_MCHAR) && defined(QSE_CHAR_IS_MCHAR)) || \
(defined(QSE_ACHAR_IS_WCHAR) && defined(QSE_CHAR_IS_WCHAR))

View File

@ -158,7 +158,7 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -173,7 +173,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -122,7 +122,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
init_awk_sample_locale ();
qse_open_stdsios ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -127,7 +127,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -136,7 +136,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -161,7 +161,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -129,7 +129,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -136,7 +136,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -149,7 +149,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_awk_sample_locale ();
x = qse_runmain (argc, argv, awk_main);
x = qse_run_main (argc, argv, awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -182,7 +182,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
}
x = qse_runmain (argc,argv,awk_main);
x = qse_run_main (argc,argv,awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -486,7 +486,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
}
ret = qse_runmain (argc, argv, awk_main);
ret = qse_run_main (argc, argv, awk_main);
#if defined(_WIN32)
WSACleanup ();

View File

@ -112,7 +112,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
}
x = qse_runmain (argc,argv,awk_main);
x = qse_run_main (argc,argv,awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -140,7 +140,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
}
x = qse_runmain (argc,argv,awk_main);
x = qse_run_main (argc,argv,awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -247,7 +247,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
}
x = qse_runmain (argc,argv,awk_main);
x = qse_run_main (argc,argv,awk_main);
qse_close_stdsios ();
return x;
}

View File

@ -77,7 +77,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -97,7 +97,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -208,7 +208,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -44,7 +44,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -49,7 +49,7 @@ int qse_main (int argc, qse_achar_t* argv[], qse_achar_t* envp[])
#endif
qse_open_stdsios ();
x = qse_runmainwithenv (argc, argv, envp, test_main);
x = qse_run_mainwithenv (argc, argv, envp, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -87,7 +87,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, path_main);
x = qse_run_main (argc, argv, path_main);
qse_close_stdsios ();
return x;
}

View File

@ -90,7 +90,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, rex_main);
x = qse_run_main (argc, argv, rex_main);
qse_close_stdsios ();
return x;
}

View File

@ -97,7 +97,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -136,7 +136,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -144,7 +144,7 @@ int qse_main (int argc, qse_achar_t* argv[])
SSL_library_init ();
#endif
ret = qse_runmain (argc, argv, httpd_main);
ret = qse_run_main (argc, argv, httpd_main);
#if defined(HAVE_SSL)
/*ERR_remove_state ();*/

View File

@ -52,7 +52,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
x = qse_run_main (argc, argv, sed_main);
qse_close_stdsios ();
return x;
}

View File

@ -65,7 +65,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
x = qse_run_main (argc, argv, sed_main);
qse_close_stdsios ();
return x;
}

View File

@ -74,7 +74,7 @@ int qse_main (int argc, qse_achar_t* argv[])
int x;
qse_open_stdsios ();
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
x = qse_run_main (argc, argv, sed_main);
qse_close_stdsios ();
return x;
}

View File

@ -54,6 +54,6 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
x = qse_run_main (argc, argv, sed_main);
return x;
}

View File

@ -68,6 +68,6 @@ int qse_main (int argc, qse_achar_t* argv[])
{
int x;
init_sed_sample_locale ();
x = qse_runmain (argc, argv, sed_main);
x = qse_run_main (argc, argv, sed_main);
return x;
}

View File

@ -122,7 +122,7 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_open_stdsios ();
x = qse_runmain (argc, argv, dir_main);
x = qse_run_main (argc, argv, dir_main);
qse_close_stdsios ();

View File

@ -99,7 +99,7 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_open_stdsios ();
x = qse_runmain (argc, argv, fs_main);
x = qse_run_main (argc, argv, fs_main);
qse_close_stdsios ();

View File

@ -154,7 +154,7 @@ int main (int argc, qse_achar_t* argv[])
qse_open_stdsios ();
x = qse_runmain (argc, argv, fs_main);
x = qse_run_main (argc, argv, fs_main);
qse_close_stdsios ();

View File

@ -162,7 +162,7 @@ int main (int argc, qse_achar_t* argv[])
qse_open_stdsios ();
x = qse_runmain (argc, argv, fs_main);
x = qse_run_main (argc, argv, fs_main);
qse_close_stdsios ();

View File

@ -63,7 +63,7 @@ int qse_main (int argc, qse_achar_t* argv[])
qse_open_stdsios ();
x = qse_runmain (argc, argv, glob_main);
x = qse_run_main (argc, argv, glob_main);
qse_close_stdsios ();

View File

@ -174,7 +174,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;
}

View File

@ -89,7 +89,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
ret = qse_runmain (argc, argv, test_main);
ret = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return ret;

View File

@ -101,7 +101,7 @@ int qse_main (int argc, qse_achar_t* argv[])
/*qse_setdflcmgrbyid (QSE_CMGR_SLMB);*/
#endif
qse_open_stdsios ();
ret = qse_runmain (argc, argv, test_main);
ret = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return ret;

View File

@ -103,7 +103,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
qse_open_stdsios ();
x = qse_runmain (argc, argv, test_main);
x = qse_run_main (argc, argv, test_main);
qse_close_stdsios ();
return x;

View File

@ -93,7 +93,7 @@ int qse_main (int argc, qse_achar_t* argv[])
#endif
}
x = qse_runmain (argc,argv,env_main);
x = qse_run_main (argc,argv,env_main);
qse_close_stdsios ();
return x;
}