/* The following returns static data which is overwritten with each call; it must therefore be used only once in a sprintf, for example. */
static char *RepresentChar(c)
char c;
{
static char ans[20];
if (c == '\015') {
strcpy(ans, "RETURN");
} else if (c <= '\032') {
sprintf(ans, "CTL-%c", c+'A'-1);
} else if (c == '\033') {
strcpy(ans, "ESC");
} else if (c == '\177') {
strcpy(ans, "DELETE/RUBOUT");
} else {
ans[0] = c;
ans[1] = '\0';
}
return(ans);
}
#ifndef AMIGA
#ifdef __hpux
#include <termio.h>
#else
#include <sys/ioctl.h>
#endif
RunCmd(BigBuf)
char *BigBuf;
{
char abort = '\177';
#ifdef __hpux
#define SYSV /* Is this necessary? */
#endif
#ifdef SYSV
struct termio blob;
if (!ioctl(0, TCGETA, &blob)) {
abort = blob.c_cc[VINTR];
}
#else
struct tchars blob;
if (!ioctl(0, TIOCGETC, &blob)) {
abort = blob.t_intrc;
}
#endif
fprintf(stderr, "Now executing the EZ program -- if an EZ window appears, you can quit it by\n holding down the middle mouse button and selecting the 'Quit' menu.\n\nYou can prevent the window from appearing by INTERRUPTING (%s) now,\n in which case you should see a text-only version of the data.\n", RepresentChar(abort));