Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
310e32b6
Commit
310e32b6
authored
20 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bunch of errors that prevented compiling.
parent
f60416a8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/syncterm/term.c
+4
-4
4 additions, 4 deletions
src/syncterm/term.c
src/syncterm/term.h
+1
-0
1 addition, 0 deletions
src/syncterm/term.h
src/syncterm/window.c
+1
-1
1 addition, 1 deletion
src/syncterm/window.c
with
6 additions
and
5 deletions
src/syncterm/term.c
+
4
−
4
View file @
310e32b6
...
@@ -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
.
p
ackpos
--
;
term
.
b
ackpos
--
;
}
}
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\n
Remote 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
{
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/term.h
+
1
−
0
View file @
310e32b6
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/syncterm/window.c
+
1
−
1
View file @
310e32b6
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment