]> git.lyx.org Git - lyx.git/commitdiff
remove the syscall constructor, adjust other code
authorLars Gullik Bjønnes <larsbj@gullik.org>
Sat, 16 Feb 2002 18:34:30 +0000 (18:34 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Sat, 16 Feb 2002 18:34:30 +0000 (18:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3555 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXSendto.C
src/frontends/controllers/ControlTexinfo.C
src/lyx_cb.C
src/mathed/formula.C
src/support/filetools.C
src/support/syscall.C
src/support/syscall.h

index fba1db3682251366334b1800bba9aaeb1cd16e07..e7fcebc4b55510d49294fe86ed9e840dbf3438d3 100644 (file)
@@ -95,7 +95,8 @@ void SendtoApplyCB(FL_OBJECT *, long)
     // 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);    
 }
 
 
index 9a266a985fcce976627c0647f4e567c091f62cfa..0166eee2a297980fa173e0440707237e79a2c451 100644 (file)
 
 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();
 }
@@ -56,7 +59,9 @@ void ControlTexinfo::runTexhash() const
        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"),
index da4a2717d25f66b00521d0a62fb7882167f1645e..f32d2cb03a79fe4ed38bb7db47ad23fc01315a11 100644 (file)
@@ -537,7 +537,8 @@ void Reconfigure(BufferView * bv)
 
        // 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..."));
index 121bef4c55cb09c843d8799cdaff851aa9c87504..e2b609de654728af63ccee3c954966a5441a339b 100644 (file)
@@ -60,7 +60,8 @@ namespace {
                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";
index c8b405d6bbe5bcc2ca7f4de55c1e0cc6656336ac..cc78a772bfb0dff279c2f4d51ed95e90f1cb0be5 100644 (file)
@@ -1043,22 +1043,26 @@ string const getExtFromContents(string const & filename) {
 
 
 /// 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;
 }
 
 
index 9a9e1ecc547b8b1dbef0b9e8aebf8933d8d26b48..35b09df93facd6c12ac077bea890c771fbf8f9e0 100644 (file)
 #include "syscall.h"
 #include "os.h"
 
+
+#if 0
 Systemcalls::Systemcalls(Starttype how, string const & what)
 {
        startscript(how, what);
 }
+#endif
 
 
 // Reuse of instance
index 598fbc13dc15191324560fa1b44afb87dafccfe4..64bcab242c4241a25368552a7898192f68dda39c 100644 (file)
@@ -38,13 +38,15 @@ public:
        
        ///
        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.
         */