mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-16 16:51:16 +00:00
Applied CoderJoe's (Thad Ward) win32 patchs. compiles, links and runs.
BTW, win32 targets now use opendir etc.
This commit is contained in:
parent
4d1176e8c5
commit
549af06fa9
13 changed files with 178 additions and 167 deletions
|
@ -47,17 +47,15 @@
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(WINDED) && !defined(GLQUAKE)
|
|
||||||
void VID_LockBuffer (void);
|
|
||||||
void VID_UnlockBuffer (void);
|
|
||||||
#else
|
|
||||||
#define VID_LockBuffer()
|
|
||||||
#define VID_UnlockBuffer()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <qtypes.h>
|
#include <qtypes.h>
|
||||||
#include <qstructs.h>
|
#include <qstructs.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define FNMATCH_FLAGS FNM_CASEFOLD
|
||||||
|
#else
|
||||||
|
#define FNMATCH_FLAGS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef max
|
#ifndef max
|
||||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
#define SUFFIX "*"
|
#define SUFFIX "*"
|
||||||
#define SLASH "\\"
|
#define SLASH "\\"
|
||||||
|
|
||||||
|
#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* opendir
|
* opendir
|
||||||
*
|
*
|
||||||
|
|
|
@ -1993,3 +1993,13 @@ void VID_InitCvars()
|
||||||
{
|
{
|
||||||
// It may not look it, but this is important
|
// It may not look it, but this is important
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VID_LockBuffer (void)
|
||||||
|
{
|
||||||
|
// need empty function, because the #define method was just silly
|
||||||
|
}
|
||||||
|
|
||||||
|
void VID_UnlockBuffer (void)
|
||||||
|
{
|
||||||
|
// need empty function, because the #define method was just silly
|
||||||
|
}
|
||||||
|
|
|
@ -44,10 +44,8 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <draw.h>
|
#include <draw.h>
|
||||||
|
|
||||||
#ifndef _WIN32 // Tonik
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
@ -192,6 +190,13 @@ void COM_Path_f (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
============
|
||||||
|
COM_Maplist_f
|
||||||
|
|
||||||
|
============
|
||||||
|
*/
|
||||||
|
|
||||||
void COM_Maplist_f (void)
|
void COM_Maplist_f (void)
|
||||||
{
|
{
|
||||||
searchpath_t *search;
|
searchpath_t *search;
|
||||||
|
@ -217,8 +222,8 @@ void COM_Maplist_f (void)
|
||||||
if (!dir_ptr)
|
if (!dir_ptr)
|
||||||
continue;
|
continue;
|
||||||
while ((dirent = readdir (dir_ptr)))
|
while ((dirent = readdir (dir_ptr)))
|
||||||
if (!fnmatch ("*.bsp", dirent->d_name, 0)
|
if (!fnmatch ("*.bsp", dirent->d_name, FNMATCH_FLAGS)
|
||||||
|| !fnmatch ("*.bsp.gz", dirent->d_name, 0))
|
|| !fnmatch ("*.bsp.gz", dirent->d_name, FNMATCH_FLAGS))
|
||||||
Con_Printf ("%s\n", dirent->d_name);
|
Con_Printf ("%s\n", dirent->d_name);
|
||||||
closedir (dir_ptr);
|
closedir (dir_ptr);
|
||||||
}
|
}
|
||||||
|
@ -710,60 +715,6 @@ pack_t *COM_LoadPackZipFile (char *packfile)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
// Yes i know, but at least the project does compile for Win32!
|
|
||||||
// Let's wait until someone implements Sys_FindFirst(),
|
|
||||||
// Sys_FindNext(), Sys_FindClose() for every platform.
|
|
||||||
//
|
|
||||||
// I wonder why didn't Mercury like the pak*.pak system?
|
|
||||||
//
|
|
||||||
// Or maybe taniwha will kindly mail me dirent.h and maybe
|
|
||||||
// i will port opendir etc to Win32?
|
|
||||||
// -- Tonik
|
|
||||||
void
|
|
||||||
COM_LoadGameDirectory(char *dir)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
searchpath_t *search;
|
|
||||||
pack_t *pak;
|
|
||||||
char pakfile[MAX_OSPATH];
|
|
||||||
qboolean done = false;
|
|
||||||
|
|
||||||
for ( i=0 ; !done ; i++ ) { // Load all Pak1 files
|
|
||||||
snprintf(pakfile, sizeof(pakfile), "%s/pak%i.pak", dir, i);
|
|
||||||
|
|
||||||
pak = COM_LoadPackFile(pakfile);
|
|
||||||
|
|
||||||
if( !pak ) {
|
|
||||||
done = true;
|
|
||||||
} else {
|
|
||||||
search = Z_Malloc (sizeof(searchpath_t));
|
|
||||||
search->pack = pak;
|
|
||||||
search->next = com_searchpaths;
|
|
||||||
com_searchpaths = search;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef GENERATIONS
|
|
||||||
for (done=false, i=0 ; !done ; i++ ) { // Load all Pak3 files.
|
|
||||||
snprintf(pakfile, sizeof(pakfile), "%s/pak%i.qz", dir, i);
|
|
||||||
|
|
||||||
pak = COM_LoadPackZipFile(pakfile);
|
|
||||||
|
|
||||||
if(!pak) {
|
|
||||||
done = true;
|
|
||||||
} else {
|
|
||||||
search = Hunk_Alloc (sizeof(searchpath_t));
|
|
||||||
search->pack = pak;
|
|
||||||
search->next = com_searchpaths;
|
|
||||||
com_searchpaths = search;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#else // !_WIN32
|
|
||||||
|
|
||||||
void
|
void
|
||||||
COM_LoadGameDirectory(char *dir)
|
COM_LoadGameDirectory(char *dir)
|
||||||
{
|
{
|
||||||
|
@ -778,7 +729,7 @@ COM_LoadGameDirectory(char *dir)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while ((dirent = readdir(dir_ptr))) {
|
while ((dirent = readdir(dir_ptr))) {
|
||||||
if (!fnmatch("*.pak", dirent->d_name, 0)) {
|
if (!fnmatch("*.pak", dirent->d_name, FNMATCH_FLAGS)) {
|
||||||
snprintf(pakfile, sizeof(pakfile), "%s/%s", dir, dirent->d_name);
|
snprintf(pakfile, sizeof(pakfile), "%s/%s", dir, dirent->d_name);
|
||||||
|
|
||||||
pak = COM_LoadPackFile(pakfile);
|
pak = COM_LoadPackFile(pakfile);
|
||||||
|
@ -812,8 +763,6 @@ COM_LoadGameDirectory(char *dir)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif // !_WIN32
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
|
|
|
@ -146,9 +146,9 @@ int Sys_FileTime (char *path)
|
||||||
int t = VID_ForceUnlockedAndReturnState();
|
int t = VID_ForceUnlockedAndReturnState();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
f = fopen(path, "rb");
|
f = Qopen(path, "rb");
|
||||||
if (f) {
|
if (f) {
|
||||||
fclose(f);
|
Qclose(f);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
#if defined(_WIN32) && !defined(SERVERONLY)
|
#if defined(_WIN32) && !defined(SERVERONLY)
|
||||||
|
|
|
@ -45,7 +45,7 @@ RSC=rc.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||||
# ADD CPP /nologo /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "id386" /YX /FD /c
|
# ADD CPP /nologo /WX /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /I "../winsup" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "id386" /YX /FD /c
|
||||||
# SUBTRACT CPP /Fr
|
# SUBTRACT CPP /Fr
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
@ -73,7 +73,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /Gm /GX /ZI /Od /I "../scitech/include" /I "../common" /I "../qw_common" /I "../qw_client" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "id386" /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /WX /Gm /GX /ZI /Od /I "../scitech/include" /I "../common" /I "../qw_common" /I "../qw_client" /I "../winsup" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "id386" /FR /YX /FD /GZ /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
||||||
|
@ -83,7 +83,8 @@ BSC32=bscmake.exe
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 dxguid.lib ..\scitech\lib\win32\vc\mgllt.lib winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Debug/qw-client-win.exe" /pdbtype:sept
|
# ADD LINK32 dxguid.lib ..\scitech\lib\win32\vc\mgllt.lib winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"Debug/qw-client-win.exe" /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /nodefaultlib
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "qw_client - Win32 GLRelease"
|
!ELSEIF "$(CFG)" == "qw_client - Win32 GLRelease"
|
||||||
|
|
||||||
|
@ -100,7 +101,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "QUAKEWORLD" /FR /YX /FD /c
|
# ADD BASE CPP /nologo /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "QUAKEWORLD" /FR /YX /FD /c
|
||||||
# ADD CPP /nologo /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "GLQUAKE" /D "id386" /YX /FD /c
|
# ADD CPP /nologo /WX /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /I "../winsup" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "GLQUAKE" /D "id386" /YX /FD /c
|
||||||
# SUBTRACT CPP /Fr
|
# SUBTRACT CPP /Fr
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
@ -131,7 +132,7 @@ LINK32=link.exe
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "GLQUAKE" /D "id386" /YX /FD /c
|
# ADD BASE CPP /nologo /GX /O2 /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "GLQUAKE" /D "id386" /YX /FD /c
|
||||||
# SUBTRACT BASE CPP /Fr
|
# SUBTRACT BASE CPP /Fr
|
||||||
# ADD CPP /nologo /GX /ZI /Od /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "GLQUAKE" /D "id386" /YX /FD /c
|
# ADD CPP /nologo /WX /GX /ZI /Od /I "../scitech/include" /I "../qw_common" /I "../common" /I "../qw_client" /I "../qw_server" /I "../winsup" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QUAKEWORLD" /D "GLQUAKE" /D "id386" /YX /FD /c
|
||||||
# SUBTRACT CPP /Fr
|
# SUBTRACT CPP /Fr
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
@ -459,6 +460,10 @@ SOURCE=..\common\d_zpoint.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\dirent.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\draw.c
|
SOURCE=..\common\draw.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "qw_client - Win32 Release"
|
!IF "$(CFG)" == "qw_client - Win32 Release"
|
||||||
|
@ -479,6 +484,10 @@ SOURCE=..\common\draw.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\fnmatch.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\gl_cl_parse.c
|
SOURCE=..\common\gl_cl_parse.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "qw_client - Win32 Release"
|
!IF "$(CFG)" == "qw_client - Win32 Release"
|
||||||
|
|
|
@ -42,7 +42,7 @@ RSC=rc.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
# ADD CPP /nologo /GX /O2 /I "../common" /I "../qw_common" /I "../qw_server" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "QUAKEWORLD" /D "SERVERONLY" /YX /FD /c
|
# ADD CPP /nologo /WX /GX /O2 /I "../common" /I "../qw_common" /I "../qw_server" /I "../winsup" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "QUAKEWORLD" /D "SERVERONLY" /YX /FD /c
|
||||||
# SUBTRACT CPP /Fr
|
# SUBTRACT CPP /Fr
|
||||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x419 /d "NDEBUG"
|
# ADD RSC /l 0x419 /d "NDEBUG"
|
||||||
|
@ -67,7 +67,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /Gm /GX /ZI /Od /I "../common" /I "../qw_common" /I "../qw_server" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "QUAKEWORLD" /D "SERVERONLY" /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /WX /Gm /GX /ZI /Od /I "../common" /I "../qw_common" /I "../qw_server" /I "../winsup" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "QUAKEWORLD" /D "SERVERONLY" /FR /YX /FD /GZ /c
|
||||||
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x419 /d "_DEBUG"
|
# ADD RSC /l 0x419 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
|
@ -104,6 +104,14 @@ SOURCE=..\common\cvar.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\dirent.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\fnmatch.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\lib_replace.c
|
SOURCE=..\common\lib_replace.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -774,7 +774,7 @@ void errorexit (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tokenstat whitespace (char c)
|
tokenstat whitespace (int c)
|
||||||
{
|
{
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
return LINE_DONE;
|
return LINE_DONE;
|
||||||
|
|
|
@ -42,7 +42,7 @@ RSC=rc.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
|
||||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
|
# ADD CPP /nologo /W1 /WX /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
|
@ -66,7 +66,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /c
|
# ADD CPP /nologo /W1 /WX /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /FD /c
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
|
|
|
@ -144,10 +144,10 @@ int wfilelength (QFile *f)
|
||||||
|
|
||||||
t = VID_ForceUnlockedAndReturnState ();
|
t = VID_ForceUnlockedAndReturnState ();
|
||||||
|
|
||||||
pos = ftell (f);
|
pos = Qtell (f);
|
||||||
fseek (f, 0, SEEK_END);
|
Qseek (f, 0, SEEK_END);
|
||||||
end = ftell (f);
|
end = Qtell (f);
|
||||||
fseek (f, pos, SEEK_SET);
|
Qseek (f, pos, SEEK_SET);
|
||||||
|
|
||||||
VID_ForceLockState (t);
|
VID_ForceLockState (t);
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ int Sys_FileOpenRead (char *path, int *hndl)
|
||||||
|
|
||||||
i = findhandle ();
|
i = findhandle ();
|
||||||
|
|
||||||
f = fopen(path, "rb");
|
f = Qopen(path, "rb");
|
||||||
|
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
|
@ -193,7 +193,7 @@ int Sys_FileOpenWrite (char *path)
|
||||||
|
|
||||||
i = findhandle ();
|
i = findhandle ();
|
||||||
|
|
||||||
f = fopen(path, "wb");
|
f = Qopen(path, "wb");
|
||||||
if (!f)
|
if (!f)
|
||||||
Sys_Error ("Error opening %s: %s", path,strerror(errno));
|
Sys_Error ("Error opening %s: %s", path,strerror(errno));
|
||||||
sys_handles[i] = f;
|
sys_handles[i] = f;
|
||||||
|
@ -208,7 +208,7 @@ void Sys_FileClose (int handle)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
t = VID_ForceUnlockedAndReturnState ();
|
t = VID_ForceUnlockedAndReturnState ();
|
||||||
fclose (sys_handles[handle]);
|
Qclose (sys_handles[handle]);
|
||||||
sys_handles[handle] = NULL;
|
sys_handles[handle] = NULL;
|
||||||
VID_ForceLockState (t);
|
VID_ForceLockState (t);
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ void Sys_FileSeek (int handle, int position)
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
t = VID_ForceUnlockedAndReturnState ();
|
t = VID_ForceUnlockedAndReturnState ();
|
||||||
fseek (sys_handles[handle], position, SEEK_SET);
|
Qseek (sys_handles[handle], position, SEEK_SET);
|
||||||
VID_ForceLockState (t);
|
VID_ForceLockState (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ int Sys_FileRead (int handle, void *dest, int count)
|
||||||
int t, x;
|
int t, x;
|
||||||
|
|
||||||
t = VID_ForceUnlockedAndReturnState ();
|
t = VID_ForceUnlockedAndReturnState ();
|
||||||
x = fread (dest, 1, count, sys_handles[handle]);
|
x = Qread (sys_handles[handle], dest, count);
|
||||||
VID_ForceLockState (t);
|
VID_ForceLockState (t);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ int Sys_FileWrite (int handle, void *data, int count)
|
||||||
int t, x;
|
int t, x;
|
||||||
|
|
||||||
t = VID_ForceUnlockedAndReturnState ();
|
t = VID_ForceUnlockedAndReturnState ();
|
||||||
x = fwrite (data, 1, count, sys_handles[handle]);
|
x = Qwrite (sys_handles[handle], data, count);
|
||||||
VID_ForceLockState (t);
|
VID_ForceLockState (t);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ RSC=rc.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||||
# ADD CPP /nologo /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /YX /FD /c
|
# ADD CPP /nologo /WX /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /I "../winsup" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||||
|
@ -71,7 +71,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /Gm /GX /ZI /Od /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /WX /Gm /GX /ZI /Od /I "../common" /I "../uquake" /I "../scitech/include" /I "../winsup" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /FR /YX /FD /GZ /c
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
# ADD BASE RSC /l 0x419 /d "_DEBUG"
|
||||||
|
@ -81,8 +81,8 @@ BSC32=bscmake.exe
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 dxguid.lib ..\scitech\lib\win32\vc\mgllt.lib winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"Debug/uquake-win.exe" /pdbtype:sept
|
# ADD LINK32 dxguid.lib ..\scitech\lib\win32\vc\mgllt.lib winmm.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libc.lib" /out:"Debug/uquake-win.exe" /pdbtype:sept
|
||||||
# SUBTRACT LINK32 /pdb:none
|
# SUBTRACT LINK32 /verbose /pdb:none /incremental:no /nodefaultlib
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "uquake - Win32 GLRelease"
|
!ELSEIF "$(CFG)" == "uquake - Win32 GLRelease"
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /YX /FD /c
|
# ADD BASE CPP /nologo /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /YX /FD /c
|
||||||
# ADD CPP /nologo /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /D "GLQUAKE" /YX /FD /c
|
# ADD CPP /nologo /WX /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /I "../winsup" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /D "GLQUAKE" /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||||
|
@ -126,7 +126,7 @@ LINK32=link.exe
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /D "GLQUAKE" /YX /FD /c
|
# ADD BASE CPP /nologo /GX /O2 /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /D "GLQUAKE" /YX /FD /c
|
||||||
# ADD CPP /nologo /GX /ZI /Od /I "../common" /I "../uquake" /I "../scitech/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /D "GLQUAKE" /FR /YX /FD /c
|
# ADD CPP /nologo /WX /GX /ZI /Od /I "../common" /I "../uquake" /I "../scitech/include" /I "../winsup" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "UQUAKE" /D "id386" /D "GLQUAKE" /FR /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
# ADD BASE RSC /l 0x419 /d "NDEBUG"
|
||||||
|
@ -456,6 +456,10 @@ SOURCE=..\common\d_zpoint.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\dirent.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\draw.c
|
SOURCE=..\common\draw.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "uquake - Win32 Release"
|
!IF "$(CFG)" == "uquake - Win32 Release"
|
||||||
|
@ -476,6 +480,10 @@ SOURCE=..\common\draw.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\common\fnmatch.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\gl_cl_parse.c
|
SOURCE=..\common\gl_cl_parse.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "uquake - Win32 Release"
|
!IF "$(CFG)" == "uquake - Win32 Release"
|
||||||
|
@ -1279,17 +1287,6 @@ SOURCE=..\common\vid_win.c
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\common\view.c
|
SOURCE=..\common\view.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "uquake - Win32 Release"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "uquake - Win32 Debug"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "uquake - Win32 GLRelease"
|
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "uquake - Win32 GLDebug"
|
|
||||||
|
|
||||||
!ENDIF
|
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
|
96
winsup/dirent.h
Normal file
96
winsup/dirent.h
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* DIRENT.H (formerly DIRLIB.H)
|
||||||
|
*
|
||||||
|
* by M. J. Weinstein Released to public domain 1-Jan-89
|
||||||
|
*
|
||||||
|
* Because I have heard that this feature (opendir, readdir, closedir)
|
||||||
|
* it so useful for programmers coming from UNIX or attempting to port
|
||||||
|
* UNIX code, and because it is reasonably light weight, I have included
|
||||||
|
* it in the Mingw32 package. I have also added an implementation of
|
||||||
|
* rewinddir, seekdir and telldir.
|
||||||
|
* - Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
|
||||||
|
*
|
||||||
|
* This code is distributed in the hope that is will be useful but
|
||||||
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
||||||
|
* DISCLAMED. This includeds but is not limited to warranties of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
* $Revision$
|
||||||
|
* $Author$
|
||||||
|
* $Date$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __STRICT_ANSI__
|
||||||
|
|
||||||
|
#ifndef _DIRENT_H_
|
||||||
|
#define _DIRENT_H_
|
||||||
|
|
||||||
|
/* All the headers include this file. */
|
||||||
|
//#include <_mingw.h>
|
||||||
|
|
||||||
|
#include <io.h>
|
||||||
|
|
||||||
|
#ifndef RC_INVOKED
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct dirent
|
||||||
|
{
|
||||||
|
long d_ino; /* Always zero. */
|
||||||
|
unsigned short d_reclen; /* Always zero. */
|
||||||
|
unsigned short d_namlen; /* Length of name in d_name. */
|
||||||
|
char* d_name; /* File name. */
|
||||||
|
/* NOTE: The name in the dirent structure points to the name in the
|
||||||
|
* finddata_t structure in the DIR. */
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is an internal data structure. Good programmers will not use it
|
||||||
|
* except as an argument to one of the functions below.
|
||||||
|
*/
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
/* disk transfer area for this dir */
|
||||||
|
struct _finddata_t dd_dta;
|
||||||
|
|
||||||
|
/* dirent struct to return from dir (NOTE: this makes this thread
|
||||||
|
* safe as long as only one thread uses a particular DIR struct at
|
||||||
|
* a time) */
|
||||||
|
struct dirent dd_dir;
|
||||||
|
|
||||||
|
/* _findnext handle */
|
||||||
|
long dd_handle;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Status of search:
|
||||||
|
* 0 = not started yet (next entry to read is first entry)
|
||||||
|
* -1 = off the end
|
||||||
|
* positive = 0 based index of next entry
|
||||||
|
*/
|
||||||
|
short dd_stat;
|
||||||
|
|
||||||
|
/* given path for dir with search pattern (struct is extended) */
|
||||||
|
char dd_name[1];
|
||||||
|
} DIR;
|
||||||
|
|
||||||
|
|
||||||
|
DIR* opendir (const char*);
|
||||||
|
struct dirent* readdir (DIR*);
|
||||||
|
int closedir (DIR*);
|
||||||
|
void rewinddir (DIR*);
|
||||||
|
long telldir (DIR*);
|
||||||
|
void seekdir (DIR*, long);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* Not RC_INVOKED */
|
||||||
|
|
||||||
|
#endif /* Not _DIRENT_H_ */
|
||||||
|
|
||||||
|
#endif /* Not __STRICT_ANSI__ */
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
/* Posix dirent.h for WIN32. */
|
|
||||||
|
|
||||||
/* Including this file should not require any Windows headers. */
|
|
||||||
|
|
||||||
#ifndef _SYS_DIRENT_H
|
|
||||||
#define _SYS_DIRENT_H
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
struct dirent
|
|
||||||
{
|
|
||||||
long __d_reserved[4];
|
|
||||||
ino_t d_ino; /* Just for compatibility, it's junk */
|
|
||||||
char d_name[256]; /* FIXME: use NAME_MAX? */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define __DIRENT_COOKIE 0xdede4242
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
/* This is first to set alignment in non _COMPILING_NEWLIB case. */
|
|
||||||
unsigned long __d_cookie;
|
|
||||||
struct dirent *__d_dirent;
|
|
||||||
char *__d_dirname; /* directory name with trailing '*' */
|
|
||||||
off_t __d_position; /* used by telldir/seekdir */
|
|
||||||
unsigned long __d_dirhash; /* hash of directory name for use by
|
|
||||||
readdir */
|
|
||||||
union
|
|
||||||
{
|
|
||||||
#ifdef _COMPILING_NEWLIB
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
HANDLE __handle;
|
|
||||||
char __open_p;
|
|
||||||
} __d_data;
|
|
||||||
#endif
|
|
||||||
char __d_filler[16];
|
|
||||||
} __d_u;
|
|
||||||
} DIR;
|
|
||||||
|
|
||||||
DIR *opendir (const char *);
|
|
||||||
struct dirent *readdir (DIR *);
|
|
||||||
void rewinddir (DIR *);
|
|
||||||
int closedir (DIR *);
|
|
||||||
|
|
||||||
#ifndef _POSIX_SOURCE
|
|
||||||
off_t telldir (DIR *);
|
|
||||||
void seekdir (DIR *, off_t loc);
|
|
||||||
|
|
||||||
int scandir (const char *__dir,
|
|
||||||
struct dirent ***__namelist,
|
|
||||||
int (*select) (const struct dirent *),
|
|
||||||
int (*compar) (const struct dirent **, const struct dirent **));
|
|
||||||
|
|
||||||
int alphasort (const struct dirent **__a, const struct dirent **__b);
|
|
||||||
#endif /* _POSIX_SOURCE */
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in a new issue