/* This file is part of
-* ======================================================
-*
-* LyX, The Document Processor
-*
-* Copyright (C) 1995 Matthias Ettrich
-* Copyright (C) 1995-1998 The LyX Team.
-*
-*======================================================*/
+ * ======================================================
+ *
+ * LyX, The Document Processor
+ *
+ * Copyright 1995 Matthias Ettrich
+ * Copyright 1995-1999 The LyX Team.
+ *
+ * ======================================================*/
#include <config.h>
-#include <stdlib.h>
+#include <cstdlib>
#ifdef __GNUG__
#pragma implementation "bufferparams.h"
#include "tex-strings.h"
#include "layout.h"
#include "vspace.h"
-#include "error.h"
-#include "lyxlib.h"
-
-// $Id: bufferparams.C,v 1.1 1999/09/27 18:44:37 larsbj Exp $
-
-#if !defined(lint) && !defined(WITH_WARNINGS)
-static char vcid[] = "$Id: bufferparams.C,v 1.1 1999/09/27 18:44:37 larsbj Exp $";
-#endif /* lint */
-
+#include "debug.h"
+#include "support/lyxlib.h"
+#include "support/lstrings.h"
BufferParams::BufferParams()
{
tocdepth = 3;
language = "default";
fonts = "default";
- inputenc = "default";
+ inputenc = "latin1";
graphicsDriver = "default";
sides = 1;
columns = 1;
fprintf(file, "\\begin_preamble\n");
{
// remove '\n' from the end of preamble
- preamble.strip('\n');
+ preamble = strip(preamble, '\n');
// write out the whole preamble in one go
fwrite(preamble.c_str(),
void BufferParams::readPreamble(LyXLex &lex)
{
if (lex.GetString() != "\\begin_preamble")
- lyxerr.print("Error (BufferParams::readPreamble):"
- "consistency check failed.");
+ lyxerr << "Error (BufferParams::readPreamble):"
+ "consistency check failed." << endl;
preamble = lex.getLongString("\\end_preamble");
}
void BufferParams::readLanguage(LyXLex &lex)
{
- LString tmptok;
- LString test;
+ string tmptok;
+ string test;
int n = 0;
if (!lex.next()) return;
break;
}
else if (test.empty()) {
- lyxerr.print("Warning: language `"
- + tmptok + "' not recognized!");
- lyxerr.print(" Setting language to `default'.");
+ lyxerr << "Warning: language `"
+ << tmptok << "' not recognized!\n"
+ << " Setting language to `default'."
+ << endl;
language = "default";
break;
}
void BufferParams::readGraphicsDriver(LyXLex &lex)
{
- LString tmptok;
- LString test;
+ string tmptok;
+ string test;
int n=0;