summaryrefslogtreecommitdiff
path: root/bbrll
diff options
context:
space:
mode:
Diffstat (limited to 'bbrll')
-rwxr-xr-xbbrll6
1 files changed, 3 insertions, 3 deletions
diff --git a/bbrll b/bbrll
index 5f3324f..13fd5f7 100755
--- a/bbrll
+++ b/bbrll
@@ -53,7 +53,8 @@ function print_sin_braille() {
#6 7
#reverse
#(1,3)(0,3)(1,2)(1,1)(1,0)(0,2)(0,1)(0,0)
- num=0
+ #the braille empty char in decimal base
+ num=14852224
if [ "${rawbuff[((0+4*$2))]:((0+2*$1)):1}" == "1" ]; then
num=$(($num + 1))
fi
@@ -81,8 +82,7 @@ function print_sin_braille() {
#ors it with the utf-8 hex value of the empty braille character
#the two spaces assume aht the encoding is utf-8, convoluted bitwise OR
#and coversion between character and number stuff
- #echo "obase=16;$(( 2#$b7${b6}00$b5$b4$b3$b2$b1$b0 | 0xE2A080 ))"|bc | xxd --reverse -ps
- echo "obase=16;$(( $num | 0xE2A080 ))"|bc | xxd --reverse -ps
+ printf %x $num | xxd --reverse -ps
}
function print_braille() {