mirror of
https://github.com/rehlds/rechecker.git
synced 2025-01-26 02:27:53 +03:00
Ignore VS2015 files.
Improve parsing resources.ini (Added chec on BOM signatures)
This commit is contained in:
parent
a5fc34007d
commit
4727659db0
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,7 +6,10 @@
|
|||||||
**/msvc/*.opensdf
|
**/msvc/*.opensdf
|
||||||
**/msvc/*.user
|
**/msvc/*.user
|
||||||
**/msvc/*.suo
|
**/msvc/*.suo
|
||||||
|
**/msvc/*.db
|
||||||
|
**/msvc/*.opendb
|
||||||
**/msvc/*.aps
|
**/msvc/*.aps
|
||||||
|
**/msvc/.vs
|
||||||
**/msvc/ipch
|
**/msvc/ipch
|
||||||
**/PublishPath*.txt
|
**/PublishPath*.txt
|
||||||
**/Server*.bat
|
**/Server*.bat
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@ -213,13 +213,13 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v120_xp</PlatformToolset>
|
<PlatformToolset>v140_xp</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v120_xp</PlatformToolset>
|
<PlatformToolset>v140_xp</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -192,13 +192,25 @@ void CResourceFile::Log(flag_type_log type, const char *fmt, ...)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CreateDirectory
|
||||||
|
#undef CreateDirectory
|
||||||
|
#endif
|
||||||
|
|
||||||
void CreateDirectory(const char *path)
|
void CreateDirectory(const char *path)
|
||||||
{
|
{
|
||||||
_mkdir(path
|
#ifdef _WIN32
|
||||||
#ifndef _WIN32
|
DWORD attr = ::GetFileAttributesA(path);
|
||||||
,0755
|
if (attr == INVALID_FILE_ATTRIBUTES || (~attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||||
#endif // _WIN32
|
{
|
||||||
);
|
_mkdir(path);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
struct stat s;
|
||||||
|
if (stat(path, &s) != 0 || !S_ISDIR(s.st_mode))
|
||||||
|
{
|
||||||
|
_mkdir(path, 0755);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CResourceFile::Init()
|
void CResourceFile::Init()
|
||||||
@ -319,7 +331,11 @@ void CResourceFile::LoadResources()
|
|||||||
|
|
||||||
while (!feof(fp) && fgets(line, sizeof(line), fp))
|
while (!feof(fp) && fgets(line, sizeof(line), fp))
|
||||||
{
|
{
|
||||||
pos = line;
|
// skip bytes BOM signature
|
||||||
|
if ((byte)line[0] == 0xEFu && (byte)line[1] == 0xBBu && (byte)line[2] == 0xBFu)
|
||||||
|
pos = &line[3];
|
||||||
|
else
|
||||||
|
pos = line;
|
||||||
|
|
||||||
cline++;
|
cline++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user