Exemple #1
0
void
action_output(const char *fmt, ...)
{
	va_list args;

	va_start(args, fmt);
	(void) vsnprintf(vmsgbuf, sizeof(vmsgbuf), fmt, args);
	va_end(args);
	if (sms_redirect()) {
		sms_info("%s", vmsgbuf);
		return;
	} else {
#if !defined(WC3270) /*[*/
		FILE *aout;
#endif /*]*/

#if defined(C3270) /*[*/
		any_error_output = True;
		screen_suspend();
# if defined(WC3270) /*[*/
		pager_output(vmsgbuf);
# else /*][*/
		aout = start_pager();
# endif /*]*/
#else /*][*/
		aout = stdout;
#endif /*]*/
#if !defined(WC3270) /*[*/
		(void) fprintf(aout, "%s\n", vmsgbuf);
#endif /*]*/
		macro_output = True;
	}
}
Exemple #2
0
/* Pop up an error dialog. */
void
popup_an_error(const char *fmt, ...)
{
	va_list args;

	va_start(args, fmt);
	(void) vsnprintf(vmsgbuf, sizeof(vmsgbuf), fmt, args);
	va_end(args);

	/* Log to the trace file. */
	trace_dsn("%s\n", vmsgbuf);

	if (sms_redirect()) {
		sms_error(vmsgbuf);
		return;
	} else {
#if defined(C3270) /*[*/
		screen_suspend();
		any_error_output = True;
#endif /*]*/
		(void) fprintf(stderr, "%s\n", vmsgbuf);
		fflush(stderr);
		macro_output = True;
	}
}
Exemple #3
0
void
action_output(const char *fmt, ...)
{
    va_list args;
    char *s;

    va_start(args, fmt);
    s = xs_vbuffer(fmt, args);
    va_end(args);
    if (sms_redirect()) {
	sms_info("%s", s);
    } else {
	if (!glue_gui_output(s)) {
	    (void) printf("%s\n", s);
	}
	any_error_output = true;
	macro_output = true;
    }
    Free(s);
}
Exemple #4
0
/* Pop up an error dialog. */
void
popup_an_error(const char *fmt, ...)
{
    va_list args;
    char *s;

    va_start(args, fmt);
    s = xs_vbuffer(fmt, args);
    va_end(args);

    /* Log to the trace file. */
    vtrace("%s\n", s);

    if (sms_redirect()) {
	sms_error(s);
    } else {
	screen_suspend();
	(void) fprintf(stderr, "%s\n", s);
	fflush(stderr);
	any_error_output = true;
	macro_output = true;
    }
    Free(s);
}