src/debug.C
src/exporter.C
src/ext_l10n.h
-src/figure_form.C
src/figureForm.C
+src/figure_form.C
src/FontLoader.C
src/frontends/controllers/ButtonController.h
src/frontends/controllers/character.C
src/frontends/qt2/tabularcreatedlgimpl.C
src/frontends/xforms/combox.C
src/frontends/xforms/FileDialog.C
-src/frontends/xforms/form_bibitem.C
src/frontends/xforms/FormBibitem.C
-src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/form_bibitem.C
src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/form_bibtex.C
src/frontends/xforms/form_browser.C
-src/frontends/xforms/form_character.C
src/frontends/xforms/FormCharacter.C
-src/frontends/xforms/form_citation.C
+src/frontends/xforms/form_character.C
src/frontends/xforms/FormCitation.C
-src/frontends/xforms/form_copyright.C
+src/frontends/xforms/form_citation.C
src/frontends/xforms/FormCopyright.C
-src/frontends/xforms/form_credits.C
+src/frontends/xforms/form_copyright.C
src/frontends/xforms/FormCredits.C
-src/frontends/xforms/form_document.C
+src/frontends/xforms/form_credits.C
src/frontends/xforms/FormDocument.C
-src/frontends/xforms/form_error.C
+src/frontends/xforms/form_document.C
src/frontends/xforms/FormError.C
-src/frontends/xforms/form_external.C
+src/frontends/xforms/form_error.C
src/frontends/xforms/FormExternal.C
-src/frontends/xforms/form_filedialog.C
+src/frontends/xforms/form_external.C
src/frontends/xforms/FormFiledialog.C
-src/frontends/xforms/form_graphics.C
+src/frontends/xforms/form_filedialog.C
src/frontends/xforms/FormGraphics.C
-src/frontends/xforms/form_include.C
+src/frontends/xforms/form_graphics.C
src/frontends/xforms/FormInclude.C
-src/frontends/xforms/form_index.C
+src/frontends/xforms/form_include.C
src/frontends/xforms/FormIndex.C
+src/frontends/xforms/form_index.C
src/frontends/xforms/FormLog.C
src/frontends/xforms/FormMathsBitmap.C
-src/frontends/xforms/form_maths_deco.C
src/frontends/xforms/FormMathsDeco.C
-src/frontends/xforms/form_maths_delim.C
+src/frontends/xforms/form_maths_deco.C
src/frontends/xforms/FormMathsDelim.C
-src/frontends/xforms/form_maths_matrix.C
+src/frontends/xforms/form_maths_delim.C
src/frontends/xforms/FormMathsMatrix.C
-src/frontends/xforms/form_maths_panel.C
+src/frontends/xforms/form_maths_matrix.C
src/frontends/xforms/FormMathsPanel.C
-src/frontends/xforms/form_maths_space.C
+src/frontends/xforms/form_maths_panel.C
src/frontends/xforms/FormMathsSpace.C
-src/frontends/xforms/form_minipage.C
+src/frontends/xforms/form_maths_space.C
src/frontends/xforms/FormMinipage.C
-src/frontends/xforms/form_paragraph.C
+src/frontends/xforms/form_minipage.C
src/frontends/xforms/FormParagraph.C
-src/frontends/xforms/form_preamble.C
+src/frontends/xforms/form_paragraph.C
src/frontends/xforms/FormPreamble.C
-src/frontends/xforms/form_preferences.C
+src/frontends/xforms/form_preamble.C
src/frontends/xforms/FormPreferences.C
-src/frontends/xforms/form_print.C
+src/frontends/xforms/form_preferences.C
src/frontends/xforms/FormPrint.C
-src/frontends/xforms/form_ref.C
+src/frontends/xforms/form_print.C
src/frontends/xforms/FormRef.C
-src/frontends/xforms/form_search.C
+src/frontends/xforms/form_ref.C
src/frontends/xforms/FormSearch.C
-src/frontends/xforms/form_tabular.C
+src/frontends/xforms/form_search.C
src/frontends/xforms/FormTabular.C
-src/frontends/xforms/form_tabular_create.C
+src/frontends/xforms/form_tabular.C
src/frontends/xforms/FormTabularCreate.C
-src/frontends/xforms/form_toc.C
+src/frontends/xforms/form_tabular_create.C
src/frontends/xforms/FormToc.C
-src/frontends/xforms/form_url.C
+src/frontends/xforms/form_toc.C
src/frontends/xforms/FormUrl.C
+src/frontends/xforms/form_url.C
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/input_validators.C
src/frontends/xforms/Menubar_pimpl.C
+2001-06-01 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * lyxfont.C:
+ * tabular.C:
+ * tabular-old.C:
+ * FontInfo.C: bring C functions into global namespace when
+ necessary
+
+2001-05-30 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * LString.h: make sure config.h has been loaded before LString.h.
+
+ * lyxlex_pimpl.C (EatLine): comment out annoying debug messages
+ (one for each char read by EatLine!).
+
+ * lyx_main.C (init): constify lyxdir. Lowercase the name of some
+ variables.
+
2001-06-01 Lars Gullik Bjønnes <larsbj@birdstep.com>
* paragraph.C (BreakParagraph): set the inset_owner in the new par
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::fabs;
+#endif
+
/// Load font close to this size
string const FontInfo::getFontname(int size)
{
lyxerr[Debug::FONT] << "Exact font match with\n"
<< strings[i] << endl;
return strings[i];
- } else if (std::fabs(sizes[i] - size - 0.1) < error) {
- error = std::fabs(sizes[i] - size - 0.1);
+ } else if (fabs(sizes[i] - size - 0.1) < error) {
+ error = fabs(sizes[i] - size - 0.1);
closestind = i;
}
}
#ifndef LSTRING_H
#define LSTRING_H
+#ifndef _CONFIG_H
+#error The <config.h> header should always be included before LString.h
+#endif
+
#ifndef USE_INCLUDED_STRING
#include <string>
using std::string;
+2001-06-01 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * MathsSymbols.C:
+ * FormMathsMatrix.C: bring C functions into global namespace if
+ necessary.
+
2001-05-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* MathsSymbols.C (pixmapFromBitmapData): add std::
#include "lyxfunc.h"
#include "support/LAssert.h"
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
static char h_align_str[80] = "c";
static char v_align_c[] = "tcb";
int FormMathsMatrix::AlignFilter(char const * cur, int c)
{
int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5) -
- int(std::strlen(cur));
+ int(strlen(cur));
if (n < 0)
return FL_INVALID;
using std::endl;
using std::ostream;
+#ifndef CXX_GLOBAL_CSTD
+using std::strstr;
+#endif
+
+
/* Latex code for those bitmaps */
#include "greek.xbm"
XpmCreateDataFromImage(fl_get_display(), const_cast<char***>(&data), sbima, sbima, 0);
// Dirty hack to get blue symbols quickly
- char * sx = const_cast<char*>(std::strstr(data[2], "FFFFFFFF"));
+ char * sx = const_cast<char*>(strstr(data[2], "FFFFFFFF"));
if (sx) {
for (int k = 0; k < 8; ++k) sx[k] = '0';
}
+2001-05-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * figinset.C: add using std:: directive for the C functions which
+ need that.
+
2001-05-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* insetfloat.C (Write): write out wide info
using std::pair;
using std::make_pair;
+#ifndef CXX_GLOBAL_CSTD
+using std::memcopy;
+using std::sin;
+using std::cos;
+using std::fabs;
+#endif
+
+
+
extern BufferView * current_view;
extern FL_OBJECT * figinset_canvas;
env[0] = new char[tmp.size() + 1];
std::copy(tmp.begin(), tmp.end(), env[0]);
env[0][tmp.size()] = '\0';
- std::memcpy(&env[1], environ,
- sizeof(char*) * (ne + 1));
+ memcpy(&env[1], environ,
+ sizeof(char*) * (ne + 1));
environ = env;
// now make gs command
if (changed) GetPSSizes();
- float sin_a = std::sin (angle / DEG2PI); /* rotation; H. Zeller 021296 */
- float cos_a = std::cos (angle / DEG2PI);
- int frame_wid = int(ceil(std::fabs(cos_a * pswid) + std::fabs(sin_a * pshgh)));
- int frame_hgh= int(ceil(std::fabs(cos_a * pshgh) + std::fabs(sin_a * pswid)));
+ float sin_a = sin(angle / DEG2PI); /* rotation; H. Zeller 021296 */
+ float cos_a = cos(angle / DEG2PI);
+ int frame_wid = int(ceil(fabs(cos_a * pswid) + fabs(sin_a * pshgh)));
+ int frame_hgh= int(ceil(fabs(cos_a * pshgh) + fabs(sin_a * pswid)));
string lfname = fname;
if (GetExtension(fname).empty())
searchpath= MakeAbsPath(system_lyxdir) + ';';
// LYX_DIR_11x environment variable
- string lyxdir = GetEnvPath("LYX_DIR_11x");
+ string const lyxdir = GetEnvPath("LYX_DIR_11x");
if (!lyxdir.empty()) {
lyxerr[Debug::INIT] << "LYX_DIR_11x: " << lyxdir << endl;
build_lyxdir.erase();
}
- bool FollowLink;
+ bool followlink;
do {
// Path of binary/../share/name of binary/
searchpath += NormalizePath(AddPath(binpath, "../share/") +
// Follow Symlinks
FileInfo file(fullbinpath, true);
- FollowLink = file.isLink();
- if (FollowLink) {
- string Link;
- if (LyXReadLink(fullbinpath, Link)) {
- fullbinpath = Link;
+ followlink = file.isLink();
+ if (followlink) {
+ string link;
+ if (LyXReadLink(fullbinpath, link)) {
+ fullbinpath = link;
binpath = MakeAbsPath(OnlyPath(fullbinpath));
}
else {
- FollowLink = false;
+ followlink = false;
}
}
- } while (FollowLink);
+ } while (followlink);
// Hardcoded dir
searchpath += LYX_DIR;
using std::ostream;
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
//
// Names for the GUI
//
os << '\\'
<< LaTeXFamilyNames[f.family()]
<< '{';
- count += std::strlen(LaTeXFamilyNames[f.family()]) + 2;
+ count += strlen(LaTeXFamilyNames[f.family()]) + 2;
env = true; //We have opened a new environment
}
if (f.series() != INHERIT_SERIES) {
os << '\\'
<< LaTeXSeriesNames[f.series()]
<< '{';
- count += std::strlen(LaTeXSeriesNames[f.series()]) + 2;
+ count += strlen(LaTeXSeriesNames[f.series()]) + 2;
env = true; //We have opened a new environment
}
if (f.shape() != INHERIT_SHAPE) {
os << '\\'
<< LaTeXShapeNames[f.shape()]
<< '{';
- count += std::strlen(LaTeXShapeNames[f.shape()]) + 2;
+ count += strlen(LaTeXShapeNames[f.shape()]) + 2;
env = true; //We have opened a new environment
}
if (f.color() != LColor::inherit && f.color() != LColor::ignore) {
os << '\\'
<< LaTeXSizeNames[f.size()]
<< ' ';
- count += std::strlen(LaTeXSizeNames[f.size()]) + 2;
+ count += strlen(LaTeXSizeNames[f.size()]) + 2;
}
return count;
}
while(is && c != '\n' && i != (LEX_MAX_BUFF - 1)) {
is.get(cc);
c = cc;
- lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
- << c << "'" << endl;
+ //lyxerr[Debug::LYXLEX] << "LyXLex::EatLine read char: `"
+ // << c << "'" << endl;
if (c != '\r')
buff[i++] = c;
}
+2001-05-31 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * array.C: bring memmove into main namespace if necessary
+
2001-05-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* math_parser.C (yylex): use contains instead of strchr
using std::ostream;
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::memmove;
+#endif
+
+
namespace {
inline
{
if (p <= last_) {
need_size(last_ + shift);
- std::memmove(&bf_[p + shift], &bf_[p], last_ - p);
+ memmove(&bf_[p + shift], &bf_[p], last_ - p);
last_ += shift;
bf_[last_] = 0;
}
using std::vector;
using std::max;
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
+
extern string mathed_label;
extern char const * latex_special_chars;
if (mathcursor) {
MathMatrixInset * p = new MathMatrixInset(m, n);
- if (k > 2 && int(std::strlen(s)) > m)
+ if (k > 2 && int(strlen(s)) > m)
p->SetAlign(s[0], &s[1]);
mathcursor->insertInset(p, LM_TC_ACTIVE_INSET);
// Andre:
+2001-06-01 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * lstrings.C:
+ * syscall.C:
+ * syscontr.C:
+ * LSubstring.C: bring C functions in global namespace if
+ necessary.
+
+ * lstrings.h (compare): use the std:: version of str[n]cmp only
+ when it exists.
+
2001-05-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* syscontr.C: add std::
#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)
LSubstring::LSubstring(string & s, string::value_type const * p)
: ps(&s)
{
- n = std::strlen(p);
+ n = strlen(p);
pos = s.find(p);
}
#ifndef CXX_GLOBAL_CSTD
using std::tolower;
using std::toupper;
+using std::strlen;
#endif
{
lyx::Assert(pre);
- size_t const l = std::strlen(pre);
+ size_t const l = strlen(pre);
string::size_type const alen = a.length();
if (l > alen || a.empty())
{
lyx::Assert(suf);
- size_t const suflen = std::strlen(suf);
+ size_t const suflen = strlen(suf);
string::size_type const alen = a.length();
if (suflen > alen)
string lstr(a);
string::size_type i = 0;
- string::size_type olen = std::strlen(oldstr);
+ string::size_type olen = strlen(oldstr);
while((i = lstr.find(oldstr, i)) != string::npos) {
lstr.replace(i, olen, newstr);
i += newstr.length(); // We need to be sure that we dont
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
}
///
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::strerror;
+#endif
+
Systemcalls::Systemcalls() {
pid = 0; // No child yet
pid_t waitrpid = waitpid(pid, &status, WUNTRACED);
if (waitrpid == -1) {
lyxerr << "LyX: Error waiting for child:"
- << std::strerror(errno) << endl;
+ << strerror(errno) << endl;
wait = false;
} else if (WIFEXITED(status)) {
// Child exited normally. Update return value.
execvp(syscmd, argv);
// If something goes wrong, we end up here:
lyxerr << "LyX: execvp failed: "
- << std::strerror(errno) << endl;
+ << strerror(errno) << endl;
} else if (cpid < 0) { // error
#else
pid_t cpid = spawnvp(P_SESSION|P_DEFAULT|P_MINIMIZE|P_BACKGROUND, syscmd, argv);
if (cpid < 0) { // error
#endif
lyxerr << "LyX: Could not fork: "
- << std::strerror(errno) << endl;
+ << strerror(errno) << endl;
} else { // parent
return cpid;
}
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::strerror;
+#endif
+
//
// Default constructor
//
int waitrpid = waitpid(pid, &stat_loc, WNOHANG);
if (waitrpid == -1) {
lyxerr << "LyX: Error waiting for child:"
- << std::strerror(errno) << endl;
+ << strerror(errno) << endl;
} else if (WIFEXITED(stat_loc) || WIFSIGNALED(stat_loc)) {
if (WIFEXITED(stat_loc)) {
// Ok, the return value goes into retval.
using std::getline;
using std::endl;
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
namespace {
bool getTokenValue(string const & str, const char * token, string & ret)
{
- size_t token_length = std::strlen(token);
+ size_t token_length = strlen(token);
string::size_type pos = str.find(token);
if (pos == string::npos || pos + token_length + 1 >= str.length()
bool getTokenValue(string const & str, const char * token, int & num)
{
string::size_type pos = str.find(token);
- char ch = str[pos + std::strlen(token)];
+ char ch = str[pos + strlen(token)];
if ((pos == string::npos) || (ch != '='))
return false;
string ret;
- pos += std::strlen(token) + 1;
+ pos += strlen(token) + 1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
if (!isdigit(ch))
bool getTokenValue(string const & str, const char * token, bool & flag)
{
string::size_type pos = str.find(token);
- char ch = str[pos + std::strlen(token)];
+ char ch = str[pos + strlen(token)];
if ((pos == string::npos) || (ch != '='))
return false;
string ret;
- pos += std::strlen(token) + 1;
+ pos += strlen(token) + 1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
if (!isdigit(ch))
using std::endl;
using std::vector;
+#ifndef CXX_GLOBAL_CSTD
+using std::strlen;
+#endif
+
namespace {
int const WIDTH_OF_LINE = 5;
bool getTokenValue(string const & str, const char * token, string & ret)
{
- size_t token_length = std::strlen(token);
+ size_t token_length = strlen(token);
string::size_type pos = str.find(token);
if (pos == string::npos || pos + token_length + 1 >= str.length()