paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [paragui-users] Let's release 1.0.2 ?


From: John Rainey
Subject: RE: [paragui-users] Let's release 1.0.2 ?
Date: Thu, 6 Jun 2002 12:19:02 -0400

I too am working on a open dialog. I have found a problem with the file
system archive in win32.c

The __PHYSFS_platformEnumerateFiles function drops the first file name in a
directory/archive. It gets the first file, checks to see if it is valid then
enters a for loop to fill the array, however when entering the loop it gets
the next file. I have changed this to a do while loop.

I am using paragui 1.0.1. Has this been found and fixed in 1.0.2????

CODE ENCLOSED

LinkedStringList *__PHYSFS_platformEnumerateFiles(const char *dirname,
                                                  int omitSymLinks)
{
    LinkedStringList *retval = NULL;
    LinkedStringList *l = NULL;
    LinkedStringList *prev = NULL;
    HANDLE dir;
    WIN32_FIND_DATA ent;

    dir = FindFirstFile(dirname, &ent);
    BAIL_IF_MACRO(dir == INVALID_HANDLE_VALUE, win32strerror(), NULL);

    // jpr 060602 the next line increments the file pointer to the next file
before the first is added
    // for (; FindNextFile(dir, &ent) != 0; )
   // changed for loop to do->while loop
    do
    {
        if (strcmp(ent.cFileName, ".") == 0)
            continue;

        if (strcmp(ent.cFileName, "..") == 0)
            continue;

        l = (LinkedStringList *) malloc(sizeof (LinkedStringList));
        if (l == NULL)
            break;

        l->str = (char *) malloc(strlen(ent.cFileName) + 1);
        if (l->str == NULL)
        {
            free(l);
            break;
        } /* if */

        strcpy(l->str, ent.cFileName);

        if (retval == NULL)
            retval = l;
        else
            prev->next = l;

        prev = l;
        l->next = NULL;
    } while(FindNextFile(dir, &ent) != 0);

    FindClose(dir);
    return(retval);
} /* __PHYSFS_platformEnumerateFiles */

-----Original Message-----
From:   address@hidden
[mailto:address@hidden On Behalf Of
Alexander Pipelka
Sent:   Thursday, June 06, 2002 9:45 AM
To:     paragui-users
Subject:        [paragui-users] Let's release 1.0.2 ?

Did anyone of you find things that should be fixed prior releasing
ParaGUI 1.0.2 ?

If not I'll schedule the release for Tue, 11th.

If there are some things to fix please let me know asap.

Alex

PS: OpenGL support requests are not valid for 1.0.2 :))
It's on my schedule for 1.0.3.




_______________________________________________
paragui-users mailing list
address@hidden
http://mail.freesoftware.fsf.org/mailman/listinfo/paragui-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]