Browse Source

white space changes

Francesco Lannutti 14 years ago
parent
commit
fd4c492562
  1. 46
      src/frontend/runcoms.c
  2. 40
      src/frontend/runcoms2.c
  3. 35
      src/spicelib/analysis/cktop.c

46
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;
}

40
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 {

35
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);
}

Loading…
Cancel
Save