From a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 15:52:39 +0200 Subject: format files --- src/auto-str.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/auto-str.c') diff --git a/src/auto-str.c b/src/auto-str.c index 72e93bd..cad14ce 100644 --- a/src/auto-str.c +++ b/src/auto-str.c @@ -1,13 +1,14 @@ #include + #include "buffer.h" #include "exit.h" char inbuf[BUFFER_SMALL]; -buffer b = BUFFER_INIT(write,1,inbuf,sizeof(inbuf)); +buffer b = BUFFER_INIT(write, 1, inbuf, sizeof(inbuf)); void out(char *s) { - if (buffer_puts(&b,s) == -1) _exit(111); + if (buffer_puts(&b, s) == -1) _exit(111); } int main(int argc, char **argv) @@ -29,8 +30,10 @@ int main(int argc, char **argv) while ((ch = *value++)) { out("\\"); octal[3] = 0; - octal[2] = '0' + (ch & 7); ch >>= 3; - octal[1] = '0' + (ch & 7); ch >>= 3; + octal[2] = '0' + (ch & 7); + ch >>= 3; + octal[1] = '0' + (ch & 7); + ch >>= 3; octal[0] = '0' + (ch & 7); out(octal); } -- cgit v1.2.3