view lib-src/leditcfns.c @ 12714:192f537bca2a

(vc-resynch-buffer): New function. (vc-locked-example): Renamed to vc-snapshot-precondition. It now also checks whether any of the files are visited. (vc-retrieve-snapshot): If any files are visited, ask whether to revert their buffers. Use vc-backend-checkout and vc-resynch-buffer to do that, instead of vc-checkout. (vc-backend-checkout): Adjust default-directory so that the checked-out file goes to the right place.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Jul 1995 01:40:43 +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);
    }