From 42d29ef49fa0aaaf746d2ec2e5c2b3e3da32947a Mon Sep 17 00:00:00 2001 From: dwarning Date: Wed, 31 Oct 2018 08:23:56 +0100 Subject: [PATCH] remove the entire file buffer modification which was never come in effect Take over this task to the OS which will handle this properly. --- src/frontend/runcoms.c | 3 --- src/frontend/runcoms2.c | 5 ----- 2 files changed, 8 deletions(-) diff --git a/src/frontend/runcoms.c b/src/frontend/runcoms.c index 5b748a6cb..1e7bdc67d 100644 --- a/src/frontend/runcoms.c +++ b/src/frontend/runcoms.c @@ -45,8 +45,6 @@ extern struct dbcomm *dbs; FILE *rawfileFp; bool rawfileBinary; -#define RAWBUF_SIZE 32768 -char rawfileBuf[RAWBUF_SIZE]; /*To tell resume the rawfile name saj*/ char *last_used_rawfile = NULL; /*end saj */ @@ -286,7 +284,6 @@ dosim( ft_setflag = FALSE; return 1; } - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); #endif /* __MINGW32__ */ rawfileBinary = !ascii; } else { diff --git a/src/frontend/runcoms2.c b/src/frontend/runcoms2.c index 1a0f63e6e..b04fc06be 100644 --- a/src/frontend/runcoms2.c +++ b/src/frontend/runcoms2.c @@ -27,8 +27,6 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #include "ngspice/inpdefs.h" -#define RAWBUF_SIZE 32768 -extern char rawfileBuf[RAWBUF_SIZE]; extern void line_free_x(struct card *deck, bool recurse); extern INPmodel *modtab; @@ -114,14 +112,12 @@ com_resume(wordlist *wl) ft_setflag = FALSE; return; } - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); } else if (!ascii) { if ((rawfileFp = fopen(last_used_rawfile, "ab")) == NULL) { perror(last_used_rawfile); ft_setflag = FALSE; return; } - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); } /*---------------------------------------------------------------------------*/ #else @@ -130,7 +126,6 @@ com_resume(wordlist *wl) ft_setflag = FALSE; return; } - setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); #endif rawfileBinary = !ascii; } else {