diff --git a/src/VERSION b/src/VERSION index 06fb41b6..84cc5294 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -1.17.2 +1.18.0 diff --git a/src/aspell/rclaspell.cpp b/src/aspell/rclaspell.cpp index d08b6ad1..63937ef8 100644 --- a/src/aspell/rclaspell.cpp +++ b/src/aspell/rclaspell.cpp @@ -284,7 +284,7 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason) // We create the dictionary by executing the aspell command: // aspell --lang=[lang] create master [dictApath] ExecCmd aspell; - list args; + vector args; args.push_back(string("--lang=")+ m_lang); args.push_back("--encoding=utf-8"); args.push_back("create"); diff --git a/src/index/mimetype.cpp b/src/index/mimetype.cpp index 0b1cdec8..1beb5d7e 100644 --- a/src/index/mimetype.cpp +++ b/src/index/mimetype.cpp @@ -57,7 +57,7 @@ static string mimetypefromdata(const string &fn, bool usfc) #ifdef USE_SYSTEM_FILE_COMMAND if (usfc && mime.empty()) { // Last resort: use "file -i" - list args; + vector args; args.push_back("-i"); args.push_back(fn); diff --git a/src/internfile/internfile.cpp b/src/internfile/internfile.cpp index 4c8235c6..99da35fe 100644 --- a/src/internfile/internfile.cpp +++ b/src/internfile/internfile.cpp @@ -143,7 +143,7 @@ static bool uncompressfile(RclConfig *conf, const string& ifn, // Substitute file name and temp dir in command elements list::const_iterator it = cmdv.begin(); ++it; - list args; + vector args; map subs; subs['f'] = ifn; subs['t'] = tdir.dirname(); diff --git a/src/internfile/mh_exec.cpp b/src/internfile/mh_exec.cpp index 3948d0f1..2e37166b 100644 --- a/src/internfile/mh_exec.cpp +++ b/src/internfile/mh_exec.cpp @@ -88,7 +88,7 @@ bool MimeHandlerExec::next_document() // Build parameter list: delete cmd name and add the file name list::iterator it = params.begin(); - listmyparams(++it, params.end()); + vectormyparams(++it, params.end()); myparams.push_back(m_fn); if (!m_ipath.empty()) myparams.push_back(m_ipath); diff --git a/src/internfile/mh_execm.cpp b/src/internfile/mh_execm.cpp index 381d0287..c74a1bee 100644 --- a/src/internfile/mh_execm.cpp +++ b/src/internfile/mh_execm.cpp @@ -52,7 +52,7 @@ bool MimeHandlerExecMultiple::startCmd() // Build parameter list: delete cmd name list::iterator it = params.begin(); - listmyparams(++it, params.end()); + vectormyparams(++it, params.end()); // Start filter m_cmd.putenv(m_forPreview ? "RECOLL_FILTER_FORPREVIEW=yes" : diff --git a/src/qtgui/confgui/confguiindex.cpp b/src/qtgui/confgui/confguiindex.cpp index e0bcfc15..7b3a6c1a 100644 --- a/src/qtgui/confgui/confguiindex.cpp +++ b/src/qtgui/confgui/confguiindex.cpp @@ -340,7 +340,7 @@ ConfSubPanelW::ConfSubPanelW(QWidget *parent, ConfNull *config) m_widgets.push_back(eskn); gl1->addWidget(eskn, 0, 0, 1, 2); - list args; + vector args; args.push_back("-l"); ExecCmd ex; string icout; diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp index 1d827044..28332165 100644 --- a/src/qtgui/rclmain_w.cpp +++ b/src/qtgui/rclmain_w.cpp @@ -703,7 +703,7 @@ void RclMain::toggleIndexing() break; case IXST_NOTRUNNING: { - list args; + vector args; args.push_back("-c"); args.push_back(theconfig->getConfDir()); m_idxproc = new ExecCmd; @@ -729,7 +729,7 @@ void RclMain::rebuildIndex() QMessageBox::Cancel, QMessageBox::NoButton); if (rep == QMessageBox::Ok) { - list args; + vector args; args.push_back("-c"); args.push_back(theconfig->getConfDir()); args.push_back("-z"); @@ -1256,7 +1256,7 @@ void RclMain::updateIdxForDocs(vector& docs) vector paths; if (ConfIndexer::docsToPaths(docs, paths)) { - list args; + vector args; args.push_back("-c"); args.push_back(theconfig->getConfDir()); args.push_back("-i"); @@ -1522,7 +1522,7 @@ void RclMain::startNativeViewer(Rcl::Doc doc) ignoreipath = stringToBool(cmdplusattr); // Split the command line - list lcmd; + vector lcmd; if (!stringToStrings(cmd, lcmd)) { QMessageBox::warning(0, "Recoll", tr("Bad viewer command line for %1: [%2]\n" @@ -1633,7 +1633,7 @@ void RclMain::startNativeViewer(Rcl::Doc doc) } // Get rid of the command name. lcmd is now argv[1...n] - lcmd.pop_front(); + lcmd.erase(lcmd.begin()); // Substitute %xx inside arguments string efftime; @@ -1658,7 +1658,7 @@ void RclMain::startNativeViewer(Rcl::Doc doc) subs[it->first] = it->second; } string ncmd; - for (list::iterator it = lcmd.begin(); + for (vector::iterator it = lcmd.begin(); it != lcmd.end(); it++) { pcSubst(*it, ncmd, subs); LOGDEB(("%s->%s\n", it->c_str(), ncmd.c_str())); diff --git a/src/qtgui/rtitool.cpp b/src/qtgui/rtitool.cpp index 3c96051b..6cede59e 100644 --- a/src/qtgui/rtitool.cpp +++ b/src/qtgui/rtitool.cpp @@ -125,7 +125,7 @@ void RTIToolW::accept() if (nowCB->isChecked()) { ExecCmd cmd; - list args; + vector args; int status; args.push_back("-m"); diff --git a/src/utils/ecrontab.cpp b/src/utils/ecrontab.cpp index fbe16183..1b147ed2 100644 --- a/src/utils/ecrontab.cpp +++ b/src/utils/ecrontab.cpp @@ -29,7 +29,7 @@ static bool eCrontabGetLines(vector& lines) { string crontab; ExecCmd croncmd; - list args; + vector args; int status; // Retrieve current crontab contents. An error here means that no @@ -51,7 +51,7 @@ static bool eCrontabWriteFile(const vector& lines, string& reason) { string crontab; ExecCmd croncmd; - list args; + vector args; int status; for (vector::const_iterator it = lines.begin(); diff --git a/src/utils/execmd.cpp b/src/utils/execmd.cpp index 326c9852..9885fcda 100644 --- a/src/utils/execmd.cpp +++ b/src/utils/execmd.cpp @@ -32,7 +32,6 @@ #include #endif -#include #include #include #include @@ -173,12 +172,12 @@ ExecCmd::~ExecCmd() ExecCmdRsrc(this); } -int ExecCmd::startExec(const string &cmd, const list& args, +int ExecCmd::startExec(const string &cmd, const vector& args, bool has_input, bool has_output) { { // Debug and logging string command = cmd + " "; - for (list::const_iterator it = args.begin();it != args.end(); + for (vector::const_iterator it = args.begin();it != args.end(); it++) { command += "{" + *it + "} "; } @@ -314,7 +313,7 @@ private: }; -int ExecCmd::doexec(const string &cmd, const list& args, +int ExecCmd::doexec(const string &cmd, const vector& args, const string *input, string *output) { @@ -505,7 +504,7 @@ bool ExecCmd::maybereap(int *status) // In child process. Set up pipes, environment, and exec command. // This must not return. exit() on error. -void ExecCmd::dochild(const string &cmd, const list& args, +void ExecCmd::dochild(const string &cmd, const vector& args, bool has_input, bool has_output) { // Start our own process group @@ -581,7 +580,7 @@ void ExecCmd::dochild(const string &cmd, const list& args, // Fill up argv argv[0] = cmd.c_str(); int i = 1; - list::const_iterator it; + vector::const_iterator it; for (it = args.begin(); it != args.end(); it++) { argv[i++] = it->c_str(); } @@ -684,7 +683,7 @@ void ReExec::reexec() #include #include #include -#include +#include #include "debuglog.h" #include "cancelcheck.h" @@ -781,7 +780,7 @@ int main(int argc, char *argv[]) Usage(); string cmd = *argv++; argc--; - list l; + vector l; while (argc > 0) { l.push_back(*argv++); argc--; } diff --git a/src/utils/execmd.h b/src/utils/execmd.h index e56c0579..6694d320 100644 --- a/src/utils/execmd.h +++ b/src/utils/execmd.h @@ -18,11 +18,9 @@ #define _EXECMD_H_INCLUDED_ #include #include -#include #include #include #ifndef NO_NAMESPACES -using std::list; using std::string; using std::vector; using std::stack; @@ -119,12 +117,12 @@ class ExecCmd { * * @param cmd the program to execute. This must be an absolute file name * or exist in the PATH. - * @param args the argument list (NOT including argv[0]). + * @param args the argument vector (NOT including argv[0]). * @param input Input to send TO the command. * @param output Output FROM the command. * @return the exec ouput status (0 if ok), or -1 */ - int doexec(const string &cmd, const list& args, + int doexec(const string &cmd, const vector& args, const string *input = 0, string *output = 0); @@ -132,7 +130,7 @@ class ExecCmd { * The next four methods can be used when a Q/A dialog needs to be * performed with the command */ - int startExec(const string &cmd, const list& args, + int startExec(const string &cmd, const vector& args, bool has_input, bool has_output); int send(const string& data); int receive(string& data, int cnt = -1); @@ -202,7 +200,7 @@ class ExecCmd { sigemptyset(&m_blkcld); } // Child process code - void dochild(const string &cmd, const list& args, + void dochild(const string &cmd, const vector& args, bool has_input, bool has_output); /* Copyconst and assignment private and forbidden */ ExecCmd(const ExecCmd &) {} diff --git a/src/utils/rclionice.cpp b/src/utils/rclionice.cpp index c5a01bb2..9fdfd2c8 100644 --- a/src/utils/rclionice.cpp +++ b/src/utils/rclionice.cpp @@ -29,7 +29,7 @@ bool rclionice(const string& clss, const string& cdata) LOGDEB0(("rclionice: ionice not found\n")); return false; } - list args; + vector args; args.push_back("-c"); args.push_back(clss); diff --git a/src/utils/utf8iter.cpp b/src/utils/utf8iter.cpp index e01ed7c0..8a2d17f5 100644 --- a/src/utils/utf8iter.cpp +++ b/src/utils/utf8iter.cpp @@ -19,7 +19,6 @@ #include #include -#include #include