From cd0fd0cacad51922b79c361a4b8943056f04cda2 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sun, 19 Jul 2015 14:28:39 +0200 Subject: Removed some useless old stuff --- compressc.c | 15 --------------- dinner.c | 30 ------------------------------ getline-test.c | 22 ---------------------- important-file.c | 18 ------------------ isOdd.c | 27 --------------------------- isOddBetter.c | 31 ------------------------------- 6 files changed, 143 deletions(-) delete mode 100644 compressc.c delete mode 100644 dinner.c delete mode 100644 getline-test.c delete mode 100644 important-file.c delete mode 100644 isOdd.c delete mode 100644 isOddBetter.c 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 - * - * 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 - -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 - * - * 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 -#include - -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 - * - * 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 -#include - -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 - * - * 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 - -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 - * - * 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 - -_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 '\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 - * - * 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 - -_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 '\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; -} -- cgit v1.2.3-54-g00ecf