From 55f62d3467d1f712fb277e1961f07ec90c7bda45 Mon Sep 17 00:00:00 2001 From: randomuser Date: Tue, 16 Feb 2021 10:38:21 -0600 Subject: [PATCH] retab scream.c --- progs/scream.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/progs/scream.c b/progs/scream.c index c39b08f..eacf2a9 100644 --- a/progs/scream.c +++ b/progs/scream.c @@ -5,30 +5,30 @@ * good night and good riddance */ char newchar(char c, int i) { - switch(i) { - case 0: - if(isupper(c)) return c + 32; - if(c == 33) return -2; - else return c; - case 1: - if(islower(c)) return c - 32; - if(c == 33) return -2; - else return c; - default: return -1; - } + switch(i) { + case 0: + if(isupper(c)) return c + 32; + if(c == 33) return -2; + else return c; + case 1: + if(islower(c)) return c - 32; + if(c == 33) return -2; + else return c; + default: return -1; + } } int advi(int i) { - switch(i) { - case 0: return 1; - case 1: return 0; - default: return -1; - } + switch(i) { + case 0: return 1; + case 1: return 0; + default: return -1; + } } int main(void) { - char c; - int i = 0; - while((c = getchar()) != EOF) { - putchar(newchar(c, i)); - i = advi(i); - } + char c; + int i = 0; + while((c = getchar()) != EOF) { + putchar(newchar(c, i)); + i = advi(i); + } }