From 52be6f13ea050324110ff0c033e1b37cec8f4a1f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 5 Jan 2000 02:41:55 +0000 Subject: [PATCH] Change name from FILE-WRITABLE? to FILE-WRITEABLE?. --- v7/src/edwin/filcom.scm | 6 +++--- v7/src/edwin/fileio.scm | 10 +++++----- v7/src/runtime/dosprm.scm | 11 ++++++----- v7/src/runtime/ntprm.scm | 13 ++++++------- v7/src/runtime/os2prm.scm | 10 ++++++---- v7/src/runtime/unxprm.scm | 29 +++++++++++------------------ 6 files changed, 37 insertions(+), 42 deletions(-) diff --git a/v7/src/edwin/filcom.scm b/v7/src/edwin/filcom.scm index 9d3cf86ba..7cb1934c6 100644 --- a/v7/src/edwin/filcom.scm +++ b/v7/src/edwin/filcom.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: filcom.scm,v 1.204 1999/08/10 16:54:34 cph Exp $ +;;; $Id: filcom.scm,v 1.205 2000/01/05 02:41:55 cph Exp $ ;;; -;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology +;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as @@ -123,7 +123,7 @@ invocation." (define (after-find-file buffer error? warn?) (let ((pathname (or (buffer-truename buffer) (buffer-pathname buffer)))) (let ((buffer-read-only? - (not (file-test-no-errors file-writable? pathname)))) + (not (file-test-no-errors file-writeable? pathname)))) (if buffer-read-only? (set-buffer-read-only! buffer) (set-buffer-writable! buffer)) diff --git a/v7/src/edwin/fileio.scm b/v7/src/edwin/fileio.scm index fd1521e74..9baa5bb5a 100644 --- a/v7/src/edwin/fileio.scm +++ b/v7/src/edwin/fileio.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: fileio.scm,v 1.148 1999/12/22 02:48:27 cph Exp $ +;;; $Id: fileio.scm,v 1.149 2000/01/05 02:41:26 cph Exp $ ;;; -;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology +;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology ;;; ;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License as @@ -503,8 +503,8 @@ Otherwise, a message is written both before and after long file writes." (define (write-buffer-interactive buffer backup-mode) (let ((pathname (buffer-pathname buffer))) - (let ((writable? (file-writable? pathname))) - (if (or writable? + (let ((writeable? (file-writeable? pathname))) + (if (or writeable? (prompt-for-yes-or-no? (string-append "File " (file-namestring pathname) @@ -548,7 +548,7 @@ Otherwise, a message is written both before and after long file writes." (clear-visited-file-modification-time! buffer)))))))) (else - (if (and (not writable?) + (if (and (not writeable?) (not modes) (file-exists? pathname)) (bind-condition-handler diff --git a/v7/src/runtime/dosprm.scm b/v7/src/runtime/dosprm.scm index 576fdfa4d..0a3d76c19 100644 --- a/v7/src/runtime/dosprm.scm +++ b/v7/src/runtime/dosprm.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: dosprm.scm,v 1.42 1999/04/07 04:09:01 cph Exp $ +$Id: dosprm.scm,v 1.43 2000/01/05 02:40:31 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-2000 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,14 +45,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ((ucode-primitive file-access 2) (->namestring (merge-pathnames filename)) amode)) - ;; upwards compatability (define dos/file-access file-access) (define (file-readable? filename) (file-access filename 4)) -(define (file-writable? filename) +(define (file-writeable? filename) (let ((pathname (merge-pathnames filename))) (let ((filename (->namestring pathname))) (or ((ucode-primitive file-access 2) filename 2) @@ -60,6 +59,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ((ucode-primitive file-access 2) (directory-namestring pathname) 2)))))) +;; upwards compatability +(define file-writable? file-writeable?) (define (temporary-file-pathname #!optional directory) (let ((root @@ -82,7 +83,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (let ((directory (pathname-as-directory (merge-pathnames directory)))) (and (file-directory? directory) - (file-writable? directory) + (file-writeable? directory) directory))))) (let ((try-variable (lambda (name) diff --git a/v7/src/runtime/ntprm.scm b/v7/src/runtime/ntprm.scm index bd1c26c55..e094d4e98 100644 --- a/v7/src/runtime/ntprm.scm +++ b/v7/src/runtime/ntprm.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: ntprm.scm,v 1.32 1999/04/24 04:40:14 cph Exp $ +$Id: ntprm.scm,v 1.33 2000/01/05 02:40:09 cph Exp $ -Copyright (c) 1992-1999 Massachusetts Institute of Technology +Copyright (c) 1992-2000 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (file-readable? filename) (file-access filename 4)) -(define (file-writable? filename) +(define (file-writeable? filename) ((ucode-primitive file-access 2) (let ((pathname (merge-pathnames filename))) (let ((filename (->namestring pathname))) @@ -48,6 +48,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. filename (directory-namestring pathname)))) 2)) +;; upwards compatability +(define file-writable? file-writeable?) (define (file-executable? filename) (file-access filename 1)) @@ -229,7 +231,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (%users-directory (lambda () (trydir (get-environment-variable "USERDIR"))))) - (set! current-user-name (lambda () (or (%current-user-name) @@ -240,7 +241,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (and homedir (pathname-name (directory-pathname-as-file homedir)))) (error "Unable to determine current user name.")))) - (set! current-home-directory (lambda () (or (%current-home-directory) @@ -257,7 +257,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (or (and user-name (trydir (merge-pathnames user-name rootdir))) rootdir))))))) - (set! user-home-directory (lambda (user-name) (let ((homedir (%current-home-directory))) @@ -316,7 +315,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (let ((directory (pathname-as-directory (merge-pathnames directory)))) (and (file-directory? directory) - (file-writable? directory) + (file-writeable? directory) directory))))) (let ((try-variable (lambda (name) diff --git a/v7/src/runtime/os2prm.scm b/v7/src/runtime/os2prm.scm index 56571a60e..124d74128 100644 --- a/v7/src/runtime/os2prm.scm +++ b/v7/src/runtime/os2prm.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: os2prm.scm,v 1.44 1999/12/27 20:44:21 cph Exp $ +$Id: os2prm.scm,v 1.45 2000/01/05 02:40:20 cph Exp $ -Copyright (c) 1994-1999 Massachusetts Institute of Technology +Copyright (c) 1994-2000 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define (file-readable? filename) (file-access filename 4)) -(define (file-writable? filename) +(define (file-writeable? filename) ((ucode-primitive file-access 2) (let ((pathname (merge-pathnames filename))) (let ((filename (->namestring pathname))) @@ -48,6 +48,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. filename (directory-namestring pathname)))) 2)) +;; upwards compatability +(define file-writable? file-writeable?) (define (file-executable? filename) (file-access filename 1)) @@ -183,7 +185,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (let ((directory (pathname-as-directory (merge-pathnames directory)))) (and (file-directory? directory) - (file-writable? directory) + (file-writeable? directory) directory))))) (let ((try-variable (lambda (name) diff --git a/v7/src/runtime/unxprm.scm b/v7/src/runtime/unxprm.scm index 24c91c034..ad117517a 100644 --- a/v7/src/runtime/unxprm.scm +++ b/v7/src/runtime/unxprm.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: unxprm.scm,v 1.58 1999/12/21 19:25:33 cph Exp $ +$Id: unxprm.scm,v 1.59 2000/01/05 02:39:21 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright (c) 1988-2000 Massachusetts Institute of Technology This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,17 +41,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. modes)) (define (file-access filename amode) - ((ucode-primitive file-access 2) - (->namestring (merge-pathnames filename)) - amode)) - -;; upwards compatability -(define unix/file-access file-access) + ((ucode-primitive file-access 2) (->namestring (merge-pathnames filename)) + amode)) +(define unix/file-access file-access) ;upwards compatability (define (file-readable? filename) (file-access filename 4)) -(define (file-writable? filename) +(define (file-writeable? filename) ((ucode-primitive file-access 2) (let ((pathname (merge-pathnames filename))) (let ((filename (->namestring pathname))) @@ -59,6 +56,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. filename (directory-namestring pathname)))) 2)) +(define file-writable? file-writeable?) ;upwards compatability (define (file-executable? filename) (file-access filename 1)) @@ -91,7 +89,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (let ((directory (pathname-as-directory (merge-pathnames directory)))) (and (file-directory? directory) - (file-writable? directory) + (file-writeable? directory) directory))))) (let ((try-variable (lambda (name) @@ -242,11 +240,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define unix/current-home-directory current-home-directory) (define unix/current-user-name current-user-name) -(define-integrable unix/current-uid - (ucode-primitive current-uid 0)) - -(define-integrable unix/current-gid - (ucode-primitive current-gid 0)) +(define-integrable unix/current-uid (ucode-primitive current-uid 0)) +(define-integrable unix/current-gid (ucode-primitive current-gid 0)) +(define-integrable unix/current-pid (ucode-primitive current-pid 0)) (define (unix/uid->string uid) (or ((ucode-primitive uid->string 1) uid) @@ -256,9 +252,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (or ((ucode-primitive gid->string 1) gid) (number->string gid 10))) -(define-integrable unix/current-pid - (ucode-primitive current-pid 0)) - (define (unix/system string) (let ((wd-inside (->namestring (working-directory-pathname))) (wd-outside) -- 2.25.1