Synching my tree with cvs.

I'm committing all the little, but uncontroversial, changes that have
built up in my tree. This will result in an almost total recompilation for
you all but will mean that things are less painfull when the other changes
go in!

* Rename files syscall.[Ch] as systemcall.[Ch].

* Rename class Systemcalls as class Systemcall as one instance of the class
  represents a single child process. Remove the default constructor too.

* Add a running() method to class Timeout. Results in recompilation of almost
  the entire tree because pretty well everything depends on LyXView.h which
  #includes "frontends/Timeout.h", so...

* Make the Timeout instances in classes LyXView and minibuffer pointers,
  allowing us to forward declare class Timeout.

* Add LFUN_FORKS_SHOW and LFUN_FORKS_KILL to commandtags.h in anticipation
  of something wonderful!

* Add a signal showForks to Dialogs.h, again anticipating some real code.

* wrap the structs firster, seconder in frontends/controllers/helper_funcs.h
  in a namespace to prevent a clash with similarly named structs in
  support/lyxalgo.h

As you see, lots of irritating bits and pieces which don't make much sense in
themselves but do in light of the other changes I've got here.

I'll post the big changes to the list for proper perusal.

Angus


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3566 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-02-18 19:13:48 +00:00
parent 834cd64152
commit d0a3af12d9
36 changed files with 226 additions and 116 deletions

View File

@ -1,3 +1,31 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* Chktex.C:
* LaTeX.C:
* LyXSendto.C:
* converter.C:
* lyx_cb.C:
* vc-backend.C: Changes due to the renaming of support/syscall.[Ch] as
support/systemcall.[Ch] and of class Systemcalls as class SystemCall.
* lyxfunc.C:
* vc-backend.h: remove #include "support/syscall.h"
* LaTeX.C:
* LyXSendto.C:
* converter.C: rearrange #includes in Lars' approved fashion.
* LyXView.[Ch]: make autosave_timeout a pointer to Timeout. Can thus
forward declare class Timeout in the header file.
* XFormsView.C: changes due to the above.
* minibuffer.[Ch]: make timer and stored_timer pointers to Timeout,
similar to LyXView.
* commandtags.h: add LFUN_FORKS_SHOW and LFUN_FORKS_KILL to the enum.
* LyXAction.C (init): add LFUN_FORKS_SHOW and LFUN_FORKS_KILL to items[]
2002-02-18 José Matos <jamatos@fep.up.pt>
* buffer.C (simpleDocBookOnePar): if paragraph style is CDATA escapes
@ -15,7 +43,7 @@
* Chktex.C:
* buffer.C:
remove #include "support/syscall.h" as it's redundant. Always has been.
remove #include "support/syscontr.h" as it's redundant. Always has been.
* Chktex.C:
* LaTeX.C:

View File

@ -25,7 +25,7 @@
#include "support/FileInfo.h"
#include "support/filetools.h"
#include "support/syscall.h"
#include "support/systemcall.h"
#include "support/path.h"
#include "support/lstrings.h"
@ -49,8 +49,8 @@ int Chktex::run(TeXErrors &terr)
// run bibtex
string log = OnlyFilename(ChangeExtension(file, ".log"));
string tmp = cmd + " -q -v0 -b0 -x " + file + " -o " + log;
Systemcalls one;
int result= one.startscript(Systemcalls::Wait, tmp);
Systemcall one;
int result= one.startscript(Systemcall::Wait, tmp);
if (result == 0) {
result = scanLogFile(terr);
} else {

View File

@ -19,20 +19,20 @@
#include <fstream>
#include "LaTeX.h"
#include "support/filetools.h"
#include "support/os.h"
#include "support/FileInfo.h"
#include "debug.h"
#include "support/lyxlib.h"
#include "support/syscall.h"
#include "support/path.h"
#include "support/LRegex.h"
#include "support/LSubstring.h"
#include "support/lstrings.h"
#include "bufferlist.h"
#include "gettext.h"
#include "lyx_gui_misc.h"
#include "lyxfunc.h"
#include "debug.h"
#include "support/filetools.h"
#include "support/FileInfo.h"
#include "support/LRegex.h"
#include "support/LSubstring.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
#include "support/systemcall.h"
#include "support/os.h"
#include "support/path.h"
using std::ifstream;
using std::getline;
@ -358,8 +358,8 @@ int LaTeX::operator()()
#else // cmd.exe (OS/2) causes SYS0003 error at "/dev/null"
string tmp = cmd + ' ' + file + " > nul";
#endif
Systemcalls one;
return one.startscript(Systemcalls::Wait, tmp);
Systemcall one;
return one.startscript(Systemcall::Wait, tmp);
}
@ -375,8 +375,8 @@ bool LaTeX::runMakeIndex(string const & f)
// to come for a later time. (0.13 perhaps?)
string tmp = "makeindex -c -q ";
tmp += f;
Systemcalls one;
one.startscript(Systemcalls::Wait, tmp);
Systemcall one;
one.startscript(Systemcall::Wait, tmp);
return true;
}
@ -506,8 +506,8 @@ bool LaTeX::runBibTeX(vector<Aux_Info> const & bibtex_info)
string tmp = "bibtex ";
tmp += OnlyFilename(ChangeExtension(it->aux_file, string()));
Systemcalls one;
one.startscript(Systemcalls::Wait, tmp);
Systemcall one;
one.startscript(Systemcall::Wait, tmp);
}
// Return whether bibtex was run
return result;

