diff options
| -rw-r--r-- | compressc.c | 15 | ||||
| -rw-r--r-- | dinner.c | 30 | ||||
| -rw-r--r-- | getline-test.c | 22 | ||||
| -rw-r--r-- | important-file.c | 18 | ||||
| -rw-r--r-- | isOdd.c | 27 | ||||
| -rw-r--r-- | isOddBetter.c | 31 | 
6 files changed, 0 insertions, 143 deletions
diff --git a/compressc.c b/compressc.c deleted file mode 100644 index 6ae6a23..0000000 --- a/compressc.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2014  Tomasz Kramkowski <tk@the-tk.com> - * - * This program is free software. It is licensed under version 3 of the - * GNU General Public License. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see [http://www.gnu.org/licenses/]. - */ - -#include<stdio.h> - -int main(void) { -    printf("WIP\n"); -} diff --git a/dinner.c b/dinner.c deleted file mode 100644 index 23707bb..0000000 --- a/dinner.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2014  Tomasz Kramkowski <tk@the-tk.com> - * - * This program is free software. It is licensed under version 3 of the - * GNU General Public License. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see [http://www.gnu.org/licenses/]. - */ - -// Yes, I got lazy. And timer.c wasn't a thing back then. - -#include <stdio.h> -#include <unistd.h> - -int main(int argc, char **argv) { -        sleep(1); -        printf("Start:\a\n"); -        for (int i = 0; i < 45; i += 5) { -                sleep(300); -                printf("Check water levels.\a\n"); -                if (i == 24) { -                        printf("Add stuff from plate.\n"); -                } -        } - -        printf("All done.\a\n"); - -        return 0; -} diff --git a/getline-test.c b/getline-test.c deleted file mode 100644 index 31bb770..0000000 --- a/getline-test.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2014  Tomasz Kramkowski <tk@the-tk.com> - * - * This program is free software. It is licensed under version 3 of the - * GNU General Public License. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see [http://www.gnu.org/licenses/]. - */ - -// I don't know what this is. -#include<stdio.h> -#include<stdlib.h> - -int main (int argc, char *argv[]) { -    char **string; - -    string = malloc(100) -    *string = "test"; - -    printf("%s", **string); -} diff --git a/important-file.c b/important-file.c deleted file mode 100644 index 0420ddc..0000000 --- a/important-file.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ??? - * - * Copyright (C) 2014  Tomasz Kramkowski <tk@the-tk.com> - * - * This program is free software. It is licensed under version 3 of the - * GNU General Public License. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see [http://www.gnu.org/licenses/]. - */ - -// One has to wonder, what made this file so important in the first place. -#include <stdio.h> - -main () { -    printf("test \n") -} diff --git a/isOdd.c b/isOdd.c deleted file mode 100644 index d173352..0000000 --- a/isOdd.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2014  Tomasz Kramkowski <tk@the-tk.com> - * - * This program is free software. It is licensed under version 3 of the - * GNU General Public License. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see [http://www.gnu.org/licenses/]. - */ - -#include<stdio.h> - -_Bool isOdd( int ); - -int main ( int argc, char *argv[] ) { -    if ( argc == 2 ) { -        printf("%s\n", isOdd( atoi( argv[1] ) ) ? "true" : "false" ); -        return 0; -    } else { -        printf("Usage: '%s <number>'\n", argv[0]); -        return 1; -    } -} - -_Bool isOdd( int n ) { -    return n % 2; -} diff --git a/isOddBetter.c b/isOddBetter.c deleted file mode 100644 index 5241524..0000000 --- a/isOddBetter.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014  Tomasz Kramkowski <tk@the-tk.com> - * - * This program is free software. It is licensed under version 3 of the - * GNU General Public License. - * - * You should have received a copy of the GNU General Public License - * along with this program.  If not, see [http://www.gnu.org/licenses/]. - */ - -// Trying to see how different ways of odd checking compile into source. -#include<stdio.h> - -_Bool isOdd( int ); - -int main ( int argc, char *argv[] ) { -    if ( argc == 2 ) { -        printf("%s\n", isOdd( atoi( argv[1] ) ) ? "true" : "false" ); -        return 0; -    } else { -        printf("Usage: '%s <number>'\n", argv[0]); -        return 1; -    } -} - -_Bool isOdd( int n ) { -    // Bitwise and with LSB to check if number is odd or even. -    // LSB == 0 => even -    // LSB == 1 => odd -    return n & 1; -}  | 
