www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/11/19:38:53

Message-ID: <018a01c152ad$8f5ad8c0$845824d5@zephyr>
From: "Eric Botcazou" <ebotcazou AT libertysurf DOT fr>
To: "DJGPP workers" <djgpp-workers AT delorie DOT com>
References: <10110111357 DOT AA18726 AT clio DOT rice DOT edu> <006601c15277$3736ab00$d27824d5 AT zephyr> <1659-Thu11Oct2001211157+0200-eliz AT is DOT elta DOT co DOT il> <00d901c152a0$398d6fa0$845824d5 AT zephyr> <7458-Fri12Oct2001003417+0200-eliz AT is DOT elta DOT co DOT il>
Subject: Re: _findfirst() patch
Date: Fri, 12 Oct 2001 01:35:50 +0200
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Reply-To: djgpp-workers AT delorie DOT com

> > 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019