Browse Source

rename commands 'savesnap', 'loadsnap' to 'snsave', 'snload'

to avoid conflict with command 'save'
pre-master-46
h_vogt 14 years ago
parent
commit
65b976dab7
  1. 6
      src/frontend/commands.c
  2. 11
      src/frontend/spiceif.c
  3. 4
      src/frontend/spiceif.h
  4. 4
      src/main.c

6
src/frontend/commands.c

@ -86,7 +86,7 @@
#include "arg.h" #include "arg.h"
#include "spiceif.h" /* for com_loadsnap() and com_savesnap() */
#include "spiceif.h" /* for com_snload() and com_snsave() */
#include "com_dl.h" #include "com_dl.h"
@ -138,11 +138,11 @@ struct comm spcp_coms[] = {
{ 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS,
arg_set, arg_set,
"[option] [option = value] ... : Set a simulator option." } , "[option] [option = value] ... : Set a simulator option." } ,
{ "savesnap", com_savesnap, FALSE, TRUE,
{ "snsave", com_snsave, FALSE, TRUE,
{ 1, 040000, 040000, 040000 }, E_DEFHMASK, 1, 1, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 1, 1,
NULL, NULL,
"file : Save a snapshot." } , "file : Save a snapshot." } ,
{ "loadsnap", com_loadsnap, FALSE, TRUE,
{ "snload", com_snload, FALSE, TRUE,
{ 1, 040000, 040000, 040000 }, E_DEFHMASK, 2, 2, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 2, 2,
NULL, NULL,
"file : Load a snapshot." } , "file : Load a snapshot." } ,

11
src/frontend/spiceif.c

@ -1379,7 +1379,7 @@ if_getstat(CKTcircuit *ckt, char *name)
#include "ngspice/trandefs.h" #include "ngspice/trandefs.h"
/* arg0: circuit file, arg1: data file */ /* arg0: circuit file, arg1: data file */
void com_loadsnap(wordlist *wl)
void com_snload(wordlist *wl)
{ {
int error = 0; int error = 0;
FILE *file; FILE *file;
@ -1632,7 +1632,7 @@ void com_loadsnap(wordlist *wl)
} }
void com_savesnap(wordlist *wl)
void com_snsave(wordlist *wl)
{ {
FILE *file; FILE *file;
int i, size; int i, size;
@ -1653,8 +1653,8 @@ void com_savesnap(wordlist *wl)
#ifdef XSPICE #ifdef XSPICE
if (ckt->CKTadevFlag == 1) { if (ckt->CKTadevFlag == 1) {
fprintf(cp_err, "Warning: savesnap not implemented for XSPICE A devices.\n");
fprintf(cp_err, " Command 'savesnap' will be ingnored!\n");
fprintf(cp_err, "Warning: snsave not implemented for XSPICE A devices.\n");
fprintf(cp_err, " Command 'snsave' will be ingnored!\n");
return; return;
} }
#endif #endif
@ -1758,10 +1758,11 @@ void com_savesnap(wordlist *wl)
#ifdef XSPICE #ifdef XSPICE
/* FIXME struct ckt->evt->data and others are not stored /* FIXME struct ckt->evt->data and others are not stored
thus savesnap, loadsnap not compatible with XSPICE code models*/
thus snsave, snload not compatible with XSPICE code models*/
_foo(ckt->evt, Evt_Ckt_Data_t, 1); _foo(ckt->evt, Evt_Ckt_Data_t, 1);
_foo(ckt->enh, Enh_Ckt_Data_t, 1); _foo(ckt->enh, Enh_Ckt_Data_t, 1);
#endif #endif
fclose(file); fclose(file);
fprintf(stdout, "Snapshot saved to %s.\n", wl->wl_word);
} }

4
src/frontend/spiceif.h

@ -13,7 +13,7 @@ void if_dump(CKTcircuit *ckt, FILE *file);
void if_cktfree(CKTcircuit *ckt, INPtables *tab); void if_cktfree(CKTcircuit *ckt, INPtables *tab);
int if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm); int if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm);
void com_loadsnap(wordlist *wl);
void com_savesnap(wordlist *wl);
void com_snload(wordlist *wl);
void com_snsave(wordlist *wl);
#endif /* SPICEIF_H_INCLUDED */ #endif /* SPICEIF_H_INCLUDED */

4
src/main.c

@ -349,8 +349,8 @@ if_getstat(CKTcircuit *ckt, char *name)
return (NULL); return (NULL);
} }
void com_loadsnap(wordlist *wl) { NG_IGNORE(wl); }
void com_savesnap(wordlist *wl) { NG_IGNORE(wl); }
void com_snload(wordlist *wl) { NG_IGNORE(wl); }
void com_snsave(wordlist *wl) { NG_IGNORE(wl); }
void SMPprint( SMPmatrix *n1 , char *n2) void SMPprint( SMPmatrix *n1 , char *n2)
{ {

Loading…
Cancel
Save