aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2021-09-29 00:59:22 +0200
committerqorg11 <qorg@vxempire.xyz>2021-09-29 00:59:22 +0200
commit66a0a233425ddd5b4a2d3be8855b05e9ff4c8f70 (patch)
tree15582f3c47d527fe6b6acd7b03c5252f3edb378b
parent8545219141e9aae13af2b4a14606935b3179e78f (diff)
downloaddemiurge-66a0a233425ddd5b4a2d3be8855b05e9ff4c8f70.tar.gz
demiurge-66a0a233425ddd5b4a2d3be8855b05e9ff4c8f70.zip
Use fread instead of readline when input is not a terminal, so you can put \n in the post
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index cc5bec8..6c01949 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,7 +55,8 @@ main(int argc, char **argv)
if(!isatty(0)) {
eputs("Not a terminal, reading from stdin");
- char *status = readline(""); // TODO: Fix newlines
+ char status[5000]; /* TODO get max from instance */
+ fread(status,5000,1,stdin);
post_status(status, NULL, NULL);
return 0;
}