mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
Merge branch 'master' of https://github.com/ultimatepp/ultimatepp
This commit is contained in:
commit
f3553f8c51
10 changed files with 42 additions and 14 deletions
|
|
@ -696,7 +696,7 @@ void CodeEditor::SyncTip()
|
|||
Rect wa = GetWorkArea();
|
||||
Point p = Upp::GetMousePos();
|
||||
MouseTip mt;
|
||||
mt.background = SColorInfo();
|
||||
mt.background = Blend(SWhite(), SLtYellow());
|
||||
mt.pos = tippos;
|
||||
mt.sz.cx = min(DPI(1000), 2 * wa.GetWidth() / 3);
|
||||
if(tippos >= 0 && IsVisible() && (WhenTip(mt) || delayed_tip && DelayedTip(mt) && p == delayed_pos)) {
|
||||
|
|
|
|||
|
|
@ -256,12 +256,20 @@ bool LocalProcess::DoStart(const char *command, const Vector<String> *arg, bool
|
|||
LLOG("wpipe[" << wpipe[0] << ", " << wpipe[1] << "]");
|
||||
LLOG("epipe[" << epipe[0] << ", " << epipe[1] << "]");
|
||||
|
||||
#ifdef CPU_BLACKFIN
|
||||
pid = vfork(); //we *can* use vfork here, since exec is done later or the parent will exit
|
||||
#else
|
||||
Vector<const char *> env;
|
||||
if(envptr) { // need to do this while heap is working
|
||||
const char *from = envptr;
|
||||
while(*from) {
|
||||
env.Add(from);
|
||||
from += strlen(from) + 1;
|
||||
}
|
||||
env.Add(NULL);
|
||||
}
|
||||
|
||||
pid = fork();
|
||||
#endif
|
||||
LLOG("\tfork, pid = " << (int)pid << ", getpid = " << (int)getpid());
|
||||
// Warning: other threads are dead after this point, which means heap might be locked
|
||||
|
||||
LLOG("\tfork, pid = " << (int)pid << ", getpid = " << (int)getpid()); // LOGs are iffy because of ^^^^
|
||||
if(pid < 0)
|
||||
return false;
|
||||
// throw Exc(NFormat(t_("fork() error; error code = %d"), errno));
|
||||
|
|
@ -330,12 +338,6 @@ bool LocalProcess::DoStart(const char *command, const Vector<String> *arg, bool
|
|||
|
||||
LLOG("running execve, app = " << app << ", #args = " << args.GetCount());
|
||||
if(envptr) {
|
||||
const char *from = envptr;
|
||||
Vector<const char *> env;
|
||||
while(*from) {
|
||||
env.Add(from);
|
||||
from += strlen(from) + 1;
|
||||
}
|
||||
env.Add(NULL);
|
||||
execve(app_full, args.Begin(), (char *const *)env.Begin());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ void Ide::BeginBuilding(bool clear_console)
|
|||
{
|
||||
SetupDefaultMethod();
|
||||
HdependTimeDirty();
|
||||
Builder::cmdx_cache.Clear();
|
||||
Renumber();
|
||||
StopDebug();
|
||||
ShowConsole();
|
||||
|
|
|
|||
|
|
@ -444,6 +444,7 @@ Vector<String> MakeBuild::GetAllLibraries(const Workspace& wspc, int index,
|
|||
bool MakeBuild::Build(const Workspace& wspc, String mainparam, String outfile, bool clear_console)
|
||||
{
|
||||
InitBlitz();
|
||||
Builder::cmdx_cache.Clear();
|
||||
|
||||
String hfile = outfile + ".xxx";
|
||||
SaveFile(hfile, "");
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ Time Builder::GetFileTime(const String& path) const
|
|||
return GetFileInfo(path);
|
||||
}
|
||||
|
||||
VectorMap<String, String> Builder::cmdx_cache;
|
||||
|
||||
String Builder::CmdX(const char *s)
|
||||
{ // expand ` character delimited sections by executing them as commands
|
||||
String r, cmd;
|
||||
|
|
@ -39,7 +41,15 @@ String Builder::CmdX(const char *s)
|
|||
for(; *s; s++)
|
||||
if(*s == '`') {
|
||||
if(cmdf) {
|
||||
r << Sys(cmd);
|
||||
int q = cmdx_cache.Find(cmd);
|
||||
if(q >= 0)
|
||||
r << cmdx_cache[q];
|
||||
else {
|
||||
String h = Sys(cmd);
|
||||
r << h;
|
||||
cmdx_cache.Add(cmd, h);
|
||||
IdeProcessEvents();
|
||||
}
|
||||
cmd.Clear();
|
||||
}
|
||||
cmdf = !cmdf;
|
||||
|
|
|
|||
|
|
@ -179,6 +179,8 @@ public:
|
|||
virtual bool IdeConsoleWait() = 0;
|
||||
virtual bool IdeConsoleWait(int slot) = 0;
|
||||
virtual void IdeConsoleOnFinish(Event<> cb) = 0;
|
||||
|
||||
virtual void IdeProcessEvents() = 0;
|
||||
|
||||
virtual bool IdeIsDebug() const = 0;
|
||||
virtual void IdeEndDebug() = 0;
|
||||
|
|
@ -243,6 +245,8 @@ bool IdeConsoleWait();
|
|||
bool IdeConsoleWait(int slot);
|
||||
void IdeConsoleOnFinish(Event<> cb);
|
||||
|
||||
void IdeProcessEvents();
|
||||
|
||||
String GetSourcePackage(const String& path);
|
||||
|
||||
String GetDefaultMethod();
|
||||
|
|
@ -576,6 +580,8 @@ struct Builder {
|
|||
Vector<String> Macro;
|
||||
|
||||
VectorMap<String, int> tmpfilei; // for naming automatic response files
|
||||
|
||||
static VectorMap<String, String> cmdx_cache; // caching e.g. pkg-config
|
||||
|
||||
String CmdX(const char *s);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ void PutVerbose(const char *s) { if(the_ide) the_ide->PutVerbose(s); }
|
|||
void PutLinking() { if(the_ide) the_ide->PutLinking(); }
|
||||
void PutLinkingEnd(bool ok) { if(the_ide) the_ide->PutLinkingEnd(ok); }
|
||||
|
||||
void IdeProcessEvents() { if(the_ide) the_ide->IdeProcessEvents(); }
|
||||
|
||||
const Workspace& GetIdeWorkspace()
|
||||
{
|
||||
if(the_ide)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ void Indexer::BuildingPause()
|
|||
|
||||
void Indexer::IndexerThread()
|
||||
{
|
||||
Thread::DumpDiagnostics();
|
||||
// Thread::DumpDiagnostics();
|
||||
while(!Thread::IsShutdownThreads()) {
|
||||
Clang clang;
|
||||
clang_CXIndex_setGlobalOptions(clang.index, CXGlobalOpt_ThreadBackgroundPriorityForIndexing);
|
||||
|
|
|
|||
|
|
@ -399,6 +399,7 @@ public:
|
|||
virtual bool IdeConsoleWait();
|
||||
virtual bool IdeConsoleWait(int slot);
|
||||
virtual void IdeConsoleOnFinish(Event<> cb);
|
||||
virtual void IdeProcessEvents();
|
||||
|
||||
virtual bool IdeIsDebug() const;
|
||||
virtual void IdeEndDebug();
|
||||
|
|
|
|||
|
|
@ -135,6 +135,11 @@ void Ide::IdeConsoleOnFinish(Event<> cb)
|
|||
console.OnFinish(cb);
|
||||
}
|
||||
|
||||
void Ide::IdeProcessEvents()
|
||||
{
|
||||
Ctrl::ProcessEvents();
|
||||
}
|
||||
|
||||
void Ide::IdeSetRight(Ctrl& ctrl)
|
||||
{
|
||||
right.Add(ctrl.SizePos());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue