]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtextclasslist.C
redraw fix 1.
[lyx.git] / src / lyxtextclasslist.C
index 79f0c3b117f0cb2d332fee8370e2eb0b3a53037e..66b9e162845c33fbda7245b6cc118cbd0cc44c20 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
- * ====================================================== 
- * 
+ * ======================================================
+ *
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
 
 #include <utility>
 
+#ifndef CXX_GLOBAL_CSTD
+using std::exit;
+#endif
+
 using lyx::textclass_type;
 using std::pair;
 using std::make_pair;
@@ -106,13 +110,13 @@ bool LyXTextClassList::Read ()
                        "lyxlex was not able to set file: "
                       << real_file << endl;
        }
-       
+
        if (!lex.isOK()) {
                lyxerr << "LyXTextClassList::Read: unable to open "
                        "textclass file  `" << MakeDisplayPath(real_file, 1000)
                       << "'\nCheck your installation. LyX can't continue."
                       << endl;
-               return false;
+               return false;
        }
 
        bool finished = false;
@@ -129,22 +133,17 @@ bool LyXTextClassList::Read ()
                        lyxerr[Debug::TCLASS] << "Fname: " << fname << endl;
                        if (lex.next()) {
                                string const clname = lex.getString();
-                               lyxerr[Debug::TCLASS]
-                                       << "Clname: " << clname << endl;
+                               lyxerr[Debug::TCLASS] << "Clname: " << clname << endl;
                                if (lex.next()) {
-                                             string const desc = lex.getString();
-                                             lyxerr[Debug::TCLASS]
-                                                     << "Desc: " << desc << endl;
-                                             // This code is run when we have
-                                             // fname, clname and desc
-                                             LyXTextClass tmpl(fname,
-                                                               clname,
-                                                               desc);
-                                             if (lyxerr.
-                                                 debugging(Debug::TCLASS)) {
-                                                     tmpl.load();
-                                             }
-                                             Add (tmpl);
+                                       string const desc = lex.getString();
+                                       lyxerr[Debug::TCLASS] << "Desc: " << desc << endl;
+                                       // This code is run when we have
+                                       // fname, clname and desc
+                                       LyXTextClass tmpl(fname, clname, desc);
+                                       if (lyxerr.debugging(Debug::TCLASS)) {
+                                               tmpl.load();
+                                       }
+                                       Add(tmpl);
                                }
                        }
                }
@@ -172,7 +171,7 @@ LyXTextClassList textclasslist;
 void LyXSetStyle()
 {
        lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration...\n";
-       
+
        if (!textclasslist.Read()) {
                lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
                        "during parsing.\n             Exiting." << endl;