Filenames now full

This commit is contained in:
drmortalwombat 2021-09-21 15:08:05 +02:00
parent 1d64404b24
commit 3f5f3ee7ea
4 changed files with 28 additions and 17 deletions

View File

@ -160,6 +160,4 @@ enum ByteCode
BC_NATIVE = 0x75
};
#pragma compile("crt.c")
#endif

View File

@ -1,5 +1,6 @@
#include "Preprocessor.h"
#include <string.h>
#include <stdlib.h>
SourcePath::SourcePath(const char* path)
{
@ -49,19 +50,31 @@ SourceFile::~SourceFile(void)
bool SourceFile::Open(const char* name, const char* path)
{
strcpy_s(mFileName, path);
int n = strlen(mFileName);
char fname[200];
if (n > 0 && mFileName[n - 1] != '/')
strcpy_s(fname, path);
int n = strlen(fname);
if (n > 0 && fname[n - 1] != '/')
{
mFileName[n++] = '/';
mFileName[n] = 0;
fname[n++] = '/';
fname[n] = 0;
}
strcat_s(mFileName + n, sizeof(mFileName) - n, name);
strcat_s(fname + n, sizeof(fname) - n, name);
if (!fopen_s(&mFile, mFileName, "r"))
if (!fopen_s(&mFile, fname, "r"))
{
_fullpath(mFileName, fname, sizeof(mFileName));
char* p = mFileName;
while (*p)
{
if (*p == '\\')
*p = '/';
p++;
}
return true;
}
return false;
}

View File

@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,30,0
PRODUCTVERSION 1,0,30,0
FILEVERSION 1,0,31,0
PRODUCTVERSION 1,0,31,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -43,12 +43,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "oscar64"
VALUE "FileDescription", "oscar64 compiler"
VALUE "FileVersion", "1.0.30.0"
VALUE "FileVersion", "1.0.31.0"
VALUE "InternalName", "oscar64.exe"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "oscar64.exe"
VALUE "ProductName", "oscar64"
VALUE "ProductVersion", "1.0.30.0"
VALUE "ProductVersion", "1.0.31.0"
END
END
BLOCK "VarFileInfo"

View File

@ -564,15 +564,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oscar64"
"ProductCode" = "8:{3661BD30-0CEA-48FD-9F79-F3EE87E35F13}"
"PackageCode" = "8:{A215641A-3D35-468B-AAAA-AB1067861712}"
"ProductCode" = "8:{62476C9D-FE04-46D6-94CA-6521843D6575}"
"PackageCode" = "8:{67130DB4-0306-455D-881B-FCE28C4AB1C9}"
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.30"
"ProductVersion" = "8:1.0.31"
"Manufacturer" = "8:oscar64"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
@ -1086,7 +1086,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_FB2E467BC172457785F4279BB0BFE8B6"
{
"SourcePath" = "8:..\\Debug\\oscar64.exe"
"SourcePath" = "8:..\\Release\\oscar64.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_C95D3F098F884652A04D707B55B980EE"