view lib-src/leditcfns.c @ 1914:60965a5c325f

* data.c (Fstring_to_number): Skip initial spaces, to make Emacs lisp parse consistently on different operating systems. #include <ctype.h> to help with this. * data.c (Fstring_to_int): Rename this to Fstring_to_number, since it parses floats as well as integers. Fix docstring. (syms_of_data): Fix defsubr. (wrong_type_argument): Change use. (Fint_to_string): Doc fix. * lisp.h (Fstring_to_int): Change extern declaration. * data.c (wrong_type_argument): Pass the correct number of arguments to Fstring_to_int. * data.c (arithcompare): Add a default case which aborts, just to make me happy.
author Jim Blandy <jimb@redhat.com>
date Mon, 22 Feb 1993 14:27:14 +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);
    }