Commit e5153e05 authored by Dylan Araps's avatar Dylan Araps Committed by GitHub

Merge pull request #603 from dylanaraps/math2

General: Swap some math to simpler syntax
parents 3d36174e ed3a47d1
...@@ -1041,7 +1041,7 @@ get_gpu() { ...@@ -1041,7 +1041,7 @@ get_gpu() {
fi fi
prin "${subtitle}${gpu_num}" "$gpu" prin "${subtitle}${gpu_num}" "$gpu"
gpu_num="$((gpu_num+=1))" ((++gpu_num))
done done
return return
...@@ -1952,7 +1952,7 @@ get_ascii() { ...@@ -1952,7 +1952,7 @@ get_ascii() {
line="${line//\$\{??\}}" line="${line//\$\{??\}}"
line="${line//\\\\/\\}" line="${line//\\\\/\\}"
((${#line} > ascii_length)) && ascii_length="${#line}" ((${#line} > ascii_length)) && ascii_length="${#line}"
lines="$((lines+=1))" ((++lines))
done < "$ascii" done < "$ascii"
# Colors. # Colors.
...@@ -2437,7 +2437,7 @@ prin() { ...@@ -2437,7 +2437,7 @@ prin() {
printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} " printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} "
# Calculate info height. # Calculate info height.
info_height="$((info_height+=1))" ((++info_height))
# Log that prin was used. # Log that prin was used.
prin=1 prin=1
...@@ -2456,7 +2456,7 @@ get_line_break() { ...@@ -2456,7 +2456,7 @@ get_line_break() {
printf "%s\n" "${zws} " printf "%s\n" "${zws} "
# Calculate info height. # Calculate info height.
info_height="$((info_height+=1))" ((++info_height))
# Tell info() that we printed manually. # Tell info() that we printed manually.
prin=1 prin=1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment