OpenVPN
|
#include "syshead.h"
#include "console.h"
#include "error.h"
#include "buffer.h"
#include "misc.h"
#include "win32.h"
Go to the source code of this file.
Functions | |
static bool | get_console_input_win32 (const char *prompt, const bool echo, char *input, const int capacity) |
Get input from a Windows console. | |
static bool | get_console_input (const char *prompt, const bool echo, char *input, const int capacity) |
Core function for getting input from console. | |
bool | query_user_exec_builtin (void) |
Wrapper function enabling query_user_exec() if no alternative methods have been enabled. | |
|
static |
Core function for getting input from console.
prompt | The prompt to present to the user |
echo | Should the user see what is being typed |
input | Pointer to the buffer used to save the user input |
capacity | Size of the input buffer |
Definition at line 195 of file console_builtin.c.
References ASSERT, chomp(), get_console_input_win32(), M_ERRNO, M_FATAL, M_WARN, and msg.
Referenced by query_user_exec_builtin().
|
static |
Get input from a Windows console.
prompt | Prompt to display to the user |
echo | Should the user input be displayed in the console |
input | Pointer to the buffer the user input will be saved |
capacity | Size of the buffer for the user input |
Definition at line 61 of file console_builtin.c.
References ASSERT, chomp(), get_orig_stderr(), M_ERRNO, M_WARN, msg, orig_stderr, status, string_null_terminate(), and win32_service_interrupt().
Referenced by get_console_input().
bool query_user_exec_builtin | ( | void | ) |
Wrapper function enabling query_user_exec() if no alternative methods have been enabled.
Loop through configured query_user slots, using the built-in method for querying the user.
Default method for querying user using default stdin/stdout on a console. This needs to be available as a backup interface for the alternative implementations in case they cannot query through their implementation specific methods.
If no alternative implementation is declared, a wrapper in console.h will ensure query_user_exec() will call this function instead.
Definition at line 281 of file console_builtin.c.