aboutsummaryrefslogtreecommitdiffstats
path: root/digit.sh
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-02-07 00:24:39 +0100
committerMattias Andrée <maandree@kth.se>2021-02-07 00:24:39 +0100
commit68dd947b82c6508cb72558130759c9eb2480f1eb (patch)
tree519b32f07c9f46d48849acb88c6687ecb28db12b /digit.sh
parentAdd posix time support (diff)
downloadmongotimer-68dd947b82c6508cb72558130759c9eb2480f1eb.tar.gz
mongotimer-68dd947b82c6508cb72558130759c9eb2480f1eb.tar.bz2
mongotimer-68dd947b82c6508cb72558130759c9eb2480f1eb.tar.xz
Fork mongoclock and turn into a timer and stopwatch
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-xdigit.sh22
1 files changed, 20 insertions, 2 deletions
diff --git a/digit.sh b/digit.sh
index c7e7fe7..8297043 100755
--- a/digit.sh
+++ b/digit.sh
@@ -176,6 +176,22 @@ mongo_c() {
' '
}
+mongo_m() {
+ printf '%s\n' \
+ ' ' \
+ ' ' \
+ ' ' \
+ ' ' \
+ ' ' \
+ ' [XXXXXXXXXX] ' \
+ ' [XXXXXXXXXX] ' \
+ ' ' \
+ ' ' \
+ ' ' \
+ ' ' \
+ ' '
+}
+
digit() {
if test "$1" = 0; then
mongo_0
@@ -197,14 +213,16 @@ digit() {
mongo_8
elif test "$1" = 9; then
mongo_9
- else
+ elif test "$1" = c; then
mongo_c
+ else
+ mongo_m
fi
}
printf 'static const char *mongo_%s[] = {\n' "$1"
digit "$1" | \
- sed -e 's/X/ /g' -e 's/\[/\\033\[7m /g' -e 's/\]/\\033\[m /g' | \
+ sed -e 's/X/ /g' -e 's/\[/\\033\[7m /g' -e 's/\]/\\033\[27m /g' | \
sed -e 's/^/"/' -e 's/$/",/' | \
sed '$s/,$//'
printf '};\n'