diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 28 |
1 files changed, 0 insertions, 28 deletions
@@ -18,7 +18,6 @@ #include <stdlib.h> #include <string.h> #include <time.h> -#include <math.h> /** @@ -35,33 +34,6 @@ long days_to_seconds(int days) { /** - * Converts the given "string integer" to a long datatype. This is useful for - * programs that take command line arguments from the user and they need to - * treats those arguments like actual numbers. - * - * @param intstr Integer string - * - * @return long The integer represented by the given string - */ -long ctoi(char* intstr) { - // TODO: This doesn't work yet - int i = 0; - long out = 0; - - while(intstr[i] != '\0') { - //printf("%d\n", intstr[i] - 48); - if(intstr[i] == '0') { - out += pow(10,i); - } else { - out += (intstr[i] - 48) + pow(10,i); - } - i++; - } - return out; -} - - -/** * TODO */ int get_user_home(char* out) { |