view lib-src/leditcfns.c @ 1401:9689db083f88

(sbrk): Removed decl. (real_morecore): New static variable. (warnlevel, warn_function, check_memory_limits): Removed. (obtain): Don't call check_memory_limits. (obtain, relinquish, r_alloc_sbrk): Use (*real_morecore) in place of sbrk; it returns 0 for errors, not -1. (r_alloc_init): Set real_morecore to old value of __morecore. Don't initialize lim_data or warnlevel, and don't call get_lim_data. (memory_warnings): Function removed.
author Roland McGrath <roland@gnu.org>
date Mon, 12 Oct 1992 21:07:25 +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);
    }