Number: 707

Date: 13-Apr-84 15':27':00

Submitter: Sannella.PA

Source: Masinter.pa

Subject: want (GETFILEINFO FILE ''TYPE) more complex values

Assigned To: 

Attn: vanMel,Masin,Kaplan

Status: Open

In/By: 

Problem Type: Design - Impl

Impact: Annoying

Difficulty: 

Frequency: Everytime

Priority: Perhaps

System: Operating System

Subsystem: Generic File Operations

Machine: 

Disk: 

Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: '
["Masinter" "21-Aug-84 14':05':04" Subject': Description':]'
["Sannella.PA" "21-Aug-84 15':25':26" Description':]'
["Sannella.PA" "22-Aug-84 12':55':46" Description':]'
["masinter" "23-Aug-84 15':39':56" Description':]'
["masinter" "23-Aug-84 17':36':45" Description':]'
["Masinter.pa" "23-Aug-84 19':33':38" Description':]'
["Sannella.PA" "28-Aug-84 11':40':57" Description':]

Description: '
Date': 13 Apr 84 08':58 PST'
From': Masinter.pa'
Subject': AR#561 on COPYFILE'
To': Roach, vanMelle, Raim.pasa, Le.pasa'
cc': LispCore↑, LispSupport'
'
'
This AR, which is marked "VAX Server", actually reports a problem with FLOPPY. The problem is that FLOPPY doesn''t keep track of "type".'
'
Actually, the Floppy DOES keep track of TYPE; but the type space supported by the floppy is more complex than most other type spaces. Thus, the Floppy code has something called MesaType,  which has 2↑16 possible values. (I''m not sure on the details of this, but Kelly explained it to me once.)'
'
Can we get together a file-TYPE standard for Interlisp, describe what it means, document it in the manual, and make sure that all devices either implement the standard or don''t choke if given a TYPE they don''t recognize?'
'
(We really don''t want to  wall off the full values of Mesa Types, because we want to be able to write files on floppies that, for example, the print server will recognize as a valid font. We can do that if we can set the type attribute to 8044-FONT which turns out to be some random 16-bit value.)'
'
'
 all file devices support type of BINARY or TEXT. All devices coerce into BINARY if given a TYPE which is otherwise unknown -- I think that some are able to keep TYPE as a string. NS services code should know about the standard NS file types which should be registered????'
'
Interlisp-VAX supports an attribute called FILETYPE, which takes values'
UNIX-FILE, TEXT-FILE, VAR-FILE, TTY-FILE, MBX-FILE, DIRECTORY-FILE USER-HANDLED RAW-QIO'
'
-----'
'
Date': 21 Aug 84 14':15 PDT'
From': Masinter.pa'
Subject': file types, Unix, VMS, etc, & AR#707'
To': Interlisp@ISI, LispCore↑'
'
An issue has come up about standardizing what a file "type" is in Interlisp. Interlisp-D nominally supports file-types of BINARY and TEXT. Many operating systems and devices can support other file types.'
'
I propose that TYPE be handled as followed':'
'
OPENFILE takes in its parameters an optional (TYPE filetype)'
(GETFILEINFO file TYPE) returns the type, '
'
TYPE can be one of'
	TEXT 	contains a stream of characters'
	BINARY  contains a stream of 8-bit bytes'
'
All other types are optional, i.e.'
'
OPENFILE is free to coerce any type it doesn''t understand into BINARY. It  should *not* error on unknown types.'
'
GETFILEINFO should attempt to return the types that it understands.'
'
At least in Interlisp-D, file types which are 16-bit positive integers are allowed when talking about NS Servers/floppies for compatibility with other Xerox products.'
'
Interlisp "machine independent" code should attempt to preserve type where possible, and presume only that types of TEXT and BINARY code are available. For example, COPYFILE will attempt to open the destination file with the same type as the type of the source file.'
'
My reading of the Interlisp-VAX users guide is that VMS and Unix, the file types known are'
'
TEXT (= StreamLF)'
BINARY (= StreamLF too?)'
UNIX (standard unix)'
VMS-TEXT (VMS text file, not Interlisp-D text?)'
VAR (non-text VMS variable length record file)'
TTY (teletype)'
MBX (pipe/mailbox)'
DIRECTORY (a directory handle)'
USERHANDLED (special file to be handled by the user)'
RAW-QIO (Special file to be handled by VMS $QIOs)'
'
Have I mis-interpreted the VMS users guide?'
'
What NS File server file types should we support with literal names? '
'
Interlisp-VAX used FILETYPE separate from TYPE. Is there any good reason to do that?'
'
'
Return-Path': <FEBER@USC-ISIB.ARPA>'
Received': from USC-ISIB.ARPA by Xerox.ARPA ; 22 AUG 84 16':47':26 PDT'
Date': 22 Aug 84 16':47 PDT'
Sender': FEBER@USC-ISIB.ARPA'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
From': FEBER@USC-ISIB.ARPA'
To': Masinter.pa'
Cc': feber@USC-ISIB.ARPA, interlisp@USC-ISIB.ARPA'
Message-ID': <[USC-ISIB.ARPA]22-Aug-84 16':47':13.FEBER>'
In-Reply-To': The message of 21 Aug 84 14':15 PDT from Masinter.pa@XEROX.ARPA'
'
To clarify Ray''s answer a little bit':'
'
We do not currently return TEXT or BINARY, but rather one of the "types"'
listed in the user''s guide, nor do we respond to ''TYPE.  Both fixes'
are possible.  Under VMS a "UNIX-FILE" means a Stream-LF file, which is '
the only kind Interlisp really likes. Both source and compiled files are'
"UNIX-FILE"s. The rest of the types give it various degrees of trouble, '
and it can only do random access on "UNIX-FILE"s.  '
'
When I first read your message I assumed that TEXT would refer to source'
files and BINARY would refer to compiled files.  However, from talking to'
local users, they seem to think that all files that Interlisp-D is willing'
to deal with are binary files.  Since (GETFILEINFO file ''TYPE) doesn''t'
seem to work on the STAR workstation it was a little difficult to experiment.'
So what is the intent of the split between TEXT and BINARY in Interlisp-D'
as it applies to the files Interlisp typically deals with?'
	(mark)'
End of message'
-----'
'
Date': 21 Aug 84 14':51 PDT'
From': Roach.pa'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
In-reply-to': Masinter.pa''s message of 21 Aug 84 14':15 PDT'
To': Masinter.pa'
cc': LispCore↑.pa'
'
     Just to complicate matters a bit, both LEAF and FLOPPY support TYPEs like (BINARY 4), (BINARY 16).  Do you care to comment on these TYPEs.  Also, FLOPPY''s MESATYPE, which Mesa uses, is independent of TYPE.'
'
-----'
'
Return-Path': <RBATES@USC-ISIB.ARPA>'
Redistributed': LispCore↑.pa'
Received': from USC-ISIB.ARPA by Xerox.ARPA ; 21 AUG 84 15':34':59 PDT'
Date': 21 Aug 84 15':34 PDT'
Sender': RBATES@USC-ISIB.ARPA'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
From': Raymond Bates <RBATES@USC-ISIB.ARPA>'
To': Masinter.pa'
Cc': Interlisp@USC-ISI.ARPA, LispCore↑.pa'
Message-ID': <[USC-ISIB.ARPA]21-Aug-84 15':34':16.RBATES>'
In-Reply-To': The message of 21 Aug 84 14':15 PDT from Masinter.pa@XEROX.ARPA'
'
You didn''t mis-interpreted our Users Guide.  VMS supports many different types of files.  There is not an conical file type under VMS.  What is bad is that each file type supports different functionally, for instance on a VMS TEXT file, one can only random access the beginning of an line by line number and can not access by character number.  The only reason we used FILETYPE instead of TYPE is that we though we were introducing a new concept and our Interlisp-10 manual didn''t mention anything.  We will be happy to confirm to Interlisp-D name of TYPE.'
'
/Ray'
'
-----'
'
Date': 21 Aug 84 15':40 PDT'
From': Masinter.pa'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
In-reply-to': Roach.pa''s message of 21 Aug 84 14':51 PDT'
To': Roach.pa'
cc': Masinter.pa, LispCore↑.pa'
'
under my proposal, it is OK for LEAF and FLOPPY to support (BINARY 4) and (BINARY 16) (although LEAF and FTP have to be consistent for the same host).'
'
Under my proposal, Floppy should turn treat the MESATYPE as a TYPE instead of having a separate name. The type names should be standardized and documented, and any mesa type not recognized should be returned as a 16-bit integer.'
'
-----'
'
Date': 21 Aug 84 17':35 PDT'
From': Roach.pa'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
In-reply-to': Masinter.pa''s message of 21 Aug 84 15':40 PDT'
To': Masinter.pa'
cc': Roach.pa, LispCore↑.pa'
'
     The reason I brought up MESATYPE is that TYPE & MESATYPE are apparently distinguished in Mesa.  These two attributes correspond to physically distinct locations on FLOPPY''s leader pages.  I would recommend either not supporting MESATYPE at all or making MESATYPE a separate attribute.'
'
-----'
'
'
 Date': 21 Aug 84 17':35 PDT'
From': Roach.pa'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
In-reply-to': Masinter.pa''s message of 21 Aug 84 15':40 PDT'
To': Masinter.pa'
cc': Roach.pa, LispCore↑.pa'
'
     The reason I brought up MESATYPE is that TYPE & MESATYPE are apparently distinguished in Mesa.  These two attributes correspond to physically distinct locations on FLOPPY''s leader pages.  I would recommend either not supporting MESATYPE at all or making MESATYPE a separate attribute.'
'
Date': 22 Aug 84 13':55 PDT'
From': Roach.pa'
Subject': Re': TYPE and MESATYPE on floppy'
In-reply-to': masinter.pa''s message of 22 Aug 84 09':53 PDT'
To': masinter.pa'
'
     I think "MESATYPE" is known as "FILETYPE" by the Mesa people.  As far as I know, any combination of {TEXT,BINARY} x 16-bit number can be used.  TYPE is stored separately from MESATYPE, and so does not need to be inferred from it.  There seem to be lots of filetypes, and they begin to be documented in {IDUN}<APILOT100>PILOT>PUBLIC>FILETYPES.MESA{IDUN}<APILOT100>*TYPE* files.'
'
-----'
'
Date': 23 Aug 84 13':04 PDT'
From': masinter.pa'
Subject': Re': file types, Unix, VMS, etc, & AR#707'
In-reply-to': FEBER@USC-ISIB.ARPA''s message of 22 Aug 84 16':47 PDT'
To': FEBER@USC-ISIB'
cc': LispSupport, vanMelle, interlisp@USC-ISIB'
'
I believe the consensus design is that GETFILEINFO returns and OPENFILE accepts '
TYPE = TEXT (contains text)'
	BINARY (contains binary data)'
with BYTESIZE being the byte size of the binary data (Interlisp-D only supports BYTESIZE=8)'
	NIL (impossible to tell, should assume BINARY)'
'
and that there is an auxilary GETFILEINFO/OPENFILE field'
FILETYPE = {implementation/device dependent value}'
	Interlisp-D supports 16-bit positive integers for FILETYPE on devices that can'
	indicate it'
'
	On VAX lisp, it can be one of the distinguished values you document in your manual'
'
	We probably should make sure that this info is available from the FTP/Leaf servers'
	on VAX/VMS and Unix.'
'
'


Workaround: 

Test Case: 

Edit-By: Sannella.PA

Edit-Date: 28-Aug-84 11':40':58