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
aae81acf
Commit
aae81acf
authored
20 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Combine multiple top/bottom checks and attempt to fix bottom check.
parent
c8f7f331
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/uifc/uifc32.c
+8
-22
8 additions, 22 deletions
src/uifc/uifc32.c
with
8 additions
and
22 deletions
src/uifc/uifc32.c
+
8
−
22
View file @
aae81acf
...
@@ -2124,8 +2124,14 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
...
@@ -2124,8 +2124,14 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
else
{
else
{
while
(
i
==
0
)
{
while
(
i
==
0
)
{
if
(
p
!=
oldp
)
{
if
(
p
!=
oldp
)
{
puttext
(
left
+
1
+
pad
,
top
+
2
+
pad
,
left
+
width
-
2
-
pad
,
top
+
height
-
1
-
pad
,
p
);
if
(
p
>
textbuf
+
(
lines
-
(
height
-
2
-
pad
-
pad
)
+
1
)
*
(
width
-
4
)
*
2
)
oldp
=
p
;
p
=
textbuf
+
(
lines
-
(
height
-
2
-
pad
-
pad
)
+
1
)
*
(
width
-
4
)
*
2
;
if
(
p
<
textbuf
)
p
=
textbuf
;
if
(
p
!=
oldp
)
{
puttext
(
left
+
1
+
pad
,
top
+
2
+
pad
,
left
+
width
-
2
-
pad
,
top
+
height
-
1
-
pad
,
p
);
oldp
=
p
;
}
}
}
if
(
kbwait
())
{
if
(
kbwait
())
{
j
=
inkey
();
j
=
inkey
();
...
@@ -2139,8 +2145,6 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
...
@@ -2139,8 +2145,6 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
&&
mevnt
.
starty
<=
top
+
pad
+
(
height
/
2
)
-
2
&&
mevnt
.
starty
<=
top
+
pad
+
(
height
/
2
)
-
2
&&
mevnt
.
event
==
CIOLIB_BUTTON_1_CLICK
)
{
&&
mevnt
.
event
==
CIOLIB_BUTTON_1_CLICK
)
{
p
=
p
-
((
width
-
4
)
*
2
*
(
height
-
5
));
p
=
p
-
((
width
-
4
)
*
2
*
(
height
-
5
));
if
(
p
<
textbuf
)
p
=
textbuf
;
continue
;
continue
;
}
}
/* Clicked Scroll Down */
/* Clicked Scroll Down */
...
@@ -2150,10 +2154,6 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
...
@@ -2150,10 +2154,6 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
&&
mevnt
.
starty
>=
top
+
pad
+
height
-
(
height
/
2
+
1
)
-
2
&&
mevnt
.
starty
>=
top
+
pad
+
height
-
(
height
/
2
+
1
)
-
2
&&
mevnt
.
event
==
CIOLIB_BUTTON_1_CLICK
)
{
&&
mevnt
.
event
==
CIOLIB_BUTTON_1_CLICK
)
{
p
=
p
+
(
width
-
4
)
*
2
*
(
height
-
5
);
p
=
p
+
(
width
-
4
)
*
2
*
(
height
-
5
);
if
(
p
>
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
)
p
=
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
;
if
(
p
<
textbuf
)
p
=
textbuf
;
continue
;
continue
;
}
}
i
=
1
;
i
=
1
;
...
@@ -2167,36 +2167,22 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
...
@@ -2167,36 +2167,22 @@ void showbuf(int mode, int left, int top, int width, int height, char *title, ch
case
CIO_KEY_UP
:
/* up arrow */
case
CIO_KEY_UP
:
/* up arrow */
p
=
p
-
((
width
-
4
)
*
2
);
p
=
p
-
((
width
-
4
)
*
2
);
if
(
p
<
textbuf
)
p
=
textbuf
;
break
;
break
;
case
CIO_KEY_PPAGE
:
/* PgUp */
case
CIO_KEY_PPAGE
:
/* PgUp */
p
=
p
-
((
width
-
4
)
*
2
*
(
height
-
5
));
p
=
p
-
((
width
-
4
)
*
2
*
(
height
-
5
));
if
(
p
<
textbuf
)
p
=
textbuf
;
break
;
break
;
case
CIO_KEY_NPAGE
:
/* PgDn */
case
CIO_KEY_NPAGE
:
/* PgDn */
p
=
p
+
(
width
-
4
)
*
2
*
(
height
-
5
);
p
=
p
+
(
width
-
4
)
*
2
*
(
height
-
5
);
if
(
p
>
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
)
p
=
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
;
if
(
p
<
textbuf
)
p
=
textbuf
;
break
;
break
;
case
CIO_KEY_END
:
/* end */
case
CIO_KEY_END
:
/* end */
p
=
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
;
p
=
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
;
if
(
p
<
textbuf
)
p
=
textbuf
;
break
;
break
;
case
CIO_KEY_DOWN
:
/* dn arrow */
case
CIO_KEY_DOWN
:
/* dn arrow */
p
=
p
+
((
width
-
4
)
*
2
);
p
=
p
+
((
width
-
4
)
*
2
);
if
(
p
>
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
)
p
=
textbuf
+
(
lines
-
height
+
1
)
*
(
width
-
4
)
*
2
;
if
(
p
<
textbuf
)
p
=
textbuf
;
break
;
break
;
default:
default:
...
...
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