From 5611d53c8c5ecf586233636d6090ce7e47644e04 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 21 Feb 2013 21:49:19 +0100 Subject: fixed global object initialization order issue * Scintilla is now initialized from main() using Interface::main() * Scintilla initialization depends on initialization of objects in the global namespace (otherwise the Lexer catalogue may not be filled properly and lexing may not work). Lexer modules were initialized after SciTECO interface initialization * merged Scintilla initialization (Interface::main()) with interface option parsing --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 78e4daa..9979ee8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -160,9 +160,7 @@ process_options(int &argc, char **&argv) mung_file = get_teco_ini(argv[0]); } - interface.parse_args(argc, argv); - - /* remaining arguments, are arguments to the munged file */ + /* remaining arguments, are arguments to the interface */ } static inline void @@ -197,6 +195,8 @@ main(int argc, char **argv) signal(SIGINT, sigint_handler); process_options(argc, argv); + interface.main(argc, argv); + /* remaining arguments are arguments to the munged file */ interface.ssm(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK); interface.ssm(SCI_SETCARETFORE, 0xFFFFFF); -- cgit v1.2.3