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. More... | |
static bool | get_console_input (const char *prompt, const bool echo, char *input, const int capacity) |
Core function for getting input from console. More... | |
bool | query_user_exec_builtin (void) |
Wrapper function enabling query_user_exec() if no alternative methods have been enabled. More... | |
|
static |
Core function for getting input from console.
@params prompt The prompt to present to the user @params echo Should the user see what is being typed @params input Pointer to the buffer used to save the user input @params capacity Size of the input buffer
Definition at line 195 of file console_builtin.c.
References ASSERT, chomp(), _query_user::echo, get_console_input_win32(), M_ERRNO, M_FATAL, M_WARN, msg, and _query_user::prompt.
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(), _query_user::echo, get_orig_stderr(), M_ERRNO, M_WARN, msg, orig_stderr, _query_user::prompt, 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.
Executes a configured setup, 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.
References get_console_input(), query_user, QUERY_USER_NUMSLOTS, and _query_user::response.