mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-19 07:21:20 +03:00
import KernelEx-4.5-Final
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* KernelEx
|
||||
* Copyright (C) 2009, Xeno86
|
||||
* Copyright (C) 2009-2010, Xeno86
|
||||
*
|
||||
* This file is part of KernelEx source code.
|
||||
*
|
||||
@ -73,17 +73,26 @@ FileFinder::~FileFinder()
|
||||
}
|
||||
|
||||
void FileFinder::search_for(const string& fn)
|
||||
{
|
||||
search_for(&fn, 1);
|
||||
}
|
||||
|
||||
void FileFinder::search_for(const string fns[], int num)
|
||||
{
|
||||
WIN32_FIND_DATA find_data;
|
||||
files.clear();
|
||||
pos = 0;
|
||||
HANDLE h = FindFirstFile(fn.c_str(), &find_data);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
return;
|
||||
do
|
||||
files.push_back(find_data.cFileName);
|
||||
while (FindNextFile(h, &find_data));
|
||||
CloseHandle(h);
|
||||
for (int i = 0 ; i < num ; i++)
|
||||
{
|
||||
const string& fn = fns[i];
|
||||
HANDLE h = FindFirstFile(fn.c_str(), &find_data);
|
||||
if (h == INVALID_HANDLE_VALUE)
|
||||
continue;
|
||||
do
|
||||
files.push_back(find_data.cFileName);
|
||||
while (FindNextFile(h, &find_data));
|
||||
FindClose(h);
|
||||
}
|
||||
stable_sort(files.begin(), files.end());
|
||||
}
|
||||
|
||||
@ -503,7 +512,8 @@ bool is_uptodate_dir(const string& path)
|
||||
FileFinder ff;
|
||||
struct _stat st;
|
||||
|
||||
ff.search_for(path + "*.c");
|
||||
string patterns[] = { path + "*.c", path + "*.cpp" };
|
||||
ff.search_for(patterns, sizeof(patterns)/sizeof(patterns[0]));
|
||||
while (!(file = ff.get_next_file()).empty())
|
||||
{
|
||||
_stat((path + file).c_str(), &st);
|
||||
@ -557,7 +567,8 @@ void work()
|
||||
continue;
|
||||
}
|
||||
|
||||
ff.search_for(path + "*.c");
|
||||
string patterns[] = { path + "*.c", path + "*.cpp" };
|
||||
ff.search_for(patterns, sizeof(patterns)/sizeof(patterns[0]));
|
||||
|
||||
//read declarations
|
||||
while (!(file = ff.get_next_file()).empty())
|
||||
|
@ -50,7 +50,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
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:console /machine:I386
|
||||
# ADD 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:console /machine:I386 /OPT:NOWIN98
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 /OPT:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "prep - Win32 Debug"
|
||||
@ -75,7 +75,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
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:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD 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:console /debug /machine:I386 /pdbtype:sept /OPT:NOWIN98
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /OPT:NOWIN98
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
FileFinder(const string& fn);
|
||||
~FileFinder();
|
||||
void search_for(const string& fn);
|
||||
void search_for(const string fns[], int num);
|
||||
string get_next_file();
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user