diff options
author | 2008-09-21 16:07:14 -0400 | |
---|---|---|
committer | 2008-09-21 16:07:14 -0400 | |
commit | 26551456de4cde7d73fa422437235d3aaa6ca326 (patch) | |
tree | 2d516aedb1a05c3e46dcc564a8c5c5520d1b730a /src/textadept.c | |
parent | 843367ffb298b87254676fc3603a3f63aa124bc6 (diff) | |
download | textadept-26551456de4cde7d73fa422437235d3aaa6ca326.tar.gz textadept-26551456de4cde7d73fa422437235d3aaa6ca326.zip |
Added LuaDoc to WinMain function, use C++ style cast in it; src/textadept.c
Diffstat (limited to 'src/textadept.c')
-rw-r--r-- | src/textadept.c | 11 |
1 files changed, 8 insertions, 3 deletions
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<char *>(path); gtk_init(0, NULL); l_init(0, NULL, false); create_ui(); |