* Began (but did not finish) applying GPL3+ declarations to each source file. This...
[citadel.git] / citadel / commands.h
1 /*
2  * $Id$
3  *
4  * Copyright (c) 1987-2009 by the citadel.org team
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 /*
22  * Colors for color() command
23  */
24 #define DIM_BLACK       0
25 #define DIM_RED         1
26 #define DIM_GREEN       2
27 #define DIM_YELLOW      3
28 #define DIM_BLUE        4
29 #define DIM_MAGENTA     5
30 #define DIM_CYAN        6
31 #define DIM_WHITE       7
32 #define BRIGHT_BLACK    8
33 #define BRIGHT_RED      9
34 #define BRIGHT_GREEN    10
35 #define BRIGHT_YELLOW   11
36 #define BRIGHT_BLUE     12
37 #define BRIGHT_MAGENTA  13
38 #define BRIGHT_CYAN     14
39 #define BRIGHT_WHITE    15
40 #define COLOR_PUSH      16      /* Save current color */
41 #define COLOR_POP       17      /* Restore saved color */
42 #define ORIGINAL_PAIR   -1      /* Default terminal colors */
43
44 /*
45  * declarations
46  */
47 void load_command_set(void);
48 void stty_ctdl(int cmd);
49 void newprompt(char *prompt, char *str, int len);
50 void strprompt(char *prompt, char *str, int len);
51 int boolprompt(char *prompt, int prev_val);
52 int intprompt(char *prompt, int ival, int imin, int imax);
53 int fmout(int width, FILE *fpin, char *text, FILE *fpout, char pagin,
54                 int height, int starting_lp, int subst);
55 int getcmd(CtdlIPC *ipc, char *argbuf);
56 void display_help(CtdlIPC *ipc, char *name);
57 void color(int colornum);
58 void cls(int colornum);
59 void send_ansi_detect(void);
60 void look_for_ansi(void);
61 int inkey(void);
62 void set_keepalives(int s);
63 extern int enable_color;
64 int yesno(void);
65 int yesno_d(int d);
66 void keyopt(char *);
67 char keymenu(char *menuprompt, char *menustring);
68 void async_ka_start(void);
69 void async_ka_end(void);
70 int checkpagin(int lp, unsigned int pagin, unsigned int height);
71 char was_a_key_pressed(void);
72
73 #ifdef __GNUC__
74 void pprintf(const char *format, ...) __attribute__((__format__(__printf__,1,2)));
75 #else
76 void pprintf(const char *format, ...);
77 #endif
78
79
80
81 extern char rc_url_cmd[SIZ];
82 extern char rc_open_cmd[SIZ];
83 extern char rc_gotmail_cmd[SIZ];
84 extern int lines_printed;
85 extern int rc_remember_passwords;