// create the .txt file in tmp_dir if this filetype is requested
if (fl_get_button(fd_form_sendto->radio_ftype_ascii))
buffer->writeFileAscii(fname, lyxrc.ascii_linelen);
- Systemcalls one(Systemcalls::Wait, command);
+ Systemcalls one;
+ one.startscript(Systemcalls::Wait, command);
}
extern string user_lyxdir; // home of *Files.lst
+
ControlTexinfo::ControlTexinfo(LyXView & lv, Dialogs & d)
: ControlDialogBI(lv, d)
{
d_.showTexinfo.connect(SigC::slot(this, &ControlTexinfo::show));
}
+
// build filelists of all availabe bst/cls/sty-files. done through
// kpsewhich and an external script, saved in *Files.lst
void ControlTexinfo::rescanStyles() const
{
// Run rescan in user lyx directory
Path p(user_lyxdir);
- Systemcalls one(Systemcalls::Wait,
+ Systemcalls one;
+ one.startscript(Systemcalls::Wait,
LibFileSearch("scripts", "TeXFiles.sh"));
p.pop();
}
Path p(user_lyxdir);
//path to texhash through system
- Systemcalls one(Systemcalls::Wait, "texhash");
+ Systemcalls one;
+ one.startscript(Systemcalls::Wait, "texhash");
+
p.pop();
// Alert::alert(_("texhash run!"),
// _("rebuilding of the TeX-tree could only be successfull"),
// Run configure in user lyx directory
Path p(user_lyxdir);
- Systemcalls one(Systemcalls::Wait,
+ Systemcalls one;
+ one.startscript(Systemcalls::Wait,
AddName(system_lyxdir, "configure"));
p.pop();
bv->owner()->message(_("Reloading configuration..."));
string outfile = lyx::tempName(string(), "mathextern");
string full = "echo '" + data + "' | (" + cmd + ") > " + outfile;
lyxerr << "calling: " << full << "\n";
- Systemcalls dummy(Systemcalls::Wait, full);
+ Systemcalls dummy;
+ dummy.startscript(Systemcalls::Wait, full);
string out = GetFileContents(outfile);
lyx::unlink(outfile);
lyxerr << "result: '" << out << "'\n";
/// check for zipped file
-bool zippedFile(string const & name) {
+bool zippedFile(string const & name)
+{
string const type = getExtFromContents(name);
- if (contains("gzip zip compress",type) && !type.empty())
- return true;
+ if (contains("gzip zip compress", type) && !type.empty())
+ return true;
return false;
}
+
string const unzipFile(string const & zipped_file)
{
- string const file = ChangeExtension(zipped_file, string());
- string const tempfile = lyx::tempName(string(), file);
- // Run gunzip
- string const command = "gunzip -c "+zipped_file+" > "+tempfile;
- Systemcalls one(Systemcalls::Wait, command);
- // test that command was executed successfully
- return tempfile;
+ string const file = ChangeExtension(zipped_file, string());
+ string const tempfile = lyx::tempName(string(), file);
+ // Run gunzip
+ string const command = "gunzip -c " + zipped_file + " > " + tempfile;
+ Systemcalls one;
+ one.startscript(Systemcalls::Wait, command);
+ // test that command was executed successfully (anon)
+ // yes, please do. (Lgb)
+ return tempfile;
}
#include "syscall.h"
#include "os.h"
+
+#if 0
Systemcalls::Systemcalls(Starttype how, string const & what)
{
startscript(how, what);
}
+#endif
// Reuse of instance
///
Systemcalls() {}
-
+
+#if 0
/** Generate instance and start child process.
* The string "what" contains a commandline with arguments separated
* by spaces.
*/
Systemcalls(Starttype how, string const & what);
-
+#endif
+
/** Start child process.
* This is for reuse of the Systemcalls instance.
*/