renamed file-win32.c/h to dir-win32.c/h

corrected function definition for directory access functions.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@302 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Felix Arends 2002-04-28 19:27:16 +00:00
parent aca76186c0
commit 98ed5ed17a
4 changed files with 11 additions and 27 deletions

View file

@ -19,8 +19,8 @@
#include <io.h>
#include <malloc.h>
#include "file-win32.h"
#include "file.h"
#include "dir-win32.h"
#include "dir.h"
// Directory operations
//
@ -36,7 +36,7 @@ DIR *opendir (
if ((p->handle = _findfirst (dirname, &fd)) == -1)
{
free (p);
return NULL;
return 0;
}
return p;
}
@ -53,14 +53,13 @@ int closedir (
// read dir
// read next entry in directory
dirent *readdir (
struct dirent *readdir (
DIR *dir
)
{
struct _finddata_t fd;
if (_findnext (dir->handle, &fd) == -1)
return NULL;
return 0;
memcpy (dir->fd.d_name, fd.name, 256);
dir->fd.d_reclen = sizeof (dirent);
return &dir->fd;
}

View file

@ -21,22 +21,7 @@
#define __FILE_WIN32_H__
#include <io.h>
#include "dir.h"
struct direnttag
{
long d_ino; /* inode number */
long d_off; /* offset to the next dirent */
unsigned short d_reclen;/* length of this record */
unsigned char d_type; /* type of file */
char d_name[256]; /* filename */
};
typedef struct direnttag dirent;
struct DIRtag
{
dirent fd;
intptr_t handle;
};
typedef struct DIRtag DIR;
#endif // #ifndef __FILE_WIN32_H__

Binary file not shown.

View file

@ -115,6 +115,9 @@
<File
RelativePath="..\..\firmware\chartables.c">
</File>
<File
RelativePath="dir-win32.c">
</File>
<File
RelativePath="kernel.c">
</File>
@ -134,9 +137,6 @@
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc">
<File
RelativePath="file-win32.h">
</File>
<File
RelativePath="lcd-win32.h">
</File>