aboutsummaryrefslogtreecommitdiff
path: root/src/textadept.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2008-09-21 16:07:14 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2008-09-21 16:07:14 -0400
commit26551456de4cde7d73fa422437235d3aaa6ca326 (patch)
tree2d516aedb1a05c3e46dcc564a8c5c5520d1b730a /src/textadept.c
parent843367ffb298b87254676fc3603a3f63aa124bc6 (diff)
downloadtextadept-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.c11
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();