From 65b976dab79e5150ff32f7659555fc01697d7981 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Thu, 1 Nov 2012 14:41:13 +0100 Subject: [PATCH] rename commands 'savesnap', 'loadsnap' to 'snsave', 'snload' to avoid conflict with command 'save' --- src/frontend/commands.c | 6 +++--- src/frontend/spiceif.c | 11 ++++++----- src/frontend/spiceif.h | 4 ++-- src/main.c | 4 ++-- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/frontend/commands.c b/src/frontend/commands.c index 5c615b247..86b13909d 100644 --- a/src/frontend/commands.c +++ b/src/frontend/commands.c @@ -86,7 +86,7 @@ #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" @@ -138,11 +138,11 @@ struct comm spcp_coms[] = { { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, arg_set, "[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, NULL, "file : Save a snapshot." } , - { "loadsnap", com_loadsnap, FALSE, TRUE, + { "snload", com_snload, FALSE, TRUE, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 2, 2, NULL, "file : Load a snapshot." } , diff --git a/src/frontend/spiceif.c b/src/frontend/spiceif.c index 3696ebf0d..7a0ca6f3c 100644 --- a/src/frontend/spiceif.c +++ b/src/frontend/spiceif.c @@ -1379,7 +1379,7 @@ if_getstat(CKTcircuit *ckt, char *name) #include "ngspice/trandefs.h" /* arg0: circuit file, arg1: data file */ -void com_loadsnap(wordlist *wl) +void com_snload(wordlist *wl) { int error = 0; FILE *file; @@ -1632,7 +1632,7 @@ void com_loadsnap(wordlist *wl) } -void com_savesnap(wordlist *wl) +void com_snsave(wordlist *wl) { FILE *file; int i, size; @@ -1653,8 +1653,8 @@ void com_savesnap(wordlist *wl) #ifdef XSPICE 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; } #endif @@ -1758,10 +1758,11 @@ void com_savesnap(wordlist *wl) #ifdef XSPICE /* 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->enh, Enh_Ckt_Data_t, 1); #endif fclose(file); + fprintf(stdout, "Snapshot saved to %s.\n", wl->wl_word); } diff --git a/src/frontend/spiceif.h b/src/frontend/spiceif.h index ecd785bd1..01c4e6ef3 100644 --- a/src/frontend/spiceif.h +++ b/src/frontend/spiceif.h @@ -13,7 +13,7 @@ void if_dump(CKTcircuit *ckt, FILE *file); void if_cktfree(CKTcircuit *ckt, INPtables *tab); 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 */ diff --git a/src/main.c b/src/main.c index 1cb692577..e47a7ded3 100644 --- a/src/main.c +++ b/src/main.c @@ -349,8 +349,8 @@ if_getstat(CKTcircuit *ckt, char *name) 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) {