X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=textclient%2Fscreen.c;h=70f2b1f65b02384c91f1d27694ca84ab01d31946;hb=da6bb5e24252a0ff56d314a60081ae9ed31ab1a7;hp=cd1d5263272491861e7621c6c11a6c55cd649131;hpb=2dfd5bee542a9d635e380097e63c307bd6c27d65;p=citadel.git diff --git a/textclient/screen.c b/textclient/screen.c index cd1d52632..70f2b1f65 100644 --- a/textclient/screen.c +++ b/textclient/screen.c @@ -70,10 +70,11 @@ void screen_new(void) /* * Beep. */ -void ctdl_beep(void) { +void ctdl_beep(void) +{ putc(7, stdout); } - + @@ -92,7 +93,7 @@ int scr_printf(char *fmt, ...) va_end(ap); len = strlen(outbuf); - for (i=0; i 0) && (cols_printed > screenwidth)) { ++lines_printed; @@ -182,10 +184,10 @@ int scr_putc(int c) /* How many lines output before stopping for the paginator? * Depends on whether we are displaying a status line. */ - int height_offset = ( ((enable_color) && (screenwidth > 0) && (enable_status_line)) ? (3) : (2) ) ; + int height_offset = (((enable_color) && (screenwidth > 0) && (enable_status_line)) ? (3) : (2)); /* Ok, go check it. Stop and display the paginator prompt if necessary. */ - if ((screenheight > 0) && (lines_printed > (screenheight-height_offset))) { + if ((screenheight > 0) && (lines_printed > (screenheight - height_offset))) { lines_printed = 0; hit_any_key(); lines_printed = 0; @@ -231,28 +233,29 @@ sighandler_t scr_winch(int signum) /* * Display a 3270-style "wait" indicator at the bottom of the screen */ -void scr_wait_indicator(int state) { +void scr_wait_indicator(int state) +{ int sp = (screenwidth - 2); - if (!enable_status_line) return; + if (!enable_status_line) + return; if (screenwidth > 0) { switch (state) { - default: - case 0: /* Idle */ - status_line[sp] = ' '; - break; - case 1: /* Waiting */ - status_line[sp] = 'X'; - break; - case 2: /* Receiving */ - status_line[sp] = '<'; - break; - case 3: /* Sending */ - status_line[sp] = '>'; - break; + default: + case 0: /* Idle */ + status_line[sp] = ' '; + break; + case 1: /* Waiting */ + status_line[sp] = 'X'; + break; + case 2: /* Receiving */ + status_line[sp] = '<'; + break; + case 3: /* Sending */ + status_line[sp] = '>'; + break; } scr_flush(); } } -