*
* Dependencies: Xlib, XForms
*
- * Copyright: (c) 1996, 1997 Alejandro Aguilar Sierra
+ * Copyright: 1996, 1997 Alejandro Aguilar Sierra
*
* Version: 0.8beta.
*
#include "symbol_def.h"
-inline
+static inline
char * strnew(char const * s)
{
char * s1 = new char[strlen(s)+1];
objtype = LM_OT_UNDEF;
size = LM_ST_TEXT;
width = ascent = descent = 0;
- name = 0;
+ //name = 0;
}
}
-MathFuncInset::MathFuncInset(char const * nm, short ot, short st)
+MathFuncInset::MathFuncInset(string const & nm, short ot, short st)
: MathedInset("", ot, st)
{
ln = 0;
lims = (GetType() == LM_OT_FUNCLIM);
if (GetType() == LM_OT_UNDEF) {
- fname = strnew(nm);
+ fname = nm;
SetName(fname);
} else {
- fname = 0;
+ //fname = 0;
SetName(nm);
}
}
}
-MathParInset::MathParInset(short st, char const * nm, short ot)
+MathParInset::MathParInset(short st, string const & nm, short ot)
: MathedInset(nm, ot, st)
{
array = 0;
while (mrow) {
r = new MathedRowSt(nc + 1);
r->numbered = mrow->numbered;
- if (mrow->label)
- r->label = strnew(mrow->label);
+ //if (mrow->label)
+ r->label = mrow->label;
if (!ro)
row = r;
else
}
-#ifdef USE_PAINTER
void MathMatrixInset::draw(Painter & pain, int x, int baseline)
{
MathParInset::draw(pain, x, baseline);
}
-#else
-void MathMatrixInset::Draw(int x, int baseline)
-{
- MathParInset::Draw(x, baseline);
-}
-#endif
void MathMatrixInset::Metrics()
{
- int i, hl, h= 0;
- MathedRowSt * cprow= 0, * cxrow;
+ int i, hl, h = 0;
+ MathedRowSt * cprow= 0;
if (!row) {
// lyxerr << " MIDA ";
}
// Clean the arrays
- cxrow = row;
+ MathedRowSt * cxrow = row;
while (cxrow) {
for (i = 0; i <= nc; ++i) cxrow->w[i] = 0;
cxrow = cxrow->next;
}
-MathBigopInset::MathBigopInset(char const* nam, int id, short st)
+MathBigopInset::MathBigopInset(string const & nam, int id, short st)
: MathedInset(nam, LM_OT_BIGOP, st), sym(id)
{
lims = -1;
}
-MathDotsInset::MathDotsInset(char const * nam, int id, short st)
+MathDotsInset::MathDotsInset(string const & nam, int id, short st)
: MathedInset(nam, LM_OT_DOTS, st), code(id) {}