Browse Source

command completion, more comments

pre-master-46
h_vogt 17 years ago
parent
commit
9eb855b802
  1. 16
      src/frontend/cpitf.c
  2. 10
      src/main.c

16
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++) {

10
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... */

Loading…
Cancel
Save