Skip to content

Commit

Permalink
Add <new> header file
Browse files Browse the repository at this point in the history
  • Loading branch information
drmortalwombat committed Oct 2, 2023
1 parent c53a288 commit 4e6769d
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 8 deletions.
11 changes: 11 additions & 0 deletions include/new
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include "stddef.h"

namespace std
{

void * operator new(size_t size);
void * operator new(void * ptr, size_t size);

}
1 change: 1 addition & 0 deletions include/opp/vector.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef OPP_VECTOR_H
#define OPP_VECTOR_H

#include <new>
#include <stdlib.h>
#include <opp/utility.h>

Expand Down
7 changes: 7 additions & 0 deletions oscar64/Scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,13 @@ void Scanner::NextRawToken(void)
mTokenIdent = Ident::Unique("operator->");
break;

case TK_NEW:
mTokenIdent = Ident::Unique("operator-new");
break;
case TK_DELETE:
mTokenIdent = Ident::Unique("operator-delete");
break;

default:
// dirty little hack to implement token preview, got to fix
// this with an infinit preview sequence at one point
Expand Down
2 changes: 1 addition & 1 deletion oscar64/oscar64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main2(int argc, const char** argv)

#else
strcpy(strProductName, "oscar64");
strcpy(strProductVersion, "1.26.220");
strcpy(strProductVersion, "1.26.221");

#ifdef __APPLE__
uint32_t length = sizeof(basePath);
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,26,220,0
PRODUCTVERSION 1,26,220,0
FILEVERSION 1,26,221,0
PRODUCTVERSION 1,26,221,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.26.220.0"
VALUE "FileVersion", "1.26.221.0"
VALUE "InternalName", "oscar64.exe"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "oscar64.exe"
VALUE "ProductName", "oscar64"
VALUE "ProductVersion", "1.26.220.0"
VALUE "ProductVersion", "1.26.221.0"
END
END
BLOCK "VarFileInfo"
Expand Down
32 changes: 29 additions & 3 deletions oscar64setup/oscar64setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@
}
"Entry"
{
"MsmKey" = "8:_26E38AB4F85C4C9DB284803C4A3473F3"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_29ED5D9B606D45DA80CFF329A7643DC8"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
Expand Down Expand Up @@ -1933,6 +1939,26 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_26E38AB4F85C4C9DB284803C4A3473F3"
{
"SourcePath" = "8:..\\include\\new"
"TargetName" = "8:new"
"Tag" = "8:"
"Folder" = "8:_7C0D28C244F14A21B5F72213BBE59B6F"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_29ED5D9B606D45DA80CFF329A7643DC8"
{
"SourcePath" = "8:..\\samples\\kernalio\\diskdir.c"
Expand Down Expand Up @@ -5686,15 +5712,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oscar64"
"ProductCode" = "8:{532AC6ED-3D25-48DC-91FD-DBE96AF0026F}"
"PackageCode" = "8:{9C57F5C1-1D7C-4915-8DD9-DFE81E950DCA}"
"ProductCode" = "8:{76114EBF-11A9-4AB2-9F9C-04180A284C4B}"
"PackageCode" = "8:{A38D2D44-B7EB-49A4-ACA8-8974DC5EB905}"
"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.26.220"
"ProductVersion" = "8:1.26.221"
"Manufacturer" = "8:oscar64"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down

0 comments on commit 4e6769d

Please sign in to comment.