mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-20 02:51:50 +01:00
[svn r140] did a lot of the work towards being able to pass multiple modules on the command line. not complete yet though
This commit is contained in:
@@ -25,6 +25,7 @@ public import tango.io.model.IBuffer,
|
||||
extern (C)
|
||||
{
|
||||
protected void * memcpy (void *dst, void *src, uint);
|
||||
private int printf(char*, ...);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -163,10 +164,14 @@ class Buffer : IBuffer
|
||||
|
||||
this (IConduit conduit)
|
||||
{
|
||||
printf("Buffer.this(%p)\n", conduit);
|
||||
assert (conduit !is null);
|
||||
assert (conduit);
|
||||
|
||||
this (conduit.bufferSize);
|
||||
setConduit (conduit);
|
||||
|
||||
assert(this !is null);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -221,7 +226,8 @@ class Buffer : IBuffer
|
||||
|
||||
this (uint capacity = 0)
|
||||
{
|
||||
setContent (new ubyte[capacity], 0);
|
||||
setContent (new ubyte[capacity], 0);
|
||||
assert(this !is null);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
||||
@@ -23,6 +23,7 @@ private import tango.io.Buffer,
|
||||
version (Posix)
|
||||
private import tango.stdc.posix.unistd; // needed for isatty()
|
||||
|
||||
private extern(C) int printf(char*, ...);
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
@@ -69,6 +70,8 @@ struct Console
|
||||
|
||||
private this (Conduit conduit, bool redirected)
|
||||
{
|
||||
printf("Console.Input.this(%p, %d)\n", conduit, redirected);
|
||||
assert (conduit);
|
||||
redirect = redirected;
|
||||
buffer = new Buffer (conduit);
|
||||
}
|
||||
@@ -596,6 +599,7 @@ struct Console
|
||||
|
||||
private this (Handle handle)
|
||||
{
|
||||
printf("Console.Conduit.this(%d)\n", handle);
|
||||
reopen (handle);
|
||||
redirected = (isatty(handle) is 0);
|
||||
}
|
||||
@@ -621,14 +625,13 @@ static Console.Output Cout, /// the standard output stream
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
static this ()
|
||||
{
|
||||
printf("STATIC INIT FOR CONSOLE\n");
|
||||
printf("Cin\n");
|
||||
printf("Cin conduit\n");
|
||||
auto conduit = new Console.Conduit (0);
|
||||
assert(conduit);
|
||||
printf("Cin input\n");
|
||||
Cin = new Console.Input (conduit, conduit.redirected);
|
||||
|
||||
printf("Cout\n");
|
||||
|
||||
@@ -18,6 +18,8 @@ public import tango.io.Conduit;
|
||||
|
||||
private import tango.core.Exception;
|
||||
|
||||
private extern(C) int printf(char*, ...);
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Implements a means of reading and writing a file device. Conduits
|
||||
|
||||
Reference in New Issue
Block a user