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