Purely cosmetic.
Andre'
Index: lyxvc.C =================================================================== --- lyxvc.C (revision 13545) +++ lyxvc.C (working copy) @@ -27,7 +27,7 @@ #include "support/lyxlib.h" using lyx::support::bformat; -using lyx::support::IsFileReadable; +using lyx::support::isFileReadable; using lyx::support::MakeDisplayPath; using lyx::support::tempName; @@ -89,7 +89,7 @@ string const filename = owner_->fileName(); // there must be a file to save - if (!IsFileReadable(filename)) { + if (!isFileReadable(filename)) { Alert::error(_("Document not saved"), _("You must save the document " "before it can be registered.")); @@ -100,7 +100,7 @@ if (!vcs) { string const cvs_entries = "CVS/Entries"; - if (IsFileReadable(cvs_entries)) { + if (isFileReadable(cvs_entries)) { lyxerr[Debug::LYXVC] << "LyXVC: registering " << MakeDisplayPath(filename) Index: LaTeXFeatures.C =================================================================== --- LaTeXFeatures.C (revision 13545) +++ LaTeXFeatures.C (working copy) @@ -30,7 +30,7 @@ #include <sstream> -using lyx::support::IsSGMLFilename; +using lyx::support::isSGMLFilename; using lyx::support::LibFileSearch; using lyx::support::MakeRelPath; using lyx::support::OnlyPath; @@ -508,7 +508,7 @@ for (FileMap::const_iterator fi = IncludedFiles_.begin(); fi != end; ++fi) sgmlpreamble << "\n<!ENTITY " << fi->first - << (IsSGMLFilename(fi->second) ? " SYSTEM \"" : " \"") + << (isSGMLFilename(fi->second) ? " SYSTEM \"" : " \"") << MakeRelPath(fi->second, basename) << "\">"; return sgmlpreamble.str(); Index: lyx_cb.C =================================================================== --- lyx_cb.C (revision 13545) +++ lyx_cb.C (working copy) @@ -59,7 +59,7 @@ using lyx::support::destroyDir; using lyx::support::FileFilterList; using lyx::support::ForkedProcess; -using lyx::support::IsLyXFilename; +using lyx::support::isLyXFilename; using lyx::support::LibFileSearch; using lyx::support::MakeAbsPath; using lyx::support::MakeDisplayPath; @@ -135,7 +135,7 @@ make_pair(string(_("Templates|#T#t")), string(lyxrc.template_path))); - if (!IsLyXFilename(fname)) + if (!isLyXFilename(fname)) fname += ".lyx"; FileFilterList const filter (_("LyX Documents (*.lyx)")); @@ -155,7 +155,7 @@ // Make sure the absolute filename ends with appropriate suffix fname = MakeAbsPath(fname); - if (!IsLyXFilename(fname)) + if (!isLyXFilename(fname)) fname += ".lyx"; } else fname = filename; Index: insets/insetbibtex.C =================================================================== --- insets/insetbibtex.C (revision 13545) +++ insets/insetbibtex.C (working copy) @@ -43,7 +43,7 @@ using lyx::support::copy; using lyx::support::FileName; using lyx::support::findtexfile; -using lyx::support::IsFileReadable; +using lyx::support::isFileReadable; using lyx::support::latex_path; using lyx::support::ltrim; using lyx::support::MakeAbsPath; @@ -112,7 +112,7 @@ string const & name, string const & ext) { string const fname = MakeAbsPath(name, buffer.filePath()); - if (AbsolutePath(name) || !IsFileReadable(fname + ext)) + if (AbsolutePath(name) || !isFileReadable(fname + ext)) return name; else if (!runparams.nice) return fname; @@ -162,7 +162,7 @@ string const in_file = database + ".bib"; if (!runparams.inComment && !runparams.nice && - IsFileReadable(in_file)) { + isFileReadable(in_file)) { // mangledFilename() needs the extension database = removeExtension(FileName(in_file).mangledFilename()); @@ -217,7 +217,7 @@ // This prevents problems with spaces and 8bit charcaters // in the file name. if (!runparams.inComment && !runparams.nice && - IsFileReadable(in_file)) { + isFileReadable(in_file)) { // use new style name base = removeExtension( FileName(in_file).mangledFilename()); Index: insets/insetexternal.C =================================================================== --- insets/insetexternal.C (revision 13545) +++ insets/insetexternal.C (working copy) @@ -801,7 +801,7 @@ string const included_file = params.filename.absFilename(); return params.display == external::PreviewDisplay && - support::IsFileReadable(included_file); + support::isFileReadable(included_file); } Index: insets/insetgraphics.C =================================================================== --- insets/insetgraphics.C (revision 13545) +++ insets/insetgraphics.C (working copy) @@ -98,7 +98,7 @@ using lyx::support::FileName; using lyx::support::float_equal; using lyx::support::GetExtension; -using lyx::support::IsFileReadable; +using lyx::support::isFileReadable; using lyx::support::latex_path; using lyx::support::OnlyFilename; using lyx::support::removeExtension; @@ -576,7 +576,7 @@ // not exist. // We are not going to change the extension or using the name of the // temporary file, the code is already complicated enough. - if (runparams.inComment || !IsFileReadable(orig_file)) + if (runparams.inComment || !isFileReadable(orig_file)) return params().filename.outputFilename(m_buffer->filePath()); // We place all temporary files in the master buffer's temp dir. @@ -726,7 +726,7 @@ params().filename.relFilename(buf.filePath()); string const file_ = params().filename.absFilename(); - bool const file_exists = !file_.empty() && IsFileReadable(file_); + bool const file_exists = !file_.empty() && isFileReadable(file_); string const message = file_exists ? string() : string("bb = 0 0 200 100, draft, type=eps"); // if !message.empty() then there was no existing file Index: insets/ExternalSupport.C =================================================================== --- insets/ExternalSupport.C (revision 13545) +++ insets/ExternalSupport.C (working copy) @@ -172,11 +172,11 @@ string const file = result.substr(pos + 12, end - (pos + 12)); string contents; - string const filepath = support::IsFileReadable(file) ? + string const filepath = support::isFileReadable(file) ? buffer.filePath() : m_buffer->temppath(); support::Path p(filepath); - if (support::IsFileReadable(file)) + if (support::isFileReadable(file)) contents = support::GetFileContents(file); result = support::subst(result, Index: insets/insetinclude.C =================================================================== --- insets/insetinclude.C (revision 13545) +++ insets/insetinclude.C (working copy) @@ -61,8 +61,8 @@ using lyx::support::copy; using lyx::support::FileName; using lyx::support::GetFileContents; -using lyx::support::IsFileReadable; -using lyx::support::IsLyXFilename; +using lyx::support::isFileReadable; +using lyx::support::isLyXFilename; using lyx::support::latex_path; using lyx::support::MakeAbsPath; using lyx::support::MakeDisplayPath; @@ -307,7 +307,7 @@ return false; string const included_file = includedFilename(buffer, params); - if (!IsLyXFilename(included_file)) + if (!isLyXFilename(included_file)) return false; Buffer * buf = bufferlist.getBuffer(included_file); @@ -417,7 +417,7 @@ exportfile); // \input wants file with extension (default is .tex) - if (!IsLyXFilename(included_file)) { + if (!isLyXFilename(included_file)) { incfile = latex_path(incfile); os << '\\' << params_.getCmdName() << '{' << incfile << '}'; } else { @@ -553,7 +553,7 @@ string const included_file = includedFilename(buffer, params_); - if (IsLyXFilename(included_file)) + if (isLyXFilename(included_file)) writefile = ChangeExtension(included_file, ".sgml"); else writefile = included_file; @@ -692,7 +692,7 @@ string const included_file = includedFilename(buffer, params); return type(params) == INPUT && params.preview() && - IsFileReadable(included_file); + isFileReadable(included_file); } Index: BufferView_pimpl.C =================================================================== --- BufferView_pimpl.C (revision 13545) +++ BufferView_pimpl.C (working copy) @@ -89,7 +89,7 @@ using lyx::support::FileFilterList; using lyx::support::FileSearch; using lyx::support::ForkedcallsController; -using lyx::support::IsDirWriteable; +using lyx::support::isDirWriteable; using lyx::support::MakeDisplayPath; using lyx::support::MakeAbsPath; using lyx::support::package; @@ -858,7 +858,7 @@ if (available()) { string const trypath = owner_->buffer()->filePath(); // If directory is writeable, use this as default. - if (IsDirWriteable(trypath)) + if (isDirWriteable(trypath)) initpath = trypath; } Index: graphics/GraphicsCacheItem.C =================================================================== --- graphics/GraphicsCacheItem.C (revision 13545) +++ graphics/GraphicsCacheItem.C (working copy) @@ -30,7 +30,7 @@ using support::ChangeExtension; using support::FileMonitor; -using support::IsFileReadable; +using support::isFileReadable; using support::MakeDisplayPath; using support::OnlyFilename; using support::tempName; @@ -267,7 +267,7 @@ converter_.reset(); cc_.disconnect(); - success = !file_to_load_.empty() && IsFileReadable(file_to_load_); + success = !file_to_load_.empty() && isFileReadable(file_to_load_); if (!success) { lyxerr[Debug::GRAPHICS] << "Unable to find converted file!" @@ -378,7 +378,7 @@ setStatus(Converting); // First, check that the file exists! - if (!IsFileReadable(filename_)) { + if (!isFileReadable(filename_)) { if (status_ != ErrorNoFile) { setStatus(ErrorNoFile); lyxerr[Debug::GRAPHICS] Index: text2.C =================================================================== --- text2.C (revision 13545) +++ text2.C (working copy) @@ -648,7 +648,7 @@ linestr[i] = ' '; newline_inserted = true; } - } else if (IsPrintable(linestr[i])) { + } else if (isPrintable(linestr[i])) { newline_inserted = false; } } Index: converter.C =================================================================== --- converter.C (revision 13545) +++ converter.C (working copy) @@ -36,7 +36,7 @@ using lyx::support::contains; using lyx::support::DirList; using lyx::support::GetExtension; -using lyx::support::IsFileReadable; +using lyx::support::isFileReadable; using lyx::support::LibFileSearch; using lyx::support::LibScriptSearch; using lyx::support::MakeRelPath; @@ -310,7 +310,7 @@ << command << endl; Systemcall one; one.startscript(Systemcall::Wait, command); - if (IsFileReadable(to_file)) { + if (isFileReadable(to_file)) { return true; } } Index: buffer.C =================================================================== --- buffer.C (revision 13545) +++ buffer.C (working copy) @@ -101,7 +101,7 @@ using lyx::support::createBufferTmpDir; using lyx::support::destroyDir; using lyx::support::getFormatFromContents; -using lyx::support::IsDirWriteable; +using lyx::support::isDirWriteable; using lyx::support::LibFileSearch; using lyx::support::latex_path; using lyx::support::ltrim; @@ -531,7 +531,7 @@ } space_inserted = true; } - } else if (!IsPrintable(*cit)) { + } else if (!isPrintable(*cit)) { // Ignore unprintables continue; } else { Index: lyxfunc.C =================================================================== --- lyxfunc.C (revision 13545) +++ lyxfunc.C (working copy) @@ -108,8 +108,8 @@ using lyx::support::FileSearch; using lyx::support::ForkedcallsController; using lyx::support::i18nLibFileSearch; -using lyx::support::IsDirWriteable; -using lyx::support::IsFileReadable; +using lyx::support::isDirWriteable; +using lyx::support::isFileReadable; using lyx::support::isStrInt; using lyx::support::MakeAbsPath; using lyx::support::MakeDisplayPath; @@ -513,7 +513,7 @@ else if (name == "character" || name == "mathpanel") enable = cur.inset().lyxCode() != InsetBase::ERT_CODE; else if (name == "latexlog") - enable = IsFileReadable(buf->getLogName().second); + enable = isFileReadable(buf->getLogName().second); #if !defined (USE_ASPELL) && !defined (USE_ISPELL) && !defined (USE_PSPELL) else if (name == "spellchecker") enable = false; @@ -1685,7 +1685,7 @@ if (view()->available()) { string const trypath = owner->buffer()->filePath(); // If directory is writeable, use this as default. - if (IsDirWriteable(trypath)) + if (isDirWriteable(trypath)) initpath = trypath; } @@ -1735,7 +1735,7 @@ if (view()->available()) { string const trypath = owner->buffer()->filePath(); // If directory is writeable, use this as default. - if (IsDirWriteable(trypath)) + if (isDirWriteable(trypath)) initpath = trypath; } @@ -1810,7 +1810,7 @@ if (view()->available()) { string const trypath = owner->buffer()->filePath(); // If directory is writeable, use this as default. - if (IsDirWriteable(trypath)) + if (isDirWriteable(trypath)) initpath = trypath; } Index: frontends/gtk/ghelpers.C =================================================================== --- frontends/gtk/ghelpers.C (revision 13545) +++ frontends/gtk/ghelpers.C (working copy) @@ -257,7 +257,7 @@ filename = lyx::support::ChangeExtension(name, ".glade"); filename = lyx::support::AddName(dir, filename); - if (!lyx::support::IsFileReadable(filename)) { + if (!lyx::support::isFileReadable(filename)) { lyxerr << "Unable to find glade file \"" << name << "\". libglade is going to crash..." << std::endl; } Index: frontends/controllers/ControlGraphics.C =================================================================== --- frontends/controllers/ControlGraphics.C (revision 13545) +++ frontends/controllers/ControlGraphics.C (working copy) @@ -44,7 +44,7 @@ using support::AddName; using support::FileFilterList; -using support::IsFileReadable; +using support::isFileReadable; using support::MakeAbsPath; using support::package; using support::readBB_from_PSFile; @@ -133,7 +133,7 @@ { // It may be that the filename is relative. string const name = MakeAbsPath(fname, kernel().bufferFilepath()); - return IsFileReadable(name); + return isFileReadable(name); } Index: frontends/controllers/ControlInclude.C =================================================================== --- frontends/controllers/ControlInclude.C (revision 13545) +++ frontends/controllers/ControlInclude.C (working copy) @@ -35,7 +35,7 @@ namespace lyx { using support::FileFilterList; -using support::IsFileReadable; +using support::isFileReadable; using support::MakeAbsPath; using support::OnlyPath; @@ -114,7 +114,7 @@ = MakeAbsPath(file, OnlyPath(kernel().buffer().fileName())); - if (IsFileReadable(fileWithAbsPath)) + if (isFileReadable(fileWithAbsPath)) return true; return false; Index: frontends/controllers/ControlSpellchecker.C =================================================================== --- frontends/controllers/ControlSpellchecker.C (revision 13545) +++ frontends/controllers/ControlSpellchecker.C (working copy) @@ -161,7 +161,7 @@ Paragraph::value_type const c = cur.paragraph().getChar(cur.pos()); word += c; - if (IsDigit(c)) + if (isDigit(c)) ignoreword = true; } } else { // !isLetter(cur) Index: support/filetools.C =================================================================== --- support/filetools.C (revision 13545) +++ support/filetools.C (working copy) @@ -70,13 +70,13 @@ namespace lyx { namespace support { -bool IsLyXFilename(string const & filename) +bool isLyXFilename(string const & filename) { return suffixIs(ascii_lowercase(filename), ".lyx"); } -bool IsSGMLFilename(string const & filename) +bool isSGMLFilename(string const & filename) { return suffixIs(ascii_lowercase(filename), ".sgml"); } @@ -139,7 +139,7 @@ // Is a file readable ? -bool IsFileReadable(string const & path) +bool isFileReadable(string const & path) { return fs::exists(path) && !fs::is_directory(path) && fs::is_readable(path); } @@ -147,9 +147,9 @@ //returns true: dir writeable // false: not writeable -bool IsDirWriteable(string const & path) +bool isDirWriteable(string const & path) { - lyxerr[Debug::FILES] << "IsDirWriteable: " << path << endl; + lyxerr[Debug::FILES] << "isDirWriteable: " << path << endl; string const tmpfl = tempName(path, "lyxwritetest"); @@ -243,14 +243,14 @@ string const tmpname = ReplaceEnvironmentPath(name); string fullname = MakeAbsPath(tmpname, path); // search first without extension, then with it. - if (IsFileReadable(fullname)) + if (isFileReadable(fullname)) return fullname; if (ext.empty()) return string(); // Is it not more reasonable to use ChangeExtension()? (SMiyata) fullname += '.'; fullname += ext; - return IsFileReadable(fullname) ? fullname : string(); + return isFileReadable(fullname) ? fullname : string(); } @@ -412,7 +412,7 @@ #ifdef __EMX__ Path p(package().user_support()); #endif - if (IsDirWriteable(deflt)) { + if (isDirWriteable(deflt)) { // deflt could not be created because it // did exist already, so let's create our own // dir inside deflt. @@ -794,7 +794,7 @@ string const getFormatFromContents(string const & filename) { // paranoia check - if (filename.empty() || !IsFileReadable(filename)) + if (filename.empty() || !isFileReadable(filename)) return string(); ifstream ifs(filename.c_str()); Index: support/filetools.h =================================================================== --- support/filetools.h (revision 13545) +++ support/filetools.h (working copy) @@ -63,18 +63,18 @@ true: dir writeable false: not writeable */ -bool IsDirWriteable (std::string const & path); +bool isDirWriteable (std::string const & path); /** Is a file readable ? Returns true if the file `path' is readable. */ -bool IsFileReadable (std::string const & path); +bool isFileReadable (std::string const & path); /// -bool IsLyXFilename(std::string const & filename); +bool isLyXFilename(std::string const & filename); /// -bool IsSGMLFilename(std::string const & filename); +bool isSGMLFilename(std::string const & filename); /** Returns the path of a library data file. Search the file name.ext in the subdirectory dir of Index: support/textutils.h =================================================================== --- support/textutils.h (revision 13545) +++ support/textutils.h (working copy) @@ -18,7 +18,7 @@ /// return true if the char is a line separator inline -bool IsLineSeparatorChar(char c) +bool isLineSeparatorChar(char c) { return c == ' '; } @@ -26,7 +26,7 @@ /// return true if a char is alphabetical (including accented chars) inline -bool IsLetterChar(unsigned char c) +bool isLetterChar(unsigned char c) { return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') @@ -36,7 +36,7 @@ /// return true if the char is printable (masked to 7-bit ASCII) inline -bool IsPrintable(unsigned char c) +bool isPrintable(unsigned char c) { return (c & 127) >= ' '; } @@ -44,15 +44,15 @@ /// return true if the char is printable and not a space (masked to 7-bit ASCII) inline -bool IsPrintableNonspace(unsigned char c) +bool isPrintableNonspace(unsigned char c) { - return IsPrintable(c) && c != ' '; + return isPrintable(c) && c != ' '; } /// completely pointless FIXME inline -bool IsDigit(unsigned char ch) +bool isDigit(unsigned char ch) { return ch >= '0' && ch <= '9'; } Index: rowpainter.C =================================================================== --- rowpainter.C (revision 13545) +++ rowpainter.C (working copy) @@ -196,7 +196,7 @@ for (pos_type i = pos - 1; i >= 0; --i) { c = par_.getChar(i); if (!Encodings::IsComposeChar_hebrew(c)) { - if (IsPrintableNonspace(c)) { + if (isPrintableNonspace(c)) { int const width2 = text_.singleWidth(par_, i, c, text_.getFont(par_, i)); // dalet / resh @@ -230,7 +230,7 @@ for (pos_type i = pos - 1; i >= 0; --i) { c = par_.getChar(i); if (!Encodings::IsComposeChar_arabic(c)) { - if (IsPrintableNonspace(c)) { + if (isPrintableNonspace(c)) { int const width2 = text_.singleWidth(par_, i, c, text_.getFont(par_, i)); dx = (width2 - width) / 2; @@ -270,7 +270,7 @@ char c = par_.getChar(pos); - if (!IsPrintableNonspace(c)) + if (!isPrintableNonspace(c)) break; if (arabic && Encodings::IsComposeChar_arabic(c)) Index: lyxtextclass.C =================================================================== --- lyxtextclass.C (revision 13545) +++ lyxtextclass.C (working copy) @@ -167,7 +167,7 @@ // Reads a textclass structure from file. bool LyXTextClass::Read(string const & filename, bool merge) { - if (!lyx::support::IsFileReadable(filename)) { + if (!lyx::support::isFileReadable(filename)) { lyxerr << "Cannot read layout file `" << filename << "'." << endl; return true; Index: tex2lyx/tex2lyx.C =================================================================== --- tex2lyx/tex2lyx.C (revision 13545) +++ tex2lyx/tex2lyx.C (working copy) @@ -58,7 +58,7 @@ using lyx::support::MakeAbsPath; using lyx::support::OnlyPath; using lyx::support::rtrim; -using lyx::support::IsFileReadable; +using lyx::support::isFileReadable; namespace fs = boost::filesystem; @@ -450,7 +450,7 @@ bool tex2lyx(string const &infilename, string const &outfilename) { - if (IsFileReadable(outfilename)) { + if (isFileReadable(outfilename)) { if (overwrite_files) { cerr << "Overwriting existing file " << outfilename << endl; Index: paragraph.C =================================================================== --- paragraph.C (revision 13545) +++ paragraph.C (working copy) @@ -1461,7 +1461,7 @@ bool Paragraph::isLineSeparator(pos_type pos) const { value_type const c = getChar(pos); - return IsLineSeparatorChar(c) + return isLineSeparatorChar(c) || (c == Paragraph::META_INSET && getInset(pos) && getInset(pos)->isLineSeparator()); } @@ -1474,7 +1474,7 @@ return getInset(pos)->isLetter(); else { value_type const c = getChar(pos); - return IsLetterChar(c) || IsDigit(c); + return isLetterChar(c) || isDigit(c); } } @@ -1547,7 +1547,7 @@ for (pos_type i = 0; i < size(); ++i) { value_type c = getChar(i); - if (IsPrintable(c)) + if (isPrintable(c)) s += c; else if (c == META_INSET && getInset(i)->lyxCode() == InsetBase::MATH_CODE) { @@ -1586,7 +1586,7 @@ for (pos_type i = beg; i < end; ++i) { value_type const c = getUChar(buffer.params(), i); - if (IsPrintable(c)) + if (isPrintable(c)) os << c; else if (c == META_INSET) getInset(i)->textString(buffer, os, runparams); @@ -1811,7 +1811,7 @@ unsigned char Paragraph::transformChar(unsigned char c, pos_type pos) const { if (!Encodings::is_arabic(c)) - if (lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 && IsDigit(c)) + if (lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 && isDigit(c)) return c + (0xb0 - '0'); else return c; Index: text.C =================================================================== --- text.C (revision 13545) +++ text.C (working copy) @@ -426,7 +426,7 @@ pos_type pos, char c, LyXFont const & font) const { // The most common case is handled first (Asger) - if (IsPrintable(c)) { + if (isPrintable(c)) { Language const * language = font.language(); if (language->RightToLeft()) { if ((lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 || @@ -1126,7 +1126,7 @@ static string const number_seperators = ".,:"; if (current_font.number() == LyXFont::ON) { - if (!IsDigit(c) && !contains(number_operators, c) && + if (!isDigit(c) && !contains(number_operators, c) && !(contains(number_seperators, c) && cur.pos() != 0 && cur.pos() != cur.lastpos() && @@ -1134,7 +1134,7 @@ getFont(par, cur.pos() - 1).number() == LyXFont::ON) ) number(cur); // Set current_font.number to OFF - } else if (IsDigit(c) && + } else if (isDigit(c) && real_current_font.isVisibleRightToLeft()) { number(cur); // Set current_font.number to ON @@ -1163,7 +1163,7 @@ // When the free-spacing option is set for the current layout, // disable the double-space checking - if (!freeSpacing && IsLineSeparatorChar(c)) { + if (!freeSpacing && isLineSeparatorChar(c)) { if (cur.pos() == 0) { static bool sent_space_message = false; if (!sent_space_message) {