view lib-src/leditcfns.c @ 22136:bc8c7f59c064

(byte-compile-insert-header): Do not look for multibyte characters here. Generate the right file header for use if there are none. Insert a line of semicolons for subsequent deletion if needed. (byte-compile-fix-header): New function. This updates the file header if the file uses multibyte characters. (byte-compile-from-buffer): Call byte-compile-insert-header before compiling, and byte-compile-fix-header at the end.
author Richard M. Stallman <rms@gnu.org>
date Tue, 19 May 1998 02:59:42 +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);
    }