home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux      Getting to be as bloated as Windows!      107,822 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 105,887 of 107,822   
   Paul Edwards to Lew Pitcher   
   Re: O_TEXT for PDOS/386   
   22 Feb 24 06:22:13   
   
   From: mutazilah@gmail.com   
      
   On 22/02/24 04:28, Lew Pitcher wrote:   
   > On Wed, 21 Feb 2024 21:54:02 +0800, Paul Edwards wrote:   
   > [snip]   
   >> When the ELF executable is run on PDOS/386, I will   
   >> have no way of knowing that this open is text, and   
   >> thus PDOS/386 (the OS) should add CRs whenever it   
   >> sees a LF.   
   >   
   > ISTM that you are looking at this from the wrong end.   
   >   
   > POSIX open() does not make a distinction between a "text"   
   > and a "binary" file; all files are "binary". Programs   
      
   Sure. And I'm talking about changing POSIX to   
   add the distinction, for anyone who has a use   
   for such a thing.   
      
   > (including Linux programs) that are coded to the POSIX   
   > standard already accommodate this. So, any code you port   
   > from a Linux environment (either source code or ELF   
   > executable) is already in a state to read and write   
   > a binary file.   
      
   This would be new code obviously, and include   
   an O_TEXT.   
      
   > Given this, then there is no need for   
   > an O_TEXT flag for a Linux program, as no Linux program   
   > expects open() to provide special conditions for text   
   > data.   
      
   I want to be able to WRITE such a Linux program.   
      
   > Given this, there only one problem to resolve: how to   
   > allow for text data to be interchanged transparently   
   > between the MSDOS/Windows side of your PDOS/386 and   
   > the Linux side.   
      
   PDOS/386 *will be Linux*. A mini-clone. Also a   
   mini-clone of OS/2. It's already a mini-clone   
   of Windows, and sort of a clone of MSDOS too.   
      
   All on a 360k floppy.   
      
   The only question is - on this all-encompassing OS -   
   are text files going to follow DOS (CP/M) convention   
   or Unix convention?   
      
   And currently I am going for CP/M, which means my   
   Linux executables need to provide the appropriate   
   information so that they run seamlessly in this   
   CP/M-standard environment.   
      
   One day I'll probably do the reverse. And since it   
   is the C library that is adding CRs for Windows,   
   it will require a similar enhancement for the   
   Windows CreateFile() interface to pass a "text"   
   flag so that PDOS/386 can STRIP the CRs that will   
   be flowing through.   
      
   But that looks even more difficult:   
      
   https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-f   
   leapi-createfilea   
      
   BFN. Paul.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca