A bit of cxx warniong hunting; update to rpm spec file.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@596 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-03-09 16:13:43 +00:00
parent 28ed6c5e80
commit 8dbf9d296e
13 changed files with 101 additions and 34 deletions

View File

@ -1,3 +1,24 @@
2000-03-09 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lib/doc/LaTeXConfig.lyx.in: add description of textclass llncs.
* src/mathed/math_macro.C (draw): do some cast magic.
(Metrics): ditto.
* src/mathed/math_defs.h: change byte* argument to byte const*.
* src/mathed/formulamacro.[Ch]: add free_spc to Latex() method.
* src/insets/insetfoot.[Ch]: Clone() always returns an Inset* (well I
know it is right to return InsetFoot* too, but cxx does not like
it...).
* src/insets/insetcollapsable.[Ch] (Clone): make const.
* development/lyx.spec.in: unset LINGUAS to avoid i18n problems.
* src/mathed/math_delim.C: change == to proper assignment.
2000-03-09 Juergen Vigna <jug@sad.it> 2000-03-09 Juergen Vigna <jug@sad.it>
* src/insets/insettext.C (setPos): fixed various cursor positioning * src/insets/insettext.C (setPos): fixed various cursor positioning

View File

@ -36,10 +36,12 @@ place that the Redhat tetex package is installed and would see it.
%setup %setup
%build %build
unset LINGUAS
CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
make make
%install %install
unset LINGUAS
rm -rf ${RPM_BUILD_ROOT} rm -rf ${RPM_BUILD_ROOT}
install -d -m 755 ${RPM_BUILD_ROOT} install -d -m 755 ${RPM_BUILD_ROOT}
make prefix=${RPM_BUILD_ROOT}/usr install make prefix=${RPM_BUILD_ROOT}/usr install

View File

