view lib-src/leditcfns.c @ 2920:c47652dc3400

Some time-handling patches from Paul Eggert: * calendar.el (calendar-current-time-zone): New function. (calendar-time-zone, calendar-standard-time-zone-name, calendar-daylight-time-zone-name): Use it instead of current-time-zone. * sendmail.el (mail-do-fcc): Use the same absolute time for both current-time-string and current-time-zone. Adjust to new format returned by current-time-zone.
author Jim Blandy <jimb@redhat.com>
date Thu, 20 May 1993 06:28:46 +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);
    }