Back to index

citadel  8.12
commands.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Copyright (c) 1987-2012 by the citadel.org team
00004  *
00005  *  This program is open source software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License version 3.
00007  *
00008  *  This program is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  *  GNU General Public License for more details.
00012  */
00013 
00014 /*
00015  * Colors for color() command
00016  */
00017 #define DIM_BLACK    0
00018 #define DIM_RED             1
00019 #define DIM_GREEN    2
00020 #define DIM_YELLOW   3
00021 #define DIM_BLUE     4
00022 #define DIM_MAGENTA  5
00023 #define DIM_CYAN     6
00024 #define DIM_WHITE    7
00025 #define BRIGHT_BLACK 8
00026 #define BRIGHT_RED   9
00027 #define BRIGHT_GREEN 10
00028 #define BRIGHT_YELLOW       11
00029 #define BRIGHT_BLUE  12
00030 #define BRIGHT_MAGENTA      13
00031 #define BRIGHT_CYAN  14
00032 #define BRIGHT_WHITE 15
00033 #define COLOR_PUSH   16     /* Save current color */
00034 #define COLOR_POP    17     /* Restore saved color */
00035 #define ORIGINAL_PAIR       -1     /* Default terminal colors */
00036 
00037 /*
00038  * declarations
00039  */
00040 void load_command_set(void);
00041 void stty_ctdl(int cmd);
00042 void newprompt(char *prompt, char *str, int len);
00043 void strprompt(char *prompt, char *str, int len);
00044 int boolprompt(char *prompt, int prev_val);
00045 int intprompt(char *prompt, int ival, int imin, int imax);
00046 int fmout(int width, FILE *fpin, char *text, FILE *fpout, int subst);
00047 int getcmd(CtdlIPC *ipc, char *argbuf);
00048 void display_help(CtdlIPC *ipc, char *name);
00049 void color(int colornum);
00050 void cls(int colornum);
00051 void send_ansi_detect(void);
00052 void look_for_ansi(void);
00053 int inkey(void);
00054 void set_keepalives(int s);
00055 extern int enable_color;
00056 int yesno(void);
00057 int yesno_d(int d);
00058 void keyopt(char *);
00059 char keymenu(char *menuprompt, char *menustring);
00060 void async_ka_start(void);
00061 void async_ka_end(void);
00062 int checkpagin(int lp, unsigned int pagin, unsigned int height);
00063 char was_a_key_pressed(void);
00064 
00065 #ifdef __GNUC__
00066 void pprintf(const char *format, ...) __attribute__((__format__(__printf__,1,2)));
00067 #else
00068 void pprintf(const char *format, ...);
00069 #endif
00070 
00071 
00072 
00073 extern char rc_url_cmd[SIZ];
00074 extern char rc_open_cmd[SIZ];
00075 extern char rc_gotmail_cmd[SIZ];
00076 extern int lines_printed;
00077 extern int rc_remember_passwords;