Merge branch 'master' of https://github.com/Hackerpilot/dfmt
This commit is contained in:
commit
9fb13d0caf
|
@ -113,9 +113,8 @@ else
|
||||||
// On Windows, set stdout to binary mode (needed for correct EOL writing)
|
// On Windows, set stdout to binary mode (needed for correct EOL writing)
|
||||||
// See Phobos' stdio.File.rawWrite
|
// See Phobos' stdio.File.rawWrite
|
||||||
{
|
{
|
||||||
import std.stdio : _fileno, _O_BINARY, _setmode;
|
import std.stdio : _O_BINARY;
|
||||||
|
immutable fd = output.fileno;
|
||||||
immutable fd = _fileno(output.getFP());
|
|
||||||
_setmode(fd, _O_BINARY);
|
_setmode(fd, _O_BINARY);
|
||||||
version (CRuntime_DigitalMars)
|
version (CRuntime_DigitalMars)
|
||||||
{
|
{
|
||||||
|
@ -212,6 +211,19 @@ else
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private version (Windows)
|
||||||
|
{
|
||||||
|
version(CRuntime_DigitalMars)
|
||||||
|
{
|
||||||
|
extern(C) int setmode(int, int) nothrow @nogc;
|
||||||
|
alias _setmode = setmode;
|
||||||
|
}
|
||||||
|
else version(CRuntime_Microsoft)
|
||||||
|
{
|
||||||
|
extern(C) int _setmode(int, int) nothrow @nogc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private string optionsToString(E)() if (is(E == enum))
|
private string optionsToString(E)() if (is(E == enum))
|
||||||
{
|
{
|
||||||
import std.traits : EnumMembers;
|
import std.traits : EnumMembers;
|
||||||
|
@ -236,7 +248,7 @@ https://github.com/Hackerpilot/dfmt
|
||||||
Options:
|
Options:
|
||||||
--help, -h Print this help message
|
--help, -h Print this help message
|
||||||
--inplace, -i Edit files in place
|
--inplace, -i Edit files in place
|
||||||
--config_dir, -c Path to directory to load .editconfig file from.
|
--config_dir, -c Path to directory to load .editorconfig file from.
|
||||||
--version Print the version number and then exit
|
--version Print the version number and then exit
|
||||||
|
|
||||||
Formatting Options:
|
Formatting Options:
|
||||||
|
|
Loading…
Reference in New Issue