commit 5a0a3260d386f7d257009b80a3172ebc2893bc00
parent 08d7554db062501978379d7a109e05cf56bab503
Author: Ed van Bruggen <edvb@uw.edu>
Date: Sun, 22 Sep 2019 20:46:35 -0700
Fix typo which coincidently worked
Remove Error enum not used
Diffstat:
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/tisp.c b/tisp.c
@@ -480,7 +480,7 @@ read_num(Str str)
tsp_warn("incorrect ratio format, no denominator found");
return mk_rat(sign * num, read_sign(str) * read_int(str));
case '.':
- s = emalloc(sizeof(str));
+ s = emalloc(sizeof(Str));
s->d = ++str->d;
double d = (double) read_int(s);
int size = s->d - str->d;
@@ -499,8 +499,8 @@ static char
esc_char(char c)
{
switch (c) {
- case 'n': return '\n';
- case 't': return '\t';
+ case 'n': return '\n';
+ case 't': return '\t';
case '\\':
case '"':
default:
diff --git a/tisp.h b/tisp.h
@@ -73,11 +73,6 @@ typedef struct Str {
char *d;
} *Str;
-typedef enum {
- ERROR_OK,
- ERROR_SYNTAX
-} Error;
-
/* fraction */
typedef struct {
double num, den;