View File

@ -434,6 +434,10 @@ void LyXAction::init()
N_("Display information about LyX"), NoBuffer },
{ LFUN_HELP_TEXINFO, "help-Texinfo",
N_("Display information about the TeX installation"), NoBuffer },
{ LFUN_FORKS_SHOW, "show-forks",
N_("Show the processes forked by LyX"), NoBuffer },
{ LFUN_FORKS_KILL, "kill-forks",
N_("Kill the forked process with this PID"), NoBuffer },
{ LFUN_NOACTION, "", "", Noop }
};

View File

@ -5,17 +5,18 @@
#include "lyx_main.h"
#include "lyxrc.h"
#include "LString.h"
#include "support/filetools.h"
#include "support/path.h"
#include "buffer.h"
#include "lyx_gui_misc.h"
#include "support/syscall.h"
#include "support/lstrings.h"
#include "gettext.h"
#include "bufferview_funcs.h"
#include "exporter.h"
#include "BufferView.h"
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/path.h"
#include "support/systemcall.h"
extern FD_form_sendto * fd_form_sendto;
extern BufferView * current_view;
extern int MakeLaTeXOutput(Buffer * buffer);
@ -95,8 +96,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;
one.startscript(Systemcalls::Wait, command);
Systemcall one;
one.startscript(Systemcall::Wait, command);
}

View File

@ -31,6 +31,7 @@
#include "frontends/Dialogs.h"
#include "frontends/Toolbar.h"
#include "frontends/Timeout.h"
#include "frontends/Menubar.h"
#include "support/filetools.h" // OnlyFilename()
@ -54,6 +55,9 @@ LyXView::LyXView()
intl = new Intl;
// Give the timeout some default sensible value.
autosave_timeout = new Timeout(5000);
dialogs_ = new Dialogs(this);
// temporary until all dialogs moved into Dialogs.
dialogs_->updateBufferDependent
@ -73,6 +77,7 @@ LyXView::~LyXView()
delete minibuffer;
delete lyxfunc;
delete intl;
delete autosave_timeout;
delete dialogs_;
}
@ -180,7 +185,7 @@ void LyXView::AutoSave()
void LyXView::resetAutosaveTimer()
{
if (lyxrc.autosave)
autosave_timeout.restart();
autosave_timeout->restart();
}

View File

