diff options
author | Daniel <steew0x8@protonmail.com> | 2021-11-03 23:39:44 +0100 |
---|---|---|
committer | Daniel <steew0x8@protonmail.com> | 2021-11-03 23:39:44 +0100 |
commit | ab903e904fa4b994497bff231447db49d7040fa4 (patch) | |
tree | ed3b30eb286a3e4461981f465b007aae5cf1bb4b | |
parent | e7748c3eb607ace655bc48d807cbbc116960a611 (diff) | |
download | rpncalc-ab903e904fa4b994497bff231447db49d7040fa4.tar.gz |
fix
-rw-r--r-- | util.c | 6 | ||||
-rw-r--r-- | util.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/util.c b/util.c index 555c445..c4dd940 100644 --- a/util.c +++ b/util.c @@ -24,9 +24,7 @@ int is_operator(char *s) { } TYPE discriminate(char *s) { - if (is_decimal(s)) { - return DOUBLE; - } else if (is_operator(s)) { + if (is_operator(s)) { return OPERATOR; - } else return INT; + } else return DOUBLE; } diff --git a/util.h b/util.h index 18fb507..5f948d9 100644 --- a/util.h +++ b/util.h @@ -2,6 +2,6 @@ #define UTIL_H typedef enum {OPERATOR, DOUBLE, FUNCTION} TYPE; -int discriminate(char *s); +TYPE discriminate(char *s); #endif |