Browse Source

remove the entire file buffer modification which was never come in effect

Take over this task to the OS which will handle this properly.
pre-master-46
dwarning 8 years ago
committed by Holger Vogt
parent
commit
42d29ef49f
  1. 3
      src/frontend/runcoms.c
  2. 5
      src/frontend/runcoms2.c

3
src/frontend/runcoms.c

@ -45,8 +45,6 @@ extern struct dbcomm *dbs;
FILE *rawfileFp; FILE *rawfileFp;
bool rawfileBinary; bool rawfileBinary;
#define RAWBUF_SIZE 32768
char rawfileBuf[RAWBUF_SIZE];
/*To tell resume the rawfile name saj*/ /*To tell resume the rawfile name saj*/
char *last_used_rawfile = NULL; char *last_used_rawfile = NULL;
/*end saj */ /*end saj */
@ -286,7 +284,6 @@ dosim(
ft_setflag = FALSE; ft_setflag = FALSE;
return 1; return 1;
} }
setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE);
#endif /* __MINGW32__ */ #endif /* __MINGW32__ */
rawfileBinary = !ascii; rawfileBinary = !ascii;
} else { } else {

5
src/frontend/runcoms2.c

@ -27,8 +27,6 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/inpdefs.h" #include "ngspice/inpdefs.h"
#define RAWBUF_SIZE 32768
extern char rawfileBuf[RAWBUF_SIZE];
extern void line_free_x(struct card *deck, bool recurse); extern void line_free_x(struct card *deck, bool recurse);
extern INPmodel *modtab; extern INPmodel *modtab;
@ -114,14 +112,12 @@ com_resume(wordlist *wl)
ft_setflag = FALSE; ft_setflag = FALSE;
return; return;
} }
setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE);
} else if (!ascii) { } else if (!ascii) {
if ((rawfileFp = fopen(last_used_rawfile, "ab")) == NULL) { if ((rawfileFp = fopen(last_used_rawfile, "ab")) == NULL) {
perror(last_used_rawfile); perror(last_used_rawfile);
ft_setflag = FALSE; ft_setflag = FALSE;
return; return;
} }
setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#else #else
@ -130,7 +126,6 @@ com_resume(wordlist *wl)
ft_setflag = FALSE; ft_setflag = FALSE;
return; return;
} }
setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE);
#endif #endif
rawfileBinary = !ascii; rawfileBinary = !ascii;
} else { } else {

Loading…
Cancel
Save