Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

open in text mode (O_TEXT) (Developers)

posted by Rugxulo Homepage, Usono, 27.02.2025, 00:29

> I think the only reason O_TEXT and O_BINARY exist
> is that some programs use read and write,
> and assume that the data handled by these routines contain
> Unix-style newlines. The more correct way to get these programs to work on
> DOS, is probably to rewrite these programs to read/write text files via
> stdio, but I realize this may not always be practical.

I'm a bit naive. I've never used creat (which GCC IA-16 lacks, see mininasm) or read. I guess they are always available on POSIX systems. (Mininasm used them for much lower footprint, and TurboC and OpenWatcom had no problems.)

creat (HelpPC)

quoting fopen (again, HelpPC):

> - text mode input, will have CRs discarded
>
> - using any of the stdio functions results in a default allocation
> of 512 bytes for the I/O buffer and the inclusion of the standard
> memory allocation functions

 

Complete thread:

Back to the forum
Board view  Mix view
22477 Postings in 2087 Threads, 400 registered users, 110 users online (0 registered, 110 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum