Commit ce558412 authored by Jim Blandy's avatar Jim Blandy
Browse files

entered into RCS

parents
#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);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment