From: Guillermo J. Rozas Date: Mon, 6 Jul 1992 23:42:08 +0000 (+0000) Subject: Add directory-delete primitive. X-Git-Tag: 20090517-FFI~9234 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0d21b41ae38e683785f17cb17d70eeea8823d66d;p=mit-scheme.git Add directory-delete primitive. --- diff --git a/v7/src/microcode/dosfs.c b/v7/src/microcode/dosfs.c index 61bebbae8..6bc353c18 100644 --- a/v7/src/microcode/dosfs.c +++ b/v7/src/microcode/dosfs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/dosfs.c,v 1.1 1992/05/05 06:55:13 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/dosfs.c,v 1.2 1992/07/06 23:42:01 jinx Exp $ Copyright (c) 1992 Massachusetts Institute of Technology @@ -139,6 +139,12 @@ DEFUN (OS_directory_make, (name), CONST char * name) { STD_VOID_SYSTEM_CALL (syscall_mkdir, (DOS_mkdir (name))); } + +void +DEFUN (OS_directory_delete, (name), CONST char * name) +{ + STD_VOID_SYSTEM_CALL (syscall_rmdir, (DOS_rmdir (name))); +} /* This is such that directory open does not return the first file */ typedef struct DIR_struct diff --git a/v7/src/microcode/msdos.h b/v7/src/microcode/msdos.h index c14342e9e..47803faf9 100644 --- a/v7/src/microcode/msdos.h +++ b/v7/src/microcode/msdos.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/msdos.h,v 1.1 1992/05/05 06:55:13 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/msdos.h,v 1.2 1992/07/06 23:42:02 jinx Exp $ Copyright (c) 1992 Massachusetts Institute of Technology @@ -105,6 +105,7 @@ enum syscall_names syscall_readlink, syscall_realloc, syscall_rename, + syscall_rmdir, syscall_select, syscall_setitimer, syscall_setpgid, diff --git a/v7/src/microcode/osfs.h b/v7/src/microcode/osfs.h index ed57869e9..0d38ff0ae 100644 --- a/v7/src/microcode/osfs.h +++ b/v7/src/microcode/osfs.h @@ -1,8 +1,8 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osfs.h,v 1.4 1992/02/08 14:54:10 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osfs.h,v 1.5 1992/07/06 23:42:03 jinx Exp $ -Copyright (c) 1990-92 Massachusetts Institute of Technology +Copyright (c) 1990-1992 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -52,6 +52,7 @@ extern void EXFUN extern void EXFUN (OS_file_link_soft, (CONST char * from_name, CONST char * to_name)); extern void EXFUN (OS_directory_make, (CONST char * name)); +extern void EXFUN (OS_directory_delete, (CONST char * name)); extern unsigned int EXFUN (OS_directory_open, (CONST char * name)); extern int EXFUN (OS_directory_valid_p, (long index)); extern void EXFUN (OS_directory_close, (unsigned int index)); diff --git a/v7/src/microcode/prosfs.c b/v7/src/microcode/prosfs.c index 081cd6d48..f702af8e5 100644 --- a/v7/src/microcode/prosfs.c +++ b/v7/src/microcode/prosfs.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosfs.c,v 1.8 1992/05/04 21:14:49 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosfs.c,v 1.9 1992/07/06 23:42:04 jinx Exp $ -Copyright (c) 1987-92 Massachusetts Institute of Technology +Copyright (c) 1987-1992 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -240,6 +240,14 @@ DEFINE_PRIMITIVE ("DIRECTORY-MAKE", Prim_directory_make, 1, 1, OS_directory_make (STRING_ARG (1)); PRIMITIVE_RETURN (UNSPECIFIC); } + +DEFINE_PRIMITIVE ("DIRECTORY-DELETE", Prim_directory_make, 1, 1, + "Create a new directory, called NAME.") +{ + PRIMITIVE_HEADER (1); + OS_directory_delete (STRING_ARG (1)); + PRIMITIVE_RETURN (UNSPECIFIC); +} DEFINE_PRIMITIVE ("DIRECTORY-OPEN-NOREAD", Prim_directory_open_noread, 1, 1, "Open the directory NAME for reading.") diff --git a/v7/src/microcode/utabmd.scm b/v7/src/microcode/utabmd.scm index fb329aa36..0fe1707f1 100644 --- a/v7/src/microcode/utabmd.scm +++ b/v7/src/microcode/utabmd.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.61 1992/02/08 14:54:14 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.62 1992/07/06 23:42:05 jinx Exp $ ;;; -;;; Copyright (c) 1987-92 Massachusetts Institute of Technology +;;; Copyright (c) 1987-1992 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -48,6 +48,9 @@ ;;; [] Types ;;; [] Returns ;;; [] Errors +;;; [] Terminations +;;; [] System-call names +;;; [] System-call errors ;;; [] Identification ;;; [] Fixed @@ -610,6 +613,7 @@ READLINK REALLOC RENAME + RMDIR SELECT SETITIMER SETPGID @@ -698,4 +702,4 @@ ;;; This identification string is saved by the system. -"$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.61 1992/02/08 14:54:14 cph Exp $" \ No newline at end of file +"$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.62 1992/07/06 23:42:05 jinx Exp $" \ No newline at end of file diff --git a/v7/src/microcode/ux.h b/v7/src/microcode/ux.h index c00f125f1..a04419512 100644 --- a/v7/src/microcode/ux.h +++ b/v7/src/microcode/ux.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ux.h,v 1.32 1992/06/11 12:44:52 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ux.h,v 1.33 1992/07/06 23:42:06 jinx Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -102,6 +102,7 @@ enum syscall_names syscall_readlink, syscall_realloc, syscall_rename, + syscall_rmdir, syscall_select, syscall_setitimer, syscall_setpgid, diff --git a/v7/src/microcode/uxfs.c b/v7/src/microcode/uxfs.c index f73db4288..dc38968ad 100644 --- a/v7/src/microcode/uxfs.c +++ b/v7/src/microcode/uxfs.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxfs.c,v 1.7 1992/02/09 03:41:48 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxfs.c,v 1.8 1992/07/06 23:42:07 jinx Exp $ -Copyright (c) 1990-92 Massachusetts Institute of Technology +Copyright (c) 1990-1992 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -179,6 +179,12 @@ DEFUN (OS_directory_make, (name), CONST char * name) { STD_VOID_SYSTEM_CALL (syscall_mkdir, (UX_mkdir (name, MODE_DIR))); } + +void +DEFUN (OS_directory_delete, (name), CONST char * name) +{ + STD_VOID_SYSTEM_CALL (syscall_rmdir, (UX_rmdir (name))); +} int OS_directory_index; diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index 30a869e61..7a406553c 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.115 1992/06/11 18:52:16 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.116 1992/07/06 23:42:08 jinx Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 115 +#define SUBVERSION 116 #endif diff --git a/v8/src/microcode/utabmd.scm b/v8/src/microcode/utabmd.scm index 7cb3a6487..7c043fd46 100644 --- a/v8/src/microcode/utabmd.scm +++ b/v8/src/microcode/utabmd.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.61 1992/02/08 14:54:14 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.62 1992/07/06 23:42:05 jinx Exp $ ;;; -;;; Copyright (c) 1987-92 Massachusetts Institute of Technology +;;; Copyright (c) 1987-1992 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -48,6 +48,9 @@ ;;; [] Types ;;; [] Returns ;;; [] Errors +;;; [] Terminations +;;; [] System-call names +;;; [] System-call errors ;;; [] Identification ;;; [] Fixed @@ -610,6 +613,7 @@ READLINK REALLOC RENAME + RMDIR SELECT SETITIMER SETPGID @@ -698,4 +702,4 @@ ;;; This identification string is saved by the system. -"$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.61 1992/02/08 14:54:14 cph Exp $" \ No newline at end of file +"$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.62 1992/07/06 23:42:05 jinx Exp $" \ No newline at end of file diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index f7a3a8b2b..be1a5b193 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.115 1992/06/11 18:52:16 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.116 1992/07/06 23:42:08 jinx Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -46,5 +46,5 @@ MIT in each case. */ #define VERSION 11 #endif #ifndef SUBVERSION -#define SUBVERSION 115 +#define SUBVERSION 116 #endif