#define IFNAIDE if (axlevel<AxAideU)
int rordercmp(struct ctdlroomlisting *r1, struct ctdlroomlisting *r2);
-
march *marchptr = NULL;
+extern char *moreprompt;
/* globals associated with the client program */
char temp[PATH_MAX]; /* Name of general-purpose temp file */
mrtg_active_users = extract_int(resp, 0);
remove_token(resp, 0, '\n');
extract_token(mrtg_server_uptime, resp, 0, '\n', sizeof mrtg_server_uptime);
- free(resp);
+ free(resp);
resp = NULL;
/* get high message# */
char buf[SIZ];
CtdlIPCServerInfo(ipc, buf);
+ moreprompt = ipc->ServInfo.moreprompt;
/* be nice and identify ourself to the server */
CtdlIPCIdentifySoftware(ipc, SERVER_TYPE, 0, REV_LEVEL,
char arg_screen;
+/* the default paginator prompt will be replaced by the server's prompt when we learn it */
+char *moreprompt = " -- more -- ";
+
extern int screenheight;
extern int screenwidth;
int lines_printed = 0;
* Issue the paginator prompt (more / hit any key to continue)
*/
void hit_any_key(void) {
- int b;
+ int a, b;
color(COLOR_PUSH);
color(DIM_RED);
- /* scr_printf("%s\r", ipc->ServInfo.moreprompt); */
- scr_printf("<<more>>\r"); // FIXME use the prompt given by the server
+ scr_printf("%s\r", moreprompt);
color(COLOR_POP);
- stty_ctdl(0);
b=inkey();
- /*
- for (a=0; !IsEmptyStr(&ipc->ServInfo.moreprompt[a]); ++a)
+ for (a=0; a<screenwidth; ++a) {
scr_putc(' ');
- */
- scr_printf(" ");
- scr_putc(13);
- stty_ctdl(1);
-
- if ( (rc_prompt_control == 1)
- || ((rc_prompt_control == 3) && (userflags & US_PROMPTCTL)) ) {
- if (b == 'q' || b == 'Q' || b == 's' || b == 'S')
+ }
+ scr_printf("\r");
+
+ if ( (rc_prompt_control == 1) || ((rc_prompt_control == 3) && (userflags & US_PROMPTCTL)) ) {
+ if (b == 'q' || b == 'Q' || b == 's' || b == 'S') {
b = STOP_KEY;
- if (b == 'n' || b == 'N')
+ }
+ if (b == 'n' || b == 'N') {
b = NEXT_KEY;
+ }
}
if (b==NEXT_KEY) sigcaught = SIGINT;