Initial git import
[sxemacs] / lib-src / leditcfns.c
1 /* Synched up with: FSF 19.28. */
2
3 #include <sgtty.h>
4 #include <signal.h>
5 #define STRLEN 100
6 static char str[STRLEN + 1] = "%?emacs";        /* extra char for the null */
7
8 switch_to_proc()
9 {
10         char *ptr = str;
11         while (*ptr)
12                 ioctl(0, TIOCSTI, ptr++);
13         ioctl(0, TIOCSTI, "\n");
14         kill(getpid(), SIGTSTP);
15 }
16
17 set_proc_str(ptr)
18 char *ptr;
19 {
20         if (strlen(ptr) <= STRLEN)
21                 strcpy(str, ptr);
22         else
23                 printf("string too long for set-proc-str: %s\n", ptr);
24 }