view lib-src/leditcfns.c @ 20034:674d7beabce0

(__tb): Define. (restore_parent_vm_title): New function. (ms_windows_version): New function. (w95_set_virtual_machine_title): New function (x_set_title): New function. (dos_cleanup): New function (syms_of_dosfns): Define `dos-windows-version' Lisp variable. (init_dosfns): Compute MS-Windows version and save the original title of our DOS box.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 13 Oct 1997 16:21:52 +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);
    }