;;; -*-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
(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))
;;; -*-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
\f
(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)
(clear-visited-file-modification-time!
buffer))))))))
(else
- (if (and (not writable?)
+ (if (and (not writeable?)
(not modes)
(file-exists? pathname))
(bind-condition-handler
#| -*-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
((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)
((ucode-primitive file-access 2)
(directory-namestring pathname)
2))))))
+;; upwards compatability
+(define file-writable? file-writeable?)
(define (temporary-file-pathname #!optional directory)
(let ((root
(let ((directory
(pathname-as-directory (merge-pathnames directory))))
(and (file-directory? directory)
- (file-writable? directory)
+ (file-writeable? directory)
directory)))))
(let ((try-variable
(lambda (name)
#| -*-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
(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)))
filename
(directory-namestring pathname))))
2))
+;; upwards compatability
+(define file-writable? file-writeable?)
(define (file-executable? filename)
(file-access filename 1))
(%users-directory
(lambda ()
(trydir (get-environment-variable "USERDIR")))))
-
(set! current-user-name
(lambda ()
(or (%current-user-name)
(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)
(or (and user-name
(trydir (merge-pathnames user-name rootdir)))
rootdir)))))))
-
(set! user-home-directory
(lambda (user-name)
(let ((homedir (%current-home-directory)))
(let ((directory
(pathname-as-directory (merge-pathnames directory))))
(and (file-directory? directory)
- (file-writable? directory)
+ (file-writeable? directory)
directory)))))
(let ((try-variable
(lambda (name)
#| -*-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
(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)))
filename
(directory-namestring pathname))))
2))
+;; upwards compatability
+(define file-writable? file-writeable?)
(define (file-executable? filename)
(file-access filename 1))
(let ((directory
(pathname-as-directory (merge-pathnames directory))))
(and (file-directory? directory)
- (file-writable? directory)
+ (file-writeable? directory)
directory)))))
(let ((try-variable
(lambda (name)
#| -*-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
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)))
filename
(directory-namestring pathname))))
2))
+(define file-writable? file-writeable?) ;upwards compatability
(define (file-executable? filename)
(file-access filename 1))
(let ((directory
(pathname-as-directory (merge-pathnames directory))))
(and (file-directory? directory)
- (file-writable? directory)
+ (file-writeable? directory)
directory)))))
(let ((try-variable
(lambda (name)
(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)
(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)