summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@iohq.net>2015-06-27 10:26:55 -0600
committerAaron Ball <nullspoon@iohq.net>2015-06-27 10:27:44 -0600
commitdea9798f377df0f79c366f2553cbda5a3324caf4 (patch)
tree0ad470527b9e139479914d9304f90042dd599fc2
parent6b66372a301366629eaac2f6ab606e4c2def497b (diff)
downloadterminus-dea9798f377df0f79c366f2553cbda5a3324caf4.tar.gz
terminus-dea9798f377df0f79c366f2553cbda5a3324caf4.tar.xz
Removed ctoi function
Oops. Forgot to remove this when switching to atoi. Also removed math.h include.
-rw-r--r--Makefile2
-rw-r--r--src/main.c28
2 files changed, 1 insertions, 29 deletions
diff --git a/Makefile b/Makefile
index cdae433..21c830f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
out = terminus
all:
- cc src/main.c -lm -o $(out)
+ cc src/main.c -o $(out)
debug:
make all dbg="-g"
diff --git a/src/main.c b/src/main.c
index 016a2e9..d3baeea 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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) {

Generated by cgit