Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion FSharp.Profiles.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<DefineConstants>$(DefineConstants);FX_NO_WINFORMS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_INDENTED_TEXT_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_REDUCED_EXCEPTIONS</DefineConstants>
<DefineConstants>$(DefineConstants);FX_REDUCED_CONSOLE</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFEMIT</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_GLOBALIZATION</DefineConstants>
<DefineConstants>$(DefineConstants);FX_RESHAPED_REFLECTION</DefineConstants>
Expand Down
9 changes: 1 addition & 8 deletions src/fsharp/fsi/fsi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,9 @@ let internal directoryName (s:string) =
/// Process the command line options
type internal FsiCommandLineOptions(fsi: FsiEvaluationSessionHostConfig, argv: string[], tcConfigB, fsiConsoleOutput: FsiConsoleOutput) =
let mutable enableConsoleKeyProcessing =
#if FX_REDUCED_CONSOLE
false
#else
// Mono on Win32 doesn't implement correct console processing
not (runningOnMono && System.Environment.OSVersion.Platform = System.PlatformID.Win32NT)
#endif

let mutable gui = not runningOnMono // override via "--gui", on by default except when on Mono
#if DEBUG
let mutable showILCode = false // show modul il code
Expand Down Expand Up @@ -1346,10 +1343,8 @@ module internal NativeMethods =

type ControlEventHandler = delegate of int -> bool

#if !FX_REDUCED_CONSOLE
[<DllImport("kernel32.dll")>]
extern bool SetConsoleCtrlHandler(ControlEventHandler _callback,bool _add)
#endif

// One strange case: when a TAE happens a strange thing
// occurs the next read from stdin always returns
Expand Down Expand Up @@ -2398,15 +2393,13 @@ type FsiEvaluationSession (fsi: FsiEvaluationSessionHostConfig, argv:string[], i

let timeReporter = FsiTimeReporter(outWriter)

#if !FX_REDUCED_CONSOLE
//----------------------------------------------------------------------------
// Console coloring
//----------------------------------------------------------------------------

// Testing shows "console coloring" is broken on some Mono configurations (e.g. Mono 2.4 Suse LiveCD).
// To support fsi usage, the console coloring is switched off by default on Mono.
do if runningOnMono then enableConsoleColoring <- false
#endif


//----------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions src/fsharp/fsi/fsimain.fs
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,12 @@ let evaluateSession(argv: string[]) =
Console.ReadKey() |> ignore
#endif

#if !FX_REDUCED_CONSOLE
// When VFSI is running, set the input/output encoding to UTF8.
// Otherwise, unicode gets lost during redirection.
// It is required only under Net4.5 or above (with unicode console feature).
if argv |> Array.exists (fun x -> x.Contains "fsi-server") then
Console.InputEncoding <- System.Text.Encoding.UTF8
Console.OutputEncoding <- System.Text.Encoding.UTF8
#else
ignore argv
#endif

try
// Create the console reader
Expand Down