view lib-src/leditcfns.c @ 39659:4bd383bb2137

(help-mode): Use define-derived-mode. (describe-mode): Add optional `buffer' arg. Use it instead of going through help-xref-mode. Avoid doubling the word `minor' when prettifying. (describe-function-1): List the corresponding key bindings. (describe-variable): Say if the var is automatically buffer-local. If the source is `loaddefs.el', look for the real source. (help-xref-mode): Remove.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 08 Oct 2001 00:19:46 +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);
    }