Skip to content

Commit

Permalink
Filenames now full
Browse files Browse the repository at this point in the history
  • Loading branch information
drmortalwombat committed Sep 21, 2021
1 parent 1d64404 commit 3f5f3ee
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 17 deletions.
2 changes: 0 additions & 2 deletions include/crt.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,4 @@ enum ByteCode
BC_NATIVE = 0x75
};

#pragma compile("crt.c")

#endif
27 changes: 20 additions & 7 deletions oscar64/Preprocessor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "Preprocessor.h"
#include <string.h>
#include <stdlib.h>

SourcePath::SourcePath(const char* path)
{
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions oscar64/oscar64.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions oscar64setup/oscar64setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 3f5f3ee

Please sign in to comment.