aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrNuget <drnuget@outlook.com>2025-11-02 01:51:45 +0200
committerDrNuget <drnuget@outlook.com>2025-11-02 01:51:45 +0200
commite3d7dfb83b06239c10e3e5b0f5dcd9e3b93925e8 (patch)
treedcfd84066368b36a22528499deaecc22b75ad1bd
parent8afd5f50c068bd9a802496455a08c76433b3fd0d (diff)
downloadbrailleboi-e3d7dfb83b06239c10e3e5b0f5dcd9e3b93925e8.tar.gz
turn code back to c99 compliant, change c standard back to c99
-rw-r--r--Makefile2
-rw-r--r--brailleboi.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index d52f23b..8983dce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC = gcc
-CFLAGS = -std=c23 -Wpedantic
+CFLAGS = -std=c99 -Wpedantic
SRC = main.c brailleboi.c brailleboi.h
diff --git a/brailleboi.c b/brailleboi.c
index d28a7d1..7957d8b 100644
--- a/brailleboi.c
+++ b/brailleboi.c
@@ -25,9 +25,9 @@ int brailleStop(image_buffer* buf)
int brailleReorganizeBits(int old)
{
//Reorganizes bits because the unicode standard for 8 dotted braille is weird
- int new = (old&0b10000111) |
- (old&0b01110000)>>1 |
- (old&0b00001000)<<3;
+ int new = (old&0x87) | // 0b10000111
+ (old&0x70)>>1 | // 0b01110000
+ (old&0x08)<<3; // 0b00001000
return new;
}