@ -11,7 +11,6 @@
#include <sigc++/signal_system.h>
#include "LString.h"
#include "frontends/Timeout.h"
#include "support/types.h"
class Buffer;
@ -23,6 +22,7 @@ class Menubar;
class BufferView;
class Dialogs;
class LyXFunc;
class Timeout;
///
class LyXView : public SigC::Object, boost::noncopyable {
@ -112,7 +112,7 @@ protected:
///
Intl * intl;
///
Timeout autosave_timeout;
Timeout * autosave_timeout;
/// A callback
void AutoSave();
///

View File

@ -26,6 +26,7 @@
#include "support/filetools.h" // OnlyFilename()
#include "frontends/Toolbar.h"
#include "frontends/Menubar.h"
#include "frontends/Timeout.h"
#include "MenuBackend.h"
#include "ToolbarDefaults.h"
#include "lyxfunc.h"
@ -164,7 +165,7 @@ void XFormsView::create_form_form_main(int width, int height)
// TIMERS
//
autosave_timeout.timeout.connect(SigC::slot(this, &XFormsView::AutoSave));
autosave_timeout->timeout.connect(SigC::slot(this, &XFormsView::AutoSave));
//
// Misc
@ -204,8 +205,8 @@ void XFormsView::init()
// Start autosave timer
if (lyxrc.autosave) {
autosave_timeout.setTimeout(lyxrc.autosave * 1000);
autosave_timeout.start();
autosave_timeout->setTimeout(lyxrc.autosave * 1000);
autosave_timeout->start();
}
intl->InitKeyMapper(lyxrc.use_kbmap);

View File

@ -297,6 +297,8 @@ enum kb_action {
LFUN_HELP_ABOUTLYX, // Edwin 20010712
LFUN_THESAURUS_ENTRY, // Levon 20010720
LFUN_HELP_TEXINFO, // Herbert 20011001
LFUN_FORKS_SHOW, // Angus 16 Feb 2002
LFUN_FORKS_KILL, // Angus 16 Feb 2002
LFUN_LASTACTION /* this marks the end of the table */
};

View File

@ -18,21 +18,23 @@
#include "converter.h"
#include "lyxrc.h"
#include "support/syscall.h"
#include "support/path.h"
#include "support/filetools.h"
#include "buffer.h"
#include "bufferview_funcs.h"
#include "LaTeX.h"
#include "LyXView.h"
#include "lyx_gui_misc.h"
#include "lyx_cb.h" // ShowMessage()
#include "support/lyxfunctional.h"
#include "frontends/Alert.h"
#include "gettext.h"
#include "BufferView.h"
#include "debug.h"
#include "frontends/Alert.h"
#include "support/filetools.h"
#include "support/lyxfunctional.h"
#include "support/path.h"
#include "support/systemcall.h"
using std::vector;
using std::queue;
using std::endl;
@ -195,8 +197,8 @@ bool Formats::view(Buffer const * buffer, string const & filename,
ShowMessage(buffer, _("Executing command:"), command);
Path p(OnlyPath(filename));
Systemcalls one;
int const res = one.startscript(Systemcalls::DontWait, command);
Systemcall one;
int const res = one.startscript(Systemcall::DontWait, command);
if (res) {
Alert::alert(_("Cannot view file"),
@ -644,9 +646,9 @@ bool Converters::convert(Buffer const * buffer,
if (buffer)
ShowMessage(buffer, _("Executing command:"), command);
Systemcalls::Starttype type = (dummy)
? Systemcalls::DontWait : Systemcalls::Wait;
Systemcalls one;
Systemcall::Starttype type = (dummy)
? Systemcall::DontWait : Systemcall::Wait;
Systemcall one;
int res;
if (conv.original_dir && buffer) {
Path p(buffer->filePath());
@ -659,7 +661,7 @@ bool Converters::convert(Buffer const * buffer,
string const command2 = conv.parselog +
" < " + QuoteName(infile2 + ".out") +
" > " + QuoteName(logfile);
one.startscript(Systemcalls::Wait, command2);
one.startscript(Systemcall::Wait, command2);
if (!scanLog(buffer, command, logfile))
return false;
}

View File

@ -1,3 +1,14 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* Liason.C: Changes due to the renaming of support/syscall.[Ch] as
support/systemcall.[Ch] and of class Systemcalls as class SystemCall.
Rearrange #includes in Lars' approved fashion.
* Timeout.[Ch] (running): new method.
(default c-tor): removed.
* Dialogs.h: added a new signal, showForks.
2002-02-16 Angus Leeming <a.leeming@ic.ac.uk>
* Liason.C:

View File

@ -109,6 +109,8 @@ public:
SigC::Signal1<void, InsetExternal *> showExternal;
/// show the contents of a file.
SigC::Signal1<void, string const &> showFile;
/// show all forked child processes
SigC::Signal0<void> showForks;
///
SigC::Signal1<void, InsetGraphics *> showGraphics;
/// show the details of a LyX file include inset

View File

@ -15,19 +15,21 @@
#endif
#include "Liason.h"
#include "lyxrc.h"
#include "PrinterParams.h"
#include "LyXView.h"
#include "BufferView.h"
#include "buffer.h"
#include "lyxrc.h"
#include "PrinterParams.h"
#include "exporter.h"
#include "converter.h"
#include "lyx_gui_misc.h"
#include "support/LAssert.h"
#include "support/lstrings.h"
#include "support/filetools.h"
#include "support/path.h"
#include "exporter.h"
#include "converter.h"
#include "support/syscall.h"
#include "support/systemcall.h"
using std::endl;
@ -116,7 +118,7 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
// 1. we print to a file
// 2. we print direct to a printer
// 3. we print using a spool command (print to file first)
Systemcalls one;
Systemcall one;
int res = 0;
string dviname = ChangeExtension(buffer->getLatexName(true), "dvi");
switch (pp.target) {
@ -134,13 +136,13 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
command2 += QuoteName(psname);
// First run dvips.
// If successful, then spool command
res = one.startscript(Systemcalls::Wait, command);
res = one.startscript(Systemcall::Wait, command);
if (res == 0)
res = one.startscript(Systemcalls::DontWait,
res = one.startscript(Systemcall::DontWait,
command2);
} else
// case 2
res = one.startscript(Systemcalls::DontWait,
res = one.startscript(Systemcall::DontWait,
command + QuoteName(dviname));
break;
@ -149,7 +151,7 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
command += lyxrc.print_to_file
+ QuoteName(MakeAbsPath(pp.file_name, path));
command += ' ' + QuoteName(dviname);
res = one.startscript(Systemcalls::DontWait, command);
res = one.startscript(Systemcall::DontWait, command);
break;
}
return res == 0;

View File

@ -17,12 +17,6 @@
#include "Timeout_pimpl.h"
Timeout::Timeout()
: type(ONETIME), timeout_ms(0)
{
pimpl_ = new Pimpl(this);
}
Timeout::Timeout(unsigned int msec, Type t)
: type(t), timeout_ms(msec)
@ -38,6 +32,12 @@ Timeout::~Timeout()
}
bool Timeout::running() const
{
return pimpl_->running();
}
void Timeout::start()
{
pimpl_->start();

View File

@ -29,11 +29,11 @@ public:
CONTINUOUS
};
///
Timeout();
///
Timeout(unsigned int msec, Type = ONETIME);
///
~Timeout();
/// Is the timer running?
bool running() const;
/// start the timer
void start();
/// stop the timer

View File

@ -1,3 +1,11 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* helper_funcs.h: wrap the structs firster and seconder up in a
namespace to avoid clashes with those in lyxalgo,h.
* ControlTexinfo.C Changes due to the renaming of support/syscall.[Ch]
as support/systemcall.[Ch] and of class Systemcalls as class SystemCall.
2002-02-16 Angus Leeming <a.leeming@ic.ac.uk>
* ControlGraphics.C: remove #include "support/syscall.h" as it's not

View File

@ -25,7 +25,7 @@
#include "BufferView.h"
#include "gettext.h"
#include "support/filetools.h" // FileSearch
#include "support/syscall.h"
#include "support/systemcall.h"
#include "support/path.h"
#include "helper_funcs.h"
#include "support/lstrings.h"
@ -46,8 +46,8 @@ void ControlTexinfo::rescanStyles() const
{
// Run rescan in user lyx directory
Path p(user_lyxdir);
Systemcalls one;
one.startscript(Systemcalls::Wait,
Systemcall one;
one.startscript(Systemcall::Wait,
LibFileSearch("scripts", "TeXFiles.sh"));
p.pop();
}
@ -59,8 +59,8 @@ void ControlTexinfo::runTexhash() const
Path p(user_lyxdir);
//path to texhash through system
Systemcalls one;
one.startscript(Systemcalls::Wait, "texhash");
Systemcall one;
one.startscript(Systemcall::Wait, "texhash");
p.pop();
// Alert::alert(_("texhash run!"),

View File

@ -68,6 +68,8 @@ std::vector<string> const getLatexUnits();
vector<pair<A,B> >
*/
namespace hide {
template<class Pair>
struct firster {
typedef typename Pair::first_type first_type;
@ -79,6 +81,8 @@ struct seconder {
typedef typename Pair::second_type second_type;
second_type const & operator()(Pair const & p) { return p.second; }
};
}
///
template<class Pair>
@ -86,7 +90,8 @@ std::vector<typename Pair::first_type> const
getFirst(std::vector<Pair> const & pr)
{
std::vector<typename Pair::first_type> tmp(pr.size());
std::transform(pr.begin(), pr.end(), tmp.begin(), firster<Pair>());
std::transform(pr.begin(), pr.end(), tmp.begin(),
hide::firster<Pair>());
return tmp;
}
@ -96,7 +101,8 @@ std::vector<typename Pair::second_type> const
getSecond(std::vector<Pair> const & pr)
{
std::vector<typename Pair::second_type> tmp(pr.size());
std::transform(pr.begin(), pr.end(), tmp.begin(), seconder<Pair>());
std::transform(pr.begin(), pr.end(), tmp.begin(),
hide::seconder<Pair>());
return tmp;
}

View File

@ -1,3 +1,7 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* Timeout_pimpl.[Ch] (running): new method.
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* FormParagraph.C:

View File

@ -48,6 +48,12 @@ void Timeout::Pimpl::reset()
}
bool Timeout::Pimpl::running() const
{
return timeout_id != -1;
}
void Timeout::Pimpl::start()
{
if (timeout_id != -1)

View File

@ -26,6 +26,8 @@ struct Timeout::Pimpl {
public:
///
Pimpl(Timeout * owner_);
/// Is the timer running?
bool running() const;
/// start the timer
void start();
/// stop the timer

View File

@ -1,3 +1,8 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* insetexternal.C Changes due to the renaming of support/syscall.[Ch]
as support/systemcall.[Ch] and of class Systemcalls as class SystemCall.
2002-02-18 José Matos <jamatos@fep.up.pt>
* insetinclude.C (validate): some code only applies to latex buffers,

View File

@ -29,7 +29,7 @@
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/path.h"
#include "support/syscall.h"
#include "support/systemcall.h"
#include "support/FileInfo.h"
#include <cstdio>
@ -220,12 +220,12 @@ void InsetExternal::executeCommand(string const & s,
Buffer const * buffer) const
{
Path p(buffer->filePath());
Systemcalls one;
Systemcall one;
if (lyxerr.debugging()) {
lyxerr << "Executing '" << s << "' in '"
<< buffer->filePath() << "'" << endl;
}
one.startscript(Systemcalls::Wait, s);
one.startscript(Systemcall::Wait, s);
}

View File

@ -33,7 +33,7 @@
#include "support/FileInfo.h"
#include "support/filetools.h"
#include "support/path.h"
#include "support/syscall.h"
#include "support/systemcall.h"
#include "support/lstrings.h"
#include <fstream>
@ -537,8 +537,8 @@ void Reconfigure(BufferView * bv)
// Run configure in user lyx directory
Path p(user_lyxdir);
Systemcalls one;
one.startscript(Systemcalls::Wait,
Systemcall one;
one.startscript(Systemcall::Wait,
AddName(system_lyxdir, "configure"));
p.pop();
bv->owner()->message(_("Reloading configuration..."));

View File

@ -88,7 +88,6 @@
#include "support/LAssert.h"
#include "support/filetools.h"
#include "support/FileInfo.h"
#include "support/syscall.h"
#include "support/lstrings.h"
#include "support/path.h"
#include "support/lyxfunctional.h"

View File

@ -1,3 +1,8 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* formula.C Changes due to the renaming of support/syscall.[Ch]
as support/systemcall.[Ch] and of class Systemcalls as class SystemCall.
2002-02-16 Angus Leeming <a.leeming@ic.ac.uk>
* formula.C: change Systemcalls::System to Systemcalls::Wait and

View File

@ -34,7 +34,7 @@
#include "support/LOstream.h"
#include "support/LAssert.h"
#include "support/lyxlib.h"
#include "support/syscall.h"
#include "support/systemcall.h"
#include "support/lstrings.h"
#include "support/filetools.h" // LibFileSearch
#include "LyXView.h"
@ -60,8 +60,8 @@ namespace {
string outfile = lyx::tempName(string(), "mathextern");
string full = "echo '" + data + "' | (" + cmd + ") > " + outfile;
lyxerr << "calling: " << full << "\n";
Systemcalls dummy;
dummy.startscript(Systemcalls::Wait, full);
Systemcall dummy;
dummy.startscript(Systemcall::Wait, full);
string out = GetFileContents(outfile);
lyx::unlink(outfile);
lyxerr << "result: '" << out << "'\n";

View File

@ -31,6 +31,7 @@
#include "gettext.h"
#include "LyXAction.h"
#include "BufferView.h"
#include "frontends/Timeout.h"
#include <cctype>
@ -61,10 +62,12 @@ MiniBuffer::MiniBuffer(LyXView * o, FL_Coord x, FL_Coord y,
: stored_(false), owner_(o), state_(spaces)
{
add(FL_NORMAL_INPUT, x, y, h, w);
timer.setTimeout(6000);
timer.timeout.connect(slot(this, &MiniBuffer::init));
stored_timer.setTimeout(1500);
stored_timer.timeout.connect(slot(this, &MiniBuffer::stored_slot));
timer = new Timeout(600);
timer->timeout.connect(slot(this, &MiniBuffer::init));
stored_timer = new Timeout(1500);
stored_timer->timeout.connect(slot(this, &MiniBuffer::stored_slot));
deactivate();
}
@ -80,6 +83,8 @@ void MiniBuffer::dd_init()
MiniBuffer::~MiniBuffer()
{
delete timer;
delete stored_timer;
delete dropdown_;
}
@ -97,7 +102,7 @@ void MiniBuffer::stored_set(string const & str)
{
stored_input = str;
stored_ = true;
stored_timer.start();
stored_timer->start();
}
@ -112,7 +117,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, int key)
char const * tmp = fl_get_input(ob);
string input = tmp ? tmp : "";
if (stored_) {
stored_timer.stop();
stored_timer->stop();
input = stored_input;
set_input(input);
stored_ = false;
@ -315,7 +320,7 @@ FL_OBJECT * MiniBuffer::add(int type, FL_Coord x, FL_Coord y,
void MiniBuffer::message(string const & str)
{
timer.restart();
timer->restart();
string const ntext = strip(str);
if (!the_buffer->focus) {
set_input(ntext);
@ -366,7 +371,7 @@ void MiniBuffer::init()
return;
timeout.emit();
timer.stop();
timer->stop();
}

View File

@ -7,7 +7,6 @@
#include FORMS_H_LOCATION
#include "LString.h"
#include "frontends/Timeout.h"
#ifdef __GNUG__
#pragma interface
@ -15,6 +14,7 @@
class LyXView;
class DropDown;
class Timeout;
///
class MiniBuffer : public SigC::Object {
@ -95,9 +95,9 @@ private:
///
FL_OBJECT * add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
///
Timeout timer;
Timeout * timer;
///
Timeout stored_timer;
Timeout * stored_timer;
/// the dropdown menu
DropDown * dropdown_;
///

View File

@ -1,3 +1,12 @@
2002-02-18 Angus Leeming <a.leeming@ic.ac.uk>
* syscall.[Ch]: renamed as systemcall.[Ch]. class Systemcalls renamed
as class SystemCall because one Systemcall instance represents a
single child process.
* filetools.C:
* Makefile.am: associated changes.
2002-02-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* syscall.C (Systemcalls): include <cstdlib>

View File

@ -63,8 +63,8 @@ libsupport_o_SOURCES = \
snprintf.h \
snprintf.c \
sstream.h \
$(REGEX) syscall.C \
syscall.h \
$(REGEX) systemcall.C \
systemcall.h \
tempname.C \
textutils.h \
translator.h \

View File

@ -33,7 +33,7 @@
#include <cerrno>
#include "debug.h"
#include "support/lstrings.h"
#include "support/syscall.h"
#include "support/systemcall.h"
#include "filetools.h"
#include "LSubstring.h"
@ -1061,8 +1061,8 @@ string const unzipFile(string const & zipped_file)
string const tempfile = lyx::tempName(string(), file);
// Run gunzip
string const command = "gunzip -c " + zipped_file + " > " + tempfile;
Systemcalls one;
one.startscript(Systemcalls::Wait, command);
Systemcall one;
one.startscript(Systemcall::Wait, command);
// test that command was executed successfully (anon)
// yes, please do. (Lgb)
return tempfile;

View File

@ -1,5 +1,5 @@
/**
* \file syscall.C
* \file systemcall.C
* Copyright 2002 the LyX Team
* Read the file COPYING
*
@ -8,7 +8,7 @@
* Interface cleaned up by
* \author Angus Leeming <a.leeming@ic.ac.uk>
*
* Class Systemcalls uses "system" to launch the child process.
* Class Systemcall uses "system" to launch the child process.
* The user can choose to wait or not wait for the process to complete, but no
* callback is invoked upon completion of the child.
*
@ -22,13 +22,14 @@
#pragma implementation
#endif
#include <cstdlib> //for ::system
#include "syscall.h"
#include "systemcall.h"
#include "os.h"
#include <cstdlib> //for ::system
#if 0
Systemcalls::Systemcalls(Starttype how, string const & what)
Systemcall::Systemcall(Starttype how, string const & what)
{
startscript(how, what);
}
@ -36,7 +37,7 @@ Systemcalls::Systemcalls(Starttype how, string const & what)
// Reuse of instance
int Systemcalls::startscript(Starttype how, string const & what)
int Systemcall::startscript(Starttype how, string const & what)
{
string command = what;

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
/**
* \file syscall.h
* \file systemcall.h
* Copyright 2002 the LyX Team
* Read the file COPYING
*
@ -9,7 +9,9 @@
* Interface cleaned up by
* \author Angus Leeming <a.leeming@ic.ac.uk>
*
* Class Systemcalls uses "system" to launch the child process.
* An instance of Class Systemcall represents a single child process.
*
* Class Systemcall uses system() to launch the child process.
* The user can choose to wait or not wait for the process to complete, but no
* callback is invoked upon completion of the child.
*
@ -17,8 +19,8 @@
* scope.
*/
#ifndef SYSCALL_H
#define SYSCALL_H
#ifndef SYSTEMCALL_H
#define SYSTEMCALL_H
#include "LString.h"
@ -26,7 +28,7 @@
#pragma interface
#endif
class Systemcalls {
class Systemcall {
public:
///
enum Starttype {
@ -36,21 +38,22 @@ public:
DontWait
};
///
Systemcalls() {}
#if 0
///
Systemcall() {}
/** Generate instance and start child process.
* The string "what" contains a commandline with arguments separated
* by spaces.
*/
Systemcalls(Starttype how, string const & what);
Systemcall(Starttype how, string const & what);
#endif
/** Start child process.
* This is for reuse of the Systemcalls instance.
* The string "what" contains a commandline with arguments separated
* by spaces.
*/
int startscript(Starttype how, string const & what);
};
#endif // SYSCALL_H
#endif // SYSTEMCALL_H

View File

@ -17,7 +17,7 @@
#include "support/path.h"
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/syscall.h"
#include "support/systemcall.h"
#include <fstream>
@ -28,9 +28,9 @@ using std::getline;
int VCS::doVCCommand(string const & cmd, string const & path)
{
lyxerr[Debug::LYXVC] << "doVCCommand: " << cmd << endl;
Systemcalls one;
Systemcall one;
Path p(path);
int const ret = one.startscript(Systemcalls::Wait, cmd);
int const ret = one.startscript(Systemcall::Wait, cmd);
return ret;
}

View File

@ -8,7 +8,6 @@
#endif
#include "LString.h"
#include "support/syscall.h"
class Buffer;