summaryrefslogtreecommitdiff
path: root/6/main.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-09 16:49:09 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-09 16:49:09 -0700
commited8711e68e441e9884d734932373317834665833 (patch)
tree08a3f37550af1b6adb1ad912ee6df70fa6c1ceaf /6/main.c
parentbd5fb6d0628831cde25f13e3fe461786d616a06e (diff)
downloadmc-ed8711e68e441e9884d734932373317834665833.tar.gz
Refactor code to add jump tables, and prepare to generate them.
Diffstat (limited to '6/main.c')
-rw-r--r--6/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/6/main.c b/6/main.c
index 8b72843..80d1c1a 100644
--- a/6/main.c
+++ b/6/main.c
@@ -98,7 +98,7 @@ static void assemble(char *asmsrc, char *path)
}
}
-static char *gentemp(char *buf, size_t bufsz, char *path, char *suffix)
+static char *tempfile(char *buf, size_t bufsz, char *path, char *suffix)
{
char *tmpdir;
char *base;
@@ -219,7 +219,7 @@ int main(int argc, char **argv)
else
swapsuffix(buf, sizeof buf, ctx.args[i], ".myr", ".s");
} else {
- gentemp(buf, sizeof buf, ctx.args[i], ".s");
+ tempfile(buf, sizeof buf, ctx.args[i], ".s");
}
gen(file, buf);
assemble(buf, ctx.args[i]);