Skip to content
Snippets Groups Projects
Commit 7aa03d4f authored by deuce's avatar deuce
Browse files

Don't use struct winsize here.

parent 7b4ac912
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ int ssh_connect(struct bbslist *bbs) ...@@ -141,7 +141,7 @@ int ssh_connect(struct bbslist *bbs)
int status; int status;
char password[MAX_PASSWD_LEN+1]; char password[MAX_PASSWD_LEN+1];
char username[MAX_USER_LEN+1]; char username[MAX_USER_LEN+1];
struct winsize ws; int rows,cols;
struct text_info ti; struct text_info ti;
init_uifc(TRUE, TRUE); init_uifc(TRUE, TRUE);
...@@ -239,28 +239,28 @@ int ssh_connect(struct bbslist *bbs) ...@@ -239,28 +239,28 @@ int ssh_connect(struct bbslist *bbs)
gettextinfo(&ti); gettextinfo(&ti);
if(ti.screenwidth < 80) if(ti.screenwidth < 80)
ws.ws_col=40; cols=40;
else { else {
if(ti.screenwidth < 132) if(ti.screenwidth < 132)
ws.ws_col=80; cols=80;
else else
ws.ws_col=132; cols=132;
} }
ws.ws_row=ti.screenheight; rows=ti.screenheight;
if(!bbs->nostatus) if(!bbs->nostatus)
ws.ws_row--; rows--;
if(ws.ws_row<24) if(rows<24)
ws.ws_row=24; rows=24;
uifc.pop(NULL); uifc.pop(NULL);
uifc.pop("Setting Terminal Width"); uifc.pop("Setting Terminal Width");
/* Pass socket to cryptlib */ /* Pass socket to cryptlib */
status=cl.SetAttribute(ssh_session, CRYPT_SESSINFO_SSH_WIDTH, ws.ws_col); status=cl.SetAttribute(ssh_session, CRYPT_SESSINFO_SSH_WIDTH, cols);
uifc.pop(NULL); uifc.pop(NULL);
uifc.pop("Setting Terminal Height"); uifc.pop("Setting Terminal Height");
/* Pass socket to cryptlib */ /* Pass socket to cryptlib */
status=cl.SetAttribute(ssh_session, CRYPT_SESSINFO_SSH_HEIGHT, ws.ws_row); status=cl.SetAttribute(ssh_session, CRYPT_SESSINFO_SSH_HEIGHT, rows);
/* Activate the session */ /* Activate the session */
uifc.pop(NULL); uifc.pop(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment