From 53564f2b98df47720fe8dad0ee6301ca858f6cc1 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 28 Jul 2026 19:43:25 +0200 Subject: [PATCH] switch to Unix line endings --- src/frontend/com_wr_ic.c | 142 +++++++++++++++++++-------------------- src/frontend/com_wr_ic.h | 22 +++--- 2 files changed, 82 insertions(+), 82 deletions(-) diff --git a/src/frontend/com_wr_ic.c b/src/frontend/com_wr_ic.c index db9ebf1b5..7fa173bfd 100644 --- a/src/frontend/com_wr_ic.c +++ b/src/frontend/com_wr_ic.c @@ -1,71 +1,71 @@ -/* ngspice file - Copyright Holger Vogt 2021 - License: BSD 3-clause - */ - - /* Print the current node status to a file with format - .ic V(node) = value - */ - -#include "ngspice/ngspice.h" -#include "ngspice/cpdefs.h" -#include "ngspice/ftedefs.h" -#include "ngspice/ftedev.h" -#include "ngspice/ftedebug.h" -#include "ngspice/cktdefs.h" - -void com_wric(wordlist* wl); - - /* Print the current node status to a file with format - .ic V(node) = value - during a transient simulation which has been stopped, - by command 'stop' and which may continue by 'resume'. - */ -void -com_wric(wordlist* wl) { - - CKTnode* node; - CKTcircuit* ckt = NULL; - FILE* fp; - char* file; - - if (wl) - file = wl->wl_word; - else - file = "dot_ic_out.txt"; - - if (!ft_curckt) { - fprintf(cp_err, "Error: there aren't any circuits loaded.\n"); - return; - } - else if (ft_curckt->ci_ckt == NULL) { /* Set noparse? */ - fprintf(cp_err, "Error: circuit not parsed.\n"); - return; - } - - ckt = ft_curckt->ci_ckt; - - if (!ckt->CKTrhsOld) { - fprintf(stderr, "\nWarning: Command wrnodev is ignored!\n"); - fprintf(stderr, " You need to execute stop ... tran ... resume\n\n"); - return; - } - - if ((fp = fopen(file, "w")) == NULL) { - perror(file); - return; - } - - fprintf(fp, "* Intermediate Transient Solution\n"); - fprintf(fp, "* Circuit: %s\n", ft_curckt->ci_name); - fprintf(fp, "* Recorded at simulation time: %g\n", ckt->CKTtime); - for (node = ckt->CKTnodes->next; node; node = node->next) { - if (!strstr(node->name, "#branch") && !strchr(node->name, '#')) - fprintf(fp, ".ic v(%s) = %g\n", node->name, - ckt->CKTrhsOld[node->number]); - } - - fprintf(stdout, "\nNode data saved to file %s\n", file); - - fclose(fp); -} +/* ngspice file + Copyright Holger Vogt 2021 + License: BSD 3-clause + */ + + /* Print the current node status to a file with format + .ic V(node) = value + */ + +#include "ngspice/ngspice.h" +#include "ngspice/cpdefs.h" +#include "ngspice/ftedefs.h" +#include "ngspice/ftedev.h" +#include "ngspice/ftedebug.h" +#include "ngspice/cktdefs.h" + +void com_wric(wordlist* wl); + + /* Print the current node status to a file with format + .ic V(node) = value + during a transient simulation which has been stopped, + by command 'stop' and which may continue by 'resume'. + */ +void +com_wric(wordlist* wl) { + + CKTnode* node; + CKTcircuit* ckt = NULL; + FILE* fp; + char* file; + + if (wl) + file = wl->wl_word; + else + file = "dot_ic_out.txt"; + + if (!ft_curckt) { + fprintf(cp_err, "Error: there aren't any circuits loaded.\n"); + return; + } + else if (ft_curckt->ci_ckt == NULL) { /* Set noparse? */ + fprintf(cp_err, "Error: circuit not parsed.\n"); + return; + } + + ckt = ft_curckt->ci_ckt; + + if (!ckt->CKTrhsOld) { + fprintf(stderr, "\nWarning: Command wrnodev is ignored!\n"); + fprintf(stderr, " You need to execute stop ... tran ... resume\n\n"); + return; + } + + if ((fp = fopen(file, "w")) == NULL) { + perror(file); + return; + } + + fprintf(fp, "* Intermediate Transient Solution\n"); + fprintf(fp, "* Circuit: %s\n", ft_curckt->ci_name); + fprintf(fp, "* Recorded at simulation time: %g\n", ckt->CKTtime); + for (node = ckt->CKTnodes->next; node; node = node->next) { + if (!strstr(node->name, "#branch") && !strchr(node->name, '#')) + fprintf(fp, ".ic v(%s) = %g\n", node->name, + ckt->CKTrhsOld[node->number]); + } + + fprintf(stdout, "\nNode data saved to file %s\n", file); + + fclose(fp); +} diff --git a/src/frontend/com_wr_ic.h b/src/frontend/com_wr_ic.h index 36b01d7e4..546ece75d 100644 --- a/src/frontend/com_wr_ic.h +++ b/src/frontend/com_wr_ic.h @@ -1,11 +1,11 @@ -/* ngspice file - Copyright Holger Vogt 2021 - License: BSD 3-clause - */ - - - /* Print the current node status to a file with format - .ic V(node) = value - */ -extern void -com_wric(wordlist* wl); +/* ngspice file + Copyright Holger Vogt 2021 + License: BSD 3-clause + */ + + + /* Print the current node status to a file with format + .ic V(node) = value + */ +extern void +com_wric(wordlist* wl);