diff options
-rw-r--r-- | libguile/Makefile.in | 10 | ||||
-rw-r--r-- | libguile/filesys.c | 18 | ||||
-rw-r--r-- | libguile/filesys.h | 2 | ||||
-rw-r--r-- | libguile/init.c | 2 |
4 files changed, 21 insertions, 11 deletions
diff --git a/libguile/Makefile.in b/libguile/Makefile.in index 08f026483..294eb9cc4 100644 --- a/libguile/Makefile.in +++ b/libguile/Makefile.in @@ -93,7 +93,6 @@ libobjs= alist.o \ extchrs.o \ fdsocket.o \ feature.o \ - files.o \ filesys.o \ fports.o \ gc.o \ @@ -170,7 +169,6 @@ inner_h_files= __scm.h \ extchrs.h \ fdsocket.h \ feature.h \ - files.h \ filesys.h \ fports.h \ gc.h \ @@ -244,7 +242,6 @@ c_files= alist.c \ extchrs.c \ fdsocket.c \ feature.c \ - files.c \ filesys.c \ fports.c \ gc.c \ @@ -314,7 +311,6 @@ gen_c_files= alist.x \ extchrs.x \ fdsocket.x \ feature.x \ - files.x \ filesys.x \ fports.x \ gc.x \ @@ -559,10 +555,6 @@ feature.o: feature.c _scm.h __scm.h scmconfig.h \ tags.h error.h __scm.h pairs.h list.h gc.h \ marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \ strings.h vectors.h root.h ports.h async.h feature.h feature.x -files.o: files.c _scm.h __scm.h scmconfig.h \ - tags.h error.h __scm.h pairs.h list.h gc.h \ - marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \ - strings.h vectors.h root.h ports.h async.h files.h files.x filesys.o: filesys.c _scm.h __scm.h scmconfig.h \ tags.h error.h __scm.h pairs.h list.h gc.h \ marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \ @@ -612,7 +604,7 @@ init.o: init.c _scm.h __scm.h scmconfig.h \ marksweep.h gsubr.h procs.h numbers.h symbols.h boolean.h \ strings.h vectors.h root.h ports.h async.h alist.h append.h \ arbiters.h chars.h continuations.h debug.h options.h \ - dynwind.h eq.h eval.h fdsocket.h feature.h files.h filesys.h fports.h \ + dynwind.h eq.h eval.h fdsocket.h feature.h filesys.h fports.h \ ports.h gdbint.h hash.h hashtab.h ioext.h kw.h load.h \ mallocs.h mbstrings.h symbols.h objprop.h options.h \ posix.h print.h procprop.h ramap.h read.h scmsigs.h sequences.h \ diff --git a/libguile/filesys.c b/libguile/filesys.c index c3184d912..ec60d0089 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -689,6 +689,24 @@ scm_sys_rename (oldname, newname) } +SCM_PROC(s_sys_delete_file, "delete-file", 1, 0, 0, scm_sys_delete_file); +#ifdef __STDC__ +SCM +scm_sys_delete_file (SCM str) +#else +SCM +scm_sys_delete_file (str) + SCM str; +#endif +{ + int ans; + SCM_ASSERT (SCM_NIMP (str) && SCM_STRINGP (str), str, SCM_ARG1, s_sys_delete_file); + SCM_SYSCALL (ans = unlink (SCM_CHARS (str))); + if (ans != 0) + SCM_SYSERROR (s_sys_delete_file); + return SCM_UNSPECIFIED; +} + SCM_PROC (s_sys_mkdir, "mkdir", 1, 1, 0, scm_sys_mkdir); #ifdef __STDC__ diff --git a/libguile/filesys.h b/libguile/filesys.h index f59b6ff0f..9dce3ae81 100644 --- a/libguile/filesys.h +++ b/libguile/filesys.h @@ -85,6 +85,7 @@ extern SCM scm_sys_dup (SCM oldfd, SCM newfd); extern SCM scm_sys_stat (SCM fd_or_path); extern SCM scm_sys_link (SCM oldpath, SCM newpath); extern SCM scm_sys_rename (SCM oldname, SCM newname); +extern SCM scm_sys_delete_file (SCM str); extern SCM scm_sys_mkdir (SCM path, SCM mode); extern SCM scm_sys_rmdir (SCM path); extern SCM scm_sys_opendir (SCM dirname); @@ -115,6 +116,7 @@ extern SCM scm_sys_dup (); extern SCM scm_sys_stat (); extern SCM scm_sys_link (); extern SCM scm_sys_rename (); +extern SCM scm_sys_delete_file (); extern SCM scm_sys_mkdir (); extern SCM scm_sys_rmdir (); extern SCM scm_sys_opendir (); diff --git a/libguile/init.c b/libguile/init.c index ebd0f31fa..cb34057f1 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -60,7 +60,6 @@ #include "eval.h" #include "fdsocket.h" #include "feature.h" -#include "files.h" #include "filesys.h" #include "fports.h" #include "gc.h" @@ -367,7 +366,6 @@ scm_boot_guile (result, argc, argv, in, out, err, init_func, boot_cmd) scm_init_error (); scm_init_fdsocket (); scm_init_fports (); - scm_init_files (); scm_init_filesys (); scm_init_gc (); scm_init_gdbint (); |