diff --git a/src/frontend/cpitf.c b/src/frontend/cpitf.c index 2410ccd21..22e88aa33 100644 --- a/src/frontend/cpitf.c +++ b/src/frontend/cpitf.c @@ -1,12 +1,10 @@ /********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group -**********/ +*********** +$Id$ +*/ -/* - * SJB 22 May 2001 - * Corrected freeing of memory in ft_cpinit() - */ #include "ngspice.h" #include "cpdefs.h" @@ -64,10 +62,16 @@ ft_cpinit(void) "vr(x,y)", "re(v(x) - v(y))" } ; - cp_ccon(TRUE); /* So the user can type ahead... */ + /* if TIOCSTI is defined (not available in MS Windows: + Make escape the break character. + So the user can type ahead... + fcn defined in complete.c. */ + cp_ccon(TRUE); /* Initialize io, cp_chars[], variable "history" in init.c. */ cp_init(); + /* If command completion is available (global variable cp_nocc + set in main.c by command line option -q) */ if (!cp_nocc) { /* Add commands... */ for (c = cp_coms; c->co_func; c++) { diff --git a/src/main.c b/src/main.c index 913c863e9..8b9fa25c5 100644 --- a/src/main.c +++ b/src/main.c @@ -900,17 +900,23 @@ main(int argc, char **argv) if ((!iflag && !istty) || ft_servermode) ft_batchmode = TRUE; + /* set command completion */ if ((iflag && !istty) || qflag) + cp_nocc = FALSE; + else cp_nocc = TRUE; if (ft_servermode) readinit = FALSE; if (!istty || ft_batchmode) out_moremode = FALSE; - /* Would like to do this later, but cpinit evals commands */ + /* Get information on memory status upon startup. + Would like to do this later, but cpinit evals commands. + fcn is in resource.c */ init_rlimits( ); - /* Have to initialize cp now. */ + /* Have to initialize cp now. + fcn is in cpitf.c*/ ft_cpinit(); /* To catch interrupts during .spiceinit... */