Rod Pemberton <
noe...@basdxcqvbe.com> writes:
>On Wed, 16 Jun 2021 00:15:29 -0700 (PDT)
>"
muta...@gmail.com" <
muta...@gmail.com> wrote:
>
>> Any reason why PDOS shouldn't just accept an
>> fopen("COM54321", "w+b");
>> and see what the port has to offer?
>>
>
>Unix and C embraces the "everything is a file"
>concept. It works fairly well. One exception
>is where I noted previously in regards to the
>format for specifying a particular device:
>
>You: fopen("
news.eternal-september.org:119", "w+");
>
>Me: "I see nothing specifying the device you're connecting to."
>
>Me: e.g., "A:" (or "C:\" etc for MS-DOS)
>
>You: "The ":" in the name is an indication that it is a URL ..."
>
Actually, it's not, really.
A Universal Resource Identifier (URI, of which URL is a subset):
URI = scheme:[//authority]path[?query][#fragment]
That allows:
fopen("nntp://
user:pa...@news.eternal-september.org/");
(scheme nntp implies port 119).
Now, even if such syntax were supported by fopen in your
faux C90-land, consider how you would use that file descriptor;
does the application need to handle the NNTP protocol, or does
your DOS operating system handle the NNTP protocol (and any
other URI scheme that you support such as HTTP, SMTP, POP,
IMAP etc et alia) on behalf of the application.
Then, consider if you are using HTML, will the application
be responsible for formatting and displaying the HTML, or
will you delegate that to your DOS. Do you want to support
full HTML5 (including entities, UTF-8, graphics, web assembly, javascript,
image display, video playback, et alia.). Just look at firefox
or chromium for what that level of complexity invariably leads
to.