Renderers cleanup part 2
[citadel.git] / textclient / src / include / commands.h
1 /*
2  *
3  * Copyright (c) 1987-2012 by the citadel.org team
4  *
5  *  This program is open source software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License version 3.
7  *
8  *  This program is distributed in the hope that it will be useful,
9  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  *  GNU General Public License for more details.
12  */
13
14 /*
15  * Colors for color() command
16  */
17 #define DIM_BLACK       0
18 #define DIM_RED         1
19 #define DIM_GREEN       2
20 #define DIM_YELLOW      3
21 #define DIM_BLUE        4
22 #define DIM_MAGENTA     5
23 #define DIM_CYAN        6
24 #define DIM_WHITE       7
25 #define BRIGHT_BLACK    8
26 #define BRIGHT_RED      9
27 #define BRIGHT_GREEN    10
28 #define BRIGHT_YELLOW   11
29 #define BRIGHT_BLUE     12
30 #define BRIGHT_MAGENTA  13
31 #define BRIGHT_CYAN     14
32 #define BRIGHT_WHITE    15
33 #define COLOR_PUSH      16      /* Save current color */
34 #define COLOR_POP       17      /* Restore saved color */
35 #define ORIGINAL_PAIR   -1      /* Default terminal colors */
36
37 /*
38  * declarations
39  */
40 void load_command_set(void);
41 void stty_ctdl(int cmd);
42 void newprompt(char *prompt, char *str, int len);
43 void strprompt(char *prompt, char *str, int len);
44 int boolprompt(char *prompt, int prev_val);
45 int intprompt(char *prompt, int ival, int imin, int imax);
46 int fmout(int width, FILE *fpin, char *text, FILE *fpout, int subst);
47 int getcmd(CtdlIPC *ipc, char *argbuf);
48 void display_help(CtdlIPC *ipc, char *name);
49 void color(int colornum);
50 void cls(int colornum);
51 void send_ansi_detect(void);
52 void look_for_ansi(void);
53 int inkey(void);
54 void set_keepalives(int s);
55 extern int enable_color;
56 int yesno(void);
57 int yesno_d(int d);
58 void keyopt(char *);
59 char keymenu(char *menuprompt, char *menustring);
60 void async_ka_start(void);
61 void async_ka_end(void);
62 int checkpagin(int lp, unsigned int pagin, unsigned int height);
63 char was_a_key_pressed(void);
64
65 #ifdef __GNUC__
66 void pprintf(const char *format, ...) __attribute__((__format__(__printf__,1,2)));
67 #else
68 void pprintf(const char *format, ...);
69 #endif
70
71
72
73 extern char rc_url_cmd[SIZ];
74 extern char rc_open_cmd[SIZ];
75 extern char rc_gotmail_cmd[SIZ];
76 extern int lines_printed;
77 extern int rc_remember_passwords;