From fd4c49256221f55fb281782b892047587da187af Mon Sep 17 00:00:00 2001 From: Francesco Lannutti Date: Mon, 22 Oct 2012 23:06:25 +0200 Subject: [PATCH] white space changes --- src/frontend/runcoms.c | 46 +++++++++++++++++------------------ src/frontend/runcoms2.c | 40 +++++++++++++++--------------- src/spicelib/analysis/cktop.c | 35 ++++++++++++++------------ 3 files changed, 62 insertions(+), 59 deletions(-) diff --git a/src/frontend/runcoms.c b/src/frontend/runcoms.c index eada360d1..4bcbbd989 100644 --- a/src/frontend/runcoms.c +++ b/src/frontend/runcoms.c @@ -250,36 +250,36 @@ dosim( ft_intrpt = FALSE; /* command "run" is given with rawfile name in wl */ if (dofile) { - if (!*wl->wl_word) - rawfileFp = stdout; + if (!*wl->wl_word) + rawfileFp = stdout; #if defined(__MINGW32__) || defined(_MSC_VER) - /* ask if binary or ASCII, open file with wb or w */ - else if (ascii) { - if ((rawfileFp = fopen(wl->wl_word, "w")) == NULL) { - perror(wl->wl_word); - ft_setflag = FALSE; - return 1; - } - fprintf(cp_out, "ASCII raw file\n"); - } - else if (!ascii) { - if ((rawfileFp = fopen(wl->wl_word, "wb")) == NULL) { - perror(wl->wl_word); - ft_setflag = FALSE; - return 1; - } - fprintf(cp_out, "binary raw file\n"); + /* ask if binary or ASCII, open file with wb or w */ + else if (ascii) { + if ((rawfileFp = fopen(wl->wl_word, "w")) == NULL) { + perror(wl->wl_word); + ft_setflag = FALSE; + return 1; } -/*---------------------------------------------------------------------------*/ -#else - else if (!(rawfileFp = fopen(wl->wl_word, "w"))) { - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); + fprintf(cp_out, "ASCII raw file\n"); + } + else if (!ascii) { + if ((rawfileFp = fopen(wl->wl_word, "wb")) == NULL) { perror(wl->wl_word); ft_setflag = FALSE; return 1; } + fprintf(cp_out, "binary raw file\n"); + } +/*---------------------------------------------------------------------------*/ +#else + else if (!(rawfileFp = fopen(wl->wl_word, "w"))) { + setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); + perror(wl->wl_word); + ft_setflag = FALSE; + return 1; + } #endif /* __MINGW32__ */ - rawfileBinary = !ascii; + rawfileBinary = !ascii; } else { rawfileFp = NULL; } diff --git a/src/frontend/runcoms2.c b/src/frontend/runcoms2.c index 85c671d18..e01e9ac0d 100644 --- a/src/frontend/runcoms2.c +++ b/src/frontend/runcoms2.c @@ -98,33 +98,33 @@ com_resume(wordlist *wl) } if (dofile) { - if (!last_used_rawfile) - rawfileFp = stdout; + if (!last_used_rawfile) + rawfileFp = stdout; #if defined(__MINGW32__) || defined(_MSC_VER) - /* ask if binary or ASCII, open file with w or wb hvogt 15.3.2000 */ - else if (ascii) { - if ((rawfileFp = fopen(last_used_rawfile, "a")) == NULL) { - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); - perror(last_used_rawfile); - ft_setflag = FALSE; - return; - } - } else if (!ascii) { - if ((rawfileFp = fopen(last_used_rawfile, "ab")) == NULL) { - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); - perror(last_used_rawfile); - ft_setflag = FALSE; - return; - } + /* ask if binary or ASCII, open file with w or wb hvogt 15.3.2000 */ + else if (ascii) { + if ((rawfileFp = fopen(last_used_rawfile, "a")) == NULL) { + setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); + perror(last_used_rawfile); + ft_setflag = FALSE; + return; } - /*---------------------------------------------------------------------------*/ -#else - else if (!(rawfileFp = fopen(last_used_rawfile, "a"))) { + } else if (!ascii) { + if ((rawfileFp = fopen(last_used_rawfile, "ab")) == NULL) { setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); perror(last_used_rawfile); ft_setflag = FALSE; return; } + } + /*---------------------------------------------------------------------------*/ +#else + else if (!(rawfileFp = fopen(last_used_rawfile, "a"))) { + setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); + perror(last_used_rawfile); + ft_setflag = FALSE; + return; + } #endif rawfileBinary = !ascii; } else { diff --git a/src/spicelib/analysis/cktop.c b/src/spicelib/analysis/cktop.c index 91d1d993d..904212a6c 100644 --- a/src/spicelib/analysis/cktop.c +++ b/src/spicelib/analysis/cktop.c @@ -93,25 +93,28 @@ ckt->CKTmode = firstmode; int CKTconvTest (CKTcircuit * ckt) { - int i; - int error = OK; + int i; + int error = OK; - for (i = 0; i < DEVmaxnum; i++) + for (i = 0; i < DEVmaxnum; i++) { - if (DEVices[i] && DEVices[i]->DEVconvTest && ckt->CKThead[i]) - { - error = DEVices[i]->DEVconvTest (ckt->CKThead[i], ckt); - } - if (error) - return (error); - if (ckt->CKTnoncon) - { - /* printf("convTest: device %s failed\n", - * DEVices[i]->DEVpublic.name); */ - return (OK); - } + if (DEVices[i] && DEVices[i]->DEVconvTest && ckt->CKThead[i]) + { + error = DEVices[i]->DEVconvTest (ckt->CKThead[i], ckt); + } + + if (error) + return (error); + + if (ckt->CKTnoncon) + { + /* printf("convTest: device %s failed\n", + * DEVices[i]->DEVpublic.name); */ + return (OK); + } } - return (OK); + + return (OK); }