Design Pattern Examples
Overview of object-oriented design patterns
helpers/enablevtmode.h File Reference

Declaration of the enableVTMode() function for configuring standard input to support the virtual terminal mode (on Windows). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __ENABLEVTMODE_H__
 

Functions

void enableVTMode (void)
 Enables the virtual terminal processing mode on the current Windows Console. When the program ends, the state of the processing mode is restored to what it was before we got to it.
 

Detailed Description

Declaration of the enableVTMode() function for configuring standard input to support the virtual terminal mode (on Windows).

Definition in file helpers/enablevtmode.h.

Macro Definition Documentation

◆ __ENABLEVTMODE_H__

#define __ENABLEVTMODE_H__

Definition at line 8 of file helpers/enablevtmode.h.

Function Documentation

◆ enableVTMode()

void enableVTMode ( void  )

Enables the virtual terminal processing mode on the current Windows Console. When the program ends, the state of the processing mode is restored to what it was before we got to it.

This is for Windows only. Although the mode is enabled in all kinds of Windows console windows (terminal, powershell, etc.), only the Windows Command Prompt needs it; but it doesn't hurt to set it on the others (it's already set on those others).

This function uses an atexit() function to restore the mode on program exit.

Definition at line 39 of file enablevtmode.c.

References _restoreVTMode().

Referenced by main().