Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make Kernel.cs compile under visual studio

make Builtins a partial class
add stub for sprintf
add Printf.cs to Makefile
  • Loading branch information...
commit a7575a1d229856f435dfdc259663015a6918c953 1 parent 0db7bb8
@diakopter diakopter authored
View
2  Makefile
@@ -7,7 +7,7 @@ RM=rm -f
CP=cp
cskernel=Kernel.cs Builtins.cs Cursor.cs JSYNC.cs NieczaCLR.cs Utils.cs \
- ObjModel.cs BigInteger.cs
+ ObjModel.cs BigInteger.cs Printf.cs
csbackend=CLRBackend.cs
csxdr=CrossDomainReceiver.cs
View
4 lib/Builtins.cs
@@ -18,7 +18,7 @@ public class UpCallee: CrossDomainReceiver {
}
}
-public class Builtins {
+public partial class Builtins {
public static P6any NominalCheck(string name, STable mo, Variable v) {
P6any r = v.Fetch();
if (!r.mo.HasMRO(mo))
@@ -1526,7 +1526,7 @@ class SubstrLValue: Variable {
private static AppDomain subDomain;
private static string backend;
- // Better, but still fudgy. Relies too mcuh on path structure.
+ // Better, but still fudgy. Relies too much on path structure.
private static AppDomain GetSubDomain() {
if (subDomain != null) return subDomain;
View
2  lib/CORE.setting
@@ -603,6 +603,8 @@ sub say(|$c) { $PROCESS::OUTPUT_USED := True; Q:CgOp { (rnull (say (obj_gets
sub print(|$c) { $PROCESS::OUTPUT_USED := True; Q:CgOp { (rnull (print (obj_getstr {Niecza::gistcat(|$c)}))) }; True }
sub note(|$c) { $PROCESS::OUTPUT_USED := True; Q:CgOp { (rnull (note (obj_getstr {Niecza::gistcat(|$c)}))) }; True }
+sub sprintf(\|$args) { Q:CgOp { (sprintf (unbox fvarlist (@ {$args}))) } }
+
sub exit($status = 0) { Q:CgOp {
(rnull [exit (cast int (obj_getnum {$status}))])
} }
View
3  lib/Kernel.cs
@@ -1214,7 +1214,8 @@ public class SubInfo {
AddHint(name).v = Kernel.BoxAnyMO<string>(value, Kernel.StrMO);
}
- public bool GetLocalHint(string name, out BValue val) {
+ public bool GetLocalHint(string name, out BValue val) {
+ val = null;
return (hints != null && hints.TryGetValue(name, out val));
}
View
46 lib/Solution/Niecza/Niecza.csproj
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,6 +10,25 @@
<RootNamespace>Niecza</RootNamespace>
<AssemblyName>Niecza</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -21,6 +40,8 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<additionalargs>/unsafe+</additionalargs>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -29,6 +50,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -66,6 +88,26 @@
<Compile Include="..\..\Utils.cs">
<Link>Utils.cs</Link>
</Compile>
+ <Compile Include="..\..\Printf.cs">
+ <Link>Printf.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
View
BIN  lib/Solution/Niecza/Niecza.pidb
Binary file not shown
View
7 lib/Solution/Solution.sln
@@ -1,6 +1,6 @@

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Niecza", "Niecza\Niecza.csproj", "{07760CA6-1010-43E9-A46E-8E9712218E8E}"
EndProject
Global
@@ -14,6 +14,9 @@ Global
{07760CA6-1010-43E9-A46E-8E9712218E8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07760CA6-1010-43E9-A46E-8E9712218E8E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Niecza\Niecza.csproj
Policies = $0
View
7 lib/Solution/Solution.userprefs
@@ -1,11 +1,6 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
- <MonoDevelop.Ide.Workbench ActiveDocument="..\Kernel.cs">
- <Files>
- <File FileName="..\Builtins.cs" Line="1426" Column="28" />
- <File FileName="..\Kernel.cs" Line="935" Column="16" />
- </Files>
- </MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.Workbench />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
Please sign in to comment.
Something went wrong with that request. Please try again.