refactor: make room for loading and outputting pre-compiled files
This commit is contained in:
parent
3afbbb6ec2
commit
96866ba9ae
11 changed files with 537 additions and 433 deletions
|
|
@ -230,7 +230,6 @@ int main(int argc, char *argv[])
|
|||
int flags = 0;
|
||||
const char *filename = NULL;
|
||||
struct ink_source source;
|
||||
struct ink_story *story = NULL;
|
||||
|
||||
option_setopts(cli_options, argv);
|
||||
|
||||
|
|
@ -285,11 +284,6 @@ int main(int argc, char *argv[])
|
|||
return rc;
|
||||
}
|
||||
|
||||
story = ink_open();
|
||||
if (!story) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
const struct ink_story_options opts = {
|
||||
.source_bytes = source.bytes,
|
||||
.source_length = source.length,
|
||||
|
|
@ -298,8 +292,8 @@ int main(int argc, char *argv[])
|
|||
.flags = flags,
|
||||
};
|
||||
|
||||
rc = ink_load_story_options(story, &opts);
|
||||
if (rc < 0) {
|
||||
struct ink_story *const story = ink_load_story_options(&opts);
|
||||
if (story == NULL) {
|
||||
goto out;
|
||||
}
|
||||
if (!compile_only) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue