Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fltk
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
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
Will2.Mcgregor@live.uwe.ac.uk
fltk
Commits
17d30021
Commit
17d30021
authored
6 months ago
by
Matthias Melcher
Browse files
Options
Downloads
Patches
Plain Diff
FLUID: Remove warnings.
parent
4d8a0df3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fluid/fluid_filename.cxx
+3
-3
3 additions, 3 deletions
fluid/fluid_filename.cxx
with
3 additions
and
3 deletions
fluid/fluid_filename.cxx
+
3
−
3
View file @
17d30021
...
@@ -208,12 +208,12 @@ Fl_String fl_filename_shortened(const Fl_String &filename, int max_chars) {
...
@@ -208,12 +208,12 @@ Fl_String fl_filename_shortened(const Fl_String &filename, int max_chars) {
// Create a new string by replacing characters in the middle.
// Create a new string by replacing characters in the middle.
int
remove_chars
=
num_chars
-
max_chars
+
ell_bytes
;
int
remove_chars
=
num_chars
-
max_chars
+
ell_bytes
;
int
left_chars
=
(
max_chars
-
ell_bytes
)
/
2
;
int
left_chars
=
(
max_chars
-
ell_bytes
)
/
2
;
int
right_chars
=
max_chars
-
left_chars
-
3
;
//
int right_chars = max_chars - left_chars - 3;
int
right_start_char
=
num_chars
-
right_chars
;
//
int right_start_char = num_chars - right_chars;
// Convert character counts into byte counts.
// Convert character counts into byte counts.
int
left_bytes
=
fl_utf8strlen
(
homed_filename
.
c_str
(),
left_chars
);
int
left_bytes
=
fl_utf8strlen
(
homed_filename
.
c_str
(),
left_chars
);
int
right_start_byte
=
fl_utf8strlen
(
homed_filename
.
c_str
()
+
left_bytes
,
remove_chars
)
+
left_bytes
;
int
right_start_byte
=
fl_utf8strlen
(
homed_filename
.
c_str
()
+
left_bytes
,
remove_chars
)
+
left_bytes
;
return
homed_filename
.
substr
(
0
,
left_bytes
)
+
"..."
+
homed_filename
.
substr
(
right_start_byte
);
return
homed_filename
.
substr
(
0
,
left_bytes
)
+
ell
+
homed_filename
.
substr
(
right_start_byte
);
}
else
{
}
else
{
// Nothing to change.
// Nothing to change.
return
homed_filename
;
return
homed_filename
;
...
...
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