]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
Applied Angus patch to compile on DEC C++ and to avoid name clashes
[lyx.git] / src / lyx_main.C
index 0a02da911d4a32d980d03851bcc620565cfc12e1..6d7a1d4780b3acedd8ad9953146222e967d95395 100644 (file)
@@ -64,7 +64,7 @@ LyXServer * lyxserver = 0;
 bool finished = false; // flag, that we are quitting the program
 
 // convenient to have it here.
-kb_keymap * toplevel_keymap;
+boost::scoped_ptr<kb_keymap> toplevel_keymap;
 
 
 LyX::LyX(int * argc, char * argv[])
@@ -78,8 +78,8 @@ LyX::LyX(int * argc, char * argv[])
        bool gui = easyParse(argc, argv);
 
        // Global bindings (this must be done as early as possible.) (Lgb)
-       toplevel_keymap = new kb_keymap;
-       defaultKeyBindings(toplevel_keymap);
+       toplevel_keymap.reset(new kb_keymap);
+       defaultKeyBindings(toplevel_keymap.get());
        
        // Make the GUI object, and let it take care of the
        // command line arguments that concerns it.
@@ -432,7 +432,7 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
        // Bind the X dead keys to the corresponding LyX functions if
        // necessary. 
        if (lyxrc.override_x_deadkeys)
-               deadKeyBindings(toplevel_keymap);
+               deadKeyBindings(toplevel_keymap.get());
 
        if (lyxerr.debugging(Debug::LYXRC)) {
                lyxrc.print();
@@ -690,8 +690,9 @@ void LyX::ReadEncodingsFile(string const & name)
 }
 
 
+namespace {
+
 // Set debugging level and report result to user
-static
 void setDebuggingLevel(string const & dbgLevel)
 {
        lyxerr << _("Setting debug level to ") <<  dbgLevel << endl;
@@ -701,7 +702,6 @@ void setDebuggingLevel(string const & dbgLevel)
 
 
 // Give command line help
-static
 void commandLineHelp()
 {
        lyxerr << "LyX " LYX_VERSION << " of " LYX_RELEASE << endl;
@@ -725,6 +725,8 @@ void commandLineHelp()
                  "Check the LyX man page for more details.") << endl;
 }
 
+} // namespace anon
+
 
 bool LyX::easyParse(int * argc, char * argv[])
 {