Skip to content
Snippets Groups Projects
Commit 310e32b6 authored by deuce's avatar deuce
Browse files

Fix a bunch of errors that prevented compiling.

parent f60416a8
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ void scrollup(void) ...@@ -40,7 +40,7 @@ void scrollup(void)
term.backpos++; term.backpos++;
if(term.backpos>backlines) { if(term.backpos>backlines) {
memmove(term.scrollback,term.scrollback+term.width*2,term.width*2*(backlines-1)); memmove(term.scrollback,term.scrollback+term.width*2,term.width*2*(backlines-1));
term.packpos--; term.backpos--;
} }
gettext(term.x+1,term.y+1,term.x+term.width,term.y+1,term.scrollback+(term.backpos-1)*term.width*2); gettext(term.x+1,term.y+1,term.x+term.width,term.y+1,term.scrollback+(term.backpos-1)*term.width*2);
buf=(char *)malloc(term.width*(term.height-1)*2); buf=(char *)malloc(term.width*(term.height-1)*2);
...@@ -92,7 +92,7 @@ void clearscreen(char attr) ...@@ -92,7 +92,7 @@ void clearscreen(char attr)
term.backpos+=term.height; term.backpos+=term.height;
if(term.backpos>backlines) { if(term.backpos>backlines) {
memmove(term.scrollback,term.scrollback+term.width*2*(term.backpos-term.backlines),term.width*2*(backlines-(term.backpos-term.backlines))); memmove(term.scrollback,term.scrollback+term.width*2*(term.backpos-backlines),term.width*2*(backlines-(term.backpos-backlines)));
term.backpos=backlines; term.backpos=backlines;
} }
gettext(term.x+1,term.y+1,term.x+term.width,term.y+term.height,term.scrollback+(term.backpos-term.height)*term.width*2); gettext(term.x+1,term.y+1,term.x+term.width,term.y+term.height,term.scrollback+(term.backpos-term.height)*term.width*2);
...@@ -516,7 +516,7 @@ void doterm(void) ...@@ -516,7 +516,7 @@ void doterm(void)
i=rlogin_recv(ch,1,100); i=rlogin_recv(ch,1,100);
switch(i) { switch(i) {
case -1: case -1:
uifcmsg("Disconnected"); uifcmsg("Disconnected","`Disconnected`\n\nRemote host dropped connection");
return; return;
case 1: case 1:
if(term.sequence) { if(term.sequence) {
...@@ -528,7 +528,7 @@ void doterm(void) ...@@ -528,7 +528,7 @@ void doterm(void)
} }
else if (term.music) { else if (term.music) {
strcat(term.musicbuf,ch); strcat(term.musicbuf,ch);
if(ch==14) if(ch[0]==14)
play_music(); play_music();
} }
else { else {
......
...@@ -14,6 +14,7 @@ struct terminal { ...@@ -14,6 +14,7 @@ struct terminal {
int save_ypos; int save_ypos;
char escbuf[1024]; char escbuf[1024];
int sequence; int sequence;
char musicbuf[1024];
int music; int music;
char *scrollback; char *scrollback;
int backpos; int backpos;
......
...@@ -21,7 +21,7 @@ int drawwin(void) ...@@ -21,7 +21,7 @@ int drawwin(void)
term.x=(txtinfo.screenwidth-term.width)/2; term.x=(txtinfo.screenwidth-term.width)/2;
term.y=(txtinfo.screenheight-term.height)/2; term.y=(txtinfo.screenheight-term.height)/2;
if((winbuf=(char *)malloc(txtinfo.screenheight*txtinfo.screenwidth*2))==NULL) { if((winbuf=(char *)malloc(txtinfo.screenheight*txtinfo.screenwidth*2))==NULL) {
uifcmsg("Cannot allocate memory for terminal buffer". "`Memory error`\n\n" uifcmsg("Cannot allocate memory for terminal buffer", "`Memory error`\n\n"
"Either your system is dangerously low on resources or your\n" "Either your system is dangerously low on resources or your\n"
"window is farking huge!"); "window is farking huge!");
return(-1); return(-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment