]> git.lyx.org Git - lyx.git/commitdiff
* filetools.[Ch]: Make functions that start with a capital
authorLars Gullik Bjønnes <larsbj@gullik.org>
Sat, 8 Apr 2006 22:31:11 +0000 (22:31 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Sat, 8 Apr 2006 22:31:11 +0000 (22:31 +0000)
letter start with a lower letter.
* All other .C and .h in the cs: adjust for above change

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13603 a592a061-630c-0410-9148-cb99ea01b6c8

89 files changed:
src/BufferView_pimpl.C
src/Chktex.C
src/DepTable.C
src/LaTeX.C
src/LaTeXFeatures.C
src/MenuBackend.C
src/ToolbarBackend.C
src/buffer.C
src/buffer_funcs.C
src/bufferlist.C
src/chset.C
src/converter.C
src/exporter.C
src/format.C
src/frontends/LyXView.C
src/frontends/controllers/ControlAboutlyx.C
src/frontends/controllers/ControlBibtex.C
src/frontends/controllers/ControlExternal.C
src/frontends/controllers/ControlGraphics.C
src/frontends/controllers/ControlInclude.C
src/frontends/controllers/ControlMath.C
src/frontends/controllers/ControlPrint.C
src/frontends/controllers/ControlRef.C
src/frontends/controllers/ControlSendto.C
src/frontends/controllers/ControlShowFile.C
src/frontends/controllers/ControlTexinfo.C
src/frontends/controllers/helper_funcs.C
src/frontends/controllers/tex_helpers.C
src/frontends/gtk/GAboutlyx.C
src/frontends/gtk/GBibtex.C
src/frontends/gtk/GTexinfo.C
src/frontends/gtk/GView.C
src/frontends/gtk/GViewBase.C
src/frontends/gtk/ghelpers.C
src/frontends/qt2/BulletsModule.C
src/frontends/qt2/QBibtex.C
src/frontends/qt2/QBibtexDialog.C
src/frontends/qt2/QCommandBuffer.C
src/frontends/qt2/QTexinfo.C
src/frontends/qt2/QtView.C
src/frontends/qt2/qfont_loader.C
src/frontends/screen.C
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/FormColorpicker.C
src/frontends/xforms/FormDialogView.C
src/frontends/xforms/FormDocument.C
src/frontends/xforms/FormFiledialog.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/FormTexinfo.C
src/frontends/xforms/XFormsView.C
src/frontends/xforms/lyx_gui.C
src/frontends/xforms/xfont_loader.C
src/frontends/xforms/xforms_helpers.C
src/graphics/GraphicsCache.C
src/graphics/GraphicsCacheItem.C
src/graphics/GraphicsConverter.C
src/graphics/PreviewLoader.C
src/importer.C
src/insets/ExternalSupport.C
src/insets/ExternalTemplate.C
src/insets/insetbibtex.C
src/insets/insetgraphics.C
src/insets/insetinclude.C
src/insets/render_graphic.C
src/lyx_cb.C
src/lyx_main.C
src/lyxfunc.C
src/lyxlex_pimpl.C
src/lyxrc.C
src/lyxtextclass.C
src/lyxtextclasslist.C
src/lyxvc.C
src/mathed/math_autocorrect.C
src/mathed/math_extern.C
src/mathed/math_factory.C
src/mover.C
src/output.C
src/session.C
src/support/filename.C
src/support/filetools.C
src/support/filetools.h
src/support/package.C.in
src/support/tempname.C
src/support/tests/filetools.C
src/tex2lyx/preamble.C
src/tex2lyx/tex2lyx.C
src/tex2lyx/text.C
src/trans.C
src/vc-backend.C

index e793188284de4dffd18fa397ed3283c559a65bb1..40fd603897bef5088978530c0e2c9ae75d683dcf 100644 (file)
 
 using lyx::pos_type;
 
-using lyx::support::AddPath;
+using lyx::support::addPath;
 using lyx::support::bformat;
 using lyx::support::FileFilterList;
-using lyx::support::FileSearch;
+using lyx::support::fileSearch;
 using lyx::support::ForkedcallsController;
 using lyx::support::isDirWriteable;
-using lyx::support::MakeDisplayPath;
-using lyx::support::MakeAbsPath;
+using lyx::support::makeDisplayPath;
+using lyx::support::makeAbsPath;
 using lyx::support::package;
 
 using std::endl;
@@ -252,7 +252,7 @@ bool BufferView::Pimpl::loadLyXFile(string const & filename, bool tolastfiles)
 {
        // Get absolute path of file and add ".lyx"
        // to the filename if necessary
-       string s = FileSearch(string(), filename, "lyx");
+       string s = fileSearch(string(), filename, "lyx");
 
        bool const found = !s.empty();
 
@@ -261,7 +261,7 @@ bool BufferView::Pimpl::loadLyXFile(string const & filename, bool tolastfiles)
 
        // File already open?
        if (bufferlist.exists(s)) {
-               string const file = MakeDisplayPath(s, 20);
+               string const file = makeDisplayPath(s, 20);
                string text = bformat(_("The document %1$s is already "
                                        "loaded.\n\nDo you want to revert "
                                        "to the saved version?"), file);
@@ -916,7 +916,7 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filenm)
                        make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
                        make_pair(string(_("Examples|#E#e")),
-                                 string(AddPath(package().system_support(), "examples"))));
+                                 string(addPath(package().system_support(), "examples"))));
 
                FileDialog::Result result =
                        fileDlg.open(initpath,
@@ -937,15 +937,15 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filenm)
 
        // Get absolute path of file and add ".lyx"
        // to the filename if necessary
-       filename = FileSearch(string(), filename, "lyx");
+       filename = fileSearch(string(), filename, "lyx");
 
-       string const disp_fn = MakeDisplayPath(filename);
+       string const disp_fn = makeDisplayPath(filename);
        owner_->message(bformat(_("Inserting document %1$s..."), disp_fn));
 
        string res;
        Buffer buf("", false);
        buf.error.connect(boost::bind(&BufferView::Pimpl::addError, this, _1));
