}
textColors[ColorNone].fg = textColors[ColorNone].bg = -1;
textColors[ColorNone].attr = 0;
+ SetTextColor(cnames, textColors[ColorNormal].fg - 30, textColors[ColorNormal].bg - 40, -2); // kludge to announce background color to front-end
}
static Boolean noEcho;
char buf[MSG_SIZ];
int count, outCount, error;
+ SetTextColor(cnames, textColors[(int)cc].fg - 30, textColors[(int)cc].bg - 40, textColors[(int)cc].attr); // for GTK widget
+
if (textColors[(int)cc].bg > 0) {
if (textColors[(int)cc].fg > 0) {
snprintf(buf, MSG_SIZ, "\033[0;%d;%d;%dm", textColors[(int)cc].attr,
return -1;
}
+Boolean stdoutClosed = FALSE;
+
int
OutputToProcess (ProcRef pr, char *message, int count, int *outError)
{
static int line = 0;
ChildProc *cp = (ChildProc *) pr;
- int outCount;
+ int outCount = count;
if (pr == NoProc)
{
- if (appData.noJoin || !appData.useInternalWrap)
- outCount = fwrite(message, 1, count, stdout);
- else
+ if (appData.noJoin || !appData.useInternalWrap) {
+ if(!stdoutClosed) outCount = fwrite(message, 1, count, stdout);
+ } else
{
int width = get_term_width();
int len = wrap(NULL, message, count, width, &line);
free(msg);
}
}
+ if(*message != '\033') ConsoleWrite(message, count);
}
else
outCount = write(cp->fdTo, message, count);