From f093965dfc07935323b8a9244a591d84788b497c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 21 Sep 2008 22:16:18 -0400 Subject: Textadept gracefully exits when errors occur in core/init.lua. Originally the error message was displayed in Textadept, but any attempts to close the program would fail because core/init.lua wasn't properly loaded. Errors from 'l_load_script' are displayed in a dialog box now. --- src/textadept.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/textadept.h') diff --git a/src/textadept.h b/src/textadept.h index 504dae05..05258ba5 100644 --- a/src/textadept.h +++ b/src/textadept.h @@ -12,6 +12,11 @@ #include #include +#ifdef WIN32 +#include "Windows.h" +#define strcasecmp _stricmp +#endif + extern "C" { #include #include @@ -63,9 +68,9 @@ GtkWidget *find_create_ui(); void find_toggle_focus(); // lua_interface.c -void l_init(int argc, char **argv, bool reinit); +bool l_init(int argc, char **argv, bool reinit); void l_close(); -void l_load_script(const char *script_file); +bool l_load_script(const char *script_file); void l_add_scintilla_window(GtkWidget *editor); void l_remove_scintilla_window(GtkWidget *editor); void l_goto_scintilla_window(GtkWidget *editor, int n, bool absolute); -- cgit v1.2.3