From 53cb5d48834ec827209656d17992139c36682bc5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 25 Oct 1995 02:16:48 +0000 Subject: [PATCH] Rename OS2/FS-foo to DOS/FS-foo and supply definitions for DOS/WIN32 as well as OS/2. This enables sharing of the filename customization code in Edwin. --- v7/src/runtime/dosprm.scm | 10 +++++++++- v7/src/runtime/os2prm.scm | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/v7/src/runtime/dosprm.scm b/v7/src/runtime/dosprm.scm index 080eb1a8d..e7193505c 100644 --- a/v7/src/runtime/dosprm.scm +++ b/v7/src/runtime/dosprm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: dosprm.scm,v 1.32 1995/10/24 05:39:49 cph Exp $ +$Id: dosprm.scm,v 1.33 1995/10/25 02:16:34 cph Exp $ Copyright (c) 1992-95 Massachusetts Institute of Technology @@ -268,6 +268,14 @@ MIT in each case. |# user-name))))) (merge-pathnames "\\"))) +(define (dos/fs-drive-type pathname) + pathname + (cons "FAT" "")) + +(define (dos/fs-long-filenames? pathname) + pathname + #f) + (define file-time->string (ucode-primitive file-time->string 1)) diff --git a/v7/src/runtime/os2prm.scm b/v7/src/runtime/os2prm.scm index 851ef03e9..a3fb56cfd 100644 --- a/v7/src/runtime/os2prm.scm +++ b/v7/src/runtime/os2prm.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: os2prm.scm,v 1.21 1995/10/24 05:40:10 cph Exp $ +$Id: os2prm.scm,v 1.22 1995/10/25 02:16:48 cph Exp $ Copyright (c) 1994-95 Massachusetts Institute of Technology @@ -192,7 +192,7 @@ MIT in each case. |# (let ((root (let ((directory (temporary-directory-pathname))) (merge-pathnames - (if (os2/fs-long-filenames? directory) + (if (dos/fs-long-filenames? directory) (string-append "sch" (string-pad-left (number->string (os2/current-pid)) 6 #\0)) @@ -251,7 +251,7 @@ MIT in each case. |# user-name))))) (merge-pathnames "\\"))) -(define (os2/fs-drive-type pathname) +(define (dos/fs-drive-type pathname) (let ((type ((ucode-primitive drive-type 1) (pathname-device (merge-pathnames pathname))))) @@ -260,11 +260,11 @@ MIT in each case. |# (cons (string-head type colon) (string-tail type (fix:+ colon 1))) (cons type ""))))) -(define (os2/fs-long-filenames? pathname) - (not (string-ci=? "fat" (car (os2/fs-drive-type pathname))))) +(define (dos/fs-long-filenames? pathname) + (not (string-ci=? "fat" (car (dos/fs-drive-type pathname))))) (define (os/file-end-of-line-translation pathname) - (let ((type (os2/fs-drive-type pathname))) + (let ((type (dos/fs-drive-type pathname))) ;; "ext2" is the Linux ext2 file-system driver. "NFS" is the IBM ;; TCP/IP NFS driver, which we further qualify by examining the ;; mount info -- if the directory starts with a "/", we assume -- 2.25.1