diff lib-src/leditcfns.c @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib-src/leditcfns.c	Mon Aug 13 08:45:50 2007 +0200
@@ -0,0 +1,20 @@
+/* Synched up with: FSF 19.28. */
+
+#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);
+    }