From 26551456de4cde7d73fa422437235d3aaa6ca326 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 21 Sep 2008 16:07:14 -0400 Subject: Added LuaDoc to WinMain function, use C++ style cast in it; src/textadept.c --- src/textadept.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/textadept.c') diff --git a/src/textadept.c b/src/textadept.c index 4d8f90d6..8bdf7e63 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -79,14 +79,19 @@ int main(int argc, char **argv) { #ifdef WIN32 char *textadept_home; + +/** + * Runs Textadept in Windows. + * Sets textadept_home according to the directory the executable is in, inits + * the Lua state, creates the user interface, and loads the core/init.lua + * script. + */ int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int) { char path[260]; GetModuleFileName(0, path, sizeof(path)); char *last_slash = strrchr(path, '\\'); if (last_slash) *last_slash = '\0'; - textadept_home = (char *)path; - - // TODO: lpCmdLine contains command line string, pass to Lua + textadept_home = static_cast(path); gtk_init(0, NULL); l_init(0, NULL, false); create_ui(); -- cgit v1.2.3