@ -492,6 +492,33 @@ dinbrief
can be used to type letters according to German conventions. can be used to type letters according to German conventions.
\layout Subsection \layout Subsection
docbook
\layout Description
Found: @chk_docbook@
\layout Description
CTAN: N/A
\layout Description
WWW:
\begin_inset LatexCommand \url{http://www.sgmltools.org}
\end_inset
\layout Description
Notes: The class docbook is not a LaTeX document class.
It is designed to produce Docbook SGML documents, which, in turn, can be
exported as HTML, RTF, text, or dvi (through
\family typewriter
jadetex
\family default
).
You need the sgmltools v2.0 package installed to use this.
\layout Subsection
g-brief-en g-brief-en
\layout Description \layout Description
@ -759,31 +786,43 @@ LinuxDoc
\layout Subsection \layout Subsection
docbook llncs
\layout Description \layout Description
Found: @chk_docbook@ Found: @chk_llncs@
\layout Description \layout Description
CTAN: N/A CTAN: N/A
\layout Description \layout Description
WWW: Notes: The document class
\begin_inset LatexCommand \url{http://www.sgmltools.org} \family sans
llncs
\family default
can be used to write articles for submission to the Springer journal
\begin_inset Quotes eld
\end_inset
Lecture Notes in Computer Science
\begin_inset Quotes erd
\end_inset
.
LaTeX documents are available from Springer's ftp site on the following
URL:
\newline
\begin_inset LatexCommand \url{ftp://trick.ntp.springer.de/pub/tex/latex/llncs/latex2e}
\end_inset \end_inset
.
\layout Description \begin_deeper
\layout Standard
Notes: The class docbook is not a LaTeX document class. The LyX layout file for this document class is still insufficiently tested.
It is designed to produce Docbook SGML documents, which, in turn, can be \end_deeper
exported as HTML, RTF, text, or dvi (through
\family typewriter
jadetex
\family default
).
You need the sgmltools v2.0 package installed to use this.
\layout Subsection \layout Subsection
paper paper

View File

@ -32,7 +32,7 @@ InsetCollapsable::InsetCollapsable(Buffer * bf): InsetText(bf)
} }
Inset * InsetCollapsable::Clone() Inset * InsetCollapsable::Clone() const
{ {
Inset * result = new InsetCollapsable(buffer); Inset * result = new InsetCollapsable(buffer);
return result; return result;

View File

@ -38,7 +38,7 @@ public:
/// ///
~InsetCollapsable() {} ~InsetCollapsable() {}
/// ///
Inset * Clone(); Inset * Clone() const;
/// ///
int ascent(Painter &, LyXFont const &) const; int ascent(Painter &, LyXFont const &) const;
/// ///

View File

@ -33,9 +33,9 @@ InsetFoot::InsetFoot(Buffer * bf): InsetCollapsable(bf)
} }
InsetFoot * InsetFoot::Clone() const Inset * InsetFoot::Clone() const
{ {
InsetFoot * result = new InsetFoot(buffer); Inset * result = new InsetFoot(buffer);
return result; return result;
} }

View File

@ -33,7 +33,7 @@ public:
/// ///
~InsetFoot() {} ~InsetFoot() {}
/// ///
InsetFoot * Clone() const; Inset * Clone() const;
/// ///
Inset::Code LyxCode() const { return Inset::FOOT_CODE; } Inset::Code LyxCode() const { return Inset::FOOT_CODE; }
#ifndef USE_OSTREAM_ONLY #ifndef USE_OSTREAM_ONLY

View File

@ -238,7 +238,7 @@ int mathed_char_height(short type, int size, byte c, int & asc, int & des)
// In a near future maybe we use a better fonts renderer // In a near future maybe we use a better fonts renderer
void MathedInset::drawStr(Painter & pain, short type, int size, void MathedInset::drawStr(Painter & pain, short type, int size,
int x, int y, byte * s, int ls) int x, int y, byte const * s, int ls)
{ {
string st; string st;
if (MathIsBinary(type)) { if (MathIsBinary(type)) {
@ -246,7 +246,7 @@ void MathedInset::drawStr(Painter & pain, short type, int size,
st += string(" ") + char(s[i]) + ' '; st += string(" ") + char(s[i]) + ' ';
} }
} else { } else {
st = string(reinterpret_cast<char*>(s), ls); st = string(reinterpret_cast<char const *>(s), ls);
} }
LyXFont mf = mathed_get_font(type, size); LyXFont mf = mathed_get_font(type, size);
pain.text(x, y, st, mf); pain.text(x, y, st, mf);

View File

@ -66,11 +66,12 @@ Inset * InsetFormulaMacro::Clone() const
void InsetFormulaMacro::Write(ostream & os) const void InsetFormulaMacro::Write(ostream & os) const
{ {
os << "FormulaMacro "; os << "FormulaMacro ";
Latex(os, 0); Latex(os, 0, false);
} }
int InsetFormulaMacro::Latex(ostream & os, signed char /*fragile*/) const int InsetFormulaMacro::Latex(ostream & os, signed char /*fragile*/,
bool /*free_spacing*/) const
{ {
int ret = 1; int ret = 1;
tmacro->WriteDef(os); tmacro->WriteDef(os);
@ -79,7 +80,8 @@ int InsetFormulaMacro::Latex(ostream & os, signed char /*fragile*/) const
#ifndef USE_OSTREAM_ONLY #ifndef USE_OSTREAM_ONLY
int InsetFormulaMacro::Latex(string &file, signed char /*fragile*/) const int InsetFormulaMacro::Latex(string &file, signed char /*fragile*/,
bool /*free_spacing*/) const
{ {
int ret = 1; int ret = 1;
tmacro->WriteDef(file); tmacro->WriteDef(file);

View File

@ -48,10 +48,10 @@ public:
/// ///
void Write(ostream & os) const; void Write(ostream & os) const;
/// ///
int Latex(ostream & os, signed char fragile) const; int Latex(ostream & os, signed char fragile, bool free_spc) const;
#ifndef USE_OSTREAM_ONLY #ifndef USE_OSTREAM_ONLY
/// ///
int Latex(string & file, signed char fragile) const; int Latex(string & file, signed char fragile, bool free_spc) const;
/// ///
int Linuxdoc(string & file) const; int Linuxdoc(string & file) const;
/// ///

View File

@ -289,7 +289,7 @@ class MathedInset {
static int df_asc, df_des, df_width; static int df_asc, df_des, df_width;
/// In a near future maybe we use a better fonts renderer than X /// In a near future maybe we use a better fonts renderer than X
void drawStr(Painter &, short, int, int, int, byte *, int); void drawStr(Painter &, short, int, int, int, byte const *, int);
/// ///
friend class MathedCursor; friend class MathedCursor;
/// ///

View File

@ -321,7 +321,7 @@ public:
sort(math_deco_table, sort(math_deco_table,
math_deco_table + math_deco_table_size, math_deco_table + math_deco_table_size,
math_deco_compare()); math_deco_compare());
init_deco_table::init == true; init_deco_table::init = true;
} }
} }
private: private:

View File

@ -271,13 +271,14 @@ void MathMacroArgument::draw(Painter & pain, int x, int baseline)
#ifdef HAVE_SSTREAM #ifdef HAVE_SSTREAM
ostringstream ost; ostringstream ost;
ost << '#' << number; ost << '#' << number;
drawStr(pain, LM_TC_TEX, size, x, baseline, ost.str().c_str(), 2); drawStr(pain, LM_TC_TEX, size, x, baseline,
reinterpret_cast<byte const *>(ost.str().c_str()), 2);
#else #else
char s[3]; char s[3];
ostrstream ost(s, 3); ostrstream ost(s, 3);
ost << '#' << number << '\0'; ost << '#' << number << '\0';
drawStr(pain, LM_TC_TEX, size, x, baseline, drawStr(pain, LM_TC_TEX, size, x, baseline,
reinterpret_cast<unsigned char*>(ost.str()), 2); reinterpret_cast<byte *>(ost.str()), 2);
#endif #endif
} }
} }
@ -291,18 +292,20 @@ void MathMacroArgument::Metrics()
#ifdef HAVE_SSTREAM #ifdef HAVE_SSTREAM
ostringstream ost; ostringstream ost;
ost << '#' << number; ost << '#' << number;
width = mathed_string_width(LM_TC_TEX, size, ost.str().c_str(), 2); width = mathed_string_width(LM_TC_TEX, size,
reinterpret_cast<byte const *>(ost.str().c_str()), 2);
mathed_string_height(LM_TC_TEX, size, mathed_string_height(LM_TC_TEX, size,
ost.str().c_str(), 2, ascent, descent); reinterpret_cast<byte const *>(ost.str().c_str()),
2, ascent, descent);
#else #else
char s[3]; char s[3];
ostrstream ost(s, 3); ostrstream ost(s, 3);
ost << '#' << number << '\0'; ost << '#' << number << '\0';
width = mathed_string_width(LM_TC_TEX, size, width = mathed_string_width(LM_TC_TEX, size,
reinterpret_cast<unsigned char*> reinterpret_cast<byte *>
(ost.str()), 2); (ost.str()), 2);
mathed_string_height(LM_TC_TEX, size, mathed_string_height(LM_TC_TEX, size,
reinterpret_cast<unsigned char*>(ost.str()), reinterpret_cast<byte *>(ost.str()),
2, ascent, descent); 2, ascent, descent);
#endif #endif
} }