scr_printf("\n");
/* show preferences */
- scr_printf("Your screen width: "); color(BRIGHT_CYAN); scr_printf("%d", /*user->USscreenwidth*/ screenwidth); color(DIM_WHITE);
- scr_printf(", height: "); color(BRIGHT_CYAN); scr_printf("%d\n", /*user->USscreenheight*/ screenheight); color(DIM_WHITE);
scr_printf("Are you an experienced Citadel user: "); color(BRIGHT_CYAN); scr_printf("%s\n", (user->flags & US_EXPERT) ? "Yes" : "No"); color(DIM_WHITE);
scr_printf("Print last old message on New message request: "); color(BRIGHT_CYAN); scr_printf("%s\n", (user->flags & US_LASTOLD)? "Yes" : "No"); color(DIM_WHITE);
scr_printf("Prompt after each message: "); color(BRIGHT_CYAN); scr_printf("%s\n", (!(user->flags & US_NOPROMPT))? "Yes" : "No"); color(DIM_WHITE);
screenwidth = 80;
screenheight = 24;
r = CtdlIPCGetConfig(ipc, &myself, aaa);
- if (r == 2) {
- screenwidth = myself->USscreenwidth;
- screenheight = myself->USscreenheight;
- }
if (getenv("TERM") != NULL)
if (!strcmp(getenv("TERM"), "xterm")) {
have_xterm = 1;
}
-#ifdef TIOCGWINSZ
check_screen_dims();
-#endif
set_floor_mode(ipc);
if (mode == 0 || mode == 1) {
- /* Does anyone still use dialup connections with manual
- * screen dimensions setting anymore? For now we'll keep
- * the system's ability to set these, but remove the prompts
- * because they're spurious for nearly everyone.
- *
- user->USscreenwidth = intprompt("Enter your screen width",
- user->USscreenwidth, 20, 255);
- user->USscreenheight = intprompt("Enter your screen height",
- user->USscreenheight, 3, 255);
- */
-
user->flags = set_attr(ipc, user->flags,
"Are you an experienced Citadel user",
US_EXPERT, 0);
return;
}
- user->flags = set_attr(ipc, user->flags,
+ user->flags = set_attr(
+ ipc,
+ user->flags,
"Print last old message on New message request",
- US_LASTOLD, 0);
-
- user->flags = set_attr(ipc, user->flags,
- "Prompt after each message",
- US_NOPROMPT, 1);
-
- if ((user->flags & US_NOPROMPT) == 0)
- user->flags = set_attr(ipc, user->flags,
- "Use 'disappearing' prompts",
- US_DISAPPEAR, 0);
-
- user->flags = set_attr(ipc, user->flags,
- "Pause after each screenful of text",
- US_PAGINATOR, 0);
+ US_LASTOLD,
+ 0
+ );
+
+ user->flags = set_attr(
+ ipc,
+ user->flags,
+ "Prompt after each message",
+ US_NOPROMPT,
+ 1
+ );
+
+ if ((user->flags & US_NOPROMPT) == 0) {
+ user->flags = set_attr(
+ ipc,
+ user->flags,
+ "Use 'disappearing' prompts",
+ US_DISAPPEAR,
+ 0
+ );
+ }
- if (rc_prompt_control == 3 && (user->flags & US_PAGINATOR))
- user->flags = set_attr(ipc, user->flags,
+ user->flags = set_attr(
+ ipc,
+ user->flags,
+ "Pause after each screenful of text",
+ US_PAGINATOR,
+ 0
+ );
+
+ if (rc_prompt_control == 3 && (user->flags & US_PAGINATOR)) {
+ user->flags = set_attr(
+ ipc,
+ user->flags,
"<N>ext and <S>top work at paginator prompt",
- US_PROMPTCTL, 0);
+ US_PROMPTCTL,
+ 0
+ );
+ }
- if (rc_floor_mode == RC_DEFAULT)
- user->flags = set_attr(ipc, user->flags,
- "View rooms by floor",
- US_FLOORS, 0);
+ if (rc_floor_mode == RC_DEFAULT) {
+ user->flags = set_attr(
+ ipc,
+ user->flags,
+ "View rooms by floor",
+ US_FLOORS,
+ 0
+ );
+ }
- if (rc_ansi_color == 3)
- user->flags = set_attr(ipc, user->flags,
- "Enable color support",
- US_COLOR, 0);
+ if (rc_ansi_color == 3) {
+ user->flags = set_attr(
+ ipc,
+ user->flags,
+ "Enable color support",
+ US_COLOR,
+ 0
+ );
+ }
- if ((user->flags & US_EXPERT) == 0)
+ if ((user->flags & US_EXPERT) == 0) {
formout(ipc, "unlisted");
+ }
- user->flags = set_attr(ipc, user->flags,
- "Be unlisted in userlog",
- US_UNLISTED, 0);
+ user->flags = set_attr(
+ ipc,
+ user->flags,
+ "Be unlisted in userlog",
+ US_UNLISTED,
+ 0
+ );
if (!IsEmptyStr(editor_paths[0])) {
- user->flags = set_attr(ipc, user->flags,
+ user->flags = set_attr(
+ ipc,
+ user->flags,
"Always enter messages with the full-screen editor",
- US_EXTEDIT, 0);
+ US_EXTEDIT,
+ 0
+ );
}
}
usbuf->timescalled = 0;
usbuf->posted = 0;
usbuf->axlevel = config.c_initax;
- usbuf->USscreenwidth = 80;
- usbuf->USscreenheight = 24;
usbuf->lastcall = time(NULL);
/* fetch a new user number */
return;
CtdlGetUser(&CC->user, CC->curr_user);
- cprintf("%d %d|%d|%d|\n",
+ cprintf("%d 80|24|%d|\n",
CIT_OK,
- CC->user.USscreenwidth,
- CC->user.USscreenheight,
(CC->user.flags & US_USER_SET)
- );
+ );
}
/*
return;
}
CtdlGetUserLock(&CC->user, CC->curr_user);
- CC->user.USscreenwidth = extract_int(new_parms, 0);
- CC->user.USscreenheight = extract_int(new_parms, 1);
CC->user.flags = CC->user.flags & (~US_USER_SET);
- CC->user.flags = CC->user.flags |
- (extract_int(new_parms, 2) & US_USER_SET);
-
+ CC->user.flags = CC->user.flags | (extract_int(new_parms, 2) & US_USER_SET);
CtdlPutUserLock(&CC->user);
cprintf("%d Ok\n", CIT_OK);
}
ret = CtdlIPCGenericCommand(ipc, "GETU", NULL, 0, NULL, NULL, cret);
if (ret / 100 == 2) {
- uret[0]->USscreenwidth = extract_int(cret, 0);
- uret[0]->USscreenheight = extract_int(cret, 1);
uret[0]->flags = extract_int(cret, 2);
}
return ret;
if (!uret) return -2;
if (!cret) return -2;
- sprintf(aaa, "SETU %d|%d|%d",
- uret->USscreenwidth, uret->USscreenheight,
- uret->flags);
+ sprintf(aaa,
+ "SETU 80|24|%d",
+ uret->flags
+ );
return CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret);
}