view lib-src/leditcfns.c @ 5008:0f979427b6ac

(INTERRUPT_INPUT): Undefined. (BROKEN_FIONREAD): Defined to work around a problem in DGUX whereby emacs will stop on a background write when invoked from a job control shell for the first time in a session. (FIRST_PTY_LETTER): Undefined. (PTY_ITERATION, PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF): Defined to use all the available PTYs in a COFF environment. (LINKER): Removed "-nostdlib" from to be compatible with a prior mod removing "/lib/crt0.o" from the LIBS_SYSTEM define. (LIBS_SYSTEM): Delete /lib/crt0.o. (SYSTEM_MALLOC): Turned off. (NO_TERMIO): Defined. (BROKEN_FASYNC): Turned off.
author Richard M. Stallman <rms@gnu.org>
date Sun, 14 Nov 1993 22:06:13 +0000
parents da530eb93c1a
children 695cf19ef79e
line wrap: on
line source

#include <sgtty.h>
#include <signal.h>
#define STRLEN 100
static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */

switch_to_proc(){
    char *ptr = str;
    while (*ptr) ioctl(0, TIOCSTI, ptr++);
    ioctl(0, TIOCSTI, "\n");
    kill(getpid(), SIGTSTP);
    }

set_proc_str(ptr) char *ptr; {
    if (strlen(ptr) <= STRLEN)
	strcpy(str, ptr);
    else
	printf("string too long for set-proc-str: %s\n", ptr);
    }