+1998-10-31 Nathan Bryant <bryant@cs.usm.maine.edu>
+ * citadel.c, commands.c, commands.h: set background color to black
+ before clearing screen, so that we can actually see text on
+ black-on-white xterms.
+
1998-10-29 Nathan Bryant <bryant@cs.usm.maine.edu>
* rooms.c: fix color of Mail>
* citadel.c: send ANSI detect sequence after attach_to_server() so the
printf("Attaching to server...\r");
fflush(stdout);
attach_to_server(argc,argv);
+
send_ansi_detect();
-cls();
-color(7);
serv_gets(aaa);
if (aaa[0]!='2') {
printf("%s\n",&aaa[4]);
}
get_serv_info();
+look_for_ansi();
+cls(0);
+color(7);
+
printf("%-22s\n%s\n%s\n",serv_info.serv_software,serv_info.serv_humannode,
serv_info.serv_bbs_city);
screenwidth = 80; /* default screen dimensions */
}
}
-look_for_ansi();
-
GSTA: termn8=0; newnow=0;
do {
if (strlen(rc_username) > 0) {
*/
void color(int colornum)
{
-
#ifdef ANSI_COLOR
if (enable_color) {
- fflush(stdout);
- printf("%c[3%dm%c[1m", 27, colornum, 27);
+ printf("\033[3%dm\033[1m", colornum);
fflush(stdout);
}
#endif
}
-void cls(void) {
+void cls(int colornum) {
#ifdef ANSI_COLOR
- fflush(stdout);
- printf("%c[2J%c[H", 27, 27);
- fflush(stdout);
+ if (enable_color) {
+ printf("\033[4%dm\033[2J\033[H", colornum);
+ fflush(stdout);
+ }
#endif
}
*/
void send_ansi_detect(void) {
#ifdef ANSI_COLOR
- printf("%c[c", 27);
+ printf("\033[c");
fflush(stdout);
time(&AnsiDetect);
#endif
int getcmd(char *argbuf);
void display_help(char *name);
void color(int colornum);
-void cls(void);
+void cls(int colornum);
void send_ansi_detect(void);
void look_for_ansi(void);
int inkey(void);