-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into value_range_propagation_merging_master
- Loading branch information
Showing
66 changed files
with
4,706 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
# Little shell script to compile, link, and run all the samples. | ||
# Use dmd2\windows\bin\shell.exe to execute. | ||
|
||
DMD=..\..\windows\bin\dmd | ||
DFLAGS= | ||
CLEAN=clean.bat | ||
|
||
|
||
|
||
#~ $(DMD) chello $(DFLAGS) # which compilation flags? | ||
#~ chello | ||
|
||
$(DMD) d2html $(DFLAGS) | ||
d2html d2html.d | ||
|
||
$(DMD) dhry $(DFLAGS) | ||
dhry | ||
|
||
$(DMD) hello $(DFLAGS) | ||
hello | ||
|
||
#~ $(DMD) htmlget $(DFLAGS) # broken | ||
|
||
#~ $(DMD) listener $(DFLAGS) # broken | ||
|
||
|
||
$(DMD) pi $(DFLAGS) | ||
pi 1000 | ||
|
||
$(DMD) sieve $(DFLAGS) | ||
sieve | ||
|
||
$(DMD) wc $(DFLAGS) | ||
wc wc.d | ||
|
||
$(DMD) wc2 $(DFLAGS) | ||
wc2 wc2.d | ||
|
||
$(DMD) winsamp gdi32.lib winsamp.def | ||
winsamp | ||
|
||
$(CLEAN) | ||
|
||
#~ broken: | ||
# COM client/server example | ||
#~ $(DMD) -c dserver -release $(DFLAGS) | ||
#~ $(DMD) -c chello $(DFLAGS) | ||
#~ $(DMD) dserver.obj chello.obj uuid.lib ole32.lib advapi32.lib kernel32.lib user32.lib dserver.def -L/map | ||
#~ $(DMD) dclient $(DFLAGS) ole32.lib uuid.lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
..\..\windows\bin\shell all.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
|
||
/* Server for IHello | ||
* Heavily modified from: | ||
*/ | ||
/* | ||
* SELFREG.CPP | ||
* Server Self-Registrtation Utility, Chapter 5 | ||
* | ||
* Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved | ||
* | ||
* Kraig Brockschmidt, Microsoft | ||
* Internet : [email protected] | ||
* Compuserve: >INTERNET:[email protected] | ||
*/ | ||
|
||
// From an example from "Inside OLE" Copyright Microsoft | ||
|
||
import std.c.stdio; | ||
import std.c.stdlib; | ||
import std.string; | ||
import std.c.windows.windows; | ||
import std.c.windows.com; | ||
|
||
GUID CLSID_Hello = { 0x30421140, 0, 0, [0xC0, 0, 0, 0, 0, 0, 0, 0x46] }; | ||
GUID IID_IHello = { 0x00421140, 0, 0, [0xC0, 0, 0, 0, 0, 0, 0, 0x46] }; | ||
|
||
interface IHello : IUnknown | ||
{ | ||
extern (Windows) : | ||
int Print(); | ||
} | ||
|
||
// Type for an object-destroyed callback | ||
alias void (*PFNDESTROYED)(); | ||
|
||
/* | ||
* The class definition for an object that singly implements | ||
* IHello in D. | ||
*/ | ||
class CHello : ComObject, IHello | ||
{ | ||
protected: | ||
IUnknown m_pUnkOuter; // Controlling unknown | ||
|
||
PFNDESTROYED m_pfnDestroy; // To call on closure | ||
|
||
/* | ||
* pUnkOuter LPUNKNOWN of a controlling unknown. | ||
* pfnDestroy PFNDESTROYED to call when an object | ||
* is destroyed. | ||
*/ | ||
public this(IUnknown pUnkOuter, PFNDESTROYED pfnDestroy) | ||
{ | ||
m_pUnkOuter = pUnkOuter; | ||
m_pfnDestroy = pfnDestroy; | ||
} | ||
|
||
~this() | ||
{ | ||
MessageBoxA(null, "CHello.~this()", null, MB_OK); | ||
} | ||
|
||
extern (Windows) : | ||
/* | ||
* Performs any intialization of a CHello that's prone to failure | ||
* that we also use internally before exposing the object outside. | ||
* Return Value: | ||
* BOOL true if the function is successful, | ||
* false otherwise. | ||
*/ | ||
|
||
public: | ||
BOOL Init() | ||
{ | ||
MessageBoxA(null, "CHello.Init()", null, MB_OK); | ||
return true; | ||
} | ||
|
||
public: | ||
HRESULT QueryInterface(const (IID)*riid, LPVOID *ppv) | ||
{ | ||
MessageBoxA(null, "CHello.QueryInterface()", null, MB_OK); | ||
|
||
if (IID_IUnknown == *riid) | ||
*ppv = cast(void*) cast(IUnknown) this; | ||
else if (IID_IHello == *riid) | ||
*ppv = cast(void*) cast(IHello) this; | ||
else | ||
{ | ||
*ppv = null; | ||
return E_NOINTERFACE; | ||
} | ||
|
||
AddRef(); | ||
return NOERROR; | ||
} | ||
|
||
ULONG Release() | ||
{ | ||
MessageBoxA(null, "CHello.Release()", null, MB_OK); | ||
|
||
if (0 != --count) | ||
return count; | ||
|
||
/* | ||
* Tell the housing that an object is going away so it can | ||
* shut down if appropriate. | ||
*/ | ||
MessageBoxA(null, "CHello Destroy()", null, MB_OK); | ||
|
||
if (m_pfnDestroy) | ||
(*m_pfnDestroy)(); | ||
|
||
// delete this; | ||
return 0; | ||
} | ||
|
||
// IHello members | ||
HRESULT Print() | ||
{ | ||
MessageBoxA(null, "CHello.Print()", null, MB_OK); | ||
return NOERROR; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
setlocal EnableDelayedExpansion | ||
del *.obj | ||
del *.map | ||
del *.res |
Oops, something went wrong.