Mercurial > hg > xemacs-beta
view lib-src/leditcfns.c @ 1265:de6cf052e10b
[xemacs-hg @ 2003-02-07 00:49:41 by ben]
add KKCC tail-recursion
alloc.c: Implement tail-recursion in KKCC when the last-marked object is
a Lisp object, to avoid stack-overflow errors when marking long
lists. Factor out some duplicated error-checking into macros.
author | ben |
---|---|
date | Fri, 07 Feb 2003 00:49:42 +0000 |
parents | 376386a54a3c |
children |
line wrap: on
line source
/* 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); }