view lib-src/leditcfns.c @ 58391:4252820dfd91

(calc-curve-nvars, calc-curve-varnames, calc-curve-model) (calc-curve-coefnames): New variable. (calc-curve-fit, calc-get-fit-variables): Replace variables nvars, varnames, model and coefnames by declared variables. (math-root-widen): New variable. (math-search-root, math-find-root): Replace variable root-widen by declared variable. (var-DUMMY): Declare it. (math-root-vars, math-min-vars): Move the declarations to earlier in the file. (math-brent-min): Make d a local variable. (math-find-minimum): Replace non-existent variable. (math-ninteg-romberg): Remove unnecessary variable. (math-ninteg-temp): New variable. (math-ninteg-romberg, math-ninteg-midpoint): Replace variable integ-temp by declared variable. (math-fit-first-var, math-fit-first-coef, math-fit-new-coefs): New variables. (math-general-fit): Replace variables first-var, first-coef and new-coefs by declared variables. (calcFunc-fitvar): Replace variable first-var by declared variable. (calcFunc-fitparam): Replace variable first-coef by declared variable. (calcFunc-fitdummy): Replace variable new-coefs by declared variable. (math-all-vars-vars, math-all-vars-found): New variables. (math-all-vars-in, math-all-vars-rec): Replace variables vars and found by declared variable math-all-vars-vars.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 21 Nov 2004 05:55:43 +0000
parents 695cf19ef79e
children 375f2633d815
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);
    }

/* arch-tag: eb7ae804-0d6e-4077-ab42-7173821410c3
   (do not change this comment) */