mirror of https://gitlab.com/basile.b/dexed.git
cleanup and fix page control test app
This commit is contained in:
parent
1bfc03ce2d
commit
c14949b755
|
@ -1,100 +0,0 @@
|
|||
program cedast_loader;
|
||||
|
||||
{$MODE OBJFPC}
|
||||
|
||||
uses dynlibs, classes, sysutils;
|
||||
|
||||
type
|
||||
|
||||
TAstHandle = NativeInt;
|
||||
|
||||
TAstNotification = procedure(param: pointer); cdecl;
|
||||
|
||||
{$Z1}
|
||||
|
||||
TSerializationFormat = (json, pas);
|
||||
|
||||
TNewAst = function(param: Pointer; clbck: TAstNotification): TAstHandle; cdecl;
|
||||
TDeleteAst = procedure(tok: TAstHandle); cdecl;
|
||||
|
||||
TScanFile = procedure(tok: TAstHandle; filename: PChar); cdecl;
|
||||
TScanBuffer = procedure(tok: TAstHandle; buffer: PByte; len: NativeUint); cdecl;
|
||||
|
||||
|
||||
TModuleName = function(tok: TAstHandle): PChar; cdecl;
|
||||
TSymbolList = function(tok: TAstHandle; var len: NativeUint ; fmt: TSerializationFormat): PByte; cdecl;
|
||||
|
||||
|
||||
|
||||
var
|
||||
dast: TLibHandle;
|
||||
newAst: TNewAst;
|
||||
deleteast: TDeleteAst;
|
||||
scanFile: TScanFile;
|
||||
scanBuffer: TScanBuffer;
|
||||
moduleName: TModuleName;
|
||||
symbolList: TSymbolList;
|
||||
hdl: TAstHandle;
|
||||
len: NativeUint = 0;
|
||||
ptr: PByte;
|
||||
done: boolean;
|
||||
|
||||
const
|
||||
testModule = 'module a.b.c.d.e.f.g.h; import std.stdio; uint a; struct F{long c;}';
|
||||
|
||||
procedure notif(param: Pointer); cdecl;
|
||||
begin
|
||||
done := true;
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
|
||||
dast := LoadLibrary('cedast');
|
||||
if dast = NilHandle then
|
||||
writeln('dast invalid handle')
|
||||
else begin
|
||||
|
||||
newAst := TNewAst(GetProcAddress(dast, 'newAst'));
|
||||
if newAst = nil then writeln('invalid newAst proc ptr')
|
||||
else hdl := newAst(nil, @notif);
|
||||
|
||||
scanFile := TScanFile(GetProcAddress(dast, 'scanFile'));
|
||||
if scanFile = nil then writeln('invalid scanfile proc ptr')
|
||||
else begin
|
||||
done := false;
|
||||
scanFile(hdl, PChar('exception in call'));
|
||||
while not done do sleep(20);
|
||||
end;
|
||||
|
||||
scanBuffer := TScanBuffer(GetProcAddress(dast, 'scanBuffer'));
|
||||
if scanBuffer = nil then writeln('invalid scanBuffer proc ptr')
|
||||
else begin
|
||||
done := false;
|
||||
scanBuffer(hdl, @testModule[1], length(testModule));
|
||||
while not done do sleep(20);
|
||||
end;
|
||||
|
||||
moduleName := TModuleName(GetProcAddress(dast, 'moduleName'));
|
||||
if moduleName = nil then writeln('invalid moduleName proc ptr')
|
||||
else if hdl <> 0 then writeln(moduleName(hdl));
|
||||
|
||||
symbolList := TSymbolList(GetProcAddress(dast, 'symbolList'));
|
||||
if symbolList = nil then writeln('invalid symbolList proc ptr')
|
||||
else if hdl <> 0 then with TMemoryStream.Create do try
|
||||
ptr := symbolList(hdl, len, TSerializationFormat.json);
|
||||
write(ptr^, len);
|
||||
SaveToFile('testsymlist.txt');
|
||||
finally
|
||||
free;
|
||||
end;
|
||||
|
||||
deleteAst := TDeleteAst(GetProcAddress(dast, 'deleteAst'));
|
||||
if deleteAst = nil then writeln('invalid deleteAst proc ptr')
|
||||
else deleteAst(hdl);
|
||||
|
||||
end;
|
||||
|
||||
readln;
|
||||
end.
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
object _1: TProjectGroup
|
||||
items = <
|
||||
item
|
||||
filename = '..\cesyms\cesyms_libman.coedit'
|
||||
end
|
||||
item
|
||||
filename = '..\cetodo\cetodo_libman.coedit'
|
||||
end
|
||||
item
|
||||
filename = '..\cesetup\cesetup.coedit'
|
||||
end>
|
||||
index = 0
|
||||
end
|
|
@ -1,20 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="pagecontrol"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Resources Count="15">
|
||||
<Resource_0 FileName="../../icons/file/document_add.png" Type="RCDATA" ResourceName="DOCUMENT_ADD"/>
|
||||
<Resource_1 FileName="../../icons/file/document_add24.png" Type="RCDATA" ResourceName="DOCUMENT_ADD24"/>
|
||||
<Resource_2 FileName="../../icons/file/document_add32.png" Type="RCDATA" ResourceName="DOCUMENT_ADD32"/>
|
||||
<Resource_3 FileName="../../icons/file/document_back.png" Type="RCDATA" ResourceName="DOCUMENT_BACK"/>
|
||||
<Resource_4 FileName="../../icons/file/document_back24.png" Type="RCDATA" ResourceName="DOCUMENT_BACK24"/>
|
||||
<Resource_5 FileName="../../icons/file/document_back32.png" Type="RCDATA" ResourceName="DOCUMENT_BACK32"/>
|
||||
<Resource_6 FileName="../../icons/file/document_delete.png" Type="RCDATA" ResourceName="DOCUMENT_DELETE"/>
|
||||
<Resource_7 FileName="../../icons/file/document_delete24.png" Type="RCDATA" ResourceName="DOCUMENT_DELETE24"/>
|
||||
<Resource_8 FileName="../../icons/file/document_delete32.png" Type="RCDATA" ResourceName="DOCUMENT_DELETE32"/>
|
||||
<Resource_9 FileName="../../icons/file/document_next.png" Type="RCDATA" ResourceName="DOCUMENT_NEXT"/>
|
||||
<Resource_10 FileName="../../icons/file/document_next24.png" Type="RCDATA" ResourceName="DOCUMENT_NEXT24"/>
|
||||
<Resource_11 FileName="../../icons/file/document_next32.png" Type="RCDATA" ResourceName="DOCUMENT_NEXT32"/>
|
||||
<Resource_12 FileName="../../icons/other/splitter.png" Type="RCDATA" ResourceName="SPLITTER"/>
|
||||
<Resource_13 FileName="../../icons/other/splitter24.png" Type="RCDATA" ResourceName="SPLITTER24"/>
|
||||
<Resource_14 FileName="../../icons/other/splitter32.png" Type="RCDATA" ResourceName="SPLITTER32"/>
|
||||
</Resources>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
|
@ -52,7 +66,7 @@
|
|||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="../../../src"/>
|
||||
<OtherUnitFiles Value="../../src"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
|
@ -4,5 +4,8 @@ object Form1: TForm1
|
|||
Top = 193
|
||||
Width = 819
|
||||
Caption = 'Form1'
|
||||
LCLVersion = '1.4.4.0'
|
||||
ClientHeight = 317
|
||||
ClientWidth = 819
|
||||
LCLVersion = '1.8.4.0'
|
||||
Visible = False
|
||||
end
|
|
@ -32,11 +32,11 @@ begin
|
|||
fPageControl.Align := alClient;
|
||||
fPageControl.onChanged:=@pageControlChanged;
|
||||
|
||||
AssignPng(fPageControl.closeButton.Glyph, 'document_delete');
|
||||
AssignPng(fPageControl.addButton.Glyph, 'document_add');
|
||||
AssignPng(fPageControl.moveLeftButton.Glyph, 'document_back');
|
||||
AssignPng(fPageControl.moveRightButton.Glyph, 'document_next');
|
||||
AssignPng(fPageControl.splitButton.Glyph, 'splitter');
|
||||
AssignPng(fPageControl.closeButton.Glyph, 'DOCUMENT_DELETE');
|
||||
AssignPng(fPageControl.addButton.Glyph, 'DOCUMENT_ADD');
|
||||
AssignPng(fPageControl.moveLeftButton.Glyph, 'DOCUMENT_BACK');
|
||||
AssignPng(fPageControl.moveRightButton.Glyph, 'DOCUMENT_NEXT');
|
||||
AssignPng(fPageControl.splitButton.Glyph, 'SPLITTER');
|
||||
end;
|
||||
|
||||
procedure TForm1.pageControlChanged(sender: TObject);
|
|
@ -1,32 +0,0 @@
|
|||
object CurrentProject: TCEProject
|
||||
OptionsCollection = <
|
||||
item
|
||||
name = 'release'
|
||||
outputOptions.inlining = True
|
||||
outputOptions.noBoundsCheck = False
|
||||
outputOptions.boundsCheck = offAlways
|
||||
outputOptions.optimizations = True
|
||||
outputOptions.release = True
|
||||
pathsOptions.outputFilename = '<CAP>cleaner.exe'
|
||||
preBuildProcess.options = []
|
||||
preBuildProcess.showWindow = swoNone
|
||||
postBuildProcess.executable = '<CAP>cleaner.exe'
|
||||
postBuildProcess.options = [poUsePipes, poStderrToOutPut]
|
||||
postBuildProcess.parameters.Strings = (
|
||||
'-e'
|
||||
'.tmp,.res'
|
||||
'-f'
|
||||
'afile.file,anotherfile.hji'
|
||||
'-p'
|
||||
'<CAP>'
|
||||
'-r'
|
||||
)
|
||||
postBuildProcess.showWindow = swoHIDE
|
||||
runOptions.options = []
|
||||
runOptions.showWindow = swoNone
|
||||
end>
|
||||
Sources.Strings = (
|
||||
'..\src\cleaner.d'
|
||||
)
|
||||
ConfigurationIndex = 0
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
object CurrentProject: TCEProject
|
||||
OptionsCollection = <
|
||||
item
|
||||
name = 'release'
|
||||
outputOptions.inlining = True
|
||||
outputOptions.noBoundsCheck = False
|
||||
outputOptions.boundsCheck = offAlways
|
||||
outputOptions.optimizations = True
|
||||
outputOptions.release = True
|
||||
pathsOptions.outputFilename = '<CAP>googlesearch'
|
||||
preBuildProcess.options = []
|
||||
preBuildProcess.showWindow = swoNone
|
||||
postBuildProcess.options = []
|
||||
postBuildProcess.showWindow = swoNone
|
||||
runOptions.options = []
|
||||
runOptions.showWindow = swoNone
|
||||
end>
|
||||
Sources.Strings = (
|
||||
'..\src\googlesearch.d'
|
||||
)
|
||||
ConfigurationIndex = 0
|
||||
end
|
|
@ -1,20 +0,0 @@
|
|||
object CurrentProject: TCEProject
|
||||
OptionsCollection = <
|
||||
item
|
||||
name = 'release'
|
||||
outputOptions.boundsCheck = offAlways
|
||||
pathsOptions.Imports.Strings = (
|
||||
'..\src\'
|
||||
)
|
||||
preBuildProcess.options = []
|
||||
preBuildProcess.showWindow = swoNone
|
||||
postBuildProcess.options = []
|
||||
postBuildProcess.showWindow = swoNone
|
||||
runOptions.options = [poUsePipes, poStderrToOutPut]
|
||||
runOptions.showWindow = swoNone
|
||||
end>
|
||||
Sources.Strings = (
|
||||
'..\src\mixin_errfile_main.d'
|
||||
)
|
||||
ConfigurationIndex = 0
|
||||
end
|
|
@ -1,2 +0,0 @@
|
|||
echo 'has compiled'
|
||||
pause
|
|
@ -1,2 +0,0 @@
|
|||
echo 'will compile'
|
||||
pause
|
|
@ -1,47 +0,0 @@
|
|||
object _1: TCENativeProject
|
||||
OptionsCollection = <
|
||||
item
|
||||
name = 'default'
|
||||
documentationOptions.generateDocumentation = True
|
||||
documentationOptions.DocumentationDirectory = '../doc'
|
||||
debugingOptions.debug = True
|
||||
debugingOptions.debugIdentifiers.Strings = (
|
||||
'a'
|
||||
'b'
|
||||
)
|
||||
debugingOptions.debugLevel = 2
|
||||
messagesOptions.additionalWarnings = True
|
||||
outputOptions.boundsCheck = onAlways
|
||||
outputOptions.unittest = True
|
||||
outputOptions.versionIdentifiers.Strings = (
|
||||
'revision_1'
|
||||
)
|
||||
pathsOptions.outputFilename = '../output/main'
|
||||
preBuildProcess.workingDirectory = '<CPP>'
|
||||
preBuildProcess.options = [poWaitOnExit]
|
||||
postBuildProcess.workingDirectory = '<CPP>'
|
||||
postBuildProcess.options = [poWaitOnExit]
|
||||
end
|
||||
item
|
||||
name = 'alternative'
|
||||
documentationOptions.generateDocumentation = True
|
||||
documentationOptions.DocumentationDirectory = '../doc'
|
||||
debugingOptions.debug = True
|
||||
debugingOptions.debugLevel = 3
|
||||
messagesOptions.additionalWarnings = True
|
||||
outputOptions.inlining = True
|
||||
outputOptions.boundsCheck = onAlways
|
||||
outputOptions.optimizations = True
|
||||
outputOptions.unittest = True
|
||||
outputOptions.versionIdentifiers.Strings = (
|
||||
'revision_2'
|
||||
)
|
||||
pathsOptions.outputFilename = '../output/main'
|
||||
end>
|
||||
Sources.Strings = (
|
||||
'../src/main.d'
|
||||
'../src/barclass.d'
|
||||
'../src/fooclass.d'
|
||||
)
|
||||
ConfigurationIndex = 0
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
module barclass;
|
||||
|
||||
import std.stdio;
|
||||
|
||||
class Bar{
|
||||
this(){
|
||||
version(revision_1) writeln("bar says: revision 1");
|
||||
version(revision_2) writeln("bar says: revision 2");
|
||||
version(unittest) writeln("bar says: unittest");
|
||||
debug writeln("bar says: debug");
|
||||
debug(0) writeln("bar says: debug level < 1");
|
||||
debug(1) writeln("bar says: debug level < 2");
|
||||
debug(2) writeln("bar says: debug level < 3");
|
||||
debug(3) writeln("bar says: debug level < 4");
|
||||
debug(a) writeln("bar says: debug ident a");
|
||||
debug(b) writeln("bar says: debug ident b");
|
||||
debug(c) writeln("bar says: debug ident c");
|
||||
}
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
module cleaner;
|
||||
|
||||
import std.stdio;
|
||||
import std.path;
|
||||
import std.file;
|
||||
import std.getopt;
|
||||
import std.array;
|
||||
|
||||
/*
|
||||
|
||||
as a runnable, input query line:
|
||||
|
||||
-e ".ext1,.ext2" -f "file.ext,file.ext" -p "rootPath" -r
|
||||
|
||||
or as a post-build process, parameter list:
|
||||
|
||||
-e
|
||||
".ext1,.ext2"
|
||||
-f
|
||||
"file.ext,file.ext"
|
||||
-p
|
||||
"rootPath"
|
||||
-r
|
||||
|
||||
*/
|
||||
void main(string args[])
|
||||
{
|
||||
bool recursive;
|
||||
string path;
|
||||
string userexts;
|
||||
string userfiles;
|
||||
string exts[];
|
||||
string files[];
|
||||
|
||||
exts ~= [".obj", ".o"];
|
||||
|
||||
getopt(args, config.passThrough,
|
||||
"e|ext", &userexts,
|
||||
"f|files", &userfiles,
|
||||
"p|path", &path,
|
||||
"r|recursive", &recursive
|
||||
);
|
||||
|
||||
if (!exists(path) || path.length == 0)
|
||||
return;
|
||||
|
||||
if (userexts.length != 0)
|
||||
{
|
||||
auto itms = split(userexts, ',');
|
||||
foreach(itm; itms)
|
||||
if (itm.length > 1 && itm[0] == '.')
|
||||
exts ~= itm;
|
||||
}
|
||||
|
||||
if (userfiles.length != 0)
|
||||
{
|
||||
auto itms = split(userfiles, ',');
|
||||
foreach(itm; itms)
|
||||
if (itm.length > 0)
|
||||
files ~= itm;
|
||||
}
|
||||
|
||||
void clean(in string currroot)
|
||||
{
|
||||
DirIterator entries = dirEntries(currroot, SpanMode.shallow);
|
||||
|
||||
foreach(entry; entries)
|
||||
{
|
||||
scope(failure){}
|
||||
|
||||
if (!isDir(entry))
|
||||
{
|
||||
foreach(trg_ext; exts)
|
||||
if (entry.extension == trg_ext)
|
||||
std.file.remove(entry);
|
||||
foreach(trg_file; files)
|
||||
if (entry.name == trg_file)
|
||||
std.file.remove(entry);
|
||||
|
||||
}
|
||||
else if (recursive)
|
||||
clean(entry);
|
||||
}
|
||||
}
|
||||
clean(path);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
module runnable;
|
||||
|
||||
import std.stdio;
|
||||
|
||||
void main(string args[])
|
||||
{
|
||||
|
||||
if(true){
|
||||
|
||||
|
||||
// region start ----+
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// region end ----
|
||||
|
||||
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
module expandSymString;
|
||||
|
||||
import std.stdio;
|
||||
import std.getopt;
|
||||
|
||||
/*
|
||||
pass:
|
||||
|
||||
"--a=<CAF>" "--b=<CAP>" "--c=<CFF>" "--d=<CFP>" "--e=<CI>" "--f=<CPF>" "--g=<CPP>" "--h=<CPR>" "--i=<CPN>" "--j=<CPO>" "--k=<CPFS>" "--l=<CPCD>"
|
||||
|
||||
as parameters in "Run, Compile and Run file..."
|
||||
*/
|
||||
|
||||
void main(string[] args)
|
||||
{
|
||||
auto opt2symbol = [
|
||||
// coedit
|
||||
'a' : "CoeditApplicationFile..: ",
|
||||
'b' : "CoeditApplicationPath..: ",
|
||||
// file
|
||||
'c' : "currentFileFilename....: ",
|
||||
'd' : "CurrentFilePath........: ",
|
||||
'e' : "CurrentIdentifier......: ",
|
||||
// project
|
||||
'f' : "CurrentProjectFile.....: ",
|
||||
'g' : "CurrentProjectPath.....: ",
|
||||
'h' : "CurrentProjectRoot.....: ",
|
||||
'i' : "CurrentProjectName.....: ",
|
||||
'j' : "CurrentProjectOutput...: ",
|
||||
'k' : "CurrentProjectFiles....: ",
|
||||
'l' : "CurrentProjectCommonSourceDirectory....: "
|
||||
];
|
||||
|
||||
string expanded;
|
||||
foreach (c; 'a'..'z')
|
||||
{
|
||||
expanded = "";
|
||||
getopt(args, std.getopt.config.passThrough, c, &expanded);
|
||||
if (expanded.length)
|
||||
writeln(opt2symbol[c], expanded);
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
module fooclass;
|
||||
|
||||
import std.stdio;
|
||||
|
||||
class Foo{
|
||||
this(){
|
||||
version(revision_1) writeln("foo says: revision 1");
|
||||
version(revision_2) writeln("foo says: revision 2");
|
||||
version(unittest) writeln("foo says: unittest");
|
||||
debug writeln("foo says: debug");
|
||||
debug(0) writeln("foo says: debug level < 1");
|
||||
debug(1) writeln("foo says: debug level < 2");
|
||||
debug(2) writeln("foo says: debug level < 3");
|
||||
debug(3) writeln("foo says: debug level < 4");
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
module googlesearch;
|
||||
|
||||
/*
|
||||
Coedit custom tool:
|
||||
search some help about the current identifier.
|
||||
executable: <CAP>\googlesearch.exe
|
||||
parameters: <CI>
|
||||
*/
|
||||
|
||||
static const string prefix = "http://www.google.com/search?q=\"dlang.org+";
|
||||
static const string suffix = "&btnI=Im+Feeling+Lucky";
|
||||
|
||||
void main(string args[])
|
||||
{
|
||||
if (args.length == 1)
|
||||
return;
|
||||
|
||||
auto url = prefix ~ args[1]~ suffix;
|
||||
import std.process: browse;
|
||||
browse(url);
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
module interactive.command.interpreter;
|
||||
|
||||
import std.stdio;
|
||||
import std.array;
|
||||
|
||||
string[] arguments;
|
||||
string command;
|
||||
void function()[string] dispatcher;
|
||||
|
||||
static this(){
|
||||
dispatcher["hello"] = &hello;
|
||||
dispatcher["showargs"] = &showArgs;
|
||||
}
|
||||
|
||||
void showArgs(){
|
||||
foreach(arg;arguments) writeln(arg);
|
||||
}
|
||||
void hello(){
|
||||
writeln("hello world");
|
||||
}
|
||||
|
||||
void main(string args[])
|
||||
{
|
||||
string input;
|
||||
while (true)
|
||||
{
|
||||
input = readln;
|
||||
if (input == "exit\n") return;
|
||||
// split command and args
|
||||
auto s = split(input);
|
||||
if (s.length){
|
||||
command = s[0];
|
||||
if (s.length > 1)
|
||||
arguments = s[1..$];
|
||||
else
|
||||
arguments.length = 0;
|
||||
if (command in dispatcher)
|
||||
dispatcher[command]();
|
||||
else
|
||||
writeln("unrecognized command: ", command);
|
||||
stdout.flush;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
Test:
|
||||
- prj save/load
|
||||
- prj compile/run
|
||||
- multiples sources
|
||||
- relative paths
|
||||
- various switches
|
||||
*/
|
||||
|
||||
module main;
|
||||
|
||||
import std.stdio;
|
||||
import fooclass;
|
||||
import barclass;
|
||||
|
||||
void main(string[] args)
|
||||
{
|
||||
auto foo = new Foo;
|
||||
auto bar = new Bar;
|
||||
|
||||
scope(exit)
|
||||
{
|
||||
delete foo;
|
||||
delete bar;
|
||||
}
|
||||
// if not UsePipes in RunOptions
|
||||
// then:
|
||||
readln;
|
||||
// (input is passed thru the new console)
|
||||
|
||||
// else: input is not handled so readln will hang Coedit until
|
||||
// the new process is manually killed
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
module runnable;
|
||||
|
||||
import std.stdio;
|
||||
|
||||
/*
|
||||
- Compile file & run.
|
||||
- select containing mangled symbols
|
||||
- message context menu, click Demangle selection
|
||||
*/
|
||||
|
||||
void main(string[] args)
|
||||
{
|
||||
"_D2rt4util7console8__assertFiZv".writeln;
|
||||
"random initial junk _D2rt4util7console8__assertFiZv random trailer".writeln;
|
||||
"multiple _D2rt4util7console8__assertFiZv occurrences _D2rt4util7console8__assertFiZv".writeln;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
writeln("hello runnable module);
|
|
@ -1,10 +0,0 @@
|
|||
module runnable;
|
||||
|
||||
import std.stdio;
|
||||
|
||||
void main(string args[])
|
||||
{
|
||||
// purpose: test if error message in mixed content could be clicked
|
||||
// => no, the filename from where the data come is not passed
|
||||
mixin(import("mixin_errfile_data.txt"));
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
module console;
|
||||
|
||||
/*
|
||||
The most simple console wrappr'.
|
||||
|
||||
usage:
|
||||
------
|
||||
- Use Coedit menu, Compile and Run file to execute.
|
||||
- use the "Process input widget to pass" commands.
|
||||
- Don't forget that the Messages widget restricts the item count.
|
||||
- type "exit" and press SEND to quit.
|
||||
*/
|
||||
void main(string args[])
|
||||
{
|
||||
import std.process;
|
||||
//
|
||||
string prgname;
|
||||
version(Windows)
|
||||
prgname = "cmd";
|
||||
/*else
|
||||
version(linux) prgname = "xterm";*/
|
||||
else
|
||||
assert(0, "unsupported target");
|
||||
//
|
||||
prgname.spawnProcess.wait;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
#!runnable-flags: -version=a -version=b
|
||||
module runnable;
|
||||
|
||||
/*
|
||||
|
||||
compile fine and run, feature #36:
|
||||
- see specs at https://github.com/BBasile/Coedit/issues/36
|
||||
- dmd switches can be passed in the script line
|
||||
- dups are automatically eliminated.
|
||||
|
||||
*/
|
||||
|
||||
import std.stdio;
|
||||
|
||||
void main(string[] args)
|
||||
{
|
||||
version(a) "a".writeln;
|
||||
version(b) "b".writeln;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
module runnable;
|
||||
|
||||
import std.stdio;
|
||||
|
||||
void main(string args[])
|
||||
{
|
||||
writeln("use <<Process input>> widget to continue: just click 'Send'");
|
||||
stdout.flush;
|
||||
readln;
|
||||
writeln("type <kbd>ENTER</kbd> in the field");
|
||||
stdout.flush;
|
||||
readln;
|
||||
writeln("it was not possible when the process was declared as a local variable...");
|
||||
}
|
Loading…
Reference in New Issue