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
d55686a5
Commit
d55686a5
authored
4 months ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
A more complete fix for the upop() issue with long strings
Completely remove the 80 column screen width assumption/limit.
parent
9c871efc
No related branches found
No related tags found
No related merge requests found
Pipeline
#7707
failed
4 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/uifc/uifc32.c
+9
-5
9 additions, 5 deletions
src/uifc/uifc32.c
with
9 additions
and
5 deletions
src/uifc/uifc32.c
+
9
−
5
View file @
d55686a5
...
...
@@ -2736,24 +2736,28 @@ char *utimestr(time_t *intime)
/****************************************************************************/
/* Status popup/down function, see uifc.h for details. */
/****************************************************************************/
void
upop
(
const
char
*
str
)
void
upop
(
const
char
*
in
str
)
{
static
struct
vmem_cell
sav
[
80
*
3
],
buf
[
80
*
3
];
char
str
[(
MAX_COLS
-
7
)
+
1
];
static
struct
vmem_cell
sav
[
MAX_COLS
*
3
],
buf
[
MAX_COLS
*
3
];
int
i
,
j
,
k
;
static
int
width
;
if
(
str
==
NULL
)
{
if
(
in
str
==
NULL
)
{
vmem_puttext
((
api
->
scrn_width
-
width
+
1
)
/
2
+
1
,(
api
->
scrn_len
-
3
+
1
)
/
2
+
1
,(
api
->
scrn_width
+
width
-
1
)
/
2
+
1
,(
api
->
scrn_len
+
3
-
1
)
/
2
+
1
,
sav
);
return
;
}
strlcpy
(
str
,
instr
,
sizeof
str
);
width
=
strlen
(
str
);
if
(
!
width
)
return
;
width
+=
7
;
if
(
width
>
80
)
width
=
80
;
if
(
width
>
api
->
scrn_width
)
{
str
[
api
->
scrn_width
-
7
]
=
'\0'
;
width
=
api
->
scrn_width
;
}
vmem_gettext
((
api
->
scrn_width
-
width
+
1
)
/
2
+
1
,(
api
->
scrn_len
-
3
+
1
)
/
2
+
1
,(
api
->
scrn_width
+
width
-
1
)
/
2
+
1
,(
api
->
scrn_len
+
3
-
1
)
/
2
+
1
,
sav
);
for
(
i
=
0
;
i
<
width
*
3
;
i
++
)
...
...
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