Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,745 of 4,255    |
|    James Harris to muta...@gmail.com    |
|    Re: microsoft vs linux    |
|    20 Jul 21 17:58:30    |
      From: james.harris.1@gmail.com              On 19/07/2021 10:23, muta...@gmail.com wrote:       > On Sunday, July 18, 2021 at 11:19:53 PM UTC+10, James Harris wrote:              ...              >>>> There's nothing wrong with fwrite (if one is emulating Unix) and I'm not       >>>> suggesting renaming it.       >>>       >>> Why did you mention Unix? This has nothing to do with       >>> Unix, other than it inspired the name vsyscall.       >       >> fwrite is specified by POSIX, although I should probably have       >> generalised Linux into POSIX rather than just into Unix.       >       > That transfers the question - why did you mention POSIX?       > This has nothing to do with POSIX.       >       > fwrite is specified by C90.              Is it? That's surprising. I could imagine it being mentioned as being       part of a/the standard C library but I personally wouldn't have thought       it would be part of the language and I could imagine some       implementations of C not having it. No matter.              I mentioned Posix because fwrite is an OS call which Posix incuded in       the standard (Posix being a portable OS interface and fwrite being part       of an OS interface).               From the little I know of clib it seems to be a library in which a       whole load of different things have been lumped together, most notably       both language support and OS-interfacing support. The clue is in the       name! I could imagine a "language" library including routines to support       the language - things like supporting routines and extra data structures       - but would have thought there would be additional OS-interfacing       libraries. It's possible that clib includes the lot simply for       historical reasons, so as not to break older code.              >       >>> Yes, I want something like this. And where you say "carries       >>> out the write" - actually I want every function involved in       >>> that to be called "fwrite" too. Whether it is writing to a       >>> particular sector of a FAT partition, or the FAT infrastructure       >>> doing a special-BIOS-layer fwrite to write to a section of disk 0x80.       >       >> I can't think why you might want multiple levels of software all to have       >> the same name. I'm not arguing that you should do otherwise. That's your       >> choice. But it does seem unnecessary and confusing.       >       > I think it's very neat. If you want to write 1 byte to a       > FAT partition at offset 372, you can use fseek and       > fputc, rather than fwrite.              On the face of it I cannot see from that why you would want multiple       functions all to be called fwrite.              >       > Why use names other than the C90-provided ones?       > What advantage does calling fatWrite() have compared       > to calling it fwrite()?              In what I suggested,               app --> language library --> OS library --> shim --> OS interface              fwrite would live in the |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca