mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 08:44:01 +00:00
fix compilation on gcc 3.0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_1_6@2126 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6868f520ad
commit
8c7c775c9f
45
ChangeLog
45
ChangeLog
@ -1,6 +1,49 @@
|
||||
2001-06-08 Yves Bastide <stid@acm.org>
|
||||
|
||||
* src/support/lyxstring.C:
|
||||
* src/mathed/math_write.C:
|
||||
* src/mathed/math_hash.C:
|
||||
* src/support/syscontr.C:
|
||||
* src/support/syscall.C:
|
||||
* src/support/lstrings.C:
|
||||
* src/support/LSubstring.C:
|
||||
* src/mathed/math_symbols.C:
|
||||
* src/mathed/math_parser.C:
|
||||
* src/mathed/math_panel.C:
|
||||
* src/mathed/math_iter.C:
|
||||
* src/mathed/formula.C:
|
||||
* src/insets/insetgraphics.C:
|
||||
* src/frontends/xforms/FormPrint.C:
|
||||
* src/tabular.C:
|
||||
* src/tabular-old.C:
|
||||
* src/spellchecker.C:
|
||||
* src/lyxserver.C:
|
||||
* src/lyxfont.C:
|
||||
* src/lyx_gui_misc.C:
|
||||
* src/buffer.C:
|
||||
* src/FontInfo.C: added necessary using directives
|
||||
|
||||
* src/mathed/array.h: include <cstring>, not <string.h>
|
||||
(LyxArrayBase::Init):
|
||||
(LyxArrayBase::Resize):
|
||||
(LyxArrayBase::LyxArrayBase):
|
||||
(LyxArrayBase::operator=):
|
||||
(LyxArrayBase::Move):
|
||||
(LyxArrayBase::Merge):
|
||||
(LyxArrayBase::MergeF):
|
||||
(LyxArrayBase::Copy): added necessary using directives
|
||||
|
||||
* src/insets/figinset.C: added necessary using directives
|
||||
(runqueue): removed a spurious ::
|
||||
|
||||
* src/font.h (lyxfont::width(char const * s, LyXFont const & f)):
|
||||
commented out
|
||||
|
||||
* src/support/lstrings.h (compare): use CXX_GLOBAL_CSTD
|
||||
|
||||
2001-06-13 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/tabular.C (ReadNew): fixed reading of files with trailing LF.
|
||||
* src/tabular.C (ReadNew): fixed reading of files with trailing CR.
|
||||
|
||||
2001-06-12 Peter Suetterlin <P.Suetterlin@astro.uu.nl>
|
||||
|
||||
|
@ -25,6 +25,10 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::fabs;
|
||||
#endif
|
||||
|
||||
/// Load font close to this size
|
||||
string const FontInfo::getFontname(int size)
|
||||
{
|
||||
|
@ -107,6 +107,13 @@ using std::vector;
|
||||
using std::max;
|
||||
using std::set;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
using std::strstr;
|
||||
using std::strcmp;
|
||||
using std::strcpy;
|
||||
#endif
|
||||
|
||||
// all these externs should eventually be removed.
|
||||
extern BufferList bufferlist;
|
||||
|
||||
|
@ -59,10 +59,10 @@ struct lyxfont {
|
||||
return width(s.c_str(), s.length(), f);
|
||||
}
|
||||
///
|
||||
static
|
||||
int width(char const * s, LyXFont const & f) {
|
||||
return width(s, strlen(s), f);
|
||||
}
|
||||
// static
|
||||
// int width(char const * s, LyXFont const & f) {
|
||||
// return width(s, strlen(s), f);
|
||||
// }
|
||||
///
|
||||
static
|
||||
int signedWidth(string const & s, LyXFont const & f);
|
||||
|
@ -32,6 +32,10 @@ using Liason::printBuffer;
|
||||
using Liason::getPrinterParams;
|
||||
#endif
|
||||
|
||||
// Should be needed sooner or later
|
||||
// #ifndef CXX_GLOBAL_CSTD
|
||||
// using std::strlen;
|
||||
// #endif
|
||||
|
||||
FormPrint::FormPrint(LyXView * lv, Dialogs * d)
|
||||
: FormBaseBD(lv, d, _("Print"), new OkApplyCancelPolicy),
|
||||
|
@ -81,6 +81,16 @@ using std::endl;
|
||||
using std::ostringstream;
|
||||
using std::copy;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
using std::strcmp;
|
||||
using std::memcpy;
|
||||
using std::sin;
|
||||
using std::cos;
|
||||
using std::ceil;
|
||||
using std::fabs;
|
||||
#endif
|
||||
|
||||
extern BufferView * current_view;
|
||||
extern FL_OBJECT * figinset_canvas;
|
||||
|
||||
@ -644,7 +654,7 @@ void runqueue()
|
||||
env[0] = new char[tmp.size() + 1];
|
||||
std::copy(tmp.begin(), tmp.end(), env[0]);
|
||||
env[0][tmp.size()] = '\0';
|
||||
::memcpy(&env[1], environ, sizeof(char*) * (ne + 1));
|
||||
memcpy(&env[1], environ, sizeof(char*) * (ne + 1));
|
||||
environ = env;
|
||||
|
||||
// now make gs command
|
||||
|
@ -192,6 +192,10 @@ using std::ostream;
|
||||
using std::endl;
|
||||
using std::max;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
// Initialize only those variables that do not have a constructor.
|
||||
InsetGraphics::InsetGraphics()
|
||||
#ifdef IG_OLDPARAMS
|
||||
|
@ -42,6 +42,10 @@ using std::pair;
|
||||
using std::make_pair;
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strerror;
|
||||
#endif
|
||||
|
||||
extern BufferView * current_view;
|
||||
|
||||
extern FD_form_character * fd_form_character;
|
||||
|
@ -29,6 +29,10 @@
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Names for the GUI
|
||||
//
|
||||
|
@ -69,6 +69,11 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strerror;
|
||||
using std::strncmp;
|
||||
#endif
|
||||
|
||||
// provide an empty mkfifo() if we do not have one. This disables the
|
||||
// lyxserver.
|
||||
#ifndef HAVE_MKFIFO
|
||||
|
@ -14,7 +14,7 @@
|
||||
* the GNU General Public Licence version 2 or later.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
#ifndef byte
|
||||
#define byte unsigned char
|
||||
@ -108,6 +108,9 @@ private:
|
||||
inline
|
||||
void LyxArrayBase::Init()
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memset;
|
||||
#endif
|
||||
memset(bf, 0, maxsize);
|
||||
last = 0;
|
||||
}
|
||||
@ -115,6 +118,9 @@ void LyxArrayBase::Init()
|
||||
inline // Hmmm, Hp-UX's CC can't handle this inline. Asger.
|
||||
void LyxArrayBase::Resize(int newsize)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcpy;
|
||||
#endif
|
||||
if (newsize<ARRAY_MIN_SIZE)
|
||||
newsize = ARRAY_MIN_SIZE;
|
||||
newsize += ARRAY_STEP - (newsize % ARRAY_STEP);
|
||||
@ -144,6 +150,9 @@ LyxArrayBase::~LyxArrayBase()
|
||||
inline
|
||||
LyxArrayBase::LyxArrayBase(LyxArrayBase const & a)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcpy;
|
||||
#endif
|
||||
maxsize = a.maxsize;
|
||||
bf = new byte[maxsize];
|
||||
memcpy(&bf[0], &a.bf[0], maxsize);
|
||||
@ -153,6 +162,9 @@ LyxArrayBase::LyxArrayBase(LyxArrayBase const & a)
|
||||
inline
|
||||
LyxArrayBase & LyxArrayBase::operator=(LyxArrayBase const & a)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcpy;
|
||||
#endif
|
||||
if (this != &a) {
|
||||
Resize(a.maxsize);
|
||||
memcpy(&bf[0], &a.bf[0], maxsize);
|
||||
@ -163,6 +175,9 @@ LyxArrayBase & LyxArrayBase::operator=(LyxArrayBase const & a)
|
||||
inline
|
||||
bool LyxArrayBase::Move(int p, int shift)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memmove;
|
||||
#endif
|
||||
bool result = false;
|
||||
if (p <= last) {
|
||||
if (last + shift >= maxsize) {
|
||||
@ -191,6 +206,9 @@ void LyxArrayBase::Remove(int pos, int dx)
|
||||
inline
|
||||
void LyxArrayBase::Merge(LyxArrayBase * a, int p, int dx)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcpy;
|
||||
#endif
|
||||
Move(p, dx);
|
||||
memcpy(&bf[p], &a->bf[0], dx);
|
||||
}
|
||||
@ -198,12 +216,18 @@ void LyxArrayBase::Merge(LyxArrayBase * a, int p, int dx)
|
||||
inline
|
||||
void LyxArrayBase::MergeF(LyxArrayBase * a, int p, int dx)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcpy;
|
||||
#endif
|
||||
memcpy(&bf[p], &a->bf[0], dx);
|
||||
}
|
||||
|
||||
inline
|
||||
void LyxArrayBase::Copy(void * a, int p, int dx)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcpy;
|
||||
#endif
|
||||
memcpy(&bf[p], a, dx);
|
||||
}
|
||||
|
||||
|
@ -47,12 +47,10 @@ using std::endl;
|
||||
using std::vector;
|
||||
using std::max;
|
||||
|
||||
#if 0
|
||||
using std::strncmp;
|
||||
using std::strcmp;
|
||||
using std::abs;
|
||||
using std::isdigit;
|
||||
using std::isalpha;
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strncpy;
|
||||
using std::strlen;
|
||||
using std::strchr;
|
||||
#endif
|
||||
|
||||
extern string mathed_label;
|
||||
|
@ -9,6 +9,10 @@
|
||||
#include "math_parser.h"
|
||||
//struct latexkeys { char* name; short token; int id; };
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strcmp;
|
||||
#endif
|
||||
|
||||
#define TOTAL_KEYWORDS 269
|
||||
#define MIN_WORD_LENGTH 2
|
||||
#define MAX_WORD_LENGTH 18
|
||||
|
@ -29,6 +29,10 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strncpy;
|
||||
#endif
|
||||
|
||||
const int SizeInset = sizeof(char*) + 2;
|
||||
|
||||
extern int mathed_char_width(short type, int style, byte c);
|
||||
|
@ -37,8 +37,8 @@
|
||||
#include "matrix.xpm"
|
||||
#include "equation.xpm"
|
||||
|
||||
#if 0
|
||||
using std::free;
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
static LyXFunc * lyxfunc = 0;
|
||||
|
@ -34,10 +34,11 @@
|
||||
using std::istream;
|
||||
using std::endl;
|
||||
|
||||
#if 0
|
||||
using std::isalpha;
|
||||
using std::isdigit;
|
||||
using std::isspace;
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strchr;
|
||||
using std::strlen;
|
||||
using std::strcpy;
|
||||
using std::strcmp;
|
||||
#endif
|
||||
|
||||
enum {
|
||||
|
@ -44,6 +44,12 @@ using std::max;
|
||||
using std::endl;
|
||||
using std::ostream;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
using std::strcmp;
|
||||
using std::strstr;
|
||||
#endif
|
||||
|
||||
extern int greek_kb_flag;
|
||||
|
||||
extern BufferView * current_view;
|
||||
|
@ -27,6 +27,10 @@
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strcmp;
|
||||
#endif
|
||||
|
||||
extern char const * latex_mathenv[];
|
||||
extern char * latex_mathspace[];
|
||||
|
||||
|
@ -2895,7 +2895,7 @@ void LyXParagraph::SimpleTeXSpecialChars(Buffer const * buf,
|
||||
if (tmp) {
|
||||
column = 0;
|
||||
} else {
|
||||
column += os.tellp() - len;
|
||||
column += int(os.tellp()) - len;
|
||||
}
|
||||
for (; tmp--;) {
|
||||
texrow.newline();
|
||||
|
@ -72,6 +72,13 @@
|
||||
using std::reverse;
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strpbrk;
|
||||
using std::strstr;
|
||||
using std::strlen;
|
||||
using std::strcpy;
|
||||
#endif
|
||||
|
||||
// Spellchecker status
|
||||
enum {
|
||||
ISP_OK = 1,
|
||||
|
@ -18,6 +18,9 @@
|
||||
|
||||
#include "LSubstring.h"
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
LSubstring::LSubstring(string & s, size_type i, size_type l)
|
||||
: ps(&s), pos(i), n(l)
|
||||
|
@ -26,9 +26,11 @@
|
||||
|
||||
using std::count;
|
||||
using std::transform;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::tolower;
|
||||
using std::toupper;
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
|
||||
#include "Lsstream.h"
|
||||
@ -31,14 +30,22 @@ int compare_no_case(string const & s, string const & s2, unsigned int len);
|
||||
inline
|
||||
int compare(char const * a, char const * b)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
return std::strcmp(a, b);
|
||||
#else
|
||||
return strcmp(a, b);
|
||||
#endif
|
||||
}
|
||||
|
||||
///
|
||||
inline
|
||||
int compare(char const * a, char const * b, unsigned int len)
|
||||
{
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
return std::strncmp(a, b, len);
|
||||
#else
|
||||
return strncmp(a, b, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
///
|
||||
|
@ -29,6 +29,16 @@ using std::min;
|
||||
using std::istream;
|
||||
using std::ostream;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::memcmp;
|
||||
using std::memcpy;
|
||||
using std::memset;
|
||||
using std::memmove;
|
||||
using std::strlen;
|
||||
using std::memchr;
|
||||
using std::strchr;
|
||||
#endif
|
||||
|
||||
// This class is supposed to be functionaly equivalent to a
|
||||
// standard conformant string. This mean among others that we
|
||||
// are useing the same requirements. Before you change anything
|
||||
|
@ -18,6 +18,9 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strerror;
|
||||
#endif
|
||||
|
||||
Systemcalls::Systemcalls() {
|
||||
pid = 0; // No child yet
|
||||
|
@ -15,6 +15,10 @@
|
||||
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strerror;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Default constructor
|
||||
//
|
||||
|
@ -20,6 +20,9 @@ using std::istream;
|
||||
using std::getline;
|
||||
using std::endl;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
static
|
||||
bool getTokenValue(string const & str, const char * token, string & ret)
|
||||
|
@ -40,6 +40,10 @@ using std::max;
|
||||
using std::endl;
|
||||
using std::vector;
|
||||
|
||||
#ifndef CXX_GLOBAL_CSTD
|
||||
using std::strlen;
|
||||
#endif
|
||||
|
||||
static int const WIDTH_OF_LINE = 5;
|
||||
|
||||
/// Define a few methods for the inner structs
|
||||
|
Loading…
x
Reference in New Issue
Block a user