(GETFILEINFO xxx 'LENGTH) always returns a FIXP
Should return SMALLP for lengths less than 65536.
As it is (EQ 0 ...) doesn't detect an empty file.
The interface to maiko code for \UFSGetFileInfo passes a pointer to a "buffer", which is either a string or a FIXP cell to be filled in, and the name of the attribute it's trying to get. I believe that all GETFILEINFO implementations would need to change so that you could use (EQ 0 ...) on any file/stream not just some that had made this change.
Is the solution then to put (IPLUS xxx 0) at the generic entry point?
On Jul 14, 2022, at 3:11 PM, Nick Briggs @.***> wrote:
The interface to maiko code for \UFSGetFileInfo passes a pointer to a "buffer", which is either a string or a FIXP cell to be filled in, and the name of the attribute it's trying to get. I believe that all GETFILEINFO implementations would need to change so that you could use (EQ 0 ...) on any file/stream not just some that had made this change.
— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/834#issuecomment-1184945962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJKRD6TGUCCVWLGZ6CTVUCGC7ANCNFSM53TUZAEA. You are receiving this because you authored the thread.
Have a look at \UFSGetFileInfo, which is the DSK FDEV op for GETFILEINFO. Since GETFILEINFO can return non-integers, it couldn't be at the FDEVOP level, I think.
What happens when we have files bigger than a FIXP? But as for (EQ 0 ...), use (= 0 ...) instead.