-       if (::loadLyXFile(&buf, MakeAbsPath(filename))) {
+       if (::loadLyXFile(&buf, makeAbsPath(filename))) {
                lyx::cap::pasteParagraphList(cursor_, buf.paragraphs(),
                                             buf.params().textclass);
                res = _("Document %1$s inserted.");
index bb9258c207d60c570e0e835bbe7b4454f31f827c..8ca81b294c1e3b784f36989859ecda70cd4ef22b 100644 (file)
@@ -24,8 +24,8 @@
 
 #include <fstream>
 
-using lyx::support::ChangeExtension;
-using lyx::support::OnlyFilename;
+using lyx::support::changeExtension;
+using lyx::support::onlyFilename;
 using lyx::support::split;
 using lyx::support::Systemcall;
 
@@ -43,7 +43,7 @@ Chktex::Chktex(string const & chktex, string const & f, string const & p)
 int Chktex::run(TeXErrors &terr)
 {
        // run bibtex
-       string log = OnlyFilename(ChangeExtension(file, ".log"));
+       string log = onlyFilename(changeExtension(file, ".log"));
        string tmp = cmd + " -q -v0 -b0 -x " + file + " -o " + log;
        Systemcall one;
        int result = one.startscript(Systemcall::Wait, tmp);
@@ -61,7 +61,7 @@ int Chktex::scanLogFile(TeXErrors & terr)
        string token;
        int retval = 0;
 
-       string const tmp = OnlyFilename(ChangeExtension(file, ".log"));
+       string const tmp = onlyFilename(changeExtension(file, ".log"));
 
 #if USE_BOOST_FORMAT
        boost::format msg(_("ChkTeX warning id # %1$d"));
index 2718bcacf934fb4d4565f341fa376f4bcb95ebe4..6de78ce830666b626e82cc8292172d8048071b82 100644 (file)
@@ -30,8 +30,8 @@ using std::time;
 #endif
 
 using lyx::support::ltrim;
-using lyx::support::MakeAbsPath;
-using lyx::support::OnlyFilename;
+using lyx::support::makeAbsPath;
+using lyx::support::onlyFilename;
 using lyx::support::suffixIs;
 using lyx::support::sum;
 
@@ -52,7 +52,7 @@ bool DepTable::dep_info::changed() const
 void DepTable::insert(string const & fi, bool upd)
 {
        // not quite sure if this is the correct place for MakeAbsPath
-       string const f = MakeAbsPath(fi);
+       string const f = makeAbsPath(fi);
        if (deplist.find(f) == deplist.end()) {
                dep_info di;
                di.crc_prev = 0;
@@ -132,7 +132,7 @@ bool DepTable::sumchange() const
 bool DepTable::haschanged(string const & f) const
 {
        // not quite sure if this is the correct place for MakeAbsPath
-       string const fil = MakeAbsPath(f);
+       string const fil = makeAbsPath(f);
        DepList::const_iterator cit = deplist.find(fil);
        if (cit != deplist.end()) {
                if (cit->second.changed())
@@ -199,7 +199,7 @@ void DepTable::remove_file(string const & filename)
        DepList::iterator cit = deplist.begin();
        DepList::iterator end = deplist.end();
        while (cit != end) {
-               if (OnlyFilename(cit->first) == filename) {
+               if (onlyFilename(cit->first) == filename) {
                        // Can't erase the current iterator, but we
                        // can increment and then erase.
                        // deplist is a map so only the erased
index e748be39c8d8bf988b5e316598283ebecfa81a80..2c64fd896ee528cde4063d0cbf76e24942a267c2 100644 (file)
 
 #include <fstream>
 
-using lyx::support::AbsolutePath;
+using lyx::support::absolutePath;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::contains;
 using lyx::support::findtexfile;
 using lyx::support::getcwd;
-using lyx::support::OnlyFilename;
+using lyx::support::onlyFilename;
 using lyx::support::prefixIs;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::rtrim;
 using lyx::support::split;
 using lyx::support::subst;
@@ -128,9 +128,9 @@ LaTeX::LaTeX(string const & latex, OutputParams const & rp,
        depfile = file + ".dep";
        if (prefixIs(cmd, "pdf")) { // Do we use pdflatex ?
                depfile += "-pdf";
-               output_file = ChangeExtension(file,".pdf");
+               output_file = changeExtension(file,".pdf");
        } else {
-               output_file = ChangeExtension(file,".dvi");
+               output_file = changeExtension(file,".dvi");
        }
 }
 
@@ -146,18 +146,18 @@ void LaTeX::deleteFilesOnError() const
 
        // but the reason for the error might be in a generated file...
 
-       string const ofname = OnlyFilename(file);
+       string const ofname = onlyFilename(file);
 
        // bibtex file
-       string const bbl = ChangeExtension(ofname, ".bbl");
+       string const bbl = changeExtension(ofname, ".bbl");
        unlink(bbl);
 
        // makeindex file
-       string const ind = ChangeExtension(ofname, ".ind");
+       string const ind = changeExtension(ofname, ".ind");
        unlink(ind);
 
        // Also remove the aux file
-       string const aux = ChangeExtension(ofname, ".aux");
+       string const aux = changeExtension(ofname, ".aux");
        unlink(aux);
 }
 
@@ -199,7 +199,7 @@ int LaTeX::run(TeXErrors & terr)
 
        bool had_depfile = fs::exists(depfile);
        bool run_bibtex = false;
-       string aux_file = OnlyFilename(ChangeExtension(file, "aux"));
+       string aux_file = onlyFilename(changeExtension(file, "aux"));
 
        if (had_depfile) {
                lyxerr[Debug::DEPEND] << "Dependency file exists" << endl;
@@ -270,11 +270,11 @@ int LaTeX::run(TeXErrors & terr)
        // if needed.
 
        // run makeindex
-       if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) {
+       if (head.haschanged(onlyFilename(changeExtension(file, ".idx")))) {
                // no checks for now
                lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
                message(_("Running MakeIndex."));
-               rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")), runparams);
+               rerun = runMakeIndex(onlyFilename(changeExtension(file, ".idx")), runparams);
        }
 
        // run bibtex
@@ -338,11 +338,11 @@ int LaTeX::run(TeXErrors & terr)
        // more after this.
 
        // run makeindex if the <file>.idx has changed or was generated.
-       if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) {
+       if (head.haschanged(onlyFilename(changeExtension(file, ".idx")))) {
                // no checks for now
                lyxerr[Debug::LATEX] << "Running MakeIndex." << endl;
                message(_("Running MakeIndex."));
-               rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")), runparams);
+               rerun = runMakeIndex(onlyFilename(changeExtension(file, ".idx")), runparams);
        }
 
        // 2
@@ -383,7 +383,7 @@ int LaTeX::run(TeXErrors & terr)
 
 int LaTeX::startscript()
 {
-       string tmp = cmd + ' ' + QuoteName(file) + " > " + os::nulldev();
+       string tmp = cmd + ' ' + quoteName(file) + " > " + os::nulldev();
        Systemcall one;
        return one.startscript(Systemcall::Wait, tmp);
 }
@@ -396,7 +396,7 @@ bool LaTeX::runMakeIndex(string const & f, OutputParams const & runparams)
                             <<  f << endl;
        string tmp = lyxrc.index_command + " ";
        tmp = subst(tmp, "$$lang", runparams.document_language);
-       tmp += QuoteName(f);
+       tmp += quoteName(f);
        Systemcall one;
        one.startscript(Systemcall::Wait, tmp);
        return true;
@@ -411,7 +411,7 @@ LaTeX::scanAuxFiles(string const & file)
        result.push_back(scanAuxFile(file));
 
        for (int i = 1; i < 1000; ++i) {
-               string const file2 = ChangeExtension(file, "")
+               string const file2 = changeExtension(file, "")
                        + '.' + convert<string>(i)
                        + ".aux";
                if (!fs::exists(file2))
@@ -461,7 +461,7 @@ void LaTeX::scanAuxFile(string const & file, Aux_Info & aux_info)
                        while (!data.empty()) {
                                string database;
                                data = split(data, database, ',');
-                               database = ChangeExtension(database, "bib");
+                               database = changeExtension(database, "bib");
                                lyxerr[Debug::LATEX] << "BibTeX database: `"
                                                     << database << '\'' << endl;
                                aux_info.databases.insert(database);
@@ -470,7 +470,7 @@ void LaTeX::scanAuxFile(string const & file, Aux_Info & aux_info)
                        string style = sub.str(1);
                        // token is now the style file
                        // pass it to the helper
-                       style = ChangeExtension(style, "bst");
+                       style = changeExtension(style, "bst");
                        lyxerr[Debug::LATEX] << "BibTeX style: `"
                                             << style << '\'' << endl;
                        aux_info.styles.insert(style);
@@ -520,7 +520,7 @@ bool LaTeX::runBibTeX(vector<Aux_Info> const & bibtex_info)
                result = true;
 
                string tmp = lyxrc.bibtex_command + " ";
-               tmp += QuoteName(OnlyFilename(ChangeExtension(it->aux_file, string())));
+               tmp += quoteName(onlyFilename(changeExtension(it->aux_file, string())));
                Systemcall one;
                one.startscript(Systemcall::Wait, tmp);
        }
@@ -534,7 +534,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
        int last_line = -1;
        int line_count = 1;
        int retval = NO_ERRORS;
-       string tmp = OnlyFilename(ChangeExtension(file, ".log"));
+       string tmp = onlyFilename(changeExtension(file, ".log"));
        lyxerr[Debug::LATEX] << "Log file: " << tmp << endl;
        ifstream ifs(tmp.c_str());
 
@@ -682,7 +682,7 @@ void handleFoundFile(string const & ff, DepTable & head)
        // (1) foundfile is an
        //     absolute path and should
        //     be inserted.
-       if (AbsolutePath(foundfile)) {
+       if (absolutePath(foundfile)) {
                lyxerr[Debug::DEPEND] << "AbsolutePath file: "
                                      << foundfile << endl;
                // On initial insert we want to do the update at once
@@ -694,7 +694,7 @@ void handleFoundFile(string const & ff, DepTable & head)
                return;
        }
 
-       string const onlyfile = OnlyFilename(foundfile);
+       string const onlyfile = onlyFilename(foundfile);
 
        // (2) foundfile is in the tmpdir
        //     insert it into head
@@ -737,7 +737,7 @@ void LaTeX::deplog(DepTable & head)
        // files used by the LaTeX run. The files are then entered into the
        // dependency file.
 
-       string const logfile = OnlyFilename(ChangeExtension(file, ".log"));
+       string const logfile = onlyFilename(changeExtension(file, ".log"));
 
        static regex reg1(".*\\([^)]+.*");
        static regex reg2("File: ([^ ]+).*");
@@ -788,5 +788,5 @@ void LaTeX::deplog(DepTable & head)
        }
 
        // Make sure that the main .tex file is in the dependancy file.
-       head.insert(OnlyFilename(file), true);
+       head.insert(onlyFilename(file), true);
 }
index bcda1dc5be0ff49cbabb31c0440bc4b8710ec905..ed5b8ccda735b9bd0be3990f7e88dd90ba99bbd8 100644 (file)
@@ -31,9 +31,9 @@
 #include <sstream>
 
 using lyx::support::isSGMLFilename;
-using lyx::support::LibFileSearch;
-using lyx::support::MakeRelPath;
-using lyx::support::OnlyPath;
+using lyx::support::libFileSearch;
+using lyx::support::makeRelPath;
+using lyx::support::onlyPath;
 
 using std::endl;
 using std::find;
@@ -75,7 +75,7 @@ void LaTeXFeatures::require(string const & name)
 void LaTeXFeatures::getAvailable()
 {
        LyXLex lex(0, 0);
-       string real_file = LibFileSearch("", "packages.lst");
+       string real_file = libFileSearch("", "packages.lst");
 
        if (real_file.empty())
                return;
@@ -503,14 +503,14 @@ string const LaTeXFeatures::getLyXSGMLEntities() const
 string const LaTeXFeatures::getIncludedFiles(string const & fname) const
 {
        ostringstream sgmlpreamble;
-       string const basename = OnlyPath(fname);
+       string const basename = onlyPath(fname);
 
        FileMap::const_iterator end = IncludedFiles_.end();
        for (FileMap::const_iterator fi = IncludedFiles_.begin();
             fi != end; ++fi)
                sgmlpreamble << "\n<!ENTITY " << fi->first
                             << (isSGMLFilename(fi->second) ? " SYSTEM \"" : " \"")
-                            << MakeRelPath(fi->second, basename) << "\">";
+                            << makeRelPath(fi->second, basename) << "\">";
 
        return sgmlpreamble.str();
 }
index 58e4b266834229e28e321cae0af8bfdb4619d477..1aa53581dc7279d22a233764f183233f82f379df 100644 (file)
@@ -49,7 +49,7 @@
 
 using lyx::support::compare_ascii_no_case;
 using lyx::support::contains;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeDisplayPath;
 using lyx::support::token;
 
 using boost::bind;
@@ -435,7 +435,7 @@ void expandLastfiles(Menu & tomenu, LyXView const * view)
 
        for (; lfit != lf.end() && ii < 10; ++lfit, ++ii) {
                string const label = convert<string>(ii) + ". "
-                       + MakeDisplayPath((*lfit), 30)
+                       + makeDisplayPath((*lfit), 30)
                        + '|' + convert<string>(ii);
                tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_FILE_OPEN, (*lfit))), view);
        }
@@ -457,7 +457,7 @@ void expandDocuments(Menu & tomenu, LyXView const * view)
        Strings::const_iterator docit = names.begin();
        Strings::const_iterator end = names.end();
        for (; docit != end; ++docit, ++ii) {
-               string label = MakeDisplayPath(*docit, 20);
+               string label = makeDisplayPath(*docit, 20);
                if (ii < 10)
                        label = convert<string>(ii) + ". " + label + '|' + convert<string>(ii);
                tomenu.add(MenuItem(MenuItem::Command, label, FuncRequest(LFUN_SWITCHBUFFER, *docit)), view);
index baa2ddfbcdfaf57865410b8aaaf1f53a02978fb4..eaf6a61dbe66fec6802f7e79557064a402652012 100644 (file)
@@ -25,7 +25,7 @@
 
 using lyx::support::compare_ascii_no_case;
 using lyx::support::getVectorFromString;
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 using lyx::support::subst;
 
 using std::endl;
@@ -229,11 +229,11 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
                if (!f.argument.empty())
                        xpm_name = subst(name + ' ' + f.argument, ' ', '_');
 
-               fullname = LibFileSearch("images", xpm_name, "xpm");
+               fullname = libFileSearch("images", xpm_name, "xpm");
 
                if (fullname.empty()) {
                        // try without the argument
-                       fullname = LibFileSearch("images", name, "xpm");
+                       fullname = libFileSearch("images", name, "xpm");
                }
        }
 
@@ -246,5 +246,5 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
        lyxerr[Debug::GUI] << "Cannot find icon for command \""
                           << lyxaction.getActionName(f.action)
                           << '(' << f.argument << ")\"" << endl;
-       return LibFileSearch("images", "unknown", "xpm");
+       return libFileSearch("images", "unknown", "xpm");
 }
index 77b6e46bb14d3eafe11b19bcb0f1ee035ee9427b..91ea64f25a3de1980ddb5c84dc076bff2c88146d 100644 (file)
 using lyx::pos_type;
 using lyx::pit_type;
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::cmd_ret;
 using lyx::support::createBufferTmpDir;
 using lyx::support::destroyDir;
 using lyx::support::getFormatFromContents;
 using lyx::support::isDirWriteable;
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 using lyx::support::latex_path;
 using lyx::support::ltrim;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
-using lyx::support::MakeLatexName;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::makeAbsPath;
+using lyx::support::makeDisplayPath;
+using lyx::support::makeLatexName;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::Path;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::removeAutosaveFile;
 using lyx::support::rename;
-using lyx::support::RunCommand;
+using lyx::support::runCommand;
 using lyx::support::split;
 using lyx::support::subst;
 using lyx::support::tempName;
@@ -202,7 +202,7 @@ public:
 
 Buffer::Impl::Impl(Buffer & parent, string const & file, bool readonly_)
        : lyx_clean(true), bak_clean(true), unnamed(false), read_only(readonly_),
-         filename(file), filepath(OnlyPath(file)), file_fully_loaded(false),
+         filename(file), filepath(onlyPath(file)), file_fully_loaded(false),
                inset(params)
 {
        inset.setAutoBreakRows(true);
@@ -331,8 +331,8 @@ TexRow const & Buffer::texrow() const
 
 string const Buffer::getLatexName(bool const no_path) const
 {
-       string const name = ChangeExtension(MakeLatexName(fileName()), ".tex");
-       return no_path ? OnlyFilename(name) : name;
+       string const name = changeExtension(makeLatexName(fileName()), ".tex");
+       return no_path ? onlyFilename(name) : name;
 }
 
 
@@ -345,12 +345,12 @@ pair<Buffer::LogType, string> const Buffer::getLogName() const
 
        string const path = temppath();
 
-       string const fname = AddName(path,
-                                    OnlyFilename(ChangeExtension(filename,
+       string const fname = addName(path,
+                                    onlyFilename(changeExtension(filename,
                                                                  ".log")));
        string const bname =
-               AddName(path, OnlyFilename(
-                       ChangeExtension(filename,
+               addName(path, onlyFilename(
+                       changeExtension(filename,
                                        formats.extension("literate") + ".out")));
 
        // If no Latex log or Build log is newer, show Build log
@@ -376,8 +376,8 @@ void Buffer::setReadonly(bool const flag)
 
 void Buffer::setFileName(string const & newfile)
 {
-       pimpl_->filename = MakeAbsPath(newfile);
-       pimpl_->filepath = OnlyPath(pimpl_->filename);
+       pimpl_->filename = makeAbsPath(newfile);
+       pimpl_->filepath = onlyPath(pimpl_->filename);
        setReadonly(fs::is_readonly(pimpl_->filename));
        updateTitles();
 }
@@ -631,7 +631,7 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
                                              filename));
                        return false;
                }
-               string const lyx2lyx = LibFileSearch("lyx2lyx", "lyx2lyx");
+               string const lyx2lyx = libFileSearch("lyx2lyx", "lyx2lyx");
                if (lyx2lyx.empty()) {
                        Alert::error(_("Conversion script not found"),
                                     bformat(_("%1$s is from an earlier"
@@ -642,17 +642,17 @@ bool Buffer::readFile(LyXLex & lex, string const & filename)
                        return false;
                }
                ostringstream command;
-               command << "python " << QuoteName(lyx2lyx)
+               command << "python " << quoteName(lyx2lyx)
                        << " -t " << convert<string>(LYX_FORMAT)
-                       << " -o " << QuoteName(tmpfile) << ' '
-                       << QuoteName(filename);
+                       << " -o " << quoteName(tmpfile) << ' '
+                       << quoteName(filename);
                string const command_str = command.str();
 
                lyxerr[Debug::INFO] << "Running '"
                                    << command_str << '\''
                                    << endl;
 
-               cmd_ret const ret = RunCommand(command_str);
+               cmd_ret const ret = runCommand(command_str);
                if (ret.first != 0) {
                        Alert::error(_("Conversion script failed"),
                                     bformat(_("%1$s is from an earlier version"
@@ -695,7 +695,7 @@ bool Buffer::save() const
        if (lyxrc.make_backup) {
                s = fileName() + '~';
                if (!lyxrc.backupdir_path.empty())
-                       s = AddName(lyxrc.backupdir_path,
+                       s = addName(lyxrc.backupdir_path,
                                    subst(os::internal_path(s),'/','!'));
 
                // It might very well be that this variant is just
@@ -999,7 +999,7 @@ void Buffer::makeLinuxDocFile(string const & fname,
                ofs << tclass.class_header();
 
                string preamble = params().preamble;
-               string const name = runparams.nice ? ChangeExtension(pimpl_->filename, ".sgml")
+               string const name = runparams.nice ? changeExtension(pimpl_->filename, ".sgml")
                         : fname;
                preamble += features.getIncludedFiles(name);
                preamble += features.getLyXSGMLEntities();
@@ -1074,7 +1074,7 @@ void Buffer::makeDocBookFile(string const & fname,
                        preamble += "<!ENTITY % output.print.bmp \"IGNORE\">\n";
                }
 
-               string const name = runparams.nice ? ChangeExtension(pimpl_->filename, ".sgml")
+               string const name = runparams.nice ? changeExtension(pimpl_->filename, ".sgml")
                         : fname;
                preamble += features.getIncludedFiles(name);
                preamble += features.getLyXSGMLEntities();
index 7a663b41239ca56cfd8f4369b1b96bce636e057f..2456da0c1e04095caee6e18e54ec9a6479c0a5c8 100644 (file)
 
 using lyx::pit_type;
 using lyx::support::bformat;
-using lyx::support::LibFileSearch;
-using lyx::support::MakeDisplayPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::libFileSearch;
+using lyx::support::makeDisplayPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::unlink;
 
 using std::min;
@@ -68,7 +68,7 @@ bool readFile(Buffer * const b, string const & s)
 
        // File information about normal file
        if (!fs::exists(s)) {
-               string const file = MakeDisplayPath(s, 50);
+               string const file = makeDisplayPath(s, 50);
                string text = bformat(_("The specified document\n%1$s"
                                        "\ncould not be read."), file);
                Alert::error(_("Could not read document"), text);
@@ -76,12 +76,12 @@ bool readFile(Buffer * const b, string const & s)
        }
 
        // Check if emergency save file exists and is newer.
-       string const e = OnlyPath(s) + OnlyFilename(s) + ".emergency";
+       string const e = onlyPath(s) + onlyFilename(s) + ".emergency";
 
        if (fs::exists(e) && fs::exists(s)
            && fs::last_write_time(e) > fs::last_write_time(s))
        {
-               string const file = MakeDisplayPath(s, 20);
+               string const file = makeDisplayPath(s, 20);
                string const text =
                        bformat(_("An emergency save of the document "
                                  "%1$s exists.\n\n"
@@ -102,12 +102,12 @@ bool readFile(Buffer * const b, string const & s)
        }
 
        // Now check if autosave file is newer.
-       string const a = OnlyPath(s) + '#' + OnlyFilename(s) + '#';
+       string const a = onlyPath(s) + '#' + onlyFilename(s) + '#';
 
        if (fs::exists(a) && fs::exists(s)
            && fs::last_write_time(a) > fs::last_write_time(s))
        {
-               string const file = MakeDisplayPath(s, 20);
+               string const file = makeDisplayPath(s, 20);
                string const text =
                        bformat(_("The backup of the document "
                                  "%1$s is newer.\n\nLoad the "
@@ -148,7 +148,7 @@ bool loadLyXFile(Buffer * b, string const & s)
                        return true;
                }
        } else {
-               string const file = MakeDisplayPath(s, 20);
+               string const file = makeDisplayPath(s, 20);
                // Here we probably should run
                if (LyXVC::file_not_found_hook(s)) {
                        string const text =
@@ -180,13 +180,13 @@ Buffer * newFile(string const & filename, string const & templatename,
        string tname;
        // use defaults.lyx as a default template if it exists.
        if (templatename.empty())
-               tname = LibFileSearch("templates", "defaults.lyx");
+               tname = libFileSearch("templates", "defaults.lyx");
        else
                tname = templatename;
 
        if (!tname.empty()) {
                if (!b->readFile(tname)) {
-                       string const file = MakeDisplayPath(tname, 50);
+                       string const file = makeDisplayPath(tname, 50);
                        string const text  = bformat(_("The specified document template\n%1$s\ncould not be read."), file);
                        Alert::error(_("Could not read template"), text);
                        // no template, start with empty buffer
index a4d2d6a0fd5512402cc7c93831bb9ea75a4bbb88..5b9826471b992ec587f255cac4599cf8c7f91795 100644 (file)
 #include <algorithm>
 #include <functional>
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::bformat;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
-using lyx::support::OnlyFilename;
+using lyx::support::makeAbsPath;
+using lyx::support::makeDisplayPath;
+using lyx::support::onlyFilename;
 using lyx::support::removeAutosaveFile;
 using lyx::support::package;
 using lyx::support::prefixIs;
@@ -73,9 +73,9 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
 
        string file;
        if (buf->isUnnamed())
-               file = OnlyFilename(buf->fileName());
+               file = onlyFilename(buf->fileName());
        else
-               file = MakeDisplayPath(buf->fileName(), 30);
+               file = makeDisplayPath(buf->fileName(), 30);
 
        string const text =
                bformat(_("The document %1$s has unsaved changes.\n\n"
@@ -172,9 +172,9 @@ bool BufferList::close(Buffer * buf, bool const ask)
 
        string fname;
        if (buf->isUnnamed())
-               fname = OnlyFilename(buf->fileName());
+               fname = onlyFilename(buf->fileName());
        else
-               fname = MakeDisplayPath(buf->fileName(), 30);
+               fname = makeDisplayPath(buf->fileName(), 30);
 
        string const text =
                bformat(_("The document %1$s has unsaved changes.\n\n"
@@ -299,7 +299,7 @@ void BufferList::emergencyWrite(Buffer * buf)
                return;
 
        string const doc = buf->isUnnamed()
-               ? OnlyFilename(buf->fileName()) : buf->fileName();
+               ? onlyFilename(buf->fileName()) : buf->fileName();
 
        lyxerr << bformat(_("LyX: Attempting to save document %1$s"), doc) << endl;
 
@@ -319,7 +319,7 @@ void BufferList::emergencyWrite(Buffer * buf)
        }
 
        // 2) In HOME directory.
-       string s = AddName(package().home_dir(), buf->fileName());
+       string s = addName(package().home_dir(), buf->fileName());
        s += ".emergency";
        lyxerr << ' ' << s << endl;
        if (buf->writeFile(s)) {
@@ -333,7 +333,7 @@ void BufferList::emergencyWrite(Buffer * buf)
        // 3) In "/tmp" directory.
        // MakeAbsPath to prepend the current
        // drive letter on OS/2
-       s = AddName(package().temp_dir(), buf->fileName());
+       s = addName(package().temp_dir(), buf->fileName());
        s += ".emergency";
        lyxerr << ' ' << s << endl;
        if (buf->writeFile(s)) {
index 6a5631566d1d5843526d9895da4bbdc86b871118..c52158e1665abdc9e258c2e3845bda437e786239 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <fstream>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using boost::regex;
 using boost::smatch;
@@ -48,7 +48,7 @@ bool CharacterSet::loadFile(string const & fname)
        // open definition file
        lyxerr[Debug::KBMAP]
                << "Reading character set file " << fname << ".cdef" << endl;
-       string const filename = LibFileSearch("kbd", fname, "cdef");
+       string const filename = libFileSearch("kbd", fname, "cdef");
        ifstream ifs(filename.c_str());
        if (!ifs) {
                lyxerr << "Unable to open character set file" << endl;
index 334f790beee41f914e78ba32e5a6ecd1236a74e8..750a03936bc4ad74e10c85560b3a8f2616948591 100644 (file)
 #include "support/path.h"
 #include "support/systemcall.h"
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::compare_ascii_no_case;
 using lyx::support::contains;
-using lyx::support::DirList;
-using lyx::support::GetExtension;
+using lyx::support::dirList;
+using lyx::support::getExtension;
 using lyx::support::isFileReadable;
-using lyx::support::LibFileSearch;
-using lyx::support::LibScriptSearch;
-using lyx::support::MakeRelPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::libFileSearch;
+using lyx::support::libScriptSearch;
+using lyx::support::makeRelPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::Path;
 using lyx::support::prefixIs;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::split;
 using lyx::support::subst;
 using lyx::support::Systemcall;
@@ -284,7 +284,7 @@ bool Converters::convert(Buffer const * buffer,
                         string & to_file, bool try_default)
 {
        string const to_ext = formats.extension(to_format);
-       to_file = ChangeExtension(to_file_base, to_ext);
+       to_file = changeExtension(to_file_base, to_ext);
 
        if (from_format == to_format)
                return move(from_format, from_file, to_file, false);
@@ -295,15 +295,15 @@ bool Converters::convert(Buffer const * buffer,
                        // if no special converter defined, then we take the
                        // default one from ImageMagic.
                        string const from_ext = from_format.empty() ?
-                               GetExtension(from_file) :
+                               getExtension(from_file) :
                                formats.extension(from_format);
                        string const command =
                                "sh " +
-                               QuoteName(LibFileSearch("scripts", "convertDefault.sh")) +
+                               quoteName(libFileSearch("scripts", "convertDefault.sh")) +
                                ' ' +
-                               QuoteName(from_ext + ':' + from_file) +
+                               quoteName(from_ext + ':' + from_file) +
                                ' ' +
-                               QuoteName(to_ext + ':' + to_file);
+                               quoteName(to_ext + ':' + to_file);
                        lyxerr[Debug::FILES]
                                << "No converter defined! "
                                   "I use convertDefault.sh:\n\t"
@@ -323,12 +323,12 @@ bool Converters::convert(Buffer const * buffer,
        }
        OutputParams runparams;
        runparams.flavor = getFlavor(edgepath);
-       string path = OnlyPath(from_file);
+       string path = onlyPath(from_file);
        Path p(path);
 
        bool run_latex = false;
-       string from_base = ChangeExtension(from_file, "");
-       string to_base = ChangeExtension(to_file, "");
+       string from_base = changeExtension(from_file, "");
+       string to_base = changeExtension(to_file, "");
        string infile;
        string outfile = from_file;
        for (Graph::EdgePath::const_iterator cit = edgepath.begin();
@@ -340,18 +340,18 @@ bool Converters::convert(Buffer const * buffer,
                               << conv.from << " to " << conv.to << endl;
                infile = outfile;
                outfile = conv.result_dir.empty()
-                       ? ChangeExtension(from_file, conv.To->extension())
-                       : AddName(subst(conv.result_dir,
+                       ? changeExtension(from_file, conv.To->extension())
+                       : addName(subst(conv.result_dir,
                                        token_base, from_base),
                                  subst(conv.result_file,
-                                       token_base, OnlyFilename(from_base)));
+                                       token_base, onlyFilename(from_base)));
 
                // if input and output files are equal, we use a
                // temporary file as intermediary (JMarc)
                string real_outfile;
                if (outfile == infile) {
                        real_outfile = infile;
-                       outfile = AddName(buffer->temppath(), "tmpfile.out");
+                       outfile = addName(buffer->temppath(), "tmpfile.out");
                }
 
                if (conv.latex) {
@@ -370,18 +370,18 @@ bool Converters::convert(Buffer const * buffer,
                        }
 
                        string const infile2 = (conv.original_dir)
-                               ? infile : MakeRelPath(infile, path);
+                               ? infile : makeRelPath(infile, path);
                        string const outfile2 = (conv.original_dir)
-                               ? outfile : MakeRelPath(outfile, path);
+                               ? outfile : makeRelPath(outfile, path);
 
                        string command = conv.command;
-                       command = subst(command, token_from, QuoteName(infile2));
-                       command = subst(command, token_base, QuoteName(from_base));
-                       command = subst(command, token_to, QuoteName(outfile2));
-                       command = LibScriptSearch(command);
+                       command = subst(command, token_from, quoteName(infile2));
+                       command = subst(command, token_base, quoteName(from_base));
+                       command = subst(command, token_to, quoteName(outfile2));
+                       command = libScriptSearch(command);
 
                        if (!conv.parselog.empty())
-                               command += " 2> " + QuoteName(infile2 + ".out");
+                               command += " 2> " + quoteName(infile2 + ".out");
 
                        if (conv.from == "dvi" && conv.to == "ps")
                                command = add_options(command,
@@ -421,10 +421,10 @@ bool Converters::convert(Buffer const * buffer,
 
                        if (!conv.parselog.empty()) {
                                string const logfile =  infile2 + ".log";
-                               string const script = LibScriptSearch(conv.parselog);
+                               string const script = libScriptSearch(conv.parselog);
                                string const command2 = script +
-                                       " < " + QuoteName(infile2 + ".out") +
-                                       " > " + QuoteName(logfile);
+                                       " < " + quoteName(infile2 + ".out") +
+                                       " > " + quoteName(logfile);
                                one.startscript(Systemcall::Wait, command2);
                                if (!scanLog(*buffer, command, logfile))
                                        return false;
@@ -451,9 +451,9 @@ bool Converters::convert(Buffer const * buffer,
                return true;
 
        if (!conv.result_dir.empty()) {
-               to_file = AddName(subst(conv.result_dir, token_base, to_base),
+               to_file = addName(subst(conv.result_dir, token_base, to_base),
                                  subst(conv.result_file,
-                                       token_base, OnlyFilename(to_base)));
+                                       token_base, onlyFilename(to_base)));
                if (from_base != to_base) {
                        string const from = subst(conv.result_dir,
                                            token_base, from_base);
@@ -480,18 +480,18 @@ bool Converters::move(string const & fmt,
                return true;
 
        bool no_errors = true;
-       string const path = OnlyPath(from);
-       string const base = OnlyFilename(ChangeExtension(from, ""));
-       string const to_base = ChangeExtension(to, "");
-       string const to_extension = GetExtension(to);
+       string const path = onlyPath(from);
+       string const base = onlyFilename(changeExtension(from, ""));
+       string const to_base = changeExtension(to, "");
+       string const to_extension = getExtension(to);
 
-       vector<string> files = DirList(OnlyPath(from), GetExtension(from));
+       vector<string> files = dirList(onlyPath(from), getExtension(from));
        for (vector<string>::const_iterator it = files.begin();
             it != files.end(); ++it)
                if (prefixIs(*it, base)) {
                        string const from2 = path + *it;
                        string to2 = to_base + it->substr(base.length());
-                       to2 = ChangeExtension(to2, to_extension);
+                       to2 = changeExtension(to2, to_extension);
                        lyxerr[Debug::FILES] << "moving " << from2
                                             << " to " << to2 << endl;
 
index ede3c28776af669d935435a5ebdac2bf10f78437..076e09a09b163d5b93fdb5c0344b55171da7c7f4 100644 (file)
 
 #include <boost/filesystem/operations.hpp>
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::contains;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::makeAbsPath;
+using lyx::support::makeDisplayPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::package;
 using lyx::support::prefixIs;
 
@@ -76,7 +76,7 @@ int checkOverwrite(string const & filename)
        if (fs::exists(filename)) {
                string text = bformat(_("The file %1$s already exists.\n\n"
                                        "Do you want to over-write that file?"),
-                                     MakeDisplayPath(filename));
+                                     makeDisplayPath(filename));
                return Alert::prompt(_("Over-write file?"),
                                     text, 0, 2,
                                     _("&Over-write"), _("Over-write &all"),
@@ -111,7 +111,7 @@ CopyStatus copyFile(string const & format,
        // overwrite themselves. This check could be changed to
        // boost::filesystem::equivalent(sourceFile, destFile) if export to
        // other directories than the document directory is desired.
-       if (!prefixIs(OnlyPath(sourceFile), package().temp_dir()))
+       if (!prefixIs(onlyPath(sourceFile), package().temp_dir()))
                return ret;
 
        if (!force) {
@@ -131,8 +131,8 @@ CopyStatus copyFile(string const & format,
        if (!mover.copy(sourceFile, destFile, latexFile))
                Alert::error(_("Couldn't copy file"),
                             bformat(_("Copying %1$s to %2$s failed."),
-                                    MakeDisplayPath(sourceFile),
-                                    MakeDisplayPath(destFile)));
+                                    makeDisplayPath(sourceFile),
+                                    makeDisplayPath(destFile)));
 
        return ret;
 }
@@ -181,8 +181,8 @@ bool Exporter::Export(Buffer * buffer, string const & format,
        }
 
        string filename = buffer->getLatexName(false);
-       filename = AddName(buffer->temppath(), filename);
-       filename = ChangeExtension(filename,
+       filename = addName(buffer->temppath(), filename);
+       filename = changeExtension(filename,
                                   formats.extension(backend_format));
 
        // Ascii backend
@@ -221,20 +221,20 @@ bool Exporter::Export(Buffer * buffer, string const & format,
 
        if (!put_in_tempdir) {
                string const tmp_result_file = result_file;
-               result_file = ChangeExtension(buffer->fileName(),
+               result_file = changeExtension(buffer->fileName(),
                                              formats.extension(format));
                // We need to copy referenced files (e. g. included graphics
                // if format == "dvi") to the result dir.
                vector<ExportedFile> const files =
                        runparams.exportdata->externalFiles(format);
-               string const dest = OnlyPath(result_file);
+               string const dest = onlyPath(result_file);
                CopyStatus status = SUCCESS;
                for (vector<ExportedFile>::const_iterator it = files.begin();
                                it != files.end() && status != CANCEL; ++it) {
                        string const fmt =
                                formats.getFormatFromFile(it->sourceName);
                        status = copyFile(fmt, it->sourceName,
-                                         MakeAbsPath(it->exportName, dest),
+                                         makeAbsPath(it->exportName, dest),
                                          it->exportName, status == FORCE);
                }
                if (status == CANCEL) {
@@ -247,7 +247,7 @@ bool Exporter::Export(Buffer * buffer, string const & format,
                        buffer->message(bformat(_("Document exported as %1$s "
                                                  "to file `%2$s'"),
                                                formats.prettyName(format),
-                                               MakeDisplayPath(result_file)));
+                                               makeDisplayPath(result_file)));
                } else {
                        // This must be a dummy converter like fax (bug 1888)
                        buffer->message(bformat(_("Document exported as %1$s"),
@@ -319,7 +319,7 @@ void ExportData::addExternalFile(string const & format,
                                 string const & sourceName,
                                 string const & exportName)
 {
-       BOOST_ASSERT(lyx::support::AbsolutePath(sourceName));
+       BOOST_ASSERT(lyx::support::absolutePath(sourceName));
 
        // Make sure that we have every file only once, otherwise copyFile()
        // would ask several times if it should overwrite a file.
@@ -333,7 +333,7 @@ void ExportData::addExternalFile(string const & format,
 void ExportData::addExternalFile(string const & format,
                                 string const & sourceName)
 {
-       addExternalFile(format, sourceName, OnlyFilename(sourceName));
+       addExternalFile(format, sourceName, onlyFilename(sourceName));
 }
 
 
index da512b01b6e964cf5493fc0e5dae63b736cedcea..ca8ef10e47c70b03a64ce2d2711d3a3dca776107 100644 (file)
 using lyx::support::bformat;
 using lyx::support::compare_ascii_no_case;
 using lyx::support::contains;
-using lyx::support::LibScriptSearch;
-using lyx::support::MakeDisplayPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::libScriptSearch;
+using lyx::support::makeDisplayPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::Path;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::subst;
 using lyx::support::Systemcall;
 
@@ -134,7 +134,7 @@ string Formats::getFormatFromFile(string const & filename) const
                return format;
 
        // try to find a format from the file extension.
-       string const ext(lyx::support::GetExtension(filename));
+       string const ext(lyx::support::getExtension(filename));
        if (!ext.empty()) {
                // this is ambigous if two formats have the same extension,
                // but better than nothing
@@ -232,7 +232,7 @@ bool Formats::view(Buffer const & buffer, string const & filename,
                return false;
        }
 
-       string command = LibScriptSearch(format->viewer());
+       string command = libScriptSearch(format->viewer());
 
        if (format_name == "dvi" &&
            !lyxrc.view_dvi_paper_option.empty()) {
@@ -249,20 +249,20 @@ bool Formats::view(Buffer const & buffer, string const & filename,
                command += ' ' + token_from;
 
        command = subst(command, token_from,
-                       QuoteName(OnlyFilename(filename)));
-       command = subst(command, token_path, QuoteName(OnlyPath(filename)));
-       command = subst(command, token_socket, QuoteName(lyxsocket->address()));
+                       quoteName(onlyFilename(filename)));
+       command = subst(command, token_path, quoteName(onlyPath(filename)));
+       command = subst(command, token_socket, quoteName(lyxsocket->address()));
        lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
        buffer.message(_("Executing command: ") + command);
 
-       Path p(OnlyPath(filename));
+       Path p(onlyPath(filename));
        Systemcall one;
        int const res = one.startscript(Systemcall::DontWait, command);
 
        if (res) {
                Alert::error(_("Cannot view file"),
                             bformat(_("An error occurred whilst running %1$s"),
-                              MakeDisplayPath(command, 50)));
+                              makeDisplayPath(command, 50)));
                return false;
        }
        return true;
@@ -294,20 +294,20 @@ bool Formats::edit(Buffer const & buffer, string const & filename,
                command += ' ' + token_from;
 
        command = subst(command, token_from,
-                       QuoteName(OnlyFilename(filename)));
-       command = subst(command, token_path, QuoteName(OnlyPath(filename)));
-       command = subst(command, token_socket, QuoteName(lyxsocket->address()));
+                       quoteName(onlyFilename(filename)));
+       command = subst(command, token_path, quoteName(onlyPath(filename)));
+       command = subst(command, token_socket, quoteName(lyxsocket->address()));
        lyxerr[Debug::FILES] << "Executing command: " << command << std::endl;
        buffer.message(_("Executing command: ") + command);
 
-       Path p(OnlyPath(filename));
+       Path p(onlyPath(filename));
        Systemcall one;
        int const res = one.startscript(Systemcall::DontWait, command);
 
        if (res) {
                Alert::error(_("Cannot edit file"),
                             bformat(_("An error occurred whilst running %1$s"),
-                              MakeDisplayPath(command, 50)));
+                              makeDisplayPath(command, 50)));
                return false;
        }
        return true;
index 56a7e410ce9e13b86f8a41315da8dccb5520893c..7b272a3c05890f8e78bd6782a98b858ba927a499 100644 (file)
@@ -46,8 +46,8 @@
 # include <unistd.h>
 #endif
 
-using lyx::support::MakeDisplayPath;
-using lyx::support::OnlyFilename;
+using lyx::support::makeDisplayPath;
+using lyx::support::onlyFilename;
 
 using std::endl;
 using std::string;
@@ -179,8 +179,8 @@ void LyXView::updateWindowTitle()
        if (view()->available()) {
                string const cur_title = buffer()->fileName();
                if (!cur_title.empty()) {
-                       maximize_title += ": " + MakeDisplayPath(cur_title, 30);
-                       minimize_title = OnlyFilename(cur_title);
+                       maximize_title += ": " + makeDisplayPath(cur_title, 30);
+                       minimize_title = onlyFilename(cur_title);
                        if (!buffer()->isClean()) {
                                maximize_title += _(" (changed)");
                                minimize_title += '*';
index b0b7ef1d34726c01ed26b65f1cb848301790c461..cd379b9141e4f6a2a62e8931ca5007156cbb633d 100644 (file)
@@ -28,8 +28,8 @@ using std::string;
 
 namespace lyx {
 
-using support::FileSearch;
-using support::MakeDisplayPath;
+using support::fileSearch;
+using support::makeDisplayPath;
 using support::package;
 
 namespace frontend {
@@ -42,7 +42,7 @@ ControlAboutlyx::ControlAboutlyx(Dialog & parent)
 
 void ControlAboutlyx::getCredits(ostream & ss) const
 {
-       string const name = FileSearch(package().system_support(), "CREDITS");
+       string const name = fileSearch(package().system_support(), "CREDITS");
 
        bool found(!name.empty());
 
@@ -89,10 +89,10 @@ string const ControlAboutlyx::getVersion() const
           << lyx_release_date
           << "\n"
           << _("Library directory: ")
-          << MakeDisplayPath(package().system_support())
+          << makeDisplayPath(package().system_support())
           << "\n"
           << _("User directory: ")
-          << MakeDisplayPath(package().user_support());
+          << makeDisplayPath(package().user_support());
 
        return ss.str();
 }
index 76964ac4c3583ca574b67dbcf40428e314514696..37ab488b0d9899b34ec30d8b77c3e7d3b79bdef6 100644 (file)
@@ -36,7 +36,7 @@ namespace lyx {
 
 using support::contains;
 using support::FileFilterList;
-using support::OnlyFilename;
+using support::onlyFilename;
 using support::prefixIs;
 using support::split;
 
@@ -82,7 +82,7 @@ void ControlBibtex::getBibStyles(vector<string> & data) const
        vector<string>::iterator it  = data.begin();
        vector<string>::iterator end = data.end();
        for (; it != end; ++it) {
-               *it = OnlyFilename(*it);
+               *it = onlyFilename(*it);
        }
        // sort on filename only (no path)
        std::sort(data.begin(), data.end());
@@ -102,7 +102,7 @@ void ControlBibtex::getBibFiles(vector<string> & data) const
        vector<string>::iterator it  = data.begin();
        vector<string>::iterator end = data.end();
        for (; it != end; ++it) {
-               *it = OnlyFilename(*it);
+               *it = onlyFilename(*it);
        }
        // sort on filename only (no path)
        std::sort(data.begin(), data.end());
index 556363ac50d1a6600b24391bb57a8275e2e4e98e..e0c36c0ec416e905cb68e32b07e9ec5ff53010ed 100644 (file)
@@ -38,7 +38,7 @@ using std::string;
 namespace lyx {
 
 using support::FileFilterList;
-using support::MakeAbsPath;
+using support::makeAbsPath;
 using support::readBB_from_PSFile;
 
 namespace frontend {
@@ -167,7 +167,7 @@ string const ControlExternal::browse(string const & input,
 string const ControlExternal::readBB(string const & file)
 {
        string const abs_file =
-               MakeAbsPath(file, kernel().bufferFilepath());
+               makeAbsPath(file, kernel().bufferFilepath());
 
        // try to get it from the file, if possible. Zipped files are
        // unzipped in the readBB_from_PSFile-Function
index e7c5e4157f9d93f2bd3d2513659641ea34d12c5c..af2ef5532482d99c58f76a4e1919d43199f34ad7 100644 (file)
@@ -42,10 +42,10 @@ namespace fs = boost::filesystem;
 
 namespace lyx {
 
-using support::AddName;
+using support::addName;
 using support::FileFilterList;
 using support::isFileReadable;
-using support::MakeAbsPath;
+using support::makeAbsPath;
 using support::package;
 using support::readBB_from_PSFile;
 
@@ -86,10 +86,10 @@ string const ControlGraphics::browse(string const & in_name) const
        string const title = _("Select graphics file");
 
        // Does user clipart directory exist?
-       string clipdir = AddName (package().user_support(), "clipart");
+       string clipdir = addName(package().user_support(), "clipart");
        if (!(fs::exists(clipdir) && fs::is_directory(clipdir)))
                // No - bail out to system clipart directory
-               clipdir = AddName (package().system_support(), "clipart");
+               clipdir = addName(package().system_support(), "clipart");
        pair<string, string> dir1(_("Clipart|#C#c"), clipdir);
        pair<string, string> dir2(_("Documents|#o#O"), string(lyxrc.document_path));
        // Show the file browser dialog
@@ -103,7 +103,7 @@ string const ControlGraphics::browse(string const & in_name) const
 string const ControlGraphics::readBB(string const & file)
 {
        string const abs_file =
-               MakeAbsPath(file, kernel().bufferFilepath());
+               makeAbsPath(file, kernel().bufferFilepath());
 
        // try to get it from the file, if possible. Zipped files are
        // unzipped in the readBB_from_PSFile-Function
@@ -132,7 +132,7 @@ string const ControlGraphics::readBB(string const & file)
 bool ControlGraphics::isFilenameValid(string const & fname) const
 {
        // It may be that the filename is relative.
-       string const name = MakeAbsPath(fname, kernel().bufferFilepath());
+       string const name = makeAbsPath(fname, kernel().bufferFilepath());
        return isFileReadable(name);
 }
 
@@ -178,7 +178,7 @@ size_t const rorigin_size = sizeof(rorigin_lyx_strs) / sizeof(char *);
 
 vector<string> const getBBUnits()
 {
-       return vector<string> (bb_units, bb_units + bb_size);
+       return vector<string>(bb_units, bb_units + bb_size);
 }
 
 
index 96b57156b10716e3424ff3b310163f6104c4545f..9bbcbffddb76f8af8f207b840f35529f86b48ed4 100644 (file)
@@ -36,8 +36,8 @@ namespace lyx {
 
 using support::FileFilterList;
 using support::isFileReadable;
-using support::MakeAbsPath;
-using support::OnlyPath;
+using support::makeAbsPath;
+using support::onlyPath;
 
 namespace frontend {
 
@@ -90,7 +90,7 @@ string const ControlInclude::browse(string const & in_name, Type in_type) const
        pair<string, string> dir1(N_("Documents|#o#O"),
                                  string(lyxrc.document_path));
 
-       string const docpath = OnlyPath(kernel().buffer().fileName());
+       string const docpath = onlyPath(kernel().buffer().fileName());
 
        return browseRelFile(in_name, docpath, title,
                             filters, false, dir1);
@@ -99,7 +99,7 @@ string const ControlInclude::browse(string const & in_name, Type in_type) const
 
 void ControlInclude::load(string const & file)
 {
-       string const ext = support::GetExtension(file);
+       string const ext = support::getExtension(file);
        if (ext == "lyx")
                kernel().dispatch(FuncRequest(LFUN_CHILDOPEN, file));
        else
@@ -111,8 +111,8 @@ void ControlInclude::load(string const & file)
 bool ControlInclude::fileExists(string const & file)
 {
        string const fileWithAbsPath
-               = MakeAbsPath(file,
-                             OnlyPath(kernel().buffer().fileName()));
+               = makeAbsPath(file,
+                             onlyPath(kernel().buffer().fileName()));
 
        if (isFileReadable(fileWithAbsPath))
                return true;
index a0cc9de8fa14e42cc952f31bbc3bfc10140e84f8..61cc600e4f8c785f1c023177d4ead8c03576230b 100644 (file)
@@ -25,7 +25,7 @@ using std::string;
 namespace lyx {
 
 using support::compare;
-using support::LibFileSearch;
+using support::libFileSearch;
 using support::subst;
 
 namespace frontend {
@@ -374,7 +374,7 @@ string const find_xpm(string const & name)
                           << "Looking for math XPM called \""
                           << xpm_name << '"' << std::endl;
 
-       return LibFileSearch("images/math/", xpm_name, "xpm");
+       return libFileSearch("images/math/", xpm_name, "xpm");
 }
 
 } // namespace frontend
index 18718d24d9ee40f0dfaeca32e68f95960ea9d7e5..2405bc16a564227d9f134670b09e6753f2c0f14d 100644 (file)
@@ -29,7 +29,7 @@ using std::string;
 
 namespace lyx {
 
-using support::ChangeExtension;
+using support::changeExtension;
 using support::FileFilterList;
 
 namespace frontend {
@@ -44,10 +44,10 @@ ControlPrint::ControlPrint(Dialog & parent)
 bool ControlPrint::initialiseParams(std::string const &)
 {
        /// get global printer parameters
-       string const name =  ChangeExtension(kernel().buffer().fileName(),
+       string const name =  changeExtension(kernel().buffer().fileName(),
                                        lyxrc.print_file_extension);
-       params_.reset(new PrinterParams (PrinterParams::PRINTER,
-                                        lyxrc.printer, name));
+       params_.reset(new PrinterParams(PrinterParams::PRINTER,
+                                       lyxrc.printer, name));
 
        dialog().bc().valid(); // so that the user can press Ok
        return true;
index 9260d5db8674c809e7d6c3b9f421be1c1e34647c..e17044a30deed5746927b8435d67258da805f8aa 100644 (file)
@@ -26,8 +26,8 @@ extern BufferList bufferlist;
 
 namespace lyx {
 
-using support::MakeAbsPath;
-using support::MakeDisplayPath;
+using support::makeAbsPath;
+using support::makeDisplayPath;
 
 namespace frontend {
 
@@ -38,7 +38,7 @@ ControlRef::ControlRef(Dialog & d)
 
 vector<string> const ControlRef::getLabelList(string const & name) const
 {
-       Buffer const & buf = *bufferlist.getBuffer(MakeAbsPath(name));
+       Buffer const & buf = *bufferlist.getBuffer(makeAbsPath(name));
        vector<string> list;
        buf.getLabelList(list);
        return list;
@@ -63,7 +63,7 @@ vector<string> const ControlRef::getBufferList() const
        vector<string> buffers = bufferlist.getFileNames();
        for (vector<string>::iterator it = buffers.begin();
             it != buffers.end(); ++it) {
-               *it = MakeDisplayPath(*it);
+               *it = makeDisplayPath(*it);
        }
 
        return buffers;
index c58eb7dd45d02df829e640df2a43a4ca0a079e95..b083bf3681bd686ec98b56080be797c5d2ca18d2 100644 (file)
@@ -26,7 +26,6 @@ using std::string;
 
 namespace lyx {
 
-using support::AddName;
 using support::trim;
 
 namespace frontend {
index 6ffe52a18e805e2fce0a864e756a1829b106601f..f0239c8f60db071e01eaad80fe86c1bc09002b54 100644 (file)
@@ -17,8 +17,7 @@ using std::string;
 
 namespace lyx {
 
-using support::GetFileContents;
-using support::OnlyFilename;
+using support::onlyFilename;
 
 namespace frontend {
 
@@ -43,13 +42,13 @@ void ControlShowFile::clearParams()
 
 string ControlShowFile::getFileContents()
 {
-       return GetFileContents(filename_);
+       return support::getFileContents(filename_);
 }
 
 
 string ControlShowFile::getFileName()
 {
-       return OnlyFilename(filename_);
+       return onlyFilename(filename_);
 }
 
 } // namespace frontend
index 6262d4a21e92234dfc52d1c63fd5ad8c21421df9..a6dfab8c2f7595e08e0d984d258ce05e72512699 100644 (file)
@@ -22,7 +22,7 @@ using std::vector;
 
 namespace lyx {
 
-using support::OnlyFilename;
+using support::onlyFilename;
 
 namespace frontend {
 
@@ -54,7 +54,7 @@ void getTexFileList(ControlTexinfo::texFileSuffix type,
        vector<string>::iterator it  = list.begin();
        vector<string>::iterator end = list.end();
        for (; it != end; ++it) {
-               *it = OnlyFilename(*it);
+               *it = onlyFilename(*it);
        }
        // sort on filename only (no path)
        std::sort(list.begin(), list.end());
index ddf9ce9dff8bbcbe7c4ec2c5978a708dcbad2e9f..2aa81d893a7dd9a2580707f7f2241ed46a4632ce 100644 (file)
@@ -29,15 +29,15 @@ using std::string;
 
 namespace lyx {
 
-using support::AddName;
-using support::ChangeExtension;
+using support::addName;
+using support::changeExtension;
 using support::FileFilterList;
-using support::GetExtension;
-using support::LibFileSearch;
-using support::MakeAbsPath;
-using support::MakeRelPath;
-using support::OnlyFilename;
-using support::OnlyPath;
+using support::getExtension;
+using support::libFileSearch;
+using support::makeAbsPath;
+using support::makeRelPath;
+using support::onlyFilename;
+using support::onlyPath;
 using support::package;
 using support::prefixIs;
 
@@ -53,7 +53,7 @@ string const browseFile(string const & filename,
 {
        string lastPath(".");
        if (!filename.empty())
-               lastPath = OnlyPath(filename);
+               lastPath = onlyPath(filename);
 
        FileDialog fileDlg(title, LFUN_SELECT_FILE_SYNC, dir1, dir2);
 
@@ -61,10 +61,10 @@ string const browseFile(string const & filename,
 
        if (save)
                result = fileDlg.save(lastPath, filters,
-                                     OnlyFilename(filename));
+                                     onlyFilename(filename));
        else
                result = fileDlg.open(lastPath, filters,
-                                     OnlyFilename(filename));
+                                     onlyFilename(filename));
 
        return result.second;
 }
@@ -78,11 +78,11 @@ string const browseRelFile(string const & filename,
                           pair<string,string> const & dir1,
                           pair<string,string> const & dir2)
 {
-       string const fname = MakeAbsPath(filename, refpath);
+       string const fname = makeAbsPath(filename, refpath);
 
        string const outname = browseFile(fname, title, filters, save,
                                          dir1, dir2);
-       string const reloutname = MakeRelPath(outname, refpath);
+       string const reloutname = makeRelPath(outname, refpath);
        if (prefixIs(reloutname, "../"))
                return outname;
        else
@@ -98,24 +98,24 @@ string const browseLibFile(string const & dir,
                           FileFilterList const & filters)
 {
        pair<string,string> const dir1(_("System files|#S#s"),
-                                      AddName(package().system_support(), dir));
+                                      addName(package().system_support(), dir));
 
        pair<string,string> const dir2(_("User files|#U#u"),
-                                      AddName(package().user_support(), dir));
+                                      addName(package().user_support(), dir));
 
-       string const result = browseFile(LibFileSearch(dir, name, ext), title,
+       string const result = browseFile(libFileSearch(dir, name, ext), title,
                                         filters, false, dir1, dir2);
 
        // remove the extension if it is the default one
        string noextresult;
-       if (GetExtension(result) == ext)
-               noextresult = ChangeExtension(result, string());
+       if (getExtension(result) == ext)
+               noextresult = changeExtension(result, string());
        else
                noextresult = result;
 
        // remove the directory, if it is the default one
-       string const file = OnlyFilename(noextresult);
-       if (LibFileSearch(dir, file, ext) == result)
+       string const file = onlyFilename(noextresult);
+       if (libFileSearch(dir, file, ext) == result)
                return file;
        else
                return noextresult;
@@ -129,12 +129,12 @@ string const browseDir(string const & pathname,
 {
        string lastPath(".");
        if (!pathname.empty())
-               lastPath = OnlyPath(pathname);
+               lastPath = onlyPath(pathname);
 
        FileDialog fileDlg(title, LFUN_SELECT_FILE_SYNC, dir1, dir2);
 
        FileDialog::Result const result =
-               fileDlg.opendir(lastPath, OnlyFilename(pathname));
+               fileDlg.opendir(lastPath, onlyFilename(pathname));
 
        return result.second;
 }
index e2aa2d5bb933f59f38787df72e3612522ae3de71..4e19b7d3ee90f2a26d922c19cde04ff608f44a8f 100644 (file)
@@ -30,14 +30,14 @@ using std::endl;
 namespace lyx {
 
 using support::contains;
-using support::GetExtension;
-using support::GetFileContents;
+using support::getExtension;
+using support::getFileContents;
 using support::getVectorFromString;
-using support::LibFileSearch;
-using support::OnlyFilename;
+using support::libFileSearch;
+using support::onlyFilename;
 using support::package;
 using support::Path;
-using support::QuoteName;
+using support::quoteName;
 using support::split;
 using support::Systemcall;
 using support::token;
@@ -53,7 +53,7 @@ void rescanTexStyles()
        Systemcall one;
        one.startscript(Systemcall::Wait,
                        "sh " +
-                       QuoteName(LibFileSearch("scripts", "TeXFiles.sh")));
+                       quoteName(libFileSearch("scripts", "TeXFiles.sh")));
 }
 
 
@@ -71,11 +71,11 @@ void texhash()
 void getTexFileList(string const & filename, std::vector<string> & list)
 {
        list.clear();
-       string const file = LibFileSearch("", filename);
+       string const file = libFileSearch("", filename);
        if (file.empty())
                return;
 
-       list = getVectorFromString(GetFileContents(file), "\n");
+       list = getVectorFromString(getFileContents(file), "\n");
 
        // Normalise paths like /foo//bar ==> /foo/bar
        boost::RegEx regex("/{2,}");
@@ -115,7 +115,7 @@ string const getTexFileFromList(string const & file,
 {
        string file_ = file;
        // do we need to add the suffix?
-       if (!(GetExtension(file) == type))
+       if (!(getExtension(file) == type))
                file_ += '.' + type;
 
        lyxerr << "Searching for file " << file_ << endl;
@@ -129,13 +129,13 @@ string const getTexFileFromList(string const & file,
                lstfile = "bstFiles.lst";
        else if (type == "bib")
                lstfile = "bibFiles.lst";
-       string const allClasses = GetFileContents(LibFileSearch(string(),
+       string const allClasses = getFileContents(libFileSearch(string(),
                                                                lstfile));
        int entries = 0;
        string classfile = token(allClasses, '\n', entries);
        int count = 0;
        while ((!contains(classfile, file) ||
-               (OnlyFilename(classfile) != file)) &&
+               (onlyFilename(classfile) != file)) &&
                (++count < 1000)) {
                classfile = token(allClasses, '\n', ++entries);
        }
index abf04e9d2710cd1cb836de0d37cac7eeff30ec4d..96d98e5664971cb14bbec1bbc520daaa0ba0d534 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <sstream>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using std::ostringstream;
 using std::string;
@@ -173,7 +173,7 @@ void GAboutlyx::doBuild()
           << controller().getDisclaimer();
        dialog->set_license (ls.str());
 
-       string const filename = LibFileSearch("images", "banner", "ppm");
+       string const filename = libFileSearch("images", "banner", "ppm");
        Glib::RefPtr<Gdk::Pixbuf> logo = Gdk::Pixbuf::create_from_file(filename);
        Glib::RefPtr<Gdk::Pixbuf> logo_scaled = logo->scale_simple(
                logo->get_width() / 2,
index 881fe69be96982cde37cbec998272b4ba443f728..4bc61f9630b0497f72fea1d2ad5f865ceea9b059 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <libglademm.h>
 
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::split;
 using lyx::support::trim;
 
@@ -135,7 +135,7 @@ void GBibtex::update()
        vector<string>::const_iterator it = str.begin();
        vector<string>::const_iterator const end = str.end();
        for (; it != end; ++it) {
-               string item(ChangeExtension(*it, ""));
+               string item(changeExtension(*it, ""));
                if (item == bibstyle)
                        item_nr = int(it - str.begin());
                stylecombo_.append_text (item);
@@ -216,7 +216,7 @@ void GBibtex::add()
        if (new_bib.empty())
                return;
 
-       new_bib = ChangeExtension(new_bib, string());
+       new_bib = changeExtension(new_bib, string());
 
        Gtk::TreeModel::iterator const row = databasesstore_->append();
        (*row)[stringcol_] = new_bib;
@@ -242,7 +242,7 @@ void GBibtex::browse()
        string const file = controller().browseBst("");
 
        if (!file.empty()) {
-               string const filen = ChangeExtension(file, "");
+               string const filen = changeExtension(file, "");
                bool present = false;
 
                for (int i = 0; i < stylecombo_.get_model()->children().size(); ++i) {
index 38890916fbe5238550eca9f03666a7a9ac4df17f..5e3616e17b0960b33acec6aafce3a18b9a7bb4cd 100644 (file)
@@ -28,7 +28,7 @@ using std::string;
 
 namespace lyx {
 
-using support::OnlyFilename;
+using support::onlyFilename;
 
 namespace frontend {
 
index 8d41e47b40ba21e8010cfab36026e8ad2e00dc78..b975a81b4b215e938a45accbac79d258ff2cbccd 100644 (file)
@@ -100,7 +100,7 @@ GView::GView()
                boost::bind(&GMiniBuffer::editMode, minibuffer_.get()));
        view_state_changed.connect(boost::bind(&GView::showViewState, this));
        signal_focus_in_event().connect(sigc::mem_fun(*this, &GView::onFocusIn));
-       // 
+       //
        int width = 750;
        int height = 550;
        // first try lyxrc
@@ -116,12 +116,12 @@ GView::GView()
                val = LyX::ref().session().loadSessionInfo("WindowHeight");
                if (val != "")
                        height = convert<unsigned int>(val);
-       }       
+       }
        set_default_size(width, height);
        // Make sure the buttons are disabled if needed.
        updateToolbars();
        string const iconName =
-               support::LibFileSearch("images", "lyx", "xpm");
+               support::libFileSearch("images", "lyx", "xpm");
        if (!iconName.empty())
                set_icon_from_file(iconName);
 }
index 9b071d748e9f3997448167bccae8b49ead2a2959..71dfdefe0333f66b9c850af5e4eae4e0f0da03d4 100644 (file)
@@ -47,7 +47,7 @@ void GViewBase::build()
 {
        doBuild();
        string const iconName =
-               support::LibFileSearch("images", "lyx", "xpm");
+               support::libFileSearch("images", "lyx", "xpm");
        if (!iconName.empty())
                window()->set_icon_from_file(iconName);
        window()->signal_delete_event().connect(
index 5d0b89fb87df3683fd483a989034443da0b5d5c2..fdf5e2fbbeab6efab747de873268298b4217cb82 100644 (file)
@@ -61,7 +61,7 @@ Gtk::BuiltinStockID getGTKStockIcon(FuncRequest const & func)
                case LFUN_ITAL: return Gtk::Stock::ITALIC;
                case LFUN_FILE_OPEN: return Gtk::Stock::OPEN;
                case LFUN_RECONFIGURE: return Gtk::Stock::REFRESH;
-               case LFUN_LABEL_GOTO: 
+               case LFUN_LABEL_GOTO:
                case LFUN_BOOKMARK_GOTO: return Gtk::Stock::JUMP_TO;
                case LFUN_GOTONOTE: return Gtk::Stock::GO_FORWARD;
                case LFUN_ACCEPT_ALL_CHANGES: return Gtk::Stock::APPLY;
@@ -138,7 +138,7 @@ Glib::ustring getGTKThemeIcon(FuncRequest const & func)
                        else if (func.argument == "align-right")
                                return "gtk-justify-right";
                        break;
-                       
+
                        case LFUN_BOOKMARK_SAVE: return "stock_add-bookmark";
                        case LFUN_INSERT_NOTE: return "stock_insert-note";
                        case LFUN_LAYOUT_PARAGRAPH: return "stock_format-paragraph";
@@ -160,7 +160,7 @@ Gtk::Image *getGTKIcon(FuncRequest const & func, Gtk::IconSize const & size)
                int iconheight = 16;
                Gtk::IconSize::lookup(size, iconwidth, iconheight);
 
-               // TODO: this stuff is called every menu view - needs 
+               // TODO: this stuff is called every menu view - needs
                // caching somewhere, or maybe GTK does enough of that for us.
                Gtk::Image *image = NULL;
                Gtk::BuiltinStockID const stockID = getGTKStockIcon(func);
@@ -177,7 +177,7 @@ Gtk::Image *getGTKIcon(FuncRequest const & func, Gtk::IconSize const & size)
                                }
                        }
                }
-               
+
                return image;
 }
 
@@ -200,9 +200,9 @@ string const getDefaultUnit()
 
 
 void unitsComboFromLength(Gtk::ComboBox * combo,
-                           Gtk::TreeModelColumn<Glib::ustring> const & stringcol,
-                           LyXLength const & len,
-                           std::string const & defunit)
+                          Gtk::TreeModelColumn<Glib::ustring> const & stringcol,
+                          LyXLength const & len,
+                          std::string const & defunit)
 {
        string unit = stringFromUnit(len.unit());
        if (unit.empty())
@@ -244,18 +244,18 @@ string const findGladeFile(string const & name)
 {
        // First, search in the installation directories.
 
-       string filename = lyx::support::LibFileSearch("glade", name, "glade");
+       string filename = lyx::support::libFileSearch("glade", name, "glade");
 
        if (!filename.empty())
                return filename;
 
        // Second, search in the src tree.
        string const dir =
-               lyx::support::AddPath(lyx::support::package().top_srcdir(),
+               lyx::support::addPath(lyx::support::package().top_srcdir(),
                                      "src/frontends/gtk/glade");
 
-       filename = lyx::support::ChangeExtension(name, ".glade");
-       filename = lyx::support::AddName(dir, filename);
+       filename = lyx::support::changeExtension(name, ".glade");
+       filename = lyx::support::addName(dir, filename);
 
        if (!lyx::support::isFileReadable(filename)) {
                lyxerr << "Unable to find glade file \"" << name
index 05e2826670e86c7b16bee66a67d9d1a8b1c6d7f1..6e9a2b8508252c3c450b1f26383355f47f81252d 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <boost/assert.hpp>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using std::string;
 
@@ -84,22 +84,22 @@ BulletsModule::BulletsModule(QWidget * parent,  const char * name, WFlags fl)
 
        // insert pixmaps
        string bmfile;
-       bmfile = LibFileSearch("images", "standard", "xpm");
+       bmfile = libFileSearch("images", "standard", "xpm");
        standard_->insertItem(QPixmap(toqstr(bmfile)));
 
-       bmfile = LibFileSearch("images", "amssymb", "xpm");
+       bmfile = libFileSearch("images", "amssymb", "xpm");
        maths_->insertItem(QPixmap(toqstr(bmfile)));
 
-       bmfile = LibFileSearch("images", "psnfss1", "xpm");
+       bmfile = libFileSearch("images", "psnfss1", "xpm");
        ding1_->insertItem(QPixmap(toqstr(bmfile)));
 
-       bmfile = LibFileSearch("images", "psnfss2", "xpm");
+       bmfile = libFileSearch("images", "psnfss2", "xpm");
        ding2_->insertItem(QPixmap(toqstr(bmfile)));
 
-       bmfile = LibFileSearch("images", "psnfss3", "xpm");
+       bmfile = libFileSearch("images", "psnfss3", "xpm");
        ding3_->insertItem(QPixmap(toqstr(bmfile)));
 
-       bmfile = LibFileSearch("images", "psnfss4", "xpm");
+       bmfile = libFileSearch("images", "psnfss4", "xpm");
        ding4_->insertItem(QPixmap(toqstr(bmfile)));
 
        connect(standard_, SIGNAL(selected(int, int)),
index eb80229276c1ffa28a37eef57da82a2b7e8933ae..2a1e30b8269610efe6ea62e88c0aa66b450fb5d3 100644 (file)
@@ -32,7 +32,7 @@
 #include <qcheckbox.h>
 
 
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::split;
 using lyx::support::trim;
 
@@ -92,7 +92,7 @@ void QBibtex::update_contents()
        controller().getBibFiles(bib_str);
        for (vector<string>::const_iterator it = bib_str.begin();
                it != bib_str.end(); ++it) {
-               string bibItem(ChangeExtension(*it, ""));
+               string bibItem(changeExtension(*it, ""));
                dialog_->add_->bibLB->insertItem(toqstr(bibItem));
        }
 
@@ -118,7 +118,7 @@ void QBibtex::update_contents()
        controller().getBibStyles(str);
        for (vector<string>::const_iterator it = str.begin();
                it != str.end(); ++it) {
-               string item(ChangeExtension(*it, ""));
+               string item(changeExtension(*it, ""));
                if (item == bibstyle)
                        item_nr = int(it - str.begin());
                dialog_->styleCB->insertItem(toqstr(item));
index cbd6061aa0414582579fb2b47bf601256cd2b214..38f5938b0995867f677ac17fae545166baa6a6cf 100644 (file)
@@ -30,7 +30,7 @@
 #include <qlineedit.h>
 #include <qlistbox.h>
 
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::trim;
 
 using std::string;
@@ -97,7 +97,7 @@ void QBibtexDialog::browsePressed()
        string const file = form_->controller().browseBst("");
 
        if (!file.empty()) {
-               string const filen = ChangeExtension(file, "");
+               string const filen = changeExtension(file, "");
                bool present = false;
                unsigned int pres = 0;
 
@@ -122,7 +122,7 @@ void QBibtexDialog::browseBibPressed()
        string const file = trim(form_->controller().browseBib(""));
 
        if (!file.empty()) {
-               string const f = ChangeExtension(file, "");
+               string const f = changeExtension(file, "");
                bool present = false;
 
                for (unsigned int i = 0; i != add_->bibLB->count(); i++) {
@@ -166,7 +166,7 @@ void QBibtexDialog::addDatabase()
        }
 
        if (!file.empty()) {
-               QString const f = toqstr(ChangeExtension(file, ""));
+               QString const f = toqstr(changeExtension(file, ""));
                if ((databaseLB->findItem(f)) == 0)
                        databaseLB->insertItem(f);
        }
index 7ec5bb27a48eaf80831e95dcaf994afc1fa5a3c4..65d29bf99cab5dd96d31f3a643ea4d2e855762e1 100644 (file)
@@ -27,7 +27,7 @@
 #include <qtooltip.h>
 #include <qpushbutton.h>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using std::vector;
 using std::string;
@@ -69,8 +69,8 @@ protected:
 QCommandBuffer::QCommandBuffer(QtView * view, QWidget * parent, ControlCommandBuffer & control)
        : QWidget(parent), view_(view), controller_(control)
 {
-       QPixmap qpup(toqstr(LibFileSearch("images", "up", "xpm")));
-       QPixmap qpdown(toqstr(LibFileSearch("images", "down", "xpm")));
+       QPixmap qpup(toqstr(libFileSearch("images", "up", "xpm")));
+       QPixmap qpdown(toqstr(libFileSearch("images", "down", "xpm")));
 
        QVBoxLayout * top = new QVBoxLayout(this);
        QHBoxLayout * layout = new QHBoxLayout(0);
index 4a993f7bb57b0e34a4b5e845a93aac2ac80634c7..87055d2fd00e2cdfe0f37bd921a3897bfaf9c337 100644 (file)
@@ -21,7 +21,7 @@
 #include <qlistbox.h>
 #include <qpushbutton.h>
 
-using lyx::support::OnlyFilename;
+using lyx::support::onlyFilename;
 
 using std::string;
 
index b83a767e4bfea13f255910e5572a233d61723215..492e9fdc647b998023c3fa251553f49953ca8027 100644 (file)
@@ -43,7 +43,7 @@ FontLoader fontloader;
 
 namespace lyx {
 
-using support::LibFileSearch;
+using support::libFileSearch;
 
 namespace frontend {
 
@@ -75,7 +75,7 @@ QtView::QtView(unsigned int width, unsigned int height)
 #ifndef Q_WS_MACX
        //  assign an icon to main form. We do not do it under Qt/Mac,
        //  since the icon is provided in the application bundle.
-       string const iconname = LibFileSearch("images", "lyx", "xpm");
+       string const iconname = libFileSearch("images", "lyx", "xpm");
        if (!iconname.empty())
                setIcon(QPixmap(toqstr(iconname)));
 #endif
index 6c22ac193e4500e4c0056e3e5ae44dc61454fb73..1ca348bb698a98adfb75ad245a00f16ff08a57fe 100644 (file)
@@ -35,9 +35,9 @@
 #endif
 
 using lyx::support::contains;
-using lyx::support::LibFileSearch;
-using lyx::support::OnlyPath;
-using lyx::support::QuoteName;
+using lyx::support::libFileSearch;
+using lyx::support::onlyPath;
+using lyx::support::quoteName;
 using lyx::support::Systemcall;
 
 using std::endl;
index fd3d3ec55b4f652d33e405c64e89f776659069bc..2f2636ef7a1f1383ae6b6affa922cca26be05e30 100644 (file)
@@ -44,7 +44,7 @@
 #include <boost/bind.hpp>
 #include <boost/signals/trackable.hpp>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using std::endl;
 using std::min;
@@ -102,7 +102,7 @@ SplashScreen::SplashScreen()
        if (!lyxrc.show_banner)
                return;
 
-       string const file = LibFileSearch("images", "banner", "ppm");
+       string const file = libFileSearch("images", "banner", "ppm");
        if (file.empty())
                return;
 
index 5ada2bfac017e01e8e48a67968e885f43bc4365a..7bc5296d418a5036b1385245c0cac91debe568b9 100644 (file)
@@ -32,12 +32,12 @@ using std::string;
 
 namespace lyx {
 
-using support::ChangeExtension;
+using support::changeExtension;
 using support::compare;
 using support::FileFilterList;
 using support::getStringFromVector;
 using support::getVectorFromString;
-using support::OnlyFilename;
+using support::onlyFilename;
 using support::split;
 
 namespace frontend {
@@ -148,7 +148,7 @@ ButtonPolicy::SMInput FormBibtex::input(FL_OBJECT * ob, long ob_value)
                        return ButtonPolicy::SMI_NOOP;
                } else {
                        fl_set_input(dialog_->input_style,
-                                       ChangeExtension(style, "").c_str());
+                                       changeExtension(style, "").c_str());
                }
                // reset the browser so that the following
                // single-click callback doesn't do anything
@@ -211,7 +211,7 @@ string const unique_and_no_extensions(string const & str_in)
        vector<string> dbase = getVectorFromString(str_in);
        for (vector<string>::iterator it = dbase.begin();
             it != dbase.end(); ++it) {
-               *it = ChangeExtension(*it, string());
+               *it = changeExtension(*it, string());
        }
        eliminate_duplicates(dbase);
        return getStringFromVector(dbase);
@@ -237,7 +237,7 @@ void FormBibtex::apply()
        string bibstyle = getString(dialog_->input_style);
        if (!bibstyle.empty()) {
                // save the BibTeX style without any ".bst" extension
-               bibstyle = ChangeExtension(OnlyFilename(bibstyle), "");
+               bibstyle = changeExtension(onlyFilename(bibstyle), "");
        }
 
        bool const addtotoc = fl_get_button(dialog_->check_bibtotoc);
index d235741d5003a200a1aa9c3bd71373fedc7d6319..47f59faafe61f3fe4fc81191fc8df191b098ccac 100644 (file)
@@ -286,7 +286,7 @@ void FormColorpicker::prepare_to_show()
 
        //  assign an icon to the form
        string const iconname =
-               support::LibFileSearch("images", "lyx", "xpm");
+               support::libFileSearch("images", "lyx", "xpm");
 
        if (!iconname.empty()) {
                unsigned int w, h;
index 13b0822adef9966e31faeba134c08e2717e23b07..1c873abfbfbd1c689e5a56e86e270a6bc4324e50 100644 (file)
@@ -31,7 +31,7 @@ using std::string;
 namespace lyx {
 
 using support::bformat;
-using support::LibFileSearch;
+using support::libFileSearch;
 
 namespace frontend {
 
@@ -114,7 +114,7 @@ void FormDialogView::prepare_to_show()
                fl_winicontitle(form()->window, getTitle().c_str());
 
        //  assign an icon to the form
-       string const iconname = LibFileSearch("images", "lyx", "xpm");
+       string const iconname = libFileSearch("images", "lyx", "xpm");
        if (!iconname.empty()) {
                unsigned int w, h;
                icon_pixmap_ = fl_read_pixmapfile(fl_root,
index d3bc40837415ae673294388e84e37f622dfc20bf..2ae5cd4bce9fbbf651548d0492ea364e5b2e4536 100644 (file)
@@ -62,7 +62,7 @@ using support::bformat;
 using support::contains;
 using support::getStringFromVector;
 using support::getVectorFromString;
-using support::LibFileSearch;
+using support::libFileSearch;
 
 namespace frontend {
 
@@ -365,7 +365,7 @@ void FormDocument::build()
 
        fl_set_input_maxchars(bullets_->input_latex, 80);
 
-       string const bmtablefile = LibFileSearch("images", "standard", "xpm");
+       string const bmtablefile = libFileSearch("images", "standard", "xpm");
        fl_set_bmtable_pixmap_file(bullets_->bmtable_panel, 6, 6,
                                   bmtablefile.c_str());
 
@@ -1428,7 +1428,7 @@ void FormDocument::BulletPanel(FL_OBJECT * ob)
                }
                new_panel += ".xpm";
                fl_set_bmtable_pixmap_file(bullets_->bmtable_panel, 6, 6,
-                                          LibFileSearch("images", new_panel).c_str());
+                                          libFileSearch("images", new_panel).c_str());
                fl_redraw_object(bullets_->bmtable_panel);
                fl_unfreeze_form(bullets_->form);
        }
index 1c5f75ddf6a96eed5cbe58cc928277a5afc956fa..7b561b563ce207bc0b37b4099a09f1c10142b95b 100644 (file)
 #include <algorithm>
 #include <sstream>
 
-using lyx::support::AbsolutePath;
-using lyx::support::AddName;
-using lyx::support::ExpandPath;
+using lyx::support::absolutePath;
+using lyx::support::addName;
+using lyx::support::expandPath;
 using lyx::support::FileFilterList;
 using lyx::support::getcwd;
-using lyx::support::MakeAbsPath;
-using lyx::support::OnlyFilename;
+using lyx::support::makeAbsPath;
+using lyx::support::onlyFilename;
 using lyx::support::package;
 using lyx::support::split;
 using lyx::support::suffixIs;
@@ -228,7 +228,7 @@ void FileDialog::Private::SetDirectory(string const & path)
        if (path.empty())
                tmp = getcwd();
        else
-               tmp = MakeAbsPath(ExpandPath(path), directory_);
+               tmp = makeAbsPath(expandPath(path), directory_);
 
        // must check the directory exists
        if (!fs::exists(tmp) || !fs::is_directory(tmp)) {
@@ -274,7 +274,7 @@ void FileDialog::Private::SetFilters(FileFilterList const & filters)
 
 FileDialog::Private::Private()
 {
-       directory_ = MakeAbsPath(string("."));
+       directory_ = makeAbsPath(string("."));
 
        // Creates form if necessary.
        if (!file_dlg_form_) {
@@ -591,7 +591,7 @@ string const FileDialog::Private::Select(string const & title,
 
        // highlight the suggested file in the browser, if it exists.
        int sel = 0;
-       string const filename = OnlyFilename(suggested);
+       string const filename = onlyFilename(suggested);
        if (!filename.empty()) {
                for (int i = 0; i < fl_get_browser_maxline(file_dlg_form_->List); ++i) {
                        string s = fl_get_browser_line(file_dlg_form_->List, i + 1);
@@ -642,8 +642,8 @@ string const FileDialog::Private::Select(string const & title,
 
        file_name_ = fl_get_input(file_dlg_form_->Filename);
 
-       if (!AbsolutePath(file_name_))
-               file_name_ = AddName(fl_get_input(file_dlg_form_->DirBox), file_name_);
+       if (!absolutePath(file_name_))
+               file_name_ = addName(fl_get_input(file_dlg_form_->DirBox), file_name_);
        return file_name_;
 }
 
index 715f0cc109df255d7c6f13be40bc7b915345852b..3cc85e50507d406a3b8f33fa7a1ab200317c3760 100644 (file)
@@ -52,8 +52,8 @@ using std::string;
 
 namespace lyx {
 
-using support::AddName;
-using support::ChangeExtension;
+using support::addName;
+using support::changeExtension;
 using support::package;
 using support::rtrim;
 using support::trim;
@@ -308,7 +308,7 @@ void FormPreferences::apply()
        // The "Save" button has been pressed.
        if (dialog().isClosing() && colors_.modifiedXformsPrefs) {
                string const filename =
-                       AddName(package().user_support(), "preferences.xform");
+                       addName(package().user_support(), "preferences.xform");
                colors_.modifiedXformsPrefs = !XformsColor::write(filename);
        }
 }
@@ -2341,7 +2341,7 @@ bool FormPreferences::Paths::input(FL_OBJECT const * const ob)
                string const name = getString(dialog_->input_serverpipe);
                if (!name.empty()) {
                        // strip off the extension
-                       string const str = ChangeExtension(name, "");
+                       string const str = changeExtension(name, "");
                        if (!RWInfo::WriteableFile(str + ".in")) {
                                parent_.postWarning(RWInfo::ErrorMessage());
                                return false;
index c0b1ad6cd1fdb7d953187bde6c545ce32ffe7f97..98677ef2ce703776f2c2b5a200f43ff7dea1cb93 100644 (file)
@@ -24,8 +24,6 @@ using std::string;
 
 namespace lyx {
 
-using support::OnlyFilename;
-
 namespace frontend {
 
 
index 0206a6907b8eccf0e15a01e42770230423ca0cf9..f13ca1f3369fd1980480cba30a58b389be2e7608 100644 (file)
@@ -42,7 +42,7 @@ extern void QuitLyX(bool);
 
 namespace lyx {
 
-using support::LibFileSearch;
+using support::libFileSearch;
 
 namespace frontend {
 
@@ -112,7 +112,7 @@ XFormsView::XFormsView(int width, int height)
        minibuffer_.reset(new XMiniBuffer(*this, *controlcommand_));
 
        //  Assign an icon to the main form.
-       string const iconname = LibFileSearch("images", "lyx", "xpm");
+       string const iconname = libFileSearch("images", "lyx", "xpm");
        if (!iconname.empty()) {
                unsigned int w, h;
                icon_pixmap_ = fl_read_pixmapfile(fl_root,
index 809e834693f16bba867e4288b3bf2681b5df0b50..a35383f3e2b38223bd116df1341fb0c830067bab 100644 (file)
@@ -49,7 +49,7 @@
 #include <sstream>
 #include <iomanip>
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::package;
 
 using lyx::frontend::fontloader;
@@ -204,7 +204,7 @@ void parse_init(int & argc, char * argv[])
 
 void parse_lyxrc()
 {
-       XformsColor::read(AddName(package().user_support(),
+       XformsColor::read(addName(package().user_support(),
                                  "preferences.xform"));
 
        if (lyxrc.popup_font_encoding.empty())
index c9c09d8257db67d6b1fad17f62992fd291a26419..de05c79192fd4d3e32e72d95250ab4fc010c4ee2 100644 (file)
@@ -32,8 +32,6 @@ using std::string;
 
 namespace lyx {
 
-using support::LibFileSearch;
-using support::OnlyPath;
 using support::Systemcall;
 
 namespace frontend {
index a77ec9194454f9a2894846b0811268bdac0cafcf..621de8c7a870432399821204f12ee3c0d55a7794 100644 (file)
@@ -41,9 +41,9 @@ namespace fs = boost::filesystem;
 
 namespace lyx {
 
-using support::AbsolutePath;
+using support::absolutePath;
 using support::isStrDbl;
-using support::OnlyPath;
+using support::onlyPath;
 using support::subst;
 using support::trim;
 
@@ -417,7 +417,7 @@ bool RWInfo::WriteableDir(string const & name)
 {
        error_message.erase();
 
-       if (!AbsolutePath(name)) {
+       if (!absolutePath(name)) {
                error_message = _("The absolute path is required.");
                return false;
        }
@@ -440,7 +440,7 @@ bool RWInfo::ReadableDir(string const & name)
 {
        error_message.erase();
 
-       if (!AbsolutePath(name)) {
+       if (!absolutePath(name)) {
                error_message = _("The absolute path is required.");
                return false;
        }
@@ -473,8 +473,8 @@ bool RWInfo::WriteableFile(string const & name)
                return false;
        }
 
-       string const dir = OnlyPath(name);
-       if (!AbsolutePath(dir)) {
+       string const dir = onlyPath(name);
+       if (!absolutePath(dir)) {
                error_message = _("The absolute path is required.");
                return false;
        }
@@ -518,8 +518,8 @@ bool RWInfo::ReadableFile(string const & name)
                return false;
        }
 
-       string const dir = OnlyPath(name);
-       if (!AbsolutePath(dir)) {
+       string const dir = onlyPath(name);
+       if (!absolutePath(dir)) {
                error_message = _("The absolute path is required.");
                return false;
        }
index 633ecb505b3602957b5fcb1fbb848cfd6bf07ae6..de5b63ad4c32edeaf582b124c0a1ef93dbb246dd 100644 (file)
@@ -66,7 +66,7 @@ std::vector<string> Cache::loadableFormats() const
 
 void Cache::add(string const & file) const
 {
-       if (!support::AbsolutePath(file)) {
+       if (!support::absolutePath(file)) {
                lyxerr << "Cache::add(" << file << "):\n"
                       << "The file must be have an absolute path."
                       << std::endl;
index e0cd2c7a95f061dd97c80d77e6db92fc2ba91871..2e47d58a16fadfaca57cf4f32218ec9e8252cf82 100644 (file)
 
 namespace support = lyx::support;
 
-using support::ChangeExtension;
+using support::changeExtension;
 using support::FileMonitor;
 using support::isFileReadable;
-using support::MakeDisplayPath;
-using support::OnlyFilename;
+using support::makeDisplayPath;
+using support::onlyFilename;
 using support::tempName;
 using support::unlink;
 using support::unzipFile;
@@ -402,7 +402,7 @@ void CacheItem::Impl::convertToDisplayFormat()
        } else
                filename = filename_;
 
-       string const displayed_filename = MakeDisplayPath(filename_);
+       string const displayed_filename = makeDisplayPath(filename_);
        lyxerr[Debug::GRAPHICS] << "[GrahicsCacheItem::convertToDisplayFormat]\n"
                << "\tAttempting to convert image file: " << filename
                << "\n\twith displayed filename: " << displayed_filename
@@ -428,7 +428,7 @@ void CacheItem::Impl::convertToDisplayFormat()
 
        lyxerr[Debug::GRAPHICS] << "\tConverting it to " << to << " format." << endl;
        // Take only the filename part of the file, without path or extension.
-       string const temp = ChangeExtension(OnlyFilename(filename), string());
+       string const temp = changeExtension(onlyFilename(filename), string());
 
        // Add some stuff to create a uniquely named temporary file.
        // This file is deleted in loadImage after it is loaded into memory.
index a9b21a8e527285bcd78752d1a6fda6e54469b5ed..179e74a826c68122eea1a52c9480f0347d62286b 100644 (file)
 
 namespace support = lyx::support;
 
-using support::ChangeExtension;
+using support::changeExtension;
 using support::Forkedcall;
 using support::ForkedCallQueue;
-using support::LibFileSearch;
-using support::LibScriptSearch;
-using support::OnlyPath;
-using support::OnlyFilename;
-using support::QuoteName;
+using support::libFileSearch;
+using support::libScriptSearch;
+using support::onlyPath;
+using support::onlyFilename;
+using support::quoteName;
 using support::subst;
 using support::tempName;
 using support::unlink;
@@ -168,11 +168,11 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
        if (!success) {
                script_command_ =
                        "sh " +
-                       QuoteName(LibFileSearch("scripts", "convertDefault.sh")) +
+                       quoteName(libFileSearch("scripts", "convertDefault.sh")) +
                        ' ' +
-                       QuoteName((from_format.empty() ? "" : from_format + ':') + from_file) +
+                       quoteName((from_format.empty() ? "" : from_format + ':') + from_file) +
                        ' ' +
-                       QuoteName(to_format + ':' + to_file_);
+                       quoteName(to_format + ':' + to_file_);
 
                lyxerr[Debug::GRAPHICS]
                        << "\tNo converter defined! I use convertDefault.sh\n\t"
@@ -187,7 +187,7 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
 
                // Output the script to file.
                static int counter = 0;
-               script_file_ = OnlyPath(to_file_base) + "lyxconvert" +
+               script_file_ = onlyPath(to_file_base) + "lyxconvert" +
                        convert<string>(counter++) + ".sh";
 
                std::ofstream fs(script_file_.c_str());
@@ -206,9 +206,9 @@ Converter::Impl::Impl(string const & from_file,   string const & to_file_base,
                // We create a dummy command for ease of understanding of the
                // list of forked processes.
                // Note: 'sh ' is absolutely essential, or execvp will fail.
-               script_command_ = "sh " + QuoteName(script_file_) + ' ' +
-                       QuoteName(OnlyFilename(from_file)) + ' ' +
-                       QuoteName(to_format);
+               script_command_ = "sh " + quoteName(script_file_) + ' ' +
+                       quoteName(onlyFilename(from_file)) + ' ' +
+                       quoteName(to_format);
        }
        // All is ready to go
        valid_process_ = true;
@@ -292,7 +292,7 @@ bool build_script(string const & from_file,
                + formats.extension(to_format);
 
        if (from_format == to_format) {
-               script << move_file(QuoteName(from_file), QuoteName(to_file));
+               script << move_file(quoteName(from_file), quoteName(to_file));
                lyxerr[Debug::GRAPHICS] << "ready (from == to)" << endl;
                return true;
        }
@@ -327,19 +327,19 @@ bool build_script(string const & from_file,
 
                // Build the conversion command
                string const infile      = outfile;
-               string const infile_base = ChangeExtension(infile, string());
-               outfile = ChangeExtension(to_base, conv.To->extension());
+               string const infile_base = changeExtension(infile, string());
+               outfile = changeExtension(to_base, conv.To->extension());
 
                // Store these names in the shell script
-               script << "infile="      << QuoteName(infile) << '\n'
-                      << "infile_base=" << QuoteName(infile_base) << '\n'
-                      << "outfile="     << QuoteName(outfile) << '\n';
+               script << "infile="      << quoteName(infile) << '\n'
+                      << "infile_base=" << quoteName(infile_base) << '\n'
+                      << "outfile="     << quoteName(outfile) << '\n';
 
                string command = conv.command;
                command = subst(command, token_from, "\"${infile}\"");
                command = subst(command, token_base, "\"${infile_base}\"");
                command = subst(command, token_to,   "\"${outfile}\"");
-               command = LibScriptSearch(command);
+               command = libScriptSearch(command);
 
                // Store in the shell script
                script << "\n" << command << " ||\n";
@@ -372,7 +372,7 @@ bool build_script(string const & from_file,
        }
 
        // Move the final outfile to to_file
-       script << move_file("\"${outfile}\"", QuoteName(to_file));
+       script << move_file("\"${outfile}\"", quoteName(to_file));
        lyxerr[Debug::GRAPHICS] << "ready!" << endl;
 
        return true;
index b2a63b753b789bf10a3fe42e93e3a1c1d0e295a1..058ceeecb93e8366de3563e31cd4be8e936c3321 100644 (file)
@@ -498,12 +498,12 @@ void PreviewLoader::Impl::startLoading()
        // The conversion command.
        ostringstream cs;
        cs << pconverter_->command << ' ' << pconverter_->to << ' '
-          << support::QuoteName(latexfile) << ' '
+          << support::quoteName(latexfile) << ' '
           << int(font_scaling_factor_) << ' '
           << lyx_gui::hexname(LColor::preview) << ' '
           << lyx_gui::hexname(LColor::background);
 
-       string const command = support::LibScriptSearch(cs.str());
+       string const command = support::libScriptSearch(cs.str());
 
        // Initiate the conversion from LaTeX to bitmap images files.
        support::Forkedcall::SignalTypePtr
@@ -654,7 +654,7 @@ string const unique_filename(string const bufferpath)
 {
        static int theCounter = 0;
        string const filename = convert<string>(theCounter++) + "lyxpreview";
-       return support::AddName(bufferpath, filename);
+       return support::addName(bufferpath, filename);
 }
 
 
index 4dd895084e444b8e30c82fb7c6812f6126aa6a8b..da876d536fd1dbef370c718ccc28962c26965380 100644 (file)
@@ -25,8 +25,8 @@
 #include "BufferView.h"
 
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
-using lyx::support::MakeDisplayPath;
+using lyx::support::changeExtension;
+using lyx::support::makeDisplayPath;
 
 using std::find;
 using std::string;
@@ -40,10 +40,10 @@ extern void InsertAsciiFile(BufferView *, string const &, bool);
 bool Importer::Import(LyXView * lv, string const & filename,
                      string const & format)
 {
-       string const displaypath = MakeDisplayPath(filename);
+       string const displaypath = makeDisplayPath(filename);
        lv->message(bformat(_("Importing %1$s..."), displaypath));
 
-       string const lyxfile = ChangeExtension(filename, ".lyx");
+       string const lyxfile = changeExtension(filename, ".lyx");
 
        string loader_format;
        vector<string> loaders = Loaders();
@@ -74,7 +74,7 @@ bool Importer::Import(LyXView * lv, string const & filename,
                lv->view()->newFile(lyxfile, string(), true);
                bool as_paragraphs = loader_format == "textparagraph";
                string filename2 = (loader_format == format) ? filename
-                       : ChangeExtension(filename,
+                       : changeExtension(filename,
                                          formats.extension(loader_format));
                InsertAsciiFile(lv->view().get(), filename2, as_paragraphs);
                lv->dispatch(FuncRequest(LFUN_MARK_OFF));
index c52a0c7d13b96aa64b4a2962922073de748df1b2..d8fd28e7bd99d30c19c6726b188c984352593f7c 100644 (file)
@@ -94,23 +94,23 @@ string const doSubstitution(InsetExternalParams const & params,
        string const filename = external_in_tmpdir ?
                params.filename.mangledFilename() :
                params.filename.outputFilename(parentpath);
-       string const basename = support::ChangeExtension(
-                       support::OnlyFilename(filename), string());
-       string const absname = support::MakeAbsPath(filename, parentpath);
+       string const basename = support::changeExtension(
+                       support::onlyFilename(filename), string());
+       string const absname = support::makeAbsPath(filename, parentpath);
 
        string result = s;
        if (what != ALL_BUT_PATHS) {
-               string const filepath = support::OnlyPath(filename);
-               string const abspath = support::OnlyPath(absname);
+               string const filepath = support::onlyPath(filename);
+               string const abspath = support::onlyPath(absname);
                string const masterpath = external_in_tmpdir ?
                        m_buffer->temppath() :
                        m_buffer->filePath();
-               string relToMasterPath = support::OnlyPath(
-                               support::MakeRelPath(absname, masterpath));
+               string relToMasterPath = support::onlyPath(
+                               support::makeRelPath(absname, masterpath));
                if (relToMasterPath == "./")
                        relToMasterPath.clear();
-               string relToParentPath = support::OnlyPath(
-                               support::MakeRelPath(absname, parentpath));
+               string relToParentPath = support::onlyPath(
+                               support::makeRelPath(absname, parentpath));
                if (relToParentPath == "./")
                        relToParentPath.clear();
 
@@ -130,7 +130,7 @@ string const doSubstitution(InsetExternalParams const & params,
                                    relToParentPath, use_latex_path,
                                    support::PROTECT_EXTENSION,
                                    support::ESCAPE_DOTS);
-               if (support::AbsolutePath(filename)) {
+               if (support::absolutePath(filename)) {
                        result = subst_path(result, "$$AbsOrRelPathMaster",
                                            abspath, use_latex_path,
                                            support::PROTECT_EXTENSION,
@@ -159,7 +159,7 @@ string const doSubstitution(InsetExternalParams const & params,
        result = subst_path(result, "$$Basename", basename, use_latex_path,
                            support::PROTECT_EXTENSION, support::ESCAPE_DOTS);
        result = subst_path(result, "$$Extension",
-                       '.' + support::GetExtension(filename), use_latex_path);
+                       '.' + support::getExtension(filename), use_latex_path);
        result = subst_path(result, "$$Tempname", params.tempname(), use_latex_path);
        result = subst_path(result, "$$Sysdir",
                                support::package().system_support(), use_latex_path);
@@ -177,7 +177,7 @@ string const doSubstitution(InsetExternalParams const & params,
                support::Path p(filepath);
 
                if (support::isFileReadable(file))
-                       contents = support::GetFileContents(file);
+                       contents = support::getFileContents(file);
 
                result = support::subst(result,
                                        ("$$Contents(\"" + file + "\")").c_str(),
@@ -252,7 +252,7 @@ void updateExternal(InsetExternalParams const & params,
        // We copy the source file to the temp dir and do the conversion
        // there if necessary
        string const temp_file =
-               support::MakeAbsPath(params.filename.mangledFilename(),
+               support::makeAbsPath(params.filename.mangledFilename(),
                                     m_buffer->temppath());
        if (!abs_from_file.empty()) {
                unsigned long const from_checksum = support::sum(abs_from_file);
@@ -275,7 +275,7 @@ void updateExternal(InsetExternalParams const & params,
                                              outputFormat.updateResult,
                                              false, true);
        string const abs_to_file =
-               support::MakeAbsPath(to_file, m_buffer->temppath());
+               support::makeAbsPath(to_file, m_buffer->temppath());
 
        // Record the referenced files for the exporter.
        // The exporter will copy them to the export dir.
@@ -286,7 +286,7 @@ void updateExternal(InsetExternalParams const & params,
                vector<string>::const_iterator fit  = rit->second.begin();
                vector<string>::const_iterator fend = rit->second.end();
                for (; fit != fend; ++fit) {
-                       string const source = support::MakeAbsPath(
+                       string const source = support::makeAbsPath(
                                        doSubstitution(params, buffer, *fit,
                                                       false, true),
                                        m_buffer->temppath());
@@ -312,7 +312,7 @@ void updateExternal(InsetExternalParams const & params,
        if (support::compare_timestamps(temp_file, abs_to_file) < 0)
                return; // SUCCESS
        string const to_file_base =
-               support::ChangeExtension(to_file, string());
+               support::changeExtension(to_file, string());
        /* bool const success = */
                converters.convert(&buffer, temp_file, to_file_base,
                                   from_format, to_format, true);
index 5653623d4dbe2c2775239d9e2aa75d5ffe847452..df79354da6c020d4ac90ebe7fa48731bb009f279 100644 (file)
@@ -246,7 +246,7 @@ void TemplateManager::readTemplates(string const & path)
 
        LyXLex lex(templatetags, TM_TEMPLATE_END);
 
-       string filename = support::LibFileSearch("", "external_templates");
+       string filename = support::libFileSearch("", "external_templates");
        if (filename.empty() || !lex.setFile(filename)) {
                lex.printError("external::TemplateManager::readTemplates: "
                               "No template file");
index 2a5ee6f4ce1b5eb1575948f38c746dbe8978603a..7222ce061d8e348f614b7695521773f47bfe039f 100644 (file)
@@ -36,9 +36,9 @@
 #include <fstream>
 #include <sstream>
 
-using lyx::support::AbsolutePath;
+using lyx::support::absolutePath;
 using lyx::support::ascii_lowercase;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::contains;
 using lyx::support::copy;
 using lyx::support::FileName;
@@ -46,8 +46,8 @@ using lyx::support::findtexfile;
 using lyx::support::isFileReadable;
 using lyx::support::latex_path;
 using lyx::support::ltrim;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeRelPath;
+using lyx::support::makeAbsPath;
+using lyx::support::makeRelPath;
 using lyx::support::Path;
 using lyx::support::prefixIs;
 using lyx::support::removeExtension;
@@ -111,13 +111,13 @@ namespace {
 string normalize_name(Buffer const & buffer, OutputParams const & runparams,
                      string const & name, string const & ext)
 {
-       string const fname = MakeAbsPath(name, buffer.filePath());
-       if (AbsolutePath(name) || !isFileReadable(fname + ext))
+       string const fname = makeAbsPath(name, buffer.filePath());
+       if (absolutePath(name) || !isFileReadable(fname + ext))
                return name;
        else if (!runparams.nice)
                return fname;
        else
-               return MakeRelPath(fname, buffer.getMasterBuffer()->filePath());
+               return makeRelPath(fname, buffer.getMasterBuffer()->filePath());
 }
 
 }
@@ -166,7 +166,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
 
                        // mangledFilename() needs the extension
                        database = removeExtension(FileName(in_file).mangledFilename());
-                       string const out_file = MakeAbsPath(database + ".bib",
+                       string const out_file = makeAbsPath(database + ".bib",
                                        buffer.getMasterBuffer()->temppath());
 
                        bool const success = copy(in_file, out_file);
@@ -221,7 +221,7 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
                        // use new style name
                        base = removeExtension(
                                        FileName(in_file).mangledFilename());
-                       string const out_file = MakeAbsPath(base + ".bst",
+                       string const out_file = makeAbsPath(base + ".bst",
                                        buffer.getMasterBuffer()->temppath());
                        bool const success = copy(in_file, out_file);
                        if (!success) {
@@ -300,7 +300,7 @@ vector<string> const InsetBibtex::getFiles(Buffer const & buffer) const
        string bibfiles = getContents();
        bibfiles = split(bibfiles, tmp, ',');
        while (!tmp.empty()) {
-               string file = findtexfile(ChangeExtension(tmp, "bib"), "bib");
+               string file = findtexfile(changeExtension(tmp, "bib"), "bib");
                lyxerr[Debug::LATEX] << "Bibfile: " << file << endl;
 
                // If we didn't find a matching file name just fail silently
index 1450a42b7d0de40f0da5125c826ac921e4bbb86b..31e096efdca0fabfd1862dcf229225dc3dfabf04 100644 (file)
@@ -90,17 +90,17 @@ TODO
 
 namespace support = lyx::support;
 
-using lyx::support::AbsolutePath;
+using lyx::support::absolutePath;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::compare_timestamps;
 using lyx::support::contains;
 using lyx::support::FileName;
 using lyx::support::float_equal;
-using lyx::support::GetExtension;
+using lyx::support::getExtension;
 using lyx::support::isFileReadable;
 using lyx::support::latex_path;
-using lyx::support::OnlyFilename;
+using lyx::support::onlyFilename;
 using lyx::support::removeExtension;
 using lyx::support::rtrim;
 using lyx::support::subst;
@@ -458,8 +458,8 @@ enum CopyStatus {
 std::pair<CopyStatus, string> const
 copyFileIfNeeded(string const & file_in, string const & file_out)
 {
-       BOOST_ASSERT(AbsolutePath(file_in));
-       BOOST_ASSERT(AbsolutePath(file_out));
+       BOOST_ASSERT(absolutePath(file_in));
+       BOOST_ASSERT(absolutePath(file_out));
 
        unsigned long const checksum_in  = support::sum(file_in);
        unsigned long const checksum_out = support::sum(file_out);
@@ -488,10 +488,10 @@ copyToDirIfNeeded(string const & file_in, string const & dir, bool zipped)
 {
        using support::rtrim;
 
-       BOOST_ASSERT(AbsolutePath(file_in));
+       BOOST_ASSERT(absolutePath(file_in));
 
-       string const only_path = support::OnlyPath(file_in);
-       if (rtrim(support::OnlyPath(file_in) , "/") == rtrim(dir, "/"))
+       string const only_path = support::onlyPath(file_in);
+       if (rtrim(support::onlyPath(file_in) , "/") == rtrim(dir, "/"))
                return std::make_pair(IDENTICAL_PATHS, file_in);
 
        string mangled = FileName(file_in).mangledFilename();
@@ -506,7 +506,7 @@ copyToDirIfNeeded(string const & file_in, string const & dir, bool zipped)
                string::size_type const ext_len = file_in.length() - base.length();
                mangled[mangled.length() - ext_len] = '.';
        }
-       string const file_out = support::MakeAbsPath(mangled, dir);
+       string const file_out = support::makeAbsPath(mangled, dir);
 
        return copyFileIfNeeded(file_in, file_out);
 }
@@ -537,7 +537,7 @@ string const stripExtensionIfPossible(string const & file, string const & to)
        // No conversion is needed. LaTeX can handle the graphic file as is.
        // This is true even if the orig_file is compressed.
        string const to_format = formats.getFormat(to)->extension();
-       string const file_format = GetExtension(file);
+       string const file_format = getExtension(file);
        // for latex .ps == .eps
        if (to_format == file_format ||
            (to_format == "eps" && file_format ==  "ps") ||
@@ -597,7 +597,7 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
        //        run through the LaTeX compiler.
        string output_file = os::external_path(runparams.nice ?
                params().filename.outputFilename(m_buffer->filePath()) :
-               OnlyFilename(temp_file));
+               onlyFilename(temp_file));
        string source_file = runparams.nice ? orig_file : temp_file;
        string const tex_format = (runparams.flavor == OutputParams::LATEX) ?
                        "latex" : "pdflatex";
@@ -611,15 +611,15 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
                        lyxerr[Debug::GRAPHICS]
                                << "\tpass zipped file to LaTeX.\n";
 
-                       string const bb_orig_file = ChangeExtension(orig_file, "bb");
+                       string const bb_orig_file = changeExtension(orig_file, "bb");
                        if (runparams.nice) {
                                runparams.exportdata->addExternalFile(tex_format,
                                                bb_orig_file,
-                                               ChangeExtension(output_file, "bb"));
+                                               changeExtension(output_file, "bb"));
                        } else {
                                // LaTeX needs the bounding box file in the
                                // tmp dir
-                               string bb_file = ChangeExtension(temp_file, "bb");
+                               string bb_file = changeExtension(temp_file, "bb");
                                boost::tie(status, bb_file) =
                                        copyFileIfNeeded(bb_orig_file, bb_file);
                                if (status == FAILURE)
@@ -681,8 +681,8 @@ string const InsetGraphics::prepareFile(Buffer const & buf,
                return stripExtensionIfPossible(output_file, to);
        }
 
-       string const to_file = ChangeExtension(temp_file, ext);
-       string const output_to_file = ChangeExtension(output_file, ext);
+       string const to_file = changeExtension(temp_file, ext);
+       string const output_to_file = changeExtension(output_file, ext);
 
        // Do we need to perform the conversion?
        // Yes if to_file does not exist or if temp_file is newer than to_file
index 7f015aeddf50d9ae29c7190d1a2aaf7c4de4f235..0bbcedbdcc95eb91b1a0c55a65e203594d049504 100644 (file)
 
 #include <sstream>
 
-using lyx::support::AddName;
-using lyx::support::AbsolutePath;
+using lyx::support::addName;
+using lyx::support::absolutePath;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::contains;
 using lyx::support::copy;
 using lyx::support::FileName;
-using lyx::support::GetFileContents;
+using lyx::support::getFileContents;
 using lyx::support::isFileReadable;
 using lyx::support::isLyXFilename;
 using lyx::support::latex_path;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
-using lyx::support::MakeRelPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::makeAbsPath;
+using lyx::support::makeDisplayPath;
+using lyx::support::makeRelPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::subst;
 using lyx::support::sum;
 
@@ -222,8 +222,8 @@ string const parentFilename(Buffer const & buffer)
 string const includedFilename(Buffer const & buffer,
                              InsetCommandParams const & params)
 {
-       return MakeAbsPath(params.getContents(),
-                          OnlyPath(parentFilename(buffer)));
+       return makeAbsPath(params.getContents(),
+                          onlyPath(parentFilename(buffer)));
 }
 
 
@@ -292,7 +292,7 @@ string const InsetInclude::getScreenLabel(Buffer const &) const
        if (params_.getContents().empty())
                temp += "???";
        else
-               temp += OnlyFilename(params_.getContents());
+               temp += onlyFilename(params_.getContents());
 
        return temp;
 }
@@ -342,16 +342,16 @@ int InsetInclude::latex(Buffer const & buffer, ostream & os,
 
        // if incfile is relative, make it relative to the master
        // buffer directory.
-       if (!AbsolutePath(incfile)) {
-               incfile = MakeRelPath(included_file,
+       if (!absolutePath(incfile)) {
+               incfile = makeRelPath(included_file,
                                      m_buffer->filePath());
        }
 
        // write it to a file (so far the complete file)
-       string const exportfile = ChangeExtension(incfile, ".tex");
-       string const mangled = FileName(ChangeExtension(included_file,
+       string const exportfile = changeExtension(incfile, ".tex");
+       string const mangled = FileName(changeExtension(included_file,
                                                        ".tex")).mangledFilename();
-       string const writefile = MakeAbsPath(mangled, m_buffer->temppath());
+       string const writefile = makeAbsPath(mangled, m_buffer->temppath());
 
        if (!runparams.nice)
                incfile = mangled;
@@ -369,7 +369,7 @@ int InsetInclude::latex(Buffer const & buffer, ostream & os,
                        string text = bformat(_("Included file `%1$s'\n"
                                                "has textclass `%2$s'\n"
                                                "while parent file has textclass `%3$s'."),
-                                             MakeDisplayPath(included_file),
+                                             makeDisplayPath(included_file),
                                              tmp->params().getLyXTextClass().name(),
                                              m_buffer->params().getLyXTextClass().name());
                        Alert::warning(_("Different textclasses"), text);
@@ -386,7 +386,7 @@ int InsetInclude::latex(Buffer const & buffer, ostream & os,
 // make use of it somehow? (JMarc 20031002)
 #endif
                tmp->makeLaTeXFile(writefile,
-                                  OnlyPath(masterFilename(buffer)),
+                                  onlyPath(masterFilename(buffer)),
                                   runparams, false);
        } else {
                // Copy the file to the temp dir, so that .aux files etc.
@@ -421,7 +421,7 @@ int InsetInclude::latex(Buffer const & buffer, ostream & os,
                        incfile = latex_path(incfile);
                        os << '\\' << params_.getCmdName() << '{' << incfile << '}';
                } else {
-               incfile = ChangeExtension(incfile, ".tex");
+               incfile = changeExtension(incfile, ".tex");
                incfile = latex_path(incfile);
                        os << '\\' << params_.getCmdName() << '{'
                           << incfile
@@ -433,7 +433,7 @@ int InsetInclude::latex(Buffer const & buffer, ostream & os,
 
                // \include don't want extension and demands that the
                // file really have .tex
-               incfile = ChangeExtension(incfile, string());
+               incfile = changeExtension(incfile, string());
                incfile = latex_path(incfile);
                os << '\\' << params_.getCmdName() << '{'
                   << incfile
@@ -448,7 +448,7 @@ int InsetInclude::plaintext(Buffer const & buffer, ostream & os,
                        OutputParams const &) const
 {
        if (isVerbatim(params_))
-               os << GetFileContents(includedFilename(buffer, params_));
+               os << getFileContents(includedFilename(buffer, params_));
        return 0;
 }
 
@@ -465,13 +465,13 @@ int InsetInclude::linuxdoc(Buffer const & buffer, ostream & os,
        string const included_file = includedFilename(buffer, params_);
 
        // write it to a file (so far the complete file)
-       string const exportfile = ChangeExtension(incfile, ".sgml");
-       string writefile = ChangeExtension(included_file, ".sgml");
+       string const exportfile = changeExtension(incfile, ".sgml");
+       string writefile = changeExtension(included_file, ".sgml");
 
        if (loadIfNeeded(buffer, params_)) {
                Buffer * tmp = bufferlist.getBuffer(included_file);
 
-               writefile = MakeAbsPath(FileName(writefile).mangledFilename(),
+               writefile = makeAbsPath(FileName(writefile).mangledFilename(),
                                        buffer.getMasterBuffer()->temppath());
                if (!runparams.nice)
                        incfile = writefile;
@@ -485,7 +485,7 @@ int InsetInclude::linuxdoc(Buffer const & buffer, ostream & os,
 
        if (isVerbatim(params_)) {
                os << "<![CDATA["
-                  << GetFileContents(included_file)
+                  << getFileContents(included_file)
                   << "]]>";
        } else {
                runparams.exportdata->addExternalFile("linuxdoc", writefile,
@@ -509,14 +509,14 @@ int InsetInclude::docbook(Buffer const & buffer, ostream & os,
        string const included_file = includedFilename(buffer, params_);
 
        // write it to a file (so far the complete file)
-       string const exportfile = ChangeExtension(incfile, ".sgml");
-       string writefile = ChangeExtension(included_file, ".sgml");
+       string const exportfile = changeExtension(incfile, ".sgml");
+       string writefile = changeExtension(included_file, ".sgml");
 
        if (loadIfNeeded(buffer, params_)) {
                Buffer * tmp = bufferlist.getBuffer(included_file);
 
                string const mangled = FileName(writefile).mangledFilename();
-               writefile = MakeAbsPath(mangled,
+               writefile = makeAbsPath(mangled,
                                        buffer.getMasterBuffer()->temppath());
                if (!runparams.nice)
                        incfile = mangled;
@@ -554,13 +554,13 @@ void InsetInclude::validate(LaTeXFeatures & features) const
        string const included_file = includedFilename(buffer, params_);
 
        if (isLyXFilename(included_file))
-               writefile = ChangeExtension(included_file, ".sgml");
+               writefile = changeExtension(included_file, ".sgml");
        else
                writefile = included_file;
 
        if (!features.runparams().nice && !isVerbatim(params_)) {
                incfile = FileName(writefile).mangledFilename();
-               writefile = MakeAbsPath(incfile,
+               writefile = makeAbsPath(incfile,
                                        buffer.getMasterBuffer()->temppath());
        }
 
index 31d4605b117778504a61b4afb6e48a546a2712fc..dcd6f705cd62f04be9c7191e3a1d3aa2e84aaae3 100644 (file)
@@ -31,8 +31,8 @@
 
 namespace graphics = lyx::graphics;
 
-using lyx::support::AbsolutePath;
-using lyx::support::OnlyFilename;
+using lyx::support::absolutePath;
+using lyx::support::onlyFilename;
 
 using std::string;
 using std::auto_ptr;
@@ -67,7 +67,7 @@ void RenderGraphic::update(graphics::Params const & params)
        params_ = params;
 
        if (!params_.filename.empty()) {
-               BOOST_ASSERT(AbsolutePath(params_.filename));
+               BOOST_ASSERT(absolutePath(params_.filename));
                loader_.reset(params_.filename, params_);
        }
 }
@@ -142,7 +142,7 @@ void RenderGraphic::metrics(MetricsInfo & mi, Dimension & dim) const
                LyXFont msgFont(mi.base.font);
                msgFont.setFamily(LyXFont::SANS_FAMILY);
 
-               string const justname = OnlyFilename(params_.filename);
+               string const justname = onlyFilename(params_.filename);
                if (!justname.empty()) {
                        msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
                        font_width = font_metrics::width(justname, msgFont);
@@ -191,7 +191,7 @@ void RenderGraphic::draw(PainterInfo & pi, int x, int y) const
                // Print the file name.
                LyXFont msgFont = pi.base.font;
                msgFont.setFamily(LyXFont::SANS_FAMILY);
-               string const justname = OnlyFilename(params_.filename);
+               string const justname = onlyFilename(params_.filename);
 
                if (!justname.empty()) {
                        msgFont.setSize(LyXFont::SIZE_FOOTNOTE);
index b379076ff7ca189a82aaf62931f26561366afb95..3286ce49287ffc64d37baec7ff7946a7be7446fa 100644 (file)
 #include <cerrno>
 #include <fstream>
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::bformat;
 using lyx::support::destroyDir;
 using lyx::support::FileFilterList;
 using lyx::support::ForkedProcess;
 using lyx::support::isLyXFilename;
-using lyx::support::LibFileSearch;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::libFileSearch;
+using lyx::support::makeAbsPath;
+using lyx::support::makeDisplayPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::Path;
 using lyx::support::package;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::removeAutosaveFile;
 using lyx::support::rename;
 using lyx::support::split;
@@ -107,7 +107,7 @@ bool MenuWrite(Buffer * buffer)
 
        // FIXME: we don't tell the user *WHY* the save failed !!
 
-       string const file = MakeDisplayPath(buffer->fileName(), 30);
+       string const file = makeDisplayPath(buffer->fileName(), 30);
 
        string text = bformat(_("The document %1$s could not be saved.\n\n"
                "Do you want to rename the document and try again?"), file);
@@ -141,9 +141,9 @@ bool WriteAs(Buffer * buffer, string const & filename)
                FileFilterList const filter (_("LyX Documents (*.lyx)"));
 
                FileDialog::Result result =
-                       fileDlg.save(OnlyPath(fname),
+                       fileDlg.save(onlyPath(fname),
                                     filter,
-                                    OnlyFilename(fname));
+                                    onlyFilename(fname));
 
                if (result.first == FileDialog::Later)
                        return false;
@@ -154,14 +154,14 @@ bool WriteAs(Buffer * buffer, string const & filename)
                        return false;
 
                // Make sure the absolute filename ends with appropriate suffix
-               fname = MakeAbsPath(fname);
+               fname = makeAbsPath(fname);
                if (!isLyXFilename(fname))
                        fname += ".lyx";
        } else
                fname = filename;
 
        if (fs::exists(fname)) {
-               string const file = MakeDisplayPath(fname, 30);
+               string const file = makeDisplayPath(fname, 30);
                string text = bformat(_("The document %1$s already exists.\n\n"
                        "Do you want to over-write that document?"), file);
                int const ret = Alert::prompt(_("Over-write document?"),
@@ -315,7 +315,7 @@ void AutoSave(BufferView * bv)
        // create autosave filename
        string fname = bv->buffer()->filePath();
        fname += '#';
-       fname += OnlyFilename(bv->buffer()->fileName());
+       fname += onlyFilename(bv->buffer()->fileName());
        fname += '#';
 
        AutoSaveBuffer autosave(*bv, fname);
@@ -400,7 +400,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
 
        if (!fs::is_readable(fname)) {
                string const error = strerror(errno);
-               string const file = MakeDisplayPath(fname, 50);
+               string const file = makeDisplayPath(fname, 50);
                string const text = bformat(_("Could not read the specified document\n"
                        "%1$s\ndue to the error: %2$s"), file, error);
                Alert::error(_("Could not read file"), text);
@@ -410,7 +410,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
        ifstream ifs(fname.c_str());
        if (!ifs) {
                string const error = strerror(errno);
-               string const file = MakeDisplayPath(fname, 50);
+               string const file = makeDisplayPath(fname, 50);
                string const text = bformat(_("Could not open the specified document\n"
                        "%1$s\ndue to the error: %2$s"), file, error);
                Alert::error(_("Could not open file"), text);
@@ -447,13 +447,13 @@ void Reconfigure(BufferView * bv)
        // Run configure in user lyx directory
        Path p(package().user_support());
        string const configure_script =
-               AddName(package().system_support(), "configure.py");
-       string const configure_command = "python " + QuoteName(configure_script);
+               addName(package().system_support(), "configure.py");
+       string const configure_command = "python " + quoteName(configure_script);
        Systemcall one;
        one.startscript(Systemcall::Wait, configure_command);
        p.pop();
        bv->owner()->message(_("Reloading configuration..."));
-       lyxrc.read(LibFileSearch(string(), "lyxrc.defaults"));
+       lyxrc.read(libFileSearch(string(), "lyxrc.defaults"));
        // Re-read packages.lst
        LaTeXFeatures::getAvailable();
 
index bc13d1ed522c3fc3e3738a2b542d2999308464d6..5fe670ca1eeecfeacf0fbf5ffb0a4194cbe52f6c 100644 (file)
 #include <iostream>
 #include <csignal>
 
-using lyx::support::AddName;
-using lyx::support::AddPath;
+using lyx::support::addName;
+using lyx::support::addPath;
 using lyx::support::bformat;
 using lyx::support::createDirectory;
 using lyx::support::createLyXTmpDir;
-using lyx::support::FileSearch;
+using lyx::support::fileSearch;
 using lyx::support::getEnv;
 using lyx::support::i18nLibFileSearch;
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 using lyx::support::package;
 using lyx::support::Path;
 using lyx::support::prependEnvPath;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::rtrim;
 
 namespace os = lyx::support::os;
@@ -117,9 +117,9 @@ void showFileError(string const & error)
 void reconfigureUserLyXDir()
 {
        string const configure_script =
-               AddName(package().system_support(), "configure.py");
+               addName(package().system_support(), "configure.py");
        string const configure_command =
-               "python " + QuoteName(configure_script);
+               "python " + quoteName(configure_script);
 
        lyxerr << _("LyX: reconfiguring user directory") << endl;
        Path p(package().user_support());
@@ -260,7 +260,7 @@ void LyX::priv_exec(int & argc, char * argv[])
                for (; it != end; ++it) {
                        // get absolute path of file and add ".lyx" to
                        // the filename if necessary
-                       string s = FileSearch(string(), *it, "lyx");
+                       string s = fileSearch(string(), *it, "lyx");
                        if (s.empty()) {
                                last_loaded = newFile(*it, string(), true);
                        } else {
@@ -429,7 +429,7 @@ void LyX::init(bool gui)
        lyxrc.document_path = package().document_dir();
 
        if (lyxrc.template_path.empty()) {
-               lyxrc.template_path = AddPath(package().system_support(),
+               lyxrc.template_path = addPath(package().system_support(),
                                              "templates");
        }
 
@@ -453,9 +453,9 @@ void LyX::init(bool gui)
 
        string prefsfile = "preferences";
        // back compatibility to lyxs < 1.1.6
-       if (LibFileSearch(string(), prefsfile).empty())
+       if (libFileSearch(string(), prefsfile).empty())
                prefsfile = "lyxrc";
-       if (!LibFileSearch(string(), prefsfile).empty())
+       if (!libFileSearch(string(), prefsfile).empty())
                readRcFile(prefsfile);
 
        readEncodingsFile("encodings");
@@ -622,9 +622,9 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
            fs::is_directory(package().user_support())) {
                first_start = false;
                string const configure_script =
-                       AddName(package().system_support(), "configure.py");
+                       addName(package().system_support(), "configure.py");
                string const userDefaults =
-                       AddName(package().user_support(), "lyxrc.defaults");
+                       addName(package().user_support(), "lyxrc.defaults");
                if (fs::exists(configure_script) &&
                    fs::exists(userDefaults) &&
                    fs::last_write_time(configure_script)
@@ -672,7 +672,7 @@ void LyX::readRcFile(string const & name)
 {
        lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
 
-       string const lyxrc_path = LibFileSearch(string(), name);
+       string const lyxrc_path = libFileSearch(string(), name);
        if (!lyxrc_path.empty()) {
 
                lyxerr[Debug::INIT] << "Found " << name
@@ -719,7 +719,7 @@ void LyX::readUIFile(string const & name)
 
        lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
 
-       string const ui_path = LibFileSearch("ui", name, "ui");
+       string const ui_path = libFileSearch("ui", name, "ui");
 
        if (ui_path.empty()) {
                lyxerr[Debug::INIT] << "Could not find " << name << endl;
@@ -775,7 +775,7 @@ void LyX::readLanguagesFile(string const & name)
 {
        lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
 
-       string const lang_path = LibFileSearch(string(), name);
+       string const lang_path = libFileSearch(string(), name);
        if (lang_path.empty()) {
                showFileError(name);
                return;
@@ -789,7 +789,7 @@ void LyX::readEncodingsFile(string const & name)
 {
        lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
 
-       string const enc_path = LibFileSearch(string(), name);
+       string const enc_path = libFileSearch(string(), name);
        if (enc_path.empty()) {
                showFileError(name);
                return;
index fdced899f392e5468df90c4ea84f0da78896fac3..f02cf11601f63162598767686b463a79b2c195c3 100644 (file)
 
 using bv_funcs::freefont2string;
 
-using lyx::support::AbsolutePath;
-using lyx::support::AddName;
-using lyx::support::AddPath;
+using lyx::support::absolutePath;
+using lyx::support::addName;
+using lyx::support::addPath;
 using lyx::support::bformat;
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::contains;
 using lyx::support::FileFilterList;
-using lyx::support::FileSearch;
+using lyx::support::fileSearch;
 using lyx::support::ForkedcallsController;
 using lyx::support::i18nLibFileSearch;
 using lyx::support::isDirWriteable;
 using lyx::support::isFileReadable;
 using lyx::support::isStrInt;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeAbsPath;
+using lyx::support::makeDisplayPath;
 using lyx::support::package;
 using lyx::support::Path;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::rtrim;
 using lyx::support::split;
 using lyx::support::subst;
@@ -655,7 +655,7 @@ bool ensureBufferClean(BufferView * bv)
        if (buf.isClean())
                return true;
 
-       string const file = MakeDisplayPath(buf.fileName(), 30);
+       string const file = makeDisplayPath(buf.fileName(), 30);
        string text = bformat(_("The document %1$s has unsaved "
                                "changes.\n\nDo you want to save "
                                "the document?"), file);
@@ -674,7 +674,7 @@ void showPrintError(string const & name)
 {
        string str = bformat(_("Could not print the document %1$s.\n"
                               "Check that your printer is set up correctly."),
-                            MakeDisplayPath(name, 50));
+                            makeDisplayPath(name, 50));
        Alert::error(_("Print document failed"), str);
 }
 
@@ -806,7 +806,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                case LFUN_MENUWRITE:
                        if (!owner->buffer()->isUnnamed()) {
                                string const str = bformat(_("Saving document %1$s..."),
-                                        MakeDisplayPath(owner->buffer()->fileName()));
+                                        makeDisplayPath(owner->buffer()->fileName()));
                                owner->message(str);
                                MenuWrite(owner->buffer());
                                owner->message(str + _(" done."));
@@ -819,7 +819,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        break;
 
                case LFUN_MENURELOAD: {
-                       string const file = MakeDisplayPath(view()->buffer()->fileName(), 20);
+                       string const file = makeDisplayPath(view()->buffer()->fileName(), 20);
                        string text = bformat(_("Any changes will be lost. Are you sure "
                                "you want to revert to the saved version of the document %1$s?"), file);
                        int const ret = Alert::prompt(_("Revert to saved document?"),
@@ -879,9 +879,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        if (format->name() == "lyx") {
                                string const latexname =
                                        buffer->getLatexName(false);
-                               filename = ChangeExtension(latexname,
+                               filename = changeExtension(latexname,
                                                           format->extension());
-                               filename = AddName(buffer->temppath(), filename);
+                               filename = addName(buffer->temppath(), filename);
 
                                if (!buffer->writeFile(filename))
                                        break;
@@ -939,18 +939,18 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        Systemcall one;
                        int res = 0;
                        string const dviname =
-                               ChangeExtension(buffer->getLatexName(true),
+                               changeExtension(buffer->getLatexName(true),
                                                "dvi");
 
                        if (target == "printer") {
                                if (!lyxrc.print_spool_command.empty()) {
                                        // case 3: print using a spool
                                        string const psname =
-                                               ChangeExtension(dviname,".ps");
+                                               changeExtension(dviname,".ps");
                                        command += lyxrc.print_to_file
-                                               + QuoteName(psname)
+                                               + quoteName(psname)
                                                + ' '
-                                               + QuoteName(dviname);
+                                               + quoteName(dviname);
 
                                        string command2 =
                                                lyxrc.print_spool_command +' ';
@@ -959,7 +959,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                                        + target_name
                                                        + ' ';
                                        }
-                                       command2 += QuoteName(psname);
+                                       command2 += quoteName(psname);
                                        // First run dvips.
                                        // If successful, then spool command
                                        res = one.startscript(
@@ -974,16 +974,16 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                        // case 2: print directly to a printer
                                        res = one.startscript(
                                                Systemcall::DontWait,
-                                               command + QuoteName(dviname));
+                                               command + quoteName(dviname));
                                }
 
                        } else {
                                // case 1: print to a file
                                command += lyxrc.print_to_file
-                                       + QuoteName(MakeAbsPath(target_name,
+                                       + quoteName(makeAbsPath(target_name,
                                                                path))
                                        + ' '
-                                       + QuoteName(dviname);
+                                       + quoteName(dviname);
                                res = one.startscript(Systemcall::DontWait,
                                                      command);
                        }
@@ -1038,7 +1038,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                                break;
                        }
                        owner->message(bformat(_("Opening help file %1$s..."),
-                               MakeDisplayPath(fname)));
+                               makeDisplayPath(fname)));
                        view()->loadLyXFile(fname, false);
                        break;
                }
@@ -1137,7 +1137,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        } else {
                                // Must replace extension of the file to be .lyx
                                // and get full path
-                               string const s = ChangeExtension(file_name, ".lyx");
+                               string const s = changeExtension(file_name, ".lyx");
                                // Either change buffer or load the file
                                if (bufferlist.exists(s)) {
                                        view()->setBuffer(bufferlist.getBuffer(s));
@@ -1292,9 +1292,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_CHILDOPEN: {
                        string const filename =
-                               MakeAbsPath(argument, owner->buffer()->filePath());
+                               makeAbsPath(argument, owner->buffer()->filePath());
                        setMessage(N_("Opening child document ") +
-                                        MakeDisplayPath(filename) + "...");
+                                        makeDisplayPath(filename) + "...");
                        view()->savePosition(0);
                        string const parentfilename = owner->buffer()->fileName();
                        if (bufferlist.exists(filename))
@@ -1479,7 +1479,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                case LFUN_SAVE_AS_DEFAULT: {
                        string const fname =
-                               AddName(AddPath(package().user_support(), "templates/"),
+                               addName(addPath(package().user_support(), "templates/"),
                                        "defaults.lyx");
                        Buffer defaults(fname);
 
@@ -1497,7 +1497,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
 
                        if (defaults.writeFile(defaults.fileName()))
                                setMessage(_("Document defaults saved in ")
-                                          + MakeDisplayPath(fname));
+                                          + makeDisplayPath(fname));
                        else
                                setErrorMessage(_("Unable to save document defaults"));
                        break;
@@ -1703,11 +1703,11 @@ void LyXFunc::menuNew(string const & name, bool fromTemplate)
        static int newfile_number;
 
        if (filename.empty()) {
-               filename = AddName(lyxrc.document_path,
+               filename = addName(lyxrc.document_path,
                            "newfile" + convert<string>(++newfile_number) + ".lyx");
                while (bufferlist.exists(filename) || fs::is_readable(filename)) {
                        ++newfile_number;
-                       filename = AddName(lyxrc.document_path,
+                       filename = addName(lyxrc.document_path,
                                           "newfile" +  convert<string>(newfile_number) +
                                    ".lyx");
                }
@@ -1758,7 +1758,7 @@ void LyXFunc::open(string const & fname)
                        make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
                        make_pair(string(_("Examples|#E#e")),
-                                 string(AddPath(package().system_support(), "examples"))));
+                                 string(addPath(package().system_support(), "examples"))));
 
                FileDialog::Result result =
                        fileDlg.open(initpath,
@@ -1780,12 +1780,12 @@ void LyXFunc::open(string const & fname)
 
        // get absolute path of file and add ".lyx" to the filename if
        // necessary
-       string const fullpath = FileSearch(string(), filename, "lyx");
+       string const fullpath = fileSearch(string(), filename, "lyx");
        if (!fullpath.empty()) {
                filename = fullpath;
        }
 
-       string const disp_fn(MakeDisplayPath(filename));
+       string const disp_fn(makeDisplayPath(filename));
 
        // if the file doesn't exist, let the user create one
        if (!fs::exists(filename)) {
@@ -1833,7 +1833,7 @@ void LyXFunc::doImport(string const & argument)
                        make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
                        make_pair(string(_("Examples|#E#e")),
-                                 string(AddPath(package().system_support(), "examples"))));
+                                 string(addPath(package().system_support(), "examples"))));
 
                string const filter = formats.prettyName(format)
                        + " (*." + formats.extension(format) + ')';
@@ -1857,9 +1857,9 @@ void LyXFunc::doImport(string const & argument)
                return;
 
        // get absolute path of file
-       filename = MakeAbsPath(filename);
+       filename = makeAbsPath(filename);
 
-       string const lyxfile = ChangeExtension(filename, ".lyx");
+       string const lyxfile = changeExtension(filename, ".lyx");
 
        // Check if the document already is open
        if (lyx_gui::use_gui && bufferlist.exists(lyxfile)) {
@@ -1872,7 +1872,7 @@ void LyXFunc::doImport(string const & argument)
        // if the file exists already, and we didn't do
        // -i lyx thefile.lyx, warn
        if (fs::exists(lyxfile) && filename != lyxfile) {
-               string const file = MakeDisplayPath(lyxfile, 30);
+               string const file = makeDisplayPath(lyxfile, 30);
 
                string text = bformat(_("The document %1$s already exists.\n\n"
                        "Do you want to over-write that document?"), file);
index 292778761a44a3bd87fc7d77c3a8b60e4b91fc6e..e8e9e06befcc3f217ca7525526c4d1664941f5c2 100644 (file)
@@ -24,7 +24,7 @@
 
 using lyx::support::compare_ascii_no_case;
 using lyx::support::getFormatFromContents;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeDisplayPath;
 using lyx::support::split;
 using lyx::support::subst;
 
@@ -73,7 +73,7 @@ void LyXLex::Pimpl::printError(string const & message) const
 {
        string const tmpmsg = subst(message, "$$Token", getString());
        lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
-              << " of file " << MakeDisplayPath(name) << ']' << endl;
+              << " of file " << makeDisplayPath(name) << ']' << endl;
 }
 
 
index acdd15ad69796cee8150c4d6cf6f1f89d1f531a8..d1276ba94cb1eb95687333c089ddf0f8ddbff4e6 100644 (file)
@@ -44,9 +44,9 @@ namespace os = lyx::support::os;
 
 using lyx::support::ascii_lowercase;
 using lyx::support::bformat;
-using lyx::support::ExpandPath;
+using lyx::support::expandPath;
 using lyx::support::getEnv;
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 using lyx::support::token;
 
 using std::cout;
@@ -365,7 +365,7 @@ int LyXRC::read(LyXLex & lexrc)
                case RC_INPUT: // Include file
                        if (lexrc.next()) {
                                string const tmp =
-                                       LibFileSearch(string(),
+                                       libFileSearch(string(),
                                                      lexrc.getString());
                                if (read(tmp)) {
                                        lexrc.printError("Error reading "
@@ -420,7 +420,7 @@ int LyXRC::read(LyXLex & lexrc)
                                string const kmap(os::internal_path(lexrc.getString()));
                                if (kmap.empty()) {
                                        // nothing
-                               } else if (!LibFileSearch("kbd", kmap,
+                               } else if (!libFileSearch("kbd", kmap,
                                                          "kmap").empty()) {
                                        primary_kbmap = kmap;
                                } else {
@@ -434,7 +434,7 @@ int LyXRC::read(LyXLex & lexrc)
                                string const kmap(os::internal_path(lexrc.getString()));
                                if (kmap.empty()) {
                                        // nothing
-                               } else if (!LibFileSearch("kbd", kmap,
+                               } else if (!libFileSearch("kbd", kmap,
                                                          "kmap").empty()) {
                                        secondary_kbmap = kmap;
                                } else {
@@ -720,21 +720,21 @@ int LyXRC::read(LyXLex & lexrc)
                case RC_DOCUMENTPATH:
                        if (lexrc.next()) {
                                document_path = os::internal_path(lexrc.getString());
-                               document_path = ExpandPath(document_path);
+                               document_path = expandPath(document_path);
                        }
                        break;
 
                case RC_TEMPLATEPATH:
                        if (lexrc.next()) {
                                template_path = os::internal_path(lexrc.getString());
-                               template_path = ExpandPath(template_path);
+                               template_path = expandPath(template_path);
                        }
                        break;
 
                case RC_TEMPDIRPATH:
                        if (lexrc.next()) {
                                tempdir_path = os::internal_path(lexrc.getString());
-                               tempdir_path = ExpandPath(tempdir_path);
+                               tempdir_path = expandPath(tempdir_path);
                        }
                        break;
 
@@ -876,7 +876,7 @@ int LyXRC::read(LyXLex & lexrc)
                case RC_SERVERPIPE:
                        if (lexrc.next()) {
                                lyxpipes = os::internal_path(lexrc.getString());
-                               lyxpipes = ExpandPath(lyxpipes);
+                               lyxpipes = expandPath(lyxpipes);
                        }
                        break;
 
@@ -961,7 +961,7 @@ int LyXRC::read(LyXLex & lexrc)
                case RC_BACKUPDIR_PATH:
                        if (lexrc.next()) {
                                backupdir_path = os::internal_path(lexrc.getString());
-                               backupdir_path = ExpandPath(backupdir_path);
+                               backupdir_path = expandPath(backupdir_path);
                        }
                        break;
                case RC_DATE_INSERT_FORMAT:
index bc522c40ed5f82f4d9c23b4c0956649c128aca34..f98683885135c1c970f51f26a10da79e200c1346 100644 (file)
@@ -27,9 +27,9 @@
 
 #include <sstream>
 
-using lyx::support::LibFileSearch;
-using lyx::support::MakeDisplayPath;
-using lyx::support::QuoteName;
+using lyx::support::libFileSearch;
+using lyx::support::makeDisplayPath;
+using lyx::support::quoteName;
 using lyx::support::rtrim;
 using lyx::support::subst;
 
@@ -61,7 +61,7 @@ int const FORMAT = 2;
 
 bool layout2layout(string const & filename, string const & tempfile)
 {
-       string const script = LibFileSearch("scripts", "layout2layout.py");
+       string const script = libFileSearch("scripts", "layout2layout.py");
        if (script.empty()) {
                lyxerr << "Could not find layout conversion "
                          "script layout2layout.py." << endl;
@@ -69,15 +69,15 @@ bool layout2layout(string const & filename, string const & tempfile)
        }
 
        std::ostringstream command;
-       command << "python " << QuoteName(script)
-               << ' ' << QuoteName(filename)
-               << ' ' << QuoteName(tempfile);
+       command << "python " << quoteName(script)
+               << ' ' << quoteName(filename)
+               << ' ' << quoteName(tempfile);
        string const command_str = command.str();
 
        lyxerr[Debug::TCLASS] << "Running `" << command_str << '\'' << endl;
 
        lyx::support::cmd_ret const ret =
-               lyx::support::RunCommand(command_str);
+               lyx::support::runCommand(command_str);
        if (ret.first != 0) {
                lyxerr << "Could not run layout conversion "
                          "script layout2layout.py." << endl;
@@ -205,11 +205,11 @@ bool LyXTextClass::Read(string const & filename, bool merge)
 
        if (!merge)
                lyxerr[Debug::TCLASS] << "Reading textclass "
-                                     << MakeDisplayPath(filename)
+                                     << makeDisplayPath(filename)
                                      << endl;
        else
                lyxerr[Debug::TCLASS] << "Reading input file "
-                                    << MakeDisplayPath(filename)
+                                    << makeDisplayPath(filename)
                                     << endl;
 
        LyXLex lexrc(textClassTags,
@@ -251,7 +251,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
 
                case TC_INPUT: // Include file
                        if (lexrc.next()) {
-                               string tmp = LibFileSearch("layouts",
+                               string tmp = libFileSearch("layouts",
                                                            lexrc.getString(),
                                                            "layout");
 
@@ -442,7 +442,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
 
        if (!merge) { // we are at top level here.
                lyxerr[Debug::TCLASS] << "Finished reading textclass "
-                                     << MakeDisplayPath(filename)
+                                     << makeDisplayPath(filename)
                                      << endl;
                if (defaultlayout_.empty()) {
                        lyxerr << "Error: Textclass '" << name_
@@ -472,7 +472,7 @@ bool LyXTextClass::Read(string const & filename, bool merge)
 
        } else
                lyxerr[Debug::TCLASS] << "Finished reading input file "
-                                     << MakeDisplayPath(filename)
+                                     << makeDisplayPath(filename)
                                      << endl;
 
        return error;
@@ -916,12 +916,12 @@ bool LyXTextClass::load() const
                return true;
 
        // Read style-file
-       string const real_file = LibFileSearch("layouts", name_, "layout");
+       string const real_file = libFileSearch("layouts", name_, "layout");
        loaded_ = const_cast<LyXTextClass*>(this)->Read(real_file) == 0;
 
        if (!loaded_) {
                lyxerr << "Error reading `"
-                      << MakeDisplayPath(real_file)
+                      << makeDisplayPath(real_file)
                       << "'\n(Check `" << name_
                       << "')\nCheck your installation and "
                        "try Options/Reconfigure..." << endl;
index 99c2d94a3acf32b2ae8af998a49ff46cdc9270b0..c930d8a3a19734886d04c9c574197afadd53f4f2 100644 (file)
@@ -22,8 +22,8 @@
 
 using lyx::textclass_type;
 
-using lyx::support::LibFileSearch;
-using lyx::support::MakeDisplayPath;
+using lyx::support::libFileSearch;
+using lyx::support::makeDisplayPath;
 
 using boost::bind;
 
@@ -91,13 +91,13 @@ public:
 bool LyXTextClassList::Read()
 {
        LyXLex lex(0, 0);
-       string real_file = LibFileSearch("", "textclass.lst");
+       string real_file = libFileSearch("", "textclass.lst");
        lyxerr[Debug::TCLASS] << "Reading textclasses from `"
                              << real_file << '\'' << endl;
 
        if (real_file.empty()) {
                lyxerr << "LyXTextClassList::Read: unable to find "
-                       "textclass file  `" << MakeDisplayPath(real_file, 1000)
+                       "textclass file  `" << makeDisplayPath(real_file, 1000)
                       << "'. Exiting." << endl;
                return false;
                // This causes LyX to end... Not a desirable behaviour. Lgb
@@ -115,7 +115,7 @@ bool LyXTextClassList::Read()
 
        if (!lex.isOK()) {
                lyxerr << "LyXTextClassList::Read: unable to open "
-                       "textclass file  `" << MakeDisplayPath(real_file, 1000)
+                       "textclass file  `" << makeDisplayPath(real_file, 1000)
                       << "'\nCheck your installation. LyX can't continue."
                       << endl;
                return false;
index 6d038b91892272d47b9f7c0abe1634f91163c2ef..d05c292f7a20aab3b0859d0836ae6031c198e2f4 100644 (file)
@@ -28,7 +28,7 @@
 
 using lyx::support::bformat;
 using lyx::support::isFileReadable;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeDisplayPath;
 using lyx::support::tempName;
 
 using std::endl;
@@ -103,14 +103,14 @@ void LyXVC::registrer()
                if (isFileReadable(cvs_entries)) {
                        lyxerr[Debug::LYXVC]
                                << "LyXVC: registering "
-                               << MakeDisplayPath(filename)
+                               << makeDisplayPath(filename)
                                << " with CVS" << endl;
                        vcs.reset(new CVS(cvs_entries, filename));
 
                } else {
                        lyxerr[Debug::LYXVC]
                                << "LyXVC: registering "
-                               << MakeDisplayPath(filename)
+                               << makeDisplayPath(filename)
                                << " with RCS" << endl;
                        vcs.reset(new RCS(filename));
                }
@@ -160,7 +160,7 @@ void LyXVC::revert()
 {
        lyxerr[Debug::LYXVC] << "LyXVC: revert" << endl;
 
-       string const file = MakeDisplayPath(owner_->fileName(), 20);
+       string const file = makeDisplayPath(owner_->fileName(), 20);
        string text = bformat(_("Reverting to the stored version of the "
                "document %1$s will lose all current changes.\n\n"
                "Do you want to revert to the saved version?"), file);
index 4d06c78259210d21900e5463474ca64c083cfc00..2c4c50040ac2218447254f3f9241d292f75107f7 100644 (file)
@@ -22,7 +22,7 @@
 #include <fstream>
 #include <sstream>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using std::string;
 using std::ifstream;
@@ -143,7 +143,7 @@ Corrections theCorrections;
 void initAutoCorrect()
 {
        lyxerr[Debug::MATHED] << "reading autocorrect file" << endl;
-       string const file = LibFileSearch(string(), "autocorrect");
+       string const file = libFileSearch(string(), "autocorrect");
        if (file.empty()) {
                lyxerr << "Could not find autocorrect file" << endl;
                return;
index 28f961cbd26977fc5afd1ab04bc7312473e16ddd..dc87e3c2bab7255c28f3cea996b73d3b095fea57 100644 (file)
@@ -40,8 +40,8 @@
 
 using lyx::support::cmd_ret;
 using lyx::support::getVectorFromString;
-using lyx::support::LibFileSearch;
-using lyx::support::RunCommand;
+using lyx::support::libFileSearch;
+using lyx::support::runCommand;
 using lyx::support::subst;
 
 using std::string;
@@ -899,7 +899,7 @@ namespace {
        {
                string command =  "echo '" + data + "' | " + cmd;
                lyxerr << "calling: " << command << endl;
-               cmd_ret const ret = RunCommand(command);
+               cmd_ret const ret = runCommand(command);
                return ret.second;
        }
 
@@ -1199,7 +1199,7 @@ MathArray pipeThroughExtern(string const & lang, string const & extra,
        string data = os.str();
 
        // search external script
-       string file = LibFileSearch("mathed", "extern_" + lang);
+       string file = libFileSearch("mathed", "extern_" + lang);
        if (file.empty()) {
                lyxerr << "converter to '" << lang << "' not found" << endl;
                return MathArray();
index 36f3505dc0236f2fe3858265bc608cf590b2bc58..67b6ec78d966439de31a5e3918f032264aef3528 100644 (file)
@@ -66,7 +66,7 @@
 #include <fstream>
 #include <sstream>
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 using lyx::support::split;
 
 using std::string;
@@ -107,7 +107,7 @@ bool math_font_available(string & name)
 
 void initSymbols()
 {
-       string const filename = LibFileSearch(string(), "symbols");
+       string const filename = libFileSearch(string(), "symbols");
        lyxerr[Debug::MATHED] << "read symbols from " << filename << endl;
        if (filename.empty()) {
                lyxerr << "Could not find symbols file" << endl;
index 20e590940852dadc6aa4ccf57bb8c27bbbe3803c..e8a69a5bea9af018d6b0b21bba7e8dd581a8219d 100644 (file)
@@ -48,7 +48,7 @@ bool SpecialisedMover::do_copy(string const & from, string const & to,
        if (command_.empty())
                return Mover::do_copy(from, to, latex);
 
-       string command = support::LibScriptSearch(command_);
+       string command = support::libScriptSearch(command_);
        command = support::subst(command, "$$i", from);
        command = support::subst(command, "$$o", to);
        command = support::subst(command, "$$l", latex);
index 5c9b57f49a6a868d947a7cee87520add361e0916..a5a3db5ecee40589be6da8f12bceec369ab4926c 100644 (file)
@@ -21,7 +21,7 @@
 #include <fstream>
 
 using lyx::support::bformat;
-using lyx::support::MakeDisplayPath;
+using lyx::support::makeDisplayPath;
 
 using std::ofstream;
 using std::string;
@@ -30,7 +30,7 @@ bool openFileWrite(ofstream & ofs, string const & fname)
 {
        ofs.open(fname.c_str());
        if (!ofs) {
-               string const file = MakeDisplayPath(fname, 50);
+               string const file = makeDisplayPath(fname, 50);
                string text = bformat(_("Could not open the specified "
                                        "document\n%1$s."), file);
                Alert::error(_("Could not open file"), text);
index f4bec2f051fbbae9f44c7bd9c396aca692f59a87..58cd9d84a3b4f0726f80c4291d9404a0292a125f 100644 (file)
@@ -23,7 +23,7 @@
 #include <algorithm>
 #include <iterator>
 
-using lyx::support::AddName;
+using lyx::support::addName;
 using lyx::support::package;
 
 namespace fs = boost::filesystem;
@@ -65,7 +65,7 @@ Session::Session(unsigned int num) :
        setNumberOfLastFiles(num);
        // locate the session file
        // note that the session file name 'session' is hard-coded
-       session_file = AddName(package().user_support(), "session");
+       session_file = addName(package().user_support(), "session");
        //
        readFile();
 }
index 67dde87f724b340d9919ee89f736943a347a0fe2..ff6bd985233e47596fa083ab9c8f40ccd5bdbc14 100644 (file)
@@ -38,14 +38,14 @@ FileName::FileName()
 FileName::FileName(string const & abs_filename, bool save_abs)
        : name_(abs_filename), save_abs_path_(save_abs)
 {
-       BOOST_ASSERT(AbsolutePath(name_));
+       BOOST_ASSERT(absolutePath(name_));
 }
 
 
 void FileName::set(string const & name, string const & buffer_path)
 {
-       save_abs_path_ = AbsolutePath(name);
-       name_ = save_abs_path_ ? name : MakeAbsPath(name, buffer_path);
+       save_abs_path_ = absolutePath(name);
+       name_ = save_abs_path_ ? name : makeAbsPath(name, buffer_path);
 }
 
 
@@ -57,13 +57,13 @@ void FileName::erase()
 
 string const FileName::relFilename(string const & path) const
 {
-       return MakeRelPath(name_, path);
+       return makeRelPath(name_, path);
 }
 
 
 string const FileName::outputFilename(string const & path) const
 {
-       return save_abs_path_ ? name_ : MakeRelPath(name_, path);
+       return save_abs_path_ ? name_ : makeRelPath(name_, path);
 }
 
 
@@ -80,7 +80,7 @@ string const FileName::mangledFilename(std::string const & dir) const
        // Now the real work
        string mname = os::internal_path(name_);
        // Remove the extension.
-       mname = ChangeExtension(name_, string());
+       mname = changeExtension(name_, string());
        // Replace '/' in the file name with '_'
        mname = subst(mname, "/", "_");
        // Replace '.' in the file name with '_'
@@ -90,7 +90,7 @@ string const FileName::mangledFilename(std::string const & dir) const
        // Replace ':' in the file name with '_'
        mname = subst(mname, ":", "_");
        // Add the extension back on
-       mname = ChangeExtension(mname, GetExtension(name_));
+       mname = changeExtension(mname, getExtension(name_));
 
        // Prepend a counter to the filename. This is necessary to make
        // the mangled name unique.
index ad37ed96be48e9b808cbb63d033ade87df306ca1..4c69d085328a88cd2f5165bbda9faa5ffaed7c6e 100644 (file)
@@ -95,7 +95,7 @@ string const latex_path(string const & original_path,
                if (extension == EXCLUDE_EXTENSION) {
                        // ChangeExtension calls os::internal_path internally
                        // so don't use it to remove the extension.
-                       string const ext = GetExtension(path);
+                       string const ext = getExtension(path);
                        string const base = ext.empty() ?
                                path :
                                path.substr(0, path.length() - ext.length() - 1);
@@ -112,10 +112,10 @@ string const latex_path(string const & original_path,
 
 
 // Substitutes spaces with underscores in filename (and path)
-string const MakeLatexName(string const & file)
+string const makeLatexName(string const & file)
 {
-       string name = OnlyFilename(file);
-       string const path = OnlyPath(file);
+       string name = onlyFilename(file);
+       string const path = onlyPath(file);
 
        for (string::size_type i = 0; i < name.length(); ++i)
                name[i] &= 0x7f; // set 8th bit to 0
@@ -129,11 +129,11 @@ string const MakeLatexName(string const & file)
        while ((pos = name.find_first_not_of(keep, pos)) != string::npos)
                name[pos++] = '_';
 
-       return AddName(path, name);
+       return addName(path, name);
 }
 
 
-string const QuoteName(string const & name)
+string const quoteName(string const & name)
 {
        return (os::shell() == os::UNIX) ?
                '\'' + name + '\'':
@@ -169,7 +169,7 @@ bool isDirWriteable(string const & path)
 // If path entry begins with $$LyX/, use system_lyxdir
 // If path entry begins with $$User/, use user_lyxdir
 // Example: "$$User/doc;$$LyX/doc"
-string const FileOpenSearch(string const & path, string const & name,
+string const fileOpenSearch(string const & path, string const & name,
                             string const & ext)
 {
        string real_file;
@@ -186,7 +186,7 @@ string const FileOpenSearch(string const & path, string const & name,
                path_element = subst(path_element, "$$User",
                                     package().user_support());
 
-               real_file = FileSearch(path_element, name, ext);
+               real_file = fileSearch(path_element, name, ext);
 
                if (real_file.empty()) {
                        do {
@@ -198,8 +198,9 @@ string const FileOpenSearch(string const & path, string const & name,
        }
 #ifdef __EMX__
        if (ext.empty() && notfound) {
-               real_file = FileOpenSearch(path, name, "exe");
-               if (notfound) real_file = FileOpenSearch(path, name, "cmd");
+               real_file = fileOpenSearch(path, name, "exe");
+               if (notfound)
+                       real_file = fileOpenSearch(path, name, "cmd");
        }
 #endif
        return real_file;
@@ -207,7 +208,7 @@ string const FileOpenSearch(string const & path, string const & name,
 
 
 /// Returns a vector of all files in directory dir having extension ext.
-vector<string> const DirList(string const & dir, string const & ext)
+vector<string> const dirList(string const & dir, string const & ext)
 {
        // EXCEPTIONS FIXME. Rewrite needed when we turn on exceptions. (Lgb)
        vector<string> dirlist;
@@ -238,13 +239,13 @@ vector<string> const DirList(string const & dir, string const & ext)
 
 // Returns the real name of file name in directory path, with optional
 // extension ext.
-string const FileSearch(string const & path, string const & name,
+string const fileSearch(string const & path, string const & name,
                        string const & ext)
 {
        // if `name' is an absolute path, we ignore the setting of `path'
        // Expand Environmentvariables in 'name'
-       string const tmpname = ReplaceEnvironmentPath(name);
-       string fullname = MakeAbsPath(tmpname, path);
+       string const tmpname = replaceEnvironmentPath(name);
+       string fullname = makeAbsPath(tmpname, path);
        // search first without extension, then with it.
        if (isFileReadable(fullname))
                return fullname;
@@ -261,21 +262,21 @@ string const FileSearch(string const & path, string const & name,
 //   1) user_lyxdir
 //   2) build_lyxdir (if not empty)
 //   3) system_lyxdir
-string const LibFileSearch(string const & dir, string const & name,
+string const libFileSearch(string const & dir, string const & name,
                           string const & ext)
 {
-       string fullname = FileSearch(AddPath(package().user_support(), dir),
+       string fullname = fileSearch(addPath(package().user_support(), dir),
                                     name, ext);
        if (!fullname.empty())
                return fullname;
 
        if (!package().build_support().empty())
-               fullname = FileSearch(AddPath(package().build_support(), dir),
+               fullname = fileSearch(addPath(package().build_support(), dir),
                                      name, ext);
        if (!fullname.empty())
                return fullname;
 
-       return FileSearch(AddPath(package().system_support(), dir), name, ext);
+       return fileSearch(addPath(package().system_support(), dir), name, ext);
 }
 
 
@@ -307,7 +308,7 @@ string const i18nLibFileSearch(string const & dir, string const & name,
        string l;
        lang = split(lang, l, ':');
        while (!l.empty() && l != "C" && l != "POSIX") {
-               string const tmp = LibFileSearch(dir,
+               string const tmp = libFileSearch(dir,
                                                 token(l, '_', 0) + '_' + name,
                                                 ext);
                if (!tmp.empty())
@@ -315,11 +316,11 @@ string const i18nLibFileSearch(string const & dir, string const & name,
                lang = split(lang, l, ':');
        }
 
-       return LibFileSearch(dir, name, ext);
+       return libFileSearch(dir, name, ext);
 }
 
 
-string const LibScriptSearch(string const & command_in)
+string const libScriptSearch(string const & command_in)
 {
        static string const token_scriptpath = "$$s/";
 
@@ -337,7 +338,7 @@ string const LibScriptSearch(string const & command_in)
 
        // Does this script file exist?
        string const script =
-               LibFileSearch(".", command.substr(start_script, size_script));
+               libFileSearch(".", command.substr(start_script, size_script));
 
        if (script.empty()) {
                // Replace "$$s/" with ""
@@ -345,7 +346,7 @@ string const LibScriptSearch(string const & command_in)
        } else {
                // Replace "$$s/foo/some_script" with "<path to>/some_script".
                string::size_type const size_replace = size_script + 4;
-               command.replace(pos1, size_replace, QuoteName(script));
+               command.replace(pos1, size_replace, quoteName(script));
        }
 
        return command;
@@ -373,7 +374,7 @@ string const createTmpDir(string const & tempdir, string const & mask)
                return string();
        }
 
-       return MakeAbsPath(tmpfl);
+       return makeAbsPath(tmpfl);
 }
 
 } // namespace anon
@@ -444,7 +445,7 @@ bool createDirectory(string const & path, int permission)
 
 
 // Strip filename from path name
-string const OnlyPath(string const & filename)
+string const onlyPath(string const & filename)
 {
        // If empty filename, return empty
        if (filename.empty())
@@ -459,78 +460,78 @@ string const OnlyPath(string const & filename)
 // Convert relative path into absolute path based on a basepath.
 // If relpath is absolute, just use that.
 // If basepath is empty, use CWD as base.
-string const MakeAbsPath(string const & RelPath, string const & BasePath)
+string const makeAbsPath(string const & relPath, string const & basePath)
 {
        // checks for already absolute path
-       if (os::is_absolute_path(RelPath))
-               return RelPath;
+       if (os::is_absolute_path(relPath))
+               return relPath;
 
        // Copies given paths
-       string TempRel = os::internal_path(RelPath);
+       string tempRel = os::internal_path(relPath);
        // Since TempRel is NOT absolute, we can safely replace "//" with "/"
-       TempRel = subst(TempRel, "//", "/");
+       tempRel = subst(tempRel, "//", "/");
 
-       string TempBase;
+       string tempBase;
 
-       if (os::is_absolute_path(BasePath))
-               TempBase = BasePath;
+       if (os::is_absolute_path(basePath))
+               tempBase = basePath;
        else
-               TempBase = AddPath(getcwd(), BasePath);
+               tempBase = addPath(getcwd(), basePath);
 
        // Handle /./ at the end of the path
-       while (suffixIs(TempBase, "/./"))
-               TempBase.erase(TempBase.length() - 2);
+       while (suffixIs(tempBase, "/./"))
+               tempBase.erase(tempBase.length() - 2);
 
        // processes relative path
-       string RTemp = TempRel;
-       string Temp;
+       string rTemp = tempRel;
+       string temp;
 
-       while (!RTemp.empty()) {
+       while (!rTemp.empty()) {
                // Split by next /
-               RTemp = split(RTemp, Temp, '/');
+               rTemp = split(rTemp, temp, '/');
 
-               if (Temp == ".") continue;
-               if (Temp == "..") {
+               if (temp == ".") continue;
+               if (temp == "..") {
                        // Remove one level of TempBase
-                       string::difference_type i = TempBase.length() - 2;
+                       string::difference_type i = tempBase.length() - 2;
 #ifndef __EMX__
                        if (i < 0)
                                i = 0;
-                       while (i > 0 && TempBase[i] != '/')
+                       while (i > 0 && tempBase[i] != '/')
                                --i;
                        if (i > 0)
 #else
                        if (i < 2)
                                i = 2;
-                       while (i > 2 && TempBase[i] != '/')
+                       while (i > 2 && tempBase[i] != '/')
                                --i;
                        if (i > 2)
 #endif
-                               TempBase.erase(i, string::npos);
+                               tempBase.erase(i, string::npos);
                        else
-                               TempBase += '/';
-               } else if (Temp.empty() && !RTemp.empty()) {
-                               TempBase = os::current_root() + RTemp;
-                               RTemp.erase();
+                               tempBase += '/';
+               } else if (temp.empty() && !rTemp.empty()) {
+                               tempBase = os::current_root() + rTemp;
+                               rTemp.erase();
                } else {
                        // Add this piece to TempBase
-                       if (!suffixIs(TempBase, '/'))
-                               TempBase += '/';
-                       TempBase += Temp;
+                       if (!suffixIs(tempBase, '/'))
+                               tempBase += '/';
+                       tempBase += temp;
                }
        }
 
        // returns absolute path
-       return os::internal_path(TempBase);
+       return os::internal_path(tempBase);
 }
 
 
 // Correctly append filename to the pathname.
 // If pathname is '.', then don't use pathname.
 // Chops any path of filename.
-string const AddName(string const & path, string const & fname)
+string const addName(string const & path, string const & fname)
 {
-       string const basename = OnlyFilename(fname);
+       string const basename = onlyFilename(fname);
        string buf;
 
        if (path != "." && path != "./" && !path.empty()) {
@@ -544,7 +545,7 @@ string const AddName(string const & path, string const & fname)
 
 
 // Strips path from filename
-string const OnlyFilename(string const & fname)
+string const onlyFilename(string const & fname)
 {
        if (fname.empty())
                return fname;
@@ -559,7 +560,7 @@ string const OnlyFilename(string const & fname)
 
 
 /// Returns true is path is absolute
-bool AbsolutePath(string const & path)
+bool absolutePath(string const & path)
 {
        return os::is_absolute_path(path);
 }
@@ -567,27 +568,27 @@ bool AbsolutePath(string const & path)
 
 // Create absolute path. If impossible, don't do anything
 // Supports ./ and ~/. Later we can add support for ~logname/. (Asger)
-string const ExpandPath(string const & path)
+string const expandPath(string const & path)
 {
        // checks for already absolute path
-       string RTemp = ReplaceEnvironmentPath(path);
-       if (os::is_absolute_path(RTemp))
-               return RTemp;
+       string rTemp = replaceEnvironmentPath(path);
+       if (os::is_absolute_path(rTemp))
+               return rTemp;
 
-       string Temp;
-       string const copy = RTemp;
+       string temp;
+       string const copy = rTemp;
 
        // Split by next /
-       RTemp = split(RTemp, Temp, '/');
+       rTemp = split(rTemp, temp, '/');
 
-       if (Temp == ".")
-               return getcwd() + '/' + RTemp;
+       if (temp == ".")
+               return getcwd() + '/' + rTemp;
 
-       if (Temp == "~")
-               return package().home_dir() + '/' + RTemp;
+       if (temp == "~")
+               return package().home_dir() + '/' + rTemp;
 
-       if (Temp == "..")
-               return MakeAbsPath(copy);
+       if (temp == "..")
+               return makeAbsPath(copy);
 
        // Don't know how to handle this
        return copy;
@@ -597,7 +598,7 @@ string const ExpandPath(string const & path)
 // Normalize a path. Constracts path/../path
 // Can't handle "../../" or "/../" (Asger)
 // Also converts paths like /foo//bar ==> /foo/bar
-string const NormalizePath(string const & path)
+string const normalizePath(string const & path)
 {
        // Normalize paths like /foo//bar ==> /foo/bar
        static boost::regex regex("/{2,}");
@@ -612,7 +613,7 @@ string const NormalizePath(string const & path)
 }
 
 
-string const GetFileContents(string const & fname)
+string const getFileContents(string const & fname)
 {
        if (fs::exists(fname)) {
                ifstream ifs(fname.c_str());
@@ -629,7 +630,7 @@ string const GetFileContents(string const & fname)
 
 
 // Search the string for ${VAR} and $VAR and replace VAR using getenv.
-string const ReplaceEnvironmentPath(string const & path)
+string const replaceEnvironmentPath(string const & path)
 {
        // ${VAR} is defined as
        // $\{[A-Za-z_][A-Za-z_0-9]*\}
@@ -658,7 +659,7 @@ string const ReplaceEnvironmentPath(string const & path)
 
 
 // Make relative path out of two absolute paths
-string const MakeRelPath(string const & abspath, string const & basepath)
+string const makeRelPath(string const & abspath, string const & basepath)
 // Makes relative path out of absolute path. If it is deeper than basepath,
 // it's easy. If basepath and abspath share something (they are all deeper
 // than some directory), it'll be rendered using ..'s. If they are completely
@@ -703,7 +704,7 @@ string const MakeRelPath(string const & abspath, string const & basepath)
 
 
 // Append sub-directory(ies) to a path in an intelligent way
-string const AddPath(string const & path, string const & path_2)
+string const addPath(string const & path, string const & path_2)
 {
        string buf;
        string const path2 = os::internal_path(path_2);
@@ -729,7 +730,7 @@ string const AddPath(string const & path, string const & path_2)
  Strips path off if no_path == true.
  If no extension on oldname, just appends.
  */
-string const ChangeExtension(string const & oldname, string const & extension)
+string const changeExtension(string const & oldname, string const & extension)
 {
        string::size_type const last_slash = oldname.rfind('/');
        string::size_type last_dot = oldname.rfind('.');
@@ -749,12 +750,12 @@ string const ChangeExtension(string const & oldname, string const & extension)
 
 string const removeExtension(string const & name)
 {
-       return ChangeExtension(name, string());
+       return changeExtension(name, string());
 }
 
 
 /// Return the extension of the file (not including the .)
-string const GetExtension(string const & name)
+string const getExtension(string const & name)
 {
        string::size_type const last_slash = name.rfind('/');
        string::size_type const last_dot = name.rfind('.');
@@ -958,9 +959,9 @@ bool zippedFile(string const & name)
 
 string const unzippedFileName(string const & zipped_file)
 {
-       string const ext = GetExtension(zipped_file);
+       string const ext = getExtension(zipped_file);
        if (ext == "gz" || ext == "z" || ext == "Z")
-               return ChangeExtension(zipped_file, string());
+               return changeExtension(zipped_file, string());
        return "unzipped_" + zipped_file;
 }
 
@@ -979,7 +980,7 @@ string const unzipFile(string const & zipped_file, string const & unzipped_file)
 }
 
 
-string const MakeDisplayPath(string const & path, unsigned int threshold)
+string const makeDisplayPath(string const & path, unsigned int threshold)
 {
        string str = path;
        string const home = package().home_dir();
@@ -1001,7 +1002,7 @@ string const MakeDisplayPath(string const & path, unsigned int threshold)
        if (str.empty()) {
                // Yes, filename itself is too long.
                // Pick the start and the end of the filename.
-               str = OnlyFilename(path);
+               str = onlyFilename(path);
                string const head = str.substr(0, threshold / 2 - 3);
 
                string::size_type len = str.length();
@@ -1014,7 +1015,7 @@ string const MakeDisplayPath(string const & path, unsigned int threshold)
 }
 
 
-bool LyXReadLink(string const & file, string & link, bool resolve)
+bool readLink(string const & file, string & link, bool resolve)
 {
 #ifdef HAVE_READLINK
        char linkbuffer[512];
@@ -1025,7 +1026,7 @@ bool LyXReadLink(string const & file, string & link, bool resolve)
                return false;
        linkbuffer[nRead] = '\0'; // terminator
        if (resolve)
-               link = MakeAbsPath(linkbuffer, OnlyPath(file));
+               link = makeAbsPath(linkbuffer, onlyPath(file));
        else
                link = linkbuffer;
        return true;
@@ -1035,7 +1036,7 @@ bool LyXReadLink(string const & file, string & link, bool resolve)
 }
 
 
-cmd_ret const RunCommand(string const & cmd)
+cmd_ret const runCommand(string const & cmd)
 {
        // FIXME: replace all calls to RunCommand with ForkedCall
        // (if the output is not needed) or the code in ispell.C
@@ -1097,7 +1098,7 @@ string const findtexfile(string const & fil, string const & /*format*/)
        // If the file can be found directly, we just return a
        // absolute path version of it.
        if (fs::exists(fil))
-               return MakeAbsPath(fil);
+               return makeAbsPath(fil);
 
        // No we try to find it using kpsewhich.
        // It seems from the kpsewhich manual page that it is safe to use
@@ -1121,7 +1122,7 @@ string const findtexfile(string const & fil, string const & /*format*/)
        // should help it by setting additional path in the approp. envir.var.
        string const kpsecmd = "kpsewhich " + fil;
 
-       cmd_ret const c = RunCommand(kpsecmd);
+       cmd_ret const c = runCommand(kpsecmd);
 
        lyxerr[Debug::LATEX] << "kpse status = " << c.first << '\n'
                 << "kpse result = `" << rtrim(c.second, "\n")
@@ -1135,9 +1136,9 @@ string const findtexfile(string const & fil, string const & /*format*/)
 
 void removeAutosaveFile(string const & filename)
 {
-       string a = OnlyPath(filename);
+       string a = onlyPath(filename);
        a += '#';
-       a += OnlyFilename(filename);
+       a += onlyFilename(filename);
        a += '#';
        if (fs::exists(a))
                unlink(a);
@@ -1202,8 +1203,8 @@ string const readBB_from_PSFile(string const & file)
 
 int compare_timestamps(string const & file1, string const & file2)
 {
-       BOOST_ASSERT(AbsolutePath(file1));
-       BOOST_ASSERT(AbsolutePath(file2));
+       BOOST_ASSERT(absolutePath(file1));
+       BOOST_ASSERT(absolutePath(file2));
 
        // If the original is newer than the copy, then copy the original
        // to the new directory.
index b363033778a3d66e7dfe22b144b925e66bfa358b..7820a01dbe9e1b5a5e241cbd255e785be6887c0a 100644 (file)
@@ -43,27 +43,29 @@ std::string const createLyXTmpDir(std::string const & deflt);
     If path entry begins with $$User/, use user_lyxdir.
     Example: "$$User/doc;$$LyX/doc".
 */
-std::string const FileOpenSearch(std::string const & path, std::string const & name,
-                      std::string const & ext = std::string());
+std::string const fileOpenSearch(std::string const & path,
+                                std::string const & name,
+                                std::string const & ext = std::string());
 
 /** Returns the real name of file name in directory path, with optional
   extension ext.
   The file is searched in the given path (unless it is an absolute
   file name), first directly, and then with extension .ext (if given).
   */
-std::string const FileSearch(std::string const & path, std::string const & name,
-                 std::string const & ext = std::string());
+std::string const fileSearch(std::string const & path,
+                            std::string const & name,
+                            std::string const & ext = std::string());
 
 /// Returns a vector of all files in directory dir having extension ext.
-std::vector<std::string> const DirList(std::string const & dir,
-                                 std::string const & ext = std::string());
+std::vector<std::string> const dirList(std::string const & dir,
+                                      std::string const & ext = std::string());
 
 /** Is directory read only?
   returns
     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.
@@ -83,15 +85,17 @@ bool isSGMLFilename(std::string const & filename);
       -# system_lyxdir
     The third parameter `ext' is optional.
 */
-std::string const LibFileSearch(std::string const & dir, std::string const & name,
-                    std::string const & ext = std::string());
+std::string const libFileSearch(std::string const & dir,
+                               std::string const & name,
+                               std::string const & ext = std::string());
 
-/** Same as LibFileSearch(), but tries first to find an
+/** Same as libFileSearch(), but tries first to find an
   internationalized version of the file by prepending $LANG_ to the
   name
   */
 std::string const
-i18nLibFileSearch(std::string const & dir, std::string const & name,
+i18nLibFileSearch(std::string const & dir,
+                 std::string const & name,
                  std::string const & ext = std::string());
 
 /** Takes a command such as "sh $$s/scripts/convertDefault.sh file.in file.out"
@@ -100,7 +104,7 @@ i18nLibFileSearch(std::string const & dir, std::string const & name,
  *  command will still fail, but the error message will make some sort of
  *  sense ;-)
  */
-std::string const LibScriptSearch(std::string const & command);
+std::string const libScriptSearch(std::string const & command);
 
 enum latex_path_extension {
        PROTECT_EXTENSION,
@@ -136,29 +140,29 @@ std::string const latex_path(std::string const & path,
                latex_path_dots dots = LEAVE_DOTS);
 
 /// Substitutes active latex characters with underscores in filename
-std::string const MakeLatexName(std::string const & file);
+std::string const makeLatexName(std::string const & file);
 
 /// Put the name in quotes suitable for the current shell
-std::string const QuoteName(std::string const & file);
+std::string const quoteName(std::string const & file);
 
 /// Add a filename to a path. Any path from filename is stripped first.
-std::string const AddName(std::string const & path, std::string const & fname);
+std::string const addName(std::string const & path, std::string const & fname);
 
 /// Append sub-directory(ies) to path in an intelligent way
-std::string const AddPath(std::string const & path, std::string const & path2);
+std::string const addPath(std::string const & path, std::string const & path2);
 
 /** Change extension of oldname to extension.
  If oldname does not have an extension, it is appended.
  If the extension is empty, any extension is removed from the name.
  */
 std::string const
-ChangeExtension(std::string const & oldname, std::string const & extension);
+changeExtension(std::string const & oldname, std::string const & extension);
 
 /// Remove the extension from \p name
 std::string const removeExtension(std::string const & name);
 
 /// Return the extension of the file (not including the .)
-std::string const GetExtension(std::string const & name);
+std::string const getExtension(std::string const & name);
 
 /** Guess the file format name (as in Format::name()) from contents.
  Normally you don't want to use this directly, but rather
@@ -183,23 +187,23 @@ std::string const unzipFile(std::string const & zipped_file,
                            std::string const & unzipped_file = std::string());
 
 /// Returns true is path is absolute
-bool AbsolutePath(std::string const & path);
+bool absolutePath(std::string const & path);
 
 /// Create absolute path. If impossible, don't do anything
-std::string const ExpandPath(std::string const & path);
+std::string const expandPath(std::string const & path);
 
 /** Convert relative path into absolute path based on a basepath.
   If relpath is absolute, just use that.
   If basepath doesn't exist use CWD.
   */
-std::string const MakeAbsPath(std::string const & RelPath = std::string(),
-                        std::string const & BasePath = std::string());
+std::string const makeAbsPath(std::string const & RelPath = std::string(),
+                             std::string const & BasePath = std::string());
 
 /** Creates a nice compact path for displaying. The parameter
   threshold, if given, specifies the maximal length of the path.
   */
 std::string const
-MakeDisplayPath(std::string const & path, unsigned int threshold = 1000);
+makeDisplayPath(std::string const & path, unsigned int threshold = 1000);
 
 /** Makes relative path out of absolute path.
   If it is deeper than basepath,
@@ -209,36 +213,39 @@ MakeDisplayPath(std::string const & path, unsigned int threshold = 1000);
   WARNING: the absolute path and base path must really be absolute paths!!!
   */
 std::string const
-MakeRelPath(std::string const & abspath, std::string const & basepath);
+makeRelPath(std::string const & abspath, std::string const & basepath);
 
 /// Strip filename from path name
-std::string const OnlyPath(std::string const & fname);
+std::string const onlyPath(std::string const & fname);
 
 /** Normalize a path. Constracts path/../path
  *  Also converts paths like /foo//bar ==> /foo/bar
  */
-std::string const NormalizePath(std::string const & path);
+std::string const normalizePath(std::string const & path);
 
 /// Strips path from filename
-std::string const OnlyFilename(std::string const & fname);
+std::string const onlyFilename(std::string const & fname);
 
 /// Get the contents of a file as a huge std::string
-std::string const GetFileContents(std::string const & fname);
+std::string const getFileContents(std::string const & fname);
 
 /** Check and Replace Environmentvariables ${NAME} in Path.
     Replaces all occurences of these, if they are found in the
     environment.
     Variables are defined by Var := '${' [a-zA-Z_][a-zA-Z_0-9]* '}'
 */
-std::string const ReplaceEnvironmentPath(std::string const & path);
+std::string const replaceEnvironmentPath(std::string const & path);
 
 /* Set \c link to the path \c file points to as a symbolic link.
    If \c resolve is true, then \c link is an absolute path
    Returns true if successful */
-bool LyXReadLink(std::string const & file, std::string & link, bool resolve = false);
+bool readLink(std::string const & file,
+             std::string & link,
+             bool resolve = false);
 
 /// Uses kpsewhich to find tex files
-std::string const findtexfile(std::string const & fil, std::string const & format);
+std::string const findtexfile(std::string const & fil,
+                             std::string const & format);
 
 /// remove the autosave-file and give a Message if it can't be done
 void removeAutosaveFile(std::string const & filename);
@@ -257,7 +264,7 @@ int compare_timestamps(std::string const & file1, std::string const & file2);
 
 typedef std::pair<int, std::string> cmd_ret;
 
-cmd_ret const RunCommand(std::string const & cmd);
+cmd_ret const runCommand(std::string const & cmd);
 
 } // namespace support
 } // namespace lyx
index 1cc8ba0302c54b359957684f8e4fce950b27eb21..e036dcb871827accc8c69c7a9b9c60eea8ca6e45 100644 (file)
@@ -125,7 +125,7 @@ Package::Package(string const & command_line_arg0,
        document_dir_ = get_document_dir(home_dir_);
 
        string const abs_binary = abs_path_from_binary_name(command_line_arg0);
-       binary_dir_ = OnlyPath(abs_binary);
+       binary_dir_ = onlyPath(abs_binary);
 
        // Is LyX being run in-place from the build tree?
        boost::tie(build_support_dir_, system_support_dir_) =
@@ -224,7 +224,7 @@ get_build_support_dir(std::string const & binary_dir,
                break;
        }
 
-       return NormalizePath(AddPath(binary_dir, indirection));
+       return normalizePath(addPath(binary_dir, indirection));
 }
 
 
@@ -245,17 +245,17 @@ get_build_dirs(string const & abs_binary,
        string binary = abs_binary;
        while (true) {
                // Try and find "lyxrc.defaults".
-               string const binary_dir = OnlyPath(binary);
+               string const binary_dir = onlyPath(binary);
                string const build_support_dir =
                        get_build_support_dir(binary_dir, top_build_dir_location);
 
-               if (!FileSearch(build_support_dir, "lyxrc.defaults").empty()) {
+               if (!fileSearch(build_support_dir, "lyxrc.defaults").empty()) {
                        // Try and find "chkconfig.ltx".
                        string const system_support_dir =
-                               MakeAbsPath(AddPath(top_srcdir(), "lib"),
-                                           AddPath(binary_dir, "support"));
+                               makeAbsPath(addPath(top_srcdir(), "lib"),
+                                           addPath(binary_dir, "support"));
 
-                       if (!FileSearch(system_support_dir, "chkconfig.ltx").empty()) {
+                       if (!fileSearch(system_support_dir, "chkconfig.ltx").empty()) {
                                lyxerr[Debug::INIT] << check_text << " yes"
                                                    << std::endl;
                                return std::make_pair(build_support_dir, system_support_dir);
@@ -268,7 +268,7 @@ get_build_dirs(string const & abs_binary,
                        break;
 
                string link;
-               if (LyXReadLink(binary, link, true)) {
+               if (readLink(binary, link, true)) {
                        binary = link;
                } else {
                        // Unable to resolve the link.
@@ -322,7 +322,7 @@ string const get_locale_dir(string const & system_support_dir)
        // 2. Search for system_support_dir / <relative locale dir>
        // The <relative locale dir> is OS-dependent. (On Unix, it will
        // be "../locale/".)
-       path = NormalizePath(AddPath(system_support_dir, relative_locale_dir()));
+       path = normalizePath(addPath(system_support_dir, relative_locale_dir()));
 
        if (fs::exists(path) && fs::is_directory(path))
                return path;
@@ -367,7 +367,7 @@ string const abs_path_from_command_line(string const & command_line)
                return string();
 
        string const path = os::internal_path(command_line);
-       return os::is_absolute_path(path) ? path : MakeAbsPath(path);
+       return os::is_absolute_path(path) ? path : makeAbsPath(path);
 }
 
 
@@ -389,13 +389,13 @@ string const get_binary_path(string const & exe)
 
        // Two possibilities present themselves.
        // 1. The binary is relative to the CWD.
-       string const abs_exe_path = MakeAbsPath(exe_path);
+       string const abs_exe_path = makeAbsPath(exe_path);
        if (fs::exists(abs_exe_path))
                return abs_exe_path;
 
        // 2. exe must be the name of the binary only and it
        // can be found on the PATH.
-       string const exe_name = OnlyFilename(exe_path);
+       string const exe_name = onlyFilename(exe_path);
        if (exe_name != exe_path)
                return string();
 
@@ -404,9 +404,9 @@ string const get_binary_path(string const & exe)
        std::vector<string>::const_iterator const end = path.end();
        for (; it != end; ++it) {
                // This will do nothing if *it is already absolute.
-               string const exe_dir = MakeAbsPath(*it);
+               string const exe_dir = makeAbsPath(*it);
 
-               string const exe_path = AddName(exe_dir, exe_name);
+               string const exe_path = addName(exe_dir, exe_name);
                if (fs::exists(exe_path))
                        return exe_path;
        }
@@ -472,13 +472,13 @@ get_system_support_dir(string const & abs_binary,
        string binary = abs_binary;
        while (true) {
                // Try and find "chkconfig.ltx".
-               string const binary_dir = OnlyPath(binary);
+               string const binary_dir = onlyPath(binary);
 
                string const lyxdir =
-                       NormalizePath(AddPath(binary_dir, relative_lyxdir));
+                       normalizePath(addPath(binary_dir, relative_lyxdir));
                searched_dirs.push_back(lyxdir);
 
-               if (!FileSearch(lyxdir, chkconfig_ltx).empty()) {
+               if (!fileSearch(lyxdir, chkconfig_ltx).empty()) {
                        // Success! "chkconfig.ltx" has been found.
                        return lyxdir;
                }
@@ -489,7 +489,7 @@ get_system_support_dir(string const & abs_binary,
                        break;
 
                string link;
-               if (LyXReadLink(binary, link, true)) {
+               if (readLink(binary, link, true)) {
                        binary = link;
                } else {
                        // Unable to resolve the link.
@@ -498,7 +498,7 @@ get_system_support_dir(string const & abs_binary,
        }
 
        // 4. Repeat the exercise on the directory itself.
-       string binary_dir = OnlyPath(abs_binary);
+       string binary_dir = onlyPath(abs_binary);
        while (true) {
                // This time test whether the directory is a symbolic link
                // *before* looking for "chkconfig.ltx".
@@ -507,7 +507,7 @@ get_system_support_dir(string const & abs_binary,
                        break;
 
                string link;
-               if (LyXReadLink(binary_dir, link, true)) {
+               if (readLink(binary_dir, link, true)) {
                        binary_dir = link;
                } else {
                        // Unable to resolve the link.
@@ -516,10 +516,10 @@ get_system_support_dir(string const & abs_binary,
 
                // Try and find "chkconfig.ltx".
                string const lyxdir =
-                       NormalizePath(AddPath(binary_dir, relative_lyxdir));
+                       normalizePath(addPath(binary_dir, relative_lyxdir));
                searched_dirs.push_back(lyxdir);
 
-               if (!FileSearch(lyxdir, chkconfig_ltx).empty()) {
+               if (!fileSearch(lyxdir, chkconfig_ltx).empty()) {
                        // Success! "chkconfig.ltx" has been found.
                        return lyxdir;
                }
@@ -527,7 +527,7 @@ get_system_support_dir(string const & abs_binary,
 
        // 5. In desparation, try the hard-coded system support dir.
        path = hardcoded_system_support_dir();
-       if (!FileSearch(path, chkconfig_ltx).empty())
+       if (!fileSearch(path, chkconfig_ltx).empty())
                return path;
 
        // Everything has failed :-(
@@ -592,7 +592,7 @@ string const get_default_user_support_dir(string const & home_dir)
        (void)home_dir; // Silence warning about unused variable.
 
        os::GetFolderPath win32_folder_path;
-       return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), PACKAGE);
+       return addPath(win32_folder_path(os::GetFolderPath::APPDATA), PACKAGE);
 
 #elif defined (USE_MACOSX_PACKAGING)
        (void)home_dir; // Silence warning about unused variable.
@@ -611,10 +611,10 @@ string const get_default_user_support_dir(string const & home_dir)
        if (status_code != 0)
                return string();
 
-       return AddPath(reinterpret_cast<char const *>(store), PACKAGE);
+       return addPath(reinterpret_cast<char const *>(store), PACKAGE);
 
 #else // USE_POSIX_PACKAGING
-       return AddPath(home_dir, string(".") + PACKAGE);
+       return addPath(home_dir, string(".") + PACKAGE);
 #endif
 }
 
@@ -625,7 +625,7 @@ bool check_command_line_dir(string const & dir,
                            string const & file,
                            string const & command_line_switch)
 {
-       string const abs_path = FileSearch(dir, file);
+       string const abs_path = fileSearch(dir, file);
        if (abs_path.empty()) {
                lyxerr << bformat(_("Invalid %1$s switch.\n"
                                    "Directory %2$s does not contain %3$s."),
@@ -641,7 +641,7 @@ bool check_command_line_dir(string const & dir,
 string const extract_env_var_dir(string const & env_var)
 {
        string const dir = os::internal_path(getEnv(env_var));
-       return dir.empty() ? dir : MakeAbsPath(dir);
+       return dir.empty() ? dir : makeAbsPath(dir);
 }
 
 
@@ -651,11 +651,11 @@ bool check_env_var_dir(string const & dir,
                       string const & file,
                       string const & env_var)
 {
-       string const abs_path = FileSearch(dir, file);
+       string const abs_path = fileSearch(dir, file);
        if (abs_path.empty()) {
                lyxerr << bformat(_("Invalid %1$s environment variable.\n"
                                    "Directory %2$s does not contain %3$s."),
-                                 env_var, dir, file)
+                                 env_var, dir, file)
                       << std::endl;
        }
 
@@ -701,7 +701,7 @@ string const relative_system_support_dir()
 #if defined (USE_WINDOWS_PACKAGING) || defined (USE_MACOSX_PACKAGING)
        result = "../Resources/";
 #else // Posix-like.
-       result = AddPath("../share/", PACKAGE);
+       result = addPath("../share/", PACKAGE);
 #endif
 
        return result;
index 601e21b30f2a38aceda307f1e292299d6f1eefce..54833b5b47d28b41dda8a588bcee8795fc9978ec 100644 (file)
@@ -73,7 +73,7 @@ int make_tempfile(char * templ)
 string const lyx::support::tempName(string const & dir, string const & mask)
 {
        string const tmpdir(dir.empty() ? package().temp_dir() : dir);
-       string tmpfl(AddName(tmpdir, mask));
+       string tmpfl(addName(tmpdir, mask));
 #if defined (HAVE_GETPID)
        tmpfl += convert<string>(getpid());
 #elif defined (HAVE__GETPID)
index 2c391c4fc7ce3d43d3caddbf4efb88a8d7b29599..1b28cf619c986c34a073bb0f3c4f66174f5ce5c9 100755 (executable)
@@ -11,20 +11,20 @@ string _(string const & str)
        return str;
 }
 
-void test_NormalizePath()
+void test_normalizePath()
 {
-       cout << NormalizePath("foo/../bar") << endl;
-       cout << NormalizePath("foo/./bar") << endl;
-       cout << NormalizePath("./foo/../bar") << endl;
-       cout << NormalizePath("./foo/./bar") << endl;
-       cout << NormalizePath("/foo/../bar") << endl;
-       cout << NormalizePath("/foo/./bar") << endl;
-       cout << NormalizePath("foo//bar") << endl;      
-       cout << NormalizePath("./foo//bar") << endl;    
-       cout << NormalizePath("/foo//bar") << endl;     
+       cout << normalizePath("foo/../bar") << endl;
+       cout << normalizePath("foo/./bar") << endl;
+       cout << normalizePath("./foo/../bar") << endl;
+       cout << normalizePath("./foo/./bar") << endl;
+       cout << normalizePath("/foo/../bar") << endl;
+       cout << normalizePath("/foo/./bar") << endl;
+       cout << normalizePath("foo//bar") << endl;
+       cout << normalizePath("./foo//bar") << endl;
+       cout << normalizePath("/foo//bar") << endl;
 }
 
 int main()
 {
-       test_NormalizePath();
+       test_normalizePath();
 }
index 5226dbbe1f0853c4e9bdc0b96012654ffc83654c..ae6cadbd0f3a6d350e6d366ac7a00e5da9dace7c 100644 (file)
@@ -34,7 +34,7 @@ using std::vector;
 using std::cerr;
 using std::endl;
 
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 // special columntypes
 extern std::map<char, int> special_columns;
@@ -485,7 +485,7 @@ LyXTextClass const parse_preamble(Parser & p, ostream & os, string const & force
        if (!forceclass.empty()) {
                h_textclass = forceclass;
        }
-       string layoutfilename = LibFileSearch("layouts", h_textclass, "layout");
+       string layoutfilename = libFileSearch("layouts", h_textclass, "layout");
        if (layoutfilename.empty()) {
                cerr << "Error: Could not find layout file for textclass \"" << h_textclass << "\"." << endl;
                exit(1);
index 9d2bea9366cc69c90c59255acdb367beaff3b06d..06905f42c067e26d36dbe21d4b76694ea4efb76a 100644 (file)
@@ -52,11 +52,11 @@ using std::string;
 using std::vector;
 using std::map;
 
-using lyx::support::ChangeExtension;
+using lyx::support::changeExtension;
 using lyx::support::isStrUnsignedInt;
 using lyx::support::ltrim;
-using lyx::support::MakeAbsPath;
-using lyx::support::OnlyPath;
+using lyx::support::makeAbsPath;
+using lyx::support::onlyPath;
 using lyx::support::rtrim;
 using lyx::support::isFileReadable;
 
@@ -431,7 +431,7 @@ void tex2lyx(std::istream &is, std::ostream &os)
 /// convert TeX from \p infilename to LyX and write it to \p os
 bool tex2lyx(string const &infilename, std::ostream &os)
 {
-       BOOST_ASSERT(lyx::support::AbsolutePath(infilename));
+       BOOST_ASSERT(lyx::support::absolutePath(infilename));
        ifstream is(infilename.c_str());
        if (!is.good()) {
                cerr << "Could not open input file \"" << infilename
@@ -439,7 +439,7 @@ bool tex2lyx(string const &infilename, std::ostream &os)
                return false;
        }
        string const oldParentFilePath = parentFilePath;
-       parentFilePath = OnlyPath(infilename);
+       parentFilePath = onlyPath(infilename);
        tex2lyx(is, os);
        parentFilePath = oldParentFilePath;
        return true;
@@ -494,16 +494,16 @@ int main(int argc, char * argv[])
 
        // Now every known option is parsed. Look for input and output
        // file name (the latter is optional).
-       string const infilename = MakeAbsPath(argv[1]);
+       string const infilename = makeAbsPath(argv[1]);
        string outfilename;
        if (argc > 2) {
                outfilename = argv[2];
                if (outfilename != "-")
-                       outfilename = MakeAbsPath(argv[2]);
+                       outfilename = makeAbsPath(argv[2]);
        } else
-               outfilename = ChangeExtension(infilename, ".lyx");
+               outfilename = changeExtension(infilename, ".lyx");
 
-       string const system_syntaxfile = lyx::support::LibFileSearch("", "syntax.default");
+       string const system_syntaxfile = lyx::support::libFileSearch("", "syntax.default");
        if (system_syntaxfile.empty()) {
                cerr << "Error: Could not find syntax file \"syntax.default\"." << endl;
                exit(1);
@@ -512,7 +512,7 @@ int main(int argc, char * argv[])
        if (!syntaxfile.empty())
                read_syntaxfile(syntaxfile);
 
-       masterFilePath = OnlyPath(infilename);
+       masterFilePath = onlyPath(infilename);
        parentFilePath = masterFilePath;
 
        if (outfilename == "-") {
index a34222917a0968c41247ca17eeaa9fc22f0e8528..07753e9104dc0c7bf3de44877484145d4b9f723b 100644 (file)
@@ -29,9 +29,9 @@
 #include <sstream>
 #include <vector>
 
-using lyx::support::ChangeExtension;
-using lyx::support::MakeAbsPath;
-using lyx::support::MakeRelPath;
+using lyx::support::changeExtension;
+using lyx::support::makeAbsPath;
+using lyx::support::makeRelPath;
 using lyx::support::rtrim;
 using lyx::support::suffixIs;
 using lyx::support::contains;
@@ -344,7 +344,7 @@ string find_file(string const & name, string const & path,
                // We don't use ChangeExtension() because it does the wrong
                // thing if name contains a dot.
                string const trial = name + '.' + (*what);
-               if (fs::exists(MakeAbsPath(trial, path)))
+               if (fs::exists(makeAbsPath(trial, path)))
                        return trial;
        }
        return string();
@@ -1004,9 +1004,9 @@ string const normalize_filename(string const & name)
 /// convention (relative to .lyx file) if it is relative
 void fix_relative_filename(string & name)
 {
-       if (lyx::support::AbsolutePath(name))
+       if (lyx::support::absolutePath(name))
                return;
-       name = MakeRelPath(MakeAbsPath(name, getMasterFilePath()),
+       name = makeRelPath(makeAbsPath(name, getMasterFilePath()),
                           getParentFilePath());
 }
 
@@ -1384,7 +1384,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        string const path = getMasterFilePath();
                        // We want to preserve relative / absolute filenames,
                        // therefore path is only used for testing
-                       if (!fs::exists(MakeAbsPath(name, path))) {
+                       if (!fs::exists(makeAbsPath(name, path))) {
                                // The file extension is probably missing.
                                // Now try to find it out.
                                string const dvips_name =
@@ -1414,7 +1414,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                        name = pdftex_name;
                        }
 
-                       if (fs::exists(MakeAbsPath(name, path)))
+                       if (fs::exists(makeAbsPath(name, path)))
                                fix_relative_filename(name);
                        else
                                cerr << "Warning: Could not find graphics file '"
@@ -2036,7 +2036,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        // We want to preserve relative / absolute filenames,
                        // therefore path is only used for testing
                        if (t.cs() == "include" &&
-                           !fs::exists(MakeAbsPath(filename, path))) {
+                           !fs::exists(makeAbsPath(filename, path))) {
                                // The file extension is probably missing.
                                // Now try to find it out.
                                string const tex_name =
@@ -2045,14 +2045,14 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                if (!tex_name.empty())
                                        filename = tex_name;
                        }
-                       if (fs::exists(MakeAbsPath(filename, path))) {
+                       if (fs::exists(makeAbsPath(filename, path))) {
                                string const abstexname =
-                                       MakeAbsPath(filename, path);
+                                       makeAbsPath(filename, path);
                                string const abslyxname =
-                                       ChangeExtension(abstexname, ".lyx");
+                                       changeExtension(abstexname, ".lyx");
                                fix_relative_filename(filename);
                                string const lyxname =
-                                       ChangeExtension(filename, ".lyx");
+                                       changeExtension(filename, ".lyx");
                                if (t.cs() != "verbatiminput" &&
                                    tex2lyx(abstexname, abslyxname)) {
                                        os << name << '{' << lyxname << "}\n";
index 3230fabf1874e2be0f8cf9103d3e9efcbd39360c..58a8e8884c229793a0a648751b1406fbb840b1d5 100644 (file)
@@ -19,7 +19,7 @@
 #include "trans_mgr.h"
 
 using lyx::support::contains;
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 
 using std::endl;
 using std::string;
@@ -325,7 +325,7 @@ string const Trans::process(char c, TransManager & k)
 
 int Trans::Load(string const & language)
 {
-       string const filename = LibFileSearch("kbd", language, "kmap");
+       string const filename = libFileSearch("kbd", language, "kmap");
        if (filename.empty())
                return -1;
 
index d58ea5e62420398c0a712ffaf780d63f1209a1cc..3225bc18ba9a42d5261395c1f5b8275bddb84c63 100644 (file)
 
 #include <fstream>
 
-using lyx::support::AddName;
-using lyx::support::AddPath;
+using lyx::support::addName;
+using lyx::support::addPath;
 using lyx::support::contains;
-using lyx::support::OnlyFilename;
-using lyx::support::OnlyPath;
+using lyx::support::onlyFilename;
+using lyx::support::onlyPath;
 using lyx::support::Path;
-using lyx::support::QuoteName;
+using lyx::support::quoteName;
 using lyx::support::rtrim;
 using lyx::support::split;
 using lyx::support::Systemcall;
@@ -83,7 +83,7 @@ string const RCS::find_file(string const & file)
                return tmp;
        } else {
                // Check if RCS/*,v exists.
-               tmp = AddName(AddPath(OnlyPath(file), "RCS"), file);
+               tmp = addName(addPath(onlyPath(file), "RCS"), file);
                tmp += ",v";
                lyxerr[Debug::LYXVC] << "Checking if file is under rcs: "
                                     << tmp << endl;
@@ -100,7 +100,7 @@ string const RCS::find_file(string const & file)
 void RCS::retrieve(string const & file)
 {
        lyxerr[Debug::LYXVC] << "LyXVC::RCS: retrieve.\n\t" << file << endl;
-       VCS::doVCCommand("co -q -r " + QuoteName(file),
+       VCS::doVCCommand("co -q -r " + quoteName(file),
                         string());
 }
 
@@ -174,7 +174,7 @@ void RCS::registrer(string const & msg)
        string cmd = "ci -q -u -i -t-\"";
        cmd += msg;
        cmd += "\" ";
-       cmd += QuoteName(OnlyFilename(owner_->fileName()));
+       cmd += quoteName(onlyFilename(owner_->fileName()));
        doVCCommand(cmd, owner_->filePath());
 }
 
@@ -182,7 +182,7 @@ void RCS::registrer(string const & msg)
 void RCS::checkIn(string const & msg)
 {
        doVCCommand("ci -q -u -m\"" + msg + "\" "
-                   + QuoteName(OnlyFilename(owner_->fileName())),
+                   + quoteName(onlyFilename(owner_->fileName())),
                    owner_->filePath());
 }
 
@@ -190,7 +190,7 @@ void RCS::checkIn(string const & msg)
 void RCS::checkOut()
 {
        owner_->markClean();
-       doVCCommand("co -q -l " + QuoteName(OnlyFilename(owner_->fileName())),
+       doVCCommand("co -q -l " + quoteName(onlyFilename(owner_->fileName())),
                    owner_->filePath());
 }
 
@@ -198,7 +198,7 @@ void RCS::checkOut()
 void RCS::revert()
 {
        doVCCommand("co -f -u" + version() + " "
-                   + QuoteName(OnlyFilename(owner_->fileName())),
+                   + quoteName(onlyFilename(owner_->fileName())),
                    owner_->filePath());
        // We ignore changes and just reload!
        owner_->markClean();
@@ -209,14 +209,14 @@ void RCS::undoLast()
 {
        lyxerr[Debug::LYXVC] << "LyXVC: undoLast" << endl;
        doVCCommand("rcs -o" + version() + " "
-                   + QuoteName(OnlyFilename(owner_->fileName())),
+                   + quoteName(onlyFilename(owner_->fileName())),
                    owner_->filePath());
 }
 
 
 void RCS::getLog(string const & tmpf)
 {
-       doVCCommand("rlog " + QuoteName(OnlyFilename(owner_->fileName()))
+       doVCCommand("rlog " + quoteName(onlyFilename(owner_->fileName()))
                    + " > " + tmpf,
                    owner_->filePath());
 }
@@ -234,8 +234,8 @@ string const CVS::find_file(string const & file)
 {
        // First we look for the CVS/Entries in the same dir
        // where we have file.
-       string const dir = OnlyPath(file) + "/CVS/Entries";
-       string const tmpf = "/" + OnlyFilename(file) + "/";
+       string const dir = onlyPath(file) + "/CVS/Entries";
+       string const tmpf = "/" + onlyFilename(file) + "/";
        lyxerr[Debug::LYXVC] << "LyXVC: checking in `" << dir
                             << "' for `" << tmpf << '\'' << endl;
        if (fs::is_readable(dir)) {
@@ -259,7 +259,7 @@ void CVS::scanMaster()
                             << master_ << endl;
        // Ok now we do the real scan...
        ifstream ifs(master_.c_str());
-       string tmpf = "/" + OnlyFilename(file_) + "/";
+       string tmpf = "/" + onlyFilename(file_) + "/";
        lyxerr[Debug::LYXVC] << "\tlooking for `" << tmpf << '\'' << endl;
        string line;
        static regex const reg("/(.*)/(.*)/(.*)/(.*)/(.*)");
@@ -303,7 +303,7 @@ void CVS::scanMaster()
 void CVS::registrer(string const & msg)
 {
        doVCCommand("cvs -q add -m \"" + msg + "\" "
-                   + QuoteName(OnlyFilename(owner_->fileName())),
+                   + quoteName(onlyFilename(owner_->fileName())),
                    owner_->filePath());
 }
 
@@ -311,7 +311,7 @@ void CVS::registrer(string const & msg)
 void CVS::checkIn(string const & msg)
 {
        doVCCommand("cvs -q commit -m \"" + msg + "\" "
-                   + QuoteName(OnlyFilename(owner_->fileName())),
+                   + quoteName(onlyFilename(owner_->fileName())),
                    owner_->filePath());
 }
 
@@ -327,7 +327,7 @@ void CVS::revert()
 {
        // Reverts to the version in CVS repository and
        // gets the updated version from the repository.
-       string const fil = QuoteName(OnlyFilename(owner_->fileName()));
+       string const fil = quoteName(onlyFilename(owner_->fileName()));
 
        doVCCommand("rm -f " + fil + "; cvs update " + fil,
                    owner_->filePath());
@@ -346,7 +346,7 @@ void CVS::undoLast()
 
 void CVS::getLog(string const & tmpf)
 {
-       doVCCommand("cvs log " + QuoteName(OnlyFilename(owner_->fileName()))
+       doVCCommand("cvs log " + quoteName(onlyFilename(owner_->fileName()))
                    + " > " + tmpf,
                    owner_->filePath());
 }