1 /*
2 
3 el_globals.h
4 
5 is part of:
6 
7 WinEditLine (formerly MinGWEditLine)
8 Copyright 2010-2020 Paolo Tosco <paolo.tosco.mail@gmail.com>
9 All rights reserved.
10 
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions
13 are met:
14 
15     * Redistributions of source code must retain the above copyright
16     notice, this list of conditions and the following disclaimer.
17     * Redistributions in binary form must reproduce the above copyright
18     notice, this list of conditions and the following disclaimer in the
19     documentation and/or other materials provided with the distribution.
20     * Neither the name of WinEditLine (formerly MinGWEditLine) nor the
21     name of its contributors may be used to endorse or promote products
22     derived from this software without specific prior written permission.
23 
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS
25 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
30 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 
36 */
37 
38 
39 #define _UNICODE
40 #define UNICODE
41 
42 const char *rl_readline_name = NULL;
43 wchar_t *_el_print = NULL;
44 wchar_t *_el_temp_print = NULL;
45 size_t _el_temp_print_size = 0;
46 wchar_t *_el_next_compl = NULL;
47 wchar_t *_el_file_name = NULL;
48 wchar_t *_el_dir_name = NULL;
49 wchar_t *_el_old_arg = NULL;
50 wchar_t *_el_wide = NULL;
51 wchar_t *_el_text = NULL;
52 wchar_t *_el_line_buffer = NULL;
53 size_t _el_line_buffer_size = 0;
54 wchar_t *_el_basic_word_break_characters = NULL;
55 wchar_t *_el_completer_word_break_characters = NULL;
56 wchar_t _el_basic_file_break_characters[_EL_MAX_FILE_BREAK_CHARACTERS];
57 char *rl_line_buffer = NULL;
58 char *rl_prompt = NULL;
59 const char rl_basic_word_break_characters[] = " \t\n\\'`@$><=;|&{(";
60 const char *rl_completer_word_break_characters = NULL;
61 char *_el_text_mb = NULL;
62 wchar_t *_el_prompt = NULL;
63 wchar_t **_el_compl_array = NULL;
64 int _el_ctrl_c_pressed = FALSE;
65 int rl_point = 0;
66 int rl_attempted_completion_over = 0;
67 int rl_completion_append_character = ' ';
68 int _el_compl_index = 0;
69 int _el_n_compl = 0;
70 int _el_prompt_len = 0;
71 rl_completion_func_t *rl_attempted_completion_function = NULL;
72 rl_compentry_func_t *rl_completion_entry_function = NULL;
73 rl_compentryfree_func_t *rl_user_completion_entry_free_function = NULL;
74 BOOL _el_prev_in_cm_saved = FALSE;
75 BOOL _el_prev_out_cm_saved = FALSE;
76 BOOL _el_prev_sbInfo_saved = FALSE;
77 DWORD _el_prev_in_cm = 0;
78 DWORD _el_prev_out_cm = 0;
79 HANDLE _el_h_in = NULL;
80 HANDLE _el_h_out = NULL;
81 COORD _el_prev_size;
82