view lib-src/leditcfns.c @ 17241:d5cbb3a06adc libc-970325 libc-970326 libc-970327 libc-970328 libc-970329 libc-970330 libc-970331 libc-970401 libc-970402 libc-970403 libc-970404 libc-970405 libc-970406 libc-970407 libc-970408 libc-970409 libc-970410 libc-970411

(m32r,mn10300): Add.
author Doug Evans <dje@gnu.org>
date Mon, 24 Mar 1997 20:38:28 +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);
    }