Sujet : Re: encapsulating directory operations
De : mutazilah (at) *nospam* gmail.com (Paul Edwards)
Groupes : comp.lang.cDate : 21. May 2025, 10:38:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100k6u1$2p5fg$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Microsoft Outlook Express 6.00.2800.1106
"Kaz Kylheku" <
643-408-1753@kylheku.com> wrote in message
news:20250520171848.66@kylheku.com...A half-baked directory access interface that serves only a
small subset of programs (which access only their own file-based
data model that can be constrained to fall within the limitations)
is not going to be worth pushing all the way up into the
language standard.
That is a good way of putting it, I think.
I am after a "constrained" file system, that is actually portable.
I don't expect my files to have creation dates, access times,
permissions, as no way exists in C90 to retrieve those things,
and there is no requirement that they exist. The only thing
you have is fopen and fseek to the end to find the size, and
even that has limits that may require to you read the entire
file.
In the "real world", people ignore the "C90 model" and just
tie their application down to a particular platform.
I am instead wanting to restrict myself to what C90 actually
says exists.
Or at least come close to that. E.g. I might do an fseek to
SEEK_END and not bother to check for an error condition
and switch to fread. And I'll just say "I only support seekable
files".
C90 says what exists for valid technical reasons.
So keeping the SPIRIT of those "valid technical reasons",
I would like to say "well, the C90 committee could have
added xyz and remained within the spirit". The spirit which
includes things like supporting 36-bit machines. ie the way
int32_t doesn't.
So if possible - and it seems that it is possible - I want to
expand what C90 *could* have done *without*
compromising portability.
And I will have an entire OS and supporting tools all written
within those confines.
It probably won't be commercially successful.
But it will be portable.
It already exists in fact - but I can't write any apps that
traverse directories. None of the apps I mentioned above
actually traverse directories. I don't (can't actually),
do "gcc *.c". I instead have a makefile that lists every C
file.
If C90 is extended (my definition) to be able to handle *.c,
then I could make "gcc *.c" work (even on MVS -
especially TSO). Currently I am stuck.
BFN. Paul.