command completion, more comments

This commit is contained in:
h_vogt 2009-08-15 11:47:05 +00:00
parent ae4db4fe25
commit 9eb855b802
2 changed files with 18 additions and 8 deletions

View File

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

View File

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