Re: [AD] [TODO] About findfirst |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 14 Aug 2001, Matthew Smith <matt@xxxxxxxxxx> wrote:
> Now personally I doubt whether you can copyright a simple C structure, but
> if you can I think it might be necessary to collapse the middle layers of
> Eric schema and lose find* altogether and just have _al_find* etc.
> There's no point keeping find* without the ffblk, and I fear using the ffblk
> definition may be subject to LGPL when ported to another compiler.
Why is it necessary to port the djgpp routines anyway? IIRC, all
systems have emulated findfirst already, except for Windows.
Now, struct _finddata_t from Mingw looks like this:
struct _finddata_t
{
unsigned attrib; /* Attributes, see constants above. */
time_t time_create;
time_t time_access; /* always midnight local time */
time_t time_write;
_fsize_t size;
char name[FILENAME_MAX]; /* may include spaces. */
};
struct ffblk from Allegro (alconfig.h) looks like this:
struct ffblk
{
unsigned char ff_attrib;
unsigned short ff_ftime;
unsigned short ff_fdate;
unsigned long ff_fsize;
char ff_name[1024];
void *ff_info;
};
It seems pretty simple to map struct _finddata_t to struct ffblk
(not sure about `ff_date'), and "_findfirst" to "findfirst". The
issue is whether we really want to.
(I might have lost track of this thread, so apologies if I have.)
--
BUMPERGLINTS (BUMP ur glintz), n. The small reflective obstacles in the
middle of interstate highways which supposedly keep drivers awake and on
the track. -- Rich Hall, "Sniglets"