small stuff, perhaps you should have a look at the change in math_parser, Andre

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3230 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-12-18 03:16:46 +00:00
parent 12d3ca2886
commit f70513fe19
11 changed files with 69 additions and 25 deletions

View File

@ -1,3 +1,21 @@
2001-12-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
* math_atom.C:
* math_binaryopinset.C:
* math_binominset.C:
* math_casesinset.C:
* math_charinset.C:
* math_data.C:
* math_diminset.C:add missing config.h
* math_cursor.C:
* math_parser.C: move inludes around a bit.
* math_extinset.C: user boost::scoped_ptr
* math_parser.C: user std::fill to fill the catcodes. (please
check this one...), and some consts.
2001-12-11 André Pönitz <poenitz@gmx.net>
* math_cursor.C: allow cut&paste of rectangular regions of cells

View File

@ -12,6 +12,8 @@
* the GNU General Public Licence version 2 or later.
*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif

View File

@ -1,3 +1,5 @@
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif

View File

@ -1,3 +1,5 @@
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif

View File

@ -1,3 +1,5 @@
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif

View File

@ -1,3 +1,5 @@
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif

View File

@ -15,25 +15,18 @@
* the GNU General Public Licence version 2 or later.
*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include <config.h>
#include <algorithm>
#include <cctype>
#include "support/lstrings.h"
#include "support/LAssert.h"
#include "debug.h"
#include "LColor.h"
#include "Painter.h"
#include "math_cursor.h"
#include "formulabase.h"
#include "math_arrayinset.h"
#include "math_braceinset.h"
#include "math_casesinset.h"
#include "math_charinset.h"
#include "math_cursor.h"
#include "math_deliminset.h"
#include "math_factory.h"
#include "math_hullinset.h"
@ -46,6 +39,16 @@
#include "math_specialcharinset.h"
#include "math_support.h"
#include "debug.h"
#include "LColor.h"
#include "Painter.h"
#include "support/lstrings.h"
#include "support/LAssert.h"
#include <algorithm>
#include <cctype>
#define FILEDEBUG 0
using std::endl;
@ -1244,7 +1247,7 @@ bool MathCursor::interpret(string const & s)
if (s == "\\over" || s == "\\choose" || s == "\\atop") {
MathArray ar = array();
MathAtom t = createMathInset(s.substr(1));
MathAtom t(createMathInset(s.substr(1)));
t->asNestInset()->cell(0).swap(array());
pos() = 0;
niceInsert(t);

View File

@ -1,3 +1,5 @@
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif

View File

@ -1,3 +1,5 @@
#include <config.h>
#include "math_diminset.h"

View File

@ -7,6 +7,8 @@
#include "math_symbolinset.h"
#include "debug.h"
#include <boost/smart_ptr.hpp>
using std::endl;
@ -75,12 +77,11 @@ void MathExIntInset::maplize(MapleStream & os) const
void MathExIntInset::mathmlize(MathMLStream & os) const
{
MathSymbolInset * sym = new MathSymbolInset(symbol_);
boost::scoped_ptr<MathSymbolInset> sym(new MathSymbolInset(symbol_));
//if (hasScripts())
// mathmlize(sym, os);
//else
sym->mathmlize(os);
delete sym;
os << cell(0) << "<mo> &InvisibleTimes; </mo>"
<< MTag("mrow") << "<mo> &DifferentialD; </mo>"
<< cell(1) << ETag("mrow");

View File

@ -45,9 +45,6 @@ point to write some macros:
#include <config.h>
#include <cctype>
#include <stack>
#ifdef __GNUG__
#pragma implementation
#endif
@ -73,22 +70,29 @@ point to write some macros:
#include "math_splitinset.h"
#include "math_sqrtinset.h"
#include "math_support.h"
#include "lyxlex.h"
#include "debug.h"
#include "support/lstrings.h"
#include <cctype>
#include <stack>
#include <algorithm>
using std::istream;
using std::ostream;
using std::ios;
using std::endl;
using std::stack;
using std::fill;
namespace {
bool stared(string const & s)
{
unsigned n = s.size();
unsigned const n = s.size();
return n && s[n - 1] == '*';
}
@ -141,12 +145,16 @@ enum {
void catInit()
{
for (int i = 0; i <= 255; ++i)
theCatcode[i] = catOther;
for (int i = 'a'; i <= 'z'; ++i)
theCatcode[i] = catLetter;
for (int i = 'A'; i <= 'Z'; ++i)
theCatcode[i] = catLetter;
fill(theCatcode, theCatcode + 256, catOther);
fill(theCatcode + 'a', theCatcode + 'z' + 1, catLetter);
fill(theCatcode + 'A', theCatcode + 'Z' + 1, catLetter);
// for (int i = 0; i <= 255; ++i)
// theCatcode[i] = catOther;
// for (int i = 'a'; i <= 'z'; ++i)
// theCatcode[i] = catLetter;
// for (int i = 'A'; i <= 'Z'; ++i)
// theCatcode[i] = catLetter;
theCatcode['\\'] = catEscape;
theCatcode['{'] = catBegin;
@ -178,7 +186,7 @@ public:
///
Token(char c, CatCode cat) : cs_(), char_(c), cat_(cat) {}
///
Token(const string & cs) : cs_(cs), char_(0), cat_(catIgnore) {}
Token(string const & cs) : cs_(cs), char_(0), cat_(catIgnore) {}
///
string const & cs() const { return cs_; }
@ -500,7 +508,7 @@ bool Parser::parse_lines(MathAtom & t, bool numbered, bool outmost)
return false;
}
const int cols = p->ncols();
int const cols = p->ncols();
// save global variables
bool const saved_num = curr_num_;