Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
apk-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
61
Issues
61
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
apk-tools
Commits
762e0c71
Commit
762e0c71
authored
Apr 09, 2011
by
Ariadne Conill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
state: make the progress bar look nice
parent
2911d0ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/state.c
src/state.c
+3
-3
No files found.
src/state.c
View file @
762e0c71
...
...
@@ -712,15 +712,15 @@ static void apk_count_change(struct apk_change *change, struct apk_stats *stats)
static
void
apk_draw_progress
(
int
percent
)
{
const
int
bar_width
=
(
apk_screen_width
-
15
);
const
int
bar_width
=
(
apk_screen_width
-
7
);
int
i
;
fp
uts
(
"\e7-["
,
stderr
);
fp
rintf
(
stderr
,
"\e7%3i%% ["
,
percent
);
for
(
i
=
0
;
i
<
bar_width
*
percent
/
100
;
i
++
)
fputc
(
'#'
,
stderr
);
for
(;
i
<
bar_width
;
i
++
)
fputc
(
' '
,
stderr
);
fp
rintf
(
stderr
,
"]- %3i%%"
,
percent
);
fp
utc
(
']'
,
stderr
);
fflush
(
stderr
);
fputs
(
"\e8\e[0K"
,
stderr
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment