summary refs log tree commit diff
path: root/bin/gfxx.c
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2018-02-07 12:07:01 -0500
committerJune McEnroe <programble@gmail.com>2018-02-07 12:07:01 -0500
commit11c23c1f97eefd5f748469d4c88b8c67e95a93dd (patch)
treee85603171f1ebb0de3f1398f5973ef9e259a6ddd /bin/gfxx.c
parentRename title to status in gfcocoa (diff)
downloadsrc-11c23c1f97eefd5f748469d4c88b8c67e95a93dd.tar.gz
src-11c23c1f97eefd5f748469d4c88b8c67e95a93dd.zip
Exit by returning false from input to gf{b,cocoa}
I haven't built gfb yet, so a fix commit is probably incoming.
Diffstat (limited to 'bin/gfxx.c')
-rw-r--r--bin/gfxx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/gfxx.c b/bin/gfxx.c
index e70dffb4..051d4591 100644
--- a/bin/gfxx.c
+++ b/bin/gfxx.c
@@ -348,11 +348,11 @@ static void setPreset(void) {
     }
 }
 
-extern void input(char in) {
+extern bool input(char in) {
     size_t pixel = (BITS_TOTAL + 7) / 8;
     size_t row = width * pixel;
     switch (in) {
-        case 'q': formatOptions(); printf("%s\n", options); exit(EX_OK);
+        case 'q': return false;
         break; case 'o': formatOptions(); printf("%s\n", options);
         break; case '[': if (!space--) space = COLOR__MAX - 1;
         break; case ']': if (++space == COLOR__MAX) space = 0;
@@ -380,4 +380,5 @@ extern void input(char in) {
         break; case '-': if (scale > 1) scale--;
         break; default: if (in >= '0' && in <= '9') setBit(in);
     }
+    return true;
 }