view lib-src/leditcfns.c @ 15534:7f169dd814ce

(rmail-unix-mail-delimiter): Accept more user names, since they can be mangled badly by modern Unix mailers (e.g. Solaris 2.5 mail.local). Be a little more picky about dates to compensate. Match all the digits of a year, as per RFC 1123 section 5.2.14. (rmail-nuke-pinhead-header): Adjust to regexp renumbering in rmail-unix-mail-delimiter.
author Richard M. Stallman <rms@gnu.org>
date Fri, 28 Jun 1996 07:10:30 +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);
    }