From: invalid@invalid.invalid   
      
   Paul Edwards writes:   
   > On 21/02/24 20:25, Richard Kettlewell wrote:   
   >> Standard C doesn’t have open(), read() or write() either,   
   >   
   > Indeed - because PDPCLIB's implementation of fopen()   
   > needs to do the open syscall (INT 80H EAX = 5H).   
   >   
   > fopen already knows whether the file is being opened as text or   
   > binary, and I don't want that information lost when I do that   
   > interrupt above. Even though Linux (currently, and very likely   
   > forever) won't use it, PDOS/386 has a use for it (in the short term).   
   >   
   >> but you seem to want to modify the behaviour of those.   
   >   
   > I don't think that is an accurate statement.   
   >   
   > What behavior, where?   
      
   You’ve been talking about doing translation _somewhere_, and cited   
   Cygwin as an example in your first posting, and have been consistently   
   using the flag name from Cygwin. Cygwin’s O_TEXT causes read() and   
   write() to translate between newline conventions, so if you meant   
   something else then it was a confusing decision to use Cygwin as an   
   example.   
      
   If, in fact, you don’t want to add translation to read() and write()   
   then you don’t need to add any new flags to open(). As an existing   
   example, Windows manages to do translation in its    
   implementation without any assistance from CreateFile and its   
   friends. Presumably it records the text/binary distinction in its   
   implementation of the FILE type.   
      
   --   
   https://www.greenend.org.uk/rjk/   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|