Browse Source

use unlink() instead of remove()

rlar 15 years ago
parent
commit
026a471d51
  1. 7
      ChangeLog
  2. 2
      src/frontend/runcoms.c
  3. 2
      src/frontend/runcoms2.c
  4. 2
      src/main.c

7
ChangeLog

@ -1,3 +1,10 @@
2011-08-21 Robert Larice
* src/main.c ,
* src/frontend/runcoms.c ,
* src/frontend/runcoms2.c :
use unlink() instead of remove()
thanks to Marcel Hendrix
2011-08-20 Robert Larice
* src/spicelib/devices/adms/admst/ngspice.xml :
#7/7 use a subdirectory "ngspice" for includes to create a uniq namespace

2
src/frontend/runcoms.c

@ -343,7 +343,7 @@ dosim(
if (rawfileFp){
if (ftell(rawfileFp)==0) {
(void) fclose(rawfileFp);
(void) remove(wl->wl_word);
(void) unlink(wl->wl_word);
} else {
(void) fclose(rawfileFp);
}

2
src/frontend/runcoms2.c

@ -145,7 +145,7 @@ com_resume(wordlist *wl)
if (rawfileFp){
if (ftell(rawfileFp)==0) {
(void) fclose(rawfileFp);
(void) remove(last_used_rawfile);
(void) unlink(last_used_rawfile);
} else {
(void) fclose(rawfileFp);
}

2
src/main.c

@ -1235,7 +1235,7 @@ main(int argc, char **argv)
}
#if defined(HAS_WINDOWS) || defined(_MSC_VER) || defined(__MINGW32__)
if (tempfile && tpf && remove(tpf))
if (tempfile && tpf && unlink(tpf))
perror("Could not delete temp file");
#endif

Loading…
Cancel
Save