Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #4902 from Dicebot/revert-regressions3
Fix issue 16682: "privatization" of symbols in std.stdio breaks DFMT
  • Loading branch information
MartinNowak committed Nov 16, 2016
2 parents 64cd526 + 73b699d commit 8b1a270
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions std/stdio.d
Expand Up @@ -88,7 +88,6 @@ else version (Posix)
else
static assert(0);

private:
version(Windows)
{
// core.stdc.stdio.fopen expects file names to be
Expand Down Expand Up @@ -247,7 +246,6 @@ version(HAS_GETDELIM) extern(C) nothrow @nogc
ptrdiff_t getline(char**, size_t*, FILE*);
}


//------------------------------------------------------------------------------
struct ByRecord(Fields...)
{
Expand Down Expand Up @@ -312,7 +310,6 @@ template byRecord(Fields...)
}
}

public:
/**
Encapsulates a $(D FILE*). Generally D does not attempt to provide
thin wrappers over equivalent functions in the C standard library, but
Expand Down Expand Up @@ -650,7 +647,6 @@ Throws: $(D ErrnoException) in case of error.
version(StdDdoc)
void windowsHandleOpen(HANDLE handle, in char[] stdioOpenmode);

/// ditto
version(Windows)
void windowsHandleOpen(HANDLE handle, in char[] stdioOpenmode)
{
Expand Down Expand Up @@ -1862,7 +1858,6 @@ Returns the underlying operating system $(D HANDLE) (Windows only).
version(StdDdoc)
@property HANDLE windowsHandle();

/// ditto
version(Windows)
@property HANDLE windowsHandle()
{
Expand All @@ -1879,7 +1874,7 @@ Range that reads one line at a time. Returned by $(LREF byLine).
Allows to directly use range operations on lines of a file.
*/
private struct ByLine(Char, Terminator)
struct ByLine(Char, Terminator)
{
private:
import std.typecons : RefCounted, RefCountedAutoInitialize;
Expand Down Expand Up @@ -2400,7 +2395,7 @@ $(REF readText, std,file)
/*
* Range that reads a chunk at a time.
*/
private struct ByChunk
struct ByChunk
{
private:
File file_;
Expand Down Expand Up @@ -2602,7 +2597,7 @@ $(D StdioException).
/*
$(D Range) that locks the file and allows fast writing to it.
*/
private struct LockingTextWriter
struct LockingTextWriter
{
private:
import std.range.primitives : ElementType, isInfinite, isInputRange;
Expand Down Expand Up @@ -2779,7 +2774,7 @@ See $(LREF byChunk) for an example.
// An output range which optionally locks the file and puts it into
// binary mode (similar to rawWrite). Because it needs to restore
// the file mode on destruction, it is RefCounted on Windows.
private struct BinaryWriterImpl(bool locking)
struct BinaryWriterImpl(bool locking)
{
import std.traits : hasIndirections;
private:
Expand Down Expand Up @@ -3194,7 +3189,7 @@ enum LockType
readWrite
}

private struct LockingTextReader
struct LockingTextReader
{
private File _f;
private char _front;
Expand Down Expand Up @@ -3914,7 +3909,6 @@ struct lines
this.terminator = terminator;
}

/// Implements `opApply` `foreach` support
int opApply(D)(scope D dg)
{
import std.traits : Parameters;
Expand Down Expand Up @@ -3958,8 +3952,8 @@ struct lines
return opApplyRaw(dg);
}
}

private int opApplyRaw(D)(scope D dg)
// no UTF checking
int opApplyRaw(D)(scope D dg)
{
import std.conv : to;
import std.exception : assumeUnique;
Expand Down Expand Up @@ -4317,7 +4311,7 @@ Initialize with a message and an error code.
}
}

package extern(C) void std_stdio_static_this()
extern(C) void std_stdio_static_this()
{
static import core.stdc.stdio;
//Bind stdin, stdout, stderr
Expand Down

0 comments on commit 8b1a270

Please sign in to comment.