1 
2 /* ---------------------------------------------------------------------
3    $Id: redlinewin.h 3651 2016-05-05 08:50:17Z arthurcnorman $
4    ---------------------------------------------------------------------
5    (c) 1999-2009 A. Dolzmann and T. Sturm, 1999-2014 T. Sturm
6    ---------------------------------------------------------------------
7    Redistribution and use in source and binary forms, with or without
8    modification, are permitted provided that the following conditions
9    are met:
10 
11       * Redistributions of source code must retain the relevant
12         copyright notice, this list of conditions and the following
13         disclaimer.
14       * Redistributions in binary form must reproduce the above
15         copyright notice, this list of conditions and the following
16         disclaimer in the documentation and/or other materials provided
17         with the distribution.
18 
19    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23    OWNERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 
32 /*
33  * This part was extracted by Arthur Norman in May 2016 so that the
34  * earlier filr redline.c was split into a version for use with native
35  * Windows and a version for other (unix-like) platforms. Declarations
36  * have then been split out to go in a header file so that references from
37  * one source file to another can be checked a bit!
38  */
39 
40 
41 #define SKIPPING_WHITESPACE 1
42 #define READING_PROMPT 2
43 #define LEARNING 3
44 #define FINISHED 0
45 
46 extern int redfrontcolor;
47 extern int normalcolor;
48 extern int promptcolor;
49 extern int inputcolor;
50 extern int outputcolor;
51 extern int debugcolor;
52 
53 extern int color;
54 
55 extern void line_init(void);
56 extern void line_learn_completion(char *);
57 extern strl line_learn_until_prompt(char *,const char *);
58 extern char *line_read(char *);
59 extern char *line_quit(const char *);
60 extern char *line_color_prompt(char *);
61 extern void line_end(void);
62 extern void line_init_history(void);
63 extern void line_add_history(char *);
64 extern void line_end_history(void);
65 extern char *line_histname(void);
66 extern char *line_switch_completion_function(const char *, int);
67 extern char *line_pack_completion_function(const char *, int);
68 extern char *line_load_completion_function(const char *, int);
69 extern char *line_strl_completion_function(const char *, int, strl);
70 
71 /* end of redlinewin.h */
72