Mail Archives: djgpp-workers/2001/10/11/19:38:53
> > Yes, but half of the code of findfirst()/findnext() is duplicated in
> > _dos_findfirst()/_dos_findnext(), so why not let the former functions
> > call the latter if LFN is set to N ?
>
> Pushing LFN=n into the environment in library functions is
> ``considered harmful'' around here.
Let me elaborate: when _USE_LFN is (bool) FALSE, findfirst() and findnext()
use exactly the same code as _dos_findfirst() and _dos_findnext(). So
applying here the 'reuse code when you can' paradigm leads directly to let
the former functions call the latter when _USE_LFN is FALSE.
> I'd say put them in the same directory where findfirst and findnext
> live.
Ok, so libc/dos/dir for the low-level wrapper functions.
> No, I think dir.h is the place. libc/dosio.h is for things that are
> so private to the library that we don't want anyone to know about
> them.
Ok, dir.h for their declarations.
> > Same thing for my helper function __dostime_to_time_t().
>
> I suggest src/libc/dos/dos, there are similar functions there
> already.
Ok, then with only one starting underscore ? dos.h header file ?
> Actually, it would be nice if every external function were documented.
What do you call external function, given that everything is external to a
certain extent with the 'one function per file' rule ?
Is __doserr_to_errno() external for example ?
--
Eric Botcazou
ebotcazou AT multimania DOT com
- Raw text -