comments added
This commit is contained in:
parent
b399caf9bc
commit
1dd7a2869f
|
|
@ -1,3 +1,8 @@
|
|||
2009-08-15 Holger Vogt
|
||||
* cpitf.c: MS Windows: search for spinit also in local (ngspice.exe) directory
|
||||
cpextern.h: function parameters added in declaration
|
||||
com_alias.h, init.c, cpitf.c, main.c: comments added
|
||||
|
||||
2009-08-08 Paolo Nenzi
|
||||
* src/frontend/resource.c: applied patch from Thomas D. Dean to remove
|
||||
the limit warning.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*************
|
||||
* Header file for alias.c
|
||||
* Header file for com_alias.c
|
||||
* 1999 E. Rouat
|
||||
************/
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
||||
**********/
|
||||
|
||||
/* Initialize stuff. */
|
||||
/* Initialize io, cp_chars[], variable "history". */
|
||||
|
||||
#include <ngspice.h>
|
||||
#include <cpdefs.h>
|
||||
|
|
@ -12,25 +12,35 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
|||
#include "variable.h"
|
||||
|
||||
|
||||
char cp_chars[128];
|
||||
char cp_chars[128]; /* used in fcn cp_lexer() from lexical.c */
|
||||
|
||||
static char *singlec = "<>;&";
|
||||
|
||||
void
|
||||
cp_init(void)
|
||||
/* called from ft_cpinit() in cpitf.c.
|
||||
Uses global variables:
|
||||
cp_chars[128]
|
||||
cp_maxhistlength (set to 10000 in com_history.c)
|
||||
cp_curin, cp_curout, cp_curerr (defined in streams.c)
|
||||
*/
|
||||
{
|
||||
char *s, *getenv(const char *);
|
||||
char *s;
|
||||
|
||||
bzero(cp_chars, 128);
|
||||
for (s = singlec; *s; s++)
|
||||
/* break word to right or left of characters <>;&*/
|
||||
cp_chars[(int) *s] = (CPC_BRR | CPC_BRL);
|
||||
|
||||
cp_vset("history", VT_NUM, (char *) &cp_maxhistlength);
|
||||
|
||||
cp_curin = stdin;
|
||||
cp_curout = stdout;
|
||||
cp_curerr = stderr;
|
||||
|
||||
cp_ioreset();
|
||||
/* io redirection in streams.c:
|
||||
cp_in set to cp_curin etc. */
|
||||
cp_ioreset();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,16 +15,16 @@ Modified: 2000 AlansFixes
|
|||
#include "bool.h"
|
||||
|
||||
|
||||
/* alias.c */
|
||||
/* com_alias.c */
|
||||
|
||||
extern struct alias *cp_aliases;
|
||||
extern void com_alias();
|
||||
extern void com_unalias();
|
||||
extern void cp_paliases();
|
||||
extern void cp_setalias();
|
||||
extern void cp_unalias();
|
||||
extern void com_alias(wordlist *wl);
|
||||
extern void com_unalias(wordlist *wl);
|
||||
extern void cp_paliases(char *word);
|
||||
extern void cp_setalias(char *word, wordlist *wlist);
|
||||
extern void cp_unalias(char *word);
|
||||
|
||||
extern wordlist *cp_doalias();
|
||||
extern wordlist *cp_doalias(wordlist *wlist);
|
||||
|
||||
/* backquote.c */
|
||||
|
||||
|
|
|
|||
12
src/main.c
12
src/main.c
|
|
@ -95,9 +95,9 @@ bool ft_setflag = FALSE; /* TRUE = Don't abort simulation after an interrupt.
|
|||
char *ft_rawfile = "rawspice.raw";
|
||||
|
||||
#ifdef HAS_WINDOWS
|
||||
extern void winmessage(char* new_msg);
|
||||
extern void winmessage(char* new_msg); /* display a message box */
|
||||
bool oflag = FALSE; /* Output over redefined I/O functions */
|
||||
FILE *flogp; /* hvogt 15.12.2001 */
|
||||
FILE *flogp; /* log file ('-o logfile' command line option) */
|
||||
#endif /* HAS_WINDOWS */
|
||||
|
||||
/* Frontend and circuit options */
|
||||
|
|
@ -107,9 +107,9 @@ IFsimulator *ft_sim = NULL;
|
|||
int ARCHme;
|
||||
int ARCHsize;
|
||||
|
||||
char *errRtn;
|
||||
char *errMsg;
|
||||
char *cp_program;
|
||||
char *errRtn; /* name of the routine declaring error */
|
||||
char *errMsg; /* descriptive message about what went wrong */
|
||||
char *cp_program; /* program name 'ngspice' */
|
||||
|
||||
|
||||
/* Globals definitions for Machine Accuracy Limits
|
||||
|
|
@ -873,7 +873,7 @@ main(int argc, char **argv)
|
|||
fprintf(stdout, "Comments and warnings go to log-file: %s\n\n", buf);
|
||||
/* Open the log file */
|
||||
#ifdef HAS_WINDOWS
|
||||
/* flogp goes to winmain's putc and writes to file buf */
|
||||
/* flogp used by winmain's putc which writes to file 'buf' */
|
||||
if (!(flogp = fopen(buf, "w"))) {
|
||||
#else
|
||||
/* Connect stdout to file buf and log stdout */
|
||||
|
|
|
|||
Loading…
Reference in New Issue