Rmk32 eol convention for input defaults to ANY, extend OPENSTREAM so that EOL can be specified as an "external format" (#1785)
* FILEIO: EOL for input defaults to ANY, EXT-FORMAT can specify EOL As per technical meeting on 7/15/2024 * Revert "FILEIO: EOL for input defaults to ANY, EXT-FORMAT can specify EOL" This reverts commit6a7e8c3665. * FILEIO: Fix comment * Added DETECTEDEOLCONVENTION to STREAM declaration and recompiled calls to macro \CHECKEOLC. * COMAPARETEXT: was trying to set EOL to ANY on a Tedit stream * LCOMS needing to be recompiled for \CHECKEOLC macro and Create STREAM (plus a new (unchanged) version of IOCHAR needed to get the cleanup to work for the recompile) * EXTERNALFORMAT macro and function implement EOL detection * FILEIO: stream records detected EOL, also RENAMEFILE uses COPYBYTES UFS doesn't check file devices identity, doesn't give type-change message. Recompiled for create stream * ADIR has TRUEDEVICE * Revert "FILEIO: stream records detected EOL, also RENAMEFILE uses COPYBYTES" This reverts commitfa97aa6157. * Revert "EXTERNALFORMAT macro and function implement EOL detection" This reverts commiteb098615ed. * Revert "LCOMS needing to be recompiled for \CHECKEOLC macro and Create STREAM" This reverts commit5967452c63. * Revert "Added DETECTEDEOLCONVENTION to STREAM declaration" This reverts commit196f105cf5. * Trying to complete the ANY/EOLC and binary RENAMEFILE issues * loadup glitch
This commit is contained in:
80
sources/UFS
80
sources/UFS
@@ -1,12 +1,12 @@
|
||||
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
|
||||
|
||||
(FILECREATED "10-Dec-2024 14:53:34" {WMEDLEY}<sources>UFS.;36 78539
|
||||
(FILECREATED "18-Dec-2024 12:52:23" {WMEDLEY}<sources>UFS.;39 79633
|
||||
|
||||
:EDIT-BY rmk
|
||||
|
||||
:CHANGES-TO (VARS UFSCOMS)
|
||||
:CHANGES-TO (FNS \UFSRenameFile)
|
||||
|
||||
:PREVIOUS-DATE "16-Sep-2023 09:22:55" {WMEDLEY}<sources>UFS.;33)
|
||||
:PREVIOUS-DATE "16-Sep-2023 09:22:55" {WMEDLEY}<sources>UFS.;38)
|
||||
|
||||
|
||||
(PRETTYCOMPRINT UFSCOMS)
|
||||
@@ -89,6 +89,8 @@
|
||||
(HTML . TEXT)
|
||||
(HTM . TEXT)
|
||||
(TEX . TEXT)
|
||||
(PS . TEXT)
|
||||
(PDF . TEXT)
|
||||
(DCOM . BINARY)
|
||||
(SKETCH . BINARY)
|
||||
(TEDIT . BINARY)
|
||||
@@ -330,8 +332,36 @@
|
||||
)
|
||||
|
||||
(\UFSRenameFile
|
||||
(LAMBDA (OLD-DEVICE OLD-NAME NEW-DEVICE NEW-NAME) (* ; "Edited 16-Apr-90 13:46 by nm") (if (NEQ OLD-DEVICE NEW-DEVICE) then (* ;; "Call the generic rename function. ") (LET ((FILE (\GENERIC.RENAMEFILE OLD-DEVICE OLD-NAME NEW-DEVICE NEW-NAME))) (COND ((AND FILE (EQ \MACHINETYPE \MAIKO) FileTypeConfirmFlg) (* ; "print warnig message") (\UFStoOtherRenameMess OLD-DEVICE OLD-NAME NEW-DEVICE NEW-NAME))) FILE) else (* ;; "UNIX file system rename.") (LET ((OLDUNIXNAME (\UFS.RECOGNIZE.FILE OLD-NAME (QUOTE OLD) OLD-DEVICE))) (if (AND OLDUNIXNAME (NOT (\UFS.OPENP OLDUNIXNAME OLD-DEVICE))) then (* ; "Old file is found and not open, so proceed") (LET ((NEWUNIXNAME (\UFS.RECOGNIZE.FILE NEW-NAME (QUOTE NEW) NEW-DEVICE)) (ERRNO (CREATECELL \FIXP))) (COND ((\UFSRenameFile-C (\UFS.REMOVE.HOST.FIELD OLDUNIXNAME OLD-DEVICE) (\UFS.REMOVE.HOST.FIELD NEWUNIXNAME NEW-DEVICE) NEW-DEVICE ERRNO) (\UFS.FULLNAME NEWUNIXNAME NEW-DEVICE)) (T (if (EQL (IPLUS ERRNO 0) 18) then (* ; "CrossDeviceError. Should be PARAMETER!") (\GENERIC.RENAMEFILE OLD-DEVICE OLD-NAME NEW-DEVICE NEW-NAME) else (\UFSError (CONCAT OLDUNIXNAME " or " NEWUNIXNAME) ERRNO) NIL))))))))
|
||||
)
|
||||
[LAMBDA (OLD-DEVICE OLD-NAME NEW-DEVICE NEW-NAME) (* ; "Edited 18-Dec-2024 12:52 by rmk")
|
||||
(* ; "Edited 16-Apr-90 13:46 by nm")
|
||||
(if (NEQ OLD-DEVICE NEW-DEVICE)
|
||||
then
|
||||
(* ;; "Call the generic rename function. ")
|
||||
|
||||
(\GENERIC.RENAMEFILE OLD-DEVICE OLD-NAME NEW-DEVICE NEW-NAME)
|
||||
else
|
||||
(* ;; "UNIX file system rename.")
|
||||
|
||||
(LET ((OLDUNIXNAME (\UFS.RECOGNIZE.FILE OLD-NAME 'OLD OLD-DEVICE)))
|
||||
(if (AND OLDUNIXNAME (NOT (\UFS.OPENP OLDUNIXNAME OLD-DEVICE)))
|
||||
then (* ;
|
||||
"Old file is found and not open, so proceed")
|
||||
(LET ((NEWUNIXNAME (\UFS.RECOGNIZE.FILE NEW-NAME 'NEW NEW-DEVICE))
|
||||
(ERRNO (CREATECELL \FIXP)))
|
||||
(COND
|
||||
((\UFSRenameFile-C (\UFS.REMOVE.HOST.FIELD OLDUNIXNAME OLD-DEVICE)
|
||||
(\UFS.REMOVE.HOST.FIELD NEWUNIXNAME NEW-DEVICE)
|
||||
NEW-DEVICE ERRNO)
|
||||
(\UFS.FULLNAME NEWUNIXNAME NEW-DEVICE))
|
||||
(T (if (EQL (IPLUS ERRNO 0)
|
||||
18)
|
||||
then (* ;
|
||||
"CrossDeviceError. Should be PARAMETER!")
|
||||
(\GENERIC.RENAMEFILE OLD-DEVICE OLD-NAME NEW-DEVICE
|
||||
NEW-NAME)
|
||||
else (\UFSError (CONCAT OLDUNIXNAME " or " NEWUNIXNAME)
|
||||
ERRNO)
|
||||
NIL])
|
||||
|
||||
(\UFSReadPages
|
||||
(LAMBDA (stream streamFirstPage buffers) (* ; "Edited 3-Mar-89 14:49 by bvm") (* ;;; "ARG0 -- stream : {stream} data type.") (* ;;; "ARG1 -- streamFirstPage : the 1st page number of file to read.") (* ;;; "ARG2 -- buffers : {VMEMPAGEP} or list of {VMEMPAGEP}. ") (* ; "Write out the buffers to the backing file.") (for buffer inside buffers as streamPageNumber from streamFirstPage bind (fileID _ (fetch (UFSSTREAM FILEID) of stream)) lastStreamPage offset ERRNO first (\UPDATEOF stream) (SETQ lastStreamPage (PLUS (fetch (STREAM EPAGE) of stream) (if (EQ 0 (fetch (STREAM EOFFSET) of stream)) then -1 else 0))) (SETQ ERRNO (CREATECELL \FIXP)) sum (if (LEQ streamPageNumber lastStreamPage) then (OR (\UFSReadPages-C fileID streamPageNumber buffer ERRNO) (\UFSError stream ERRNO) (CL:ERROR (QUOTE XCL:SIMPLE-DEVICE-ERROR) :MESSAGE stream)) (if (EQ streamPageNumber lastStreamPage) then (SETQ offset (fetch (STREAM EOFFSET) of stream)) (if (EQ offset 0) then (SETQ offset BYTESPERPAGE) else (\CLEARBYTES buffer offset (- BYTESPERPAGE offset))) offset else BYTESPERPAGE) else (\CLEARWORDS buffer WORDSPERPAGE) 0)))
|
||||
@@ -795,6 +825,8 @@ update the map") (SETQ PAGES (RESTOREMAP STREAM))) (DELETED (* ; "the file disap
|
||||
(HTML . TEXT)
|
||||
(HTM . TEXT)
|
||||
(TEX . TEXT)
|
||||
(PS . TEXT)
|
||||
(PDF . TEXT)
|
||||
(DCOM . BINARY)
|
||||
(SKETCH . BINARY)
|
||||
(TEDIT . BINARY)
|
||||
@@ -1152,23 +1184,23 @@ update the map") (SETQ PAGES (RESTOREMAP STREAM))) (DELETED (* ; "the file disap
|
||||
(ADDTOVAR LAMA )
|
||||
)
|
||||
(DECLARE%: DONTCOPY
|
||||
(FILEMAP (NIL (8676 10229 (\UFSCreateDevice 8686 . 9051) (\UFS.CREATE.DEVICE 9053 . 9909) (
|
||||
\UFSOpenDevice 9911 . 10088) (\UFSCloseDevice 10090 . 10227)) (14492 50994 (\UFSOpenFile 14502 . 17796
|
||||
) (\UFS.OPENP 17798 . 18295) (\UFS.RECOGNIZE.FILE 18297 . 19050) (\UFS.DIRECTORY.NAME 19052 . 19795) (
|
||||
\UFSCloseFile 19797 . 21702) (\UFSGetFileName 21704 . 21903) (\UFSDeleteFile 21905 . 22445) (
|
||||
\UFSRenameFile 22447 . 23612) (\UFSReadPages 23614 . 24749) (\UFSWritePages 24751 . 25971) (
|
||||
\UFSTruncateFile 25973 . 27470) (\UFSDirectoryNameP 27472 . 28526) (\UFSEventFn 28528 . 29190) (
|
||||
\UFSGetFileInfo 29192 . 31474) (\UFS.CREATE.PROPS 31476 . 31829) (\UFSSetFileInfo 31831 . 33060) (
|
||||
\UFSGenerateFiles 33062 . 39942) (\UFS.NEXTFILEFN 39944 . 47582) (\UFS.FILEINFOFN 47584 . 49033) (
|
||||
\UFS.VALID.PROPP 49035 . 49327) (\UFS.REGISTER.GFS 49329 . 49584) (\UFS.UNREGISTER.GFS 49586 . 50169)
|
||||
(\UFS.ABORT.DIRECTORY 50171 . 50519) (\UFS.ABORT.CL-DIRECTORY 50521 . 50808) (\UFS.CLEANUP.GFS.TABLE
|
||||
50810 . 50992)) (51029 57713 (\UFSMakeUnixFormatName 51039 . 52060) (\UFSParseNameString 52062 . 52436
|
||||
) (\UFSParse-Directory 52438 . 52979) (\UFS.PARSE.BODY 52981 . 53526) (\UFS.ADJUST.HOST 53528 . 53687)
|
||||
(\UFS.FULLNAME 53689 . 54897) (\UFS.ADD.HOST.FIELD 54899 . 55259) (\UFS.REMOVE.HOST.FIELD 55261 .
|
||||
56931) (\UFS.HANDLE.RELATIVEDIRECTORY 56933 . 57711)) (58529 59142 (CHDIR 58539 . 59140)) (59214 60200
|
||||
(\DEVICEFILE.EOSERROR 59224 . 60198)) (60273 61510 (\UNVISIBLE.PAGED.REVALIDATEFILELST 60283 . 61128)
|
||||
(\UNVISIBLE.FLUSH.OPEN.STREAMS 61130 . 61508)) (61543 63169 (\UFSError 61553 . 63167)) (63213 65628 (
|
||||
\UFSGetFileType 63223 . 63824) (\UFSSetFileType 63826 . 64423) (\UFSeol 64425 . 65626)) (74234 75358 (
|
||||
\UFSGetPrintFileType 74244 . 74656) (\UFSGetFileTypeConfirm 74658 . 75106) (\UFSPrintTypeMenu 75108 .
|
||||
75356)) (75388 78226 (\UFStoOtherCopyMess 75398 . 77076) (\UFStoOtherRenameMess 77078 . 78224)))))
|
||||
(FILEMAP (NIL (8857 10410 (\UFSCreateDevice 8867 . 9232) (\UFS.CREATE.DEVICE 9234 . 10090) (
|
||||
\UFSOpenDevice 10092 . 10269) (\UFSCloseDevice 10271 . 10408)) (14673 52047 (\UFSOpenFile 14683 .
|
||||
17977) (\UFS.OPENP 17979 . 18476) (\UFS.RECOGNIZE.FILE 18478 . 19231) (\UFS.DIRECTORY.NAME 19233 .
|
||||
19976) (\UFSCloseFile 19978 . 21883) (\UFSGetFileName 21885 . 22084) (\UFSDeleteFile 22086 . 22626) (
|
||||
\UFSRenameFile 22628 . 24665) (\UFSReadPages 24667 . 25802) (\UFSWritePages 25804 . 27024) (
|
||||
\UFSTruncateFile 27026 . 28523) (\UFSDirectoryNameP 28525 . 29579) (\UFSEventFn 29581 . 30243) (
|
||||
\UFSGetFileInfo 30245 . 32527) (\UFS.CREATE.PROPS 32529 . 32882) (\UFSSetFileInfo 32884 . 34113) (
|
||||
\UFSGenerateFiles 34115 . 40995) (\UFS.NEXTFILEFN 40997 . 48635) (\UFS.FILEINFOFN 48637 . 50086) (
|
||||
\UFS.VALID.PROPP 50088 . 50380) (\UFS.REGISTER.GFS 50382 . 50637) (\UFS.UNREGISTER.GFS 50639 . 51222)
|
||||
(\UFS.ABORT.DIRECTORY 51224 . 51572) (\UFS.ABORT.CL-DIRECTORY 51574 . 51861) (\UFS.CLEANUP.GFS.TABLE
|
||||
51863 . 52045)) (52082 58766 (\UFSMakeUnixFormatName 52092 . 53113) (\UFSParseNameString 53115 . 53489
|
||||
) (\UFSParse-Directory 53491 . 54032) (\UFS.PARSE.BODY 54034 . 54579) (\UFS.ADJUST.HOST 54581 . 54740)
|
||||
(\UFS.FULLNAME 54742 . 55950) (\UFS.ADD.HOST.FIELD 55952 . 56312) (\UFS.REMOVE.HOST.FIELD 56314 .
|
||||
57984) (\UFS.HANDLE.RELATIVEDIRECTORY 57986 . 58764)) (59582 60195 (CHDIR 59592 . 60193)) (60267 61253
|
||||
(\DEVICEFILE.EOSERROR 60277 . 61251)) (61326 62563 (\UNVISIBLE.PAGED.REVALIDATEFILELST 61336 . 62181)
|
||||
(\UNVISIBLE.FLUSH.OPEN.STREAMS 62183 . 62561)) (62596 64222 (\UFSError 62606 . 64220)) (64266 66681 (
|
||||
\UFSGetFileType 64276 . 64877) (\UFSSetFileType 64879 . 65476) (\UFSeol 65478 . 66679)) (75328 76452 (
|
||||
\UFSGetPrintFileType 75338 . 75750) (\UFSGetFileTypeConfirm 75752 . 76200) (\UFSPrintTypeMenu 76202 .
|
||||
76450)) (76482 79320 (\UFStoOtherCopyMess 76492 . 78170) (\UFStoOtherRenameMess 78172 . 79318)))))
|
||||
STOP
|
||||
|
||||
Reference in New Issue
Block a user