aboutsummaryrefslogtreecommitdiff
path: root/risugen
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-02-10 17:18:02 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-02-10 17:18:02 +0000
commit6807d239366a6953517a228b73ab7417033bf4aa (patch)
tree8e32e1f9cd5993e3a33faf2148e8bde68ac74f7e /risugen
parent71c81d66264f8adeed2787eab056a9f62c12e079 (diff)
Move progress bar functions to risugen_common
The progress bar functions are the same in every backend, so move them to the common file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'risugen')
-rwxr-xr-xrisugen30
1 files changed, 0 insertions, 30 deletions
diff --git a/risugen b/risugen
index b94eb6a..6aad626 100755
--- a/risugen
+++ b/risugen
@@ -37,36 +37,6 @@ my @not_pattern_re = (); # exclude pattern
# Valid block names (keys in blocks hash)
my %valid_blockname = ( constraints => 1, memory => 1 );
-my $lastprog;
-my $proglen;
-my $progmax;
-
-sub progress_start($$)
-{
- ($proglen, $progmax) = @_;
- $proglen -= 2; # allow for [] chars
- $| = 1; # disable buffering so we can see the meter...
- print "[" . " " x $proglen . "]\r";
- $lastprog = 0;
-}
-
-sub progress_update($)
-{
- # update the progress bar with current progress
- my ($done) = @_;
- my $barlen = int($proglen * $done / $progmax);
- if ($barlen != $lastprog) {
- $lastprog = $barlen;
- print "[" . "-" x $barlen . " " x ($proglen - $barlen) . "]\r";
- }
-}
-
-sub progress_end()
-{
- print "[" . "-" x $proglen . "]\n";
- $| = 0;
-}
-
sub parse_risu_directive($$@)
{
# Parse a line beginning with ".", which is a directive used