projects
/
vvhitespace
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing unused string from Hunt the Wumpus.
[vvhitespace]
/
vv_compiler.c
diff --git
a/vv_compiler.c
b/vv_compiler.c
index
f7e9540
..
d4f6af9
100644
(file)
--- a/
vv_compiler.c
+++ b/
vv_compiler.c
@@
-1,6
+1,6
@@
/*
* (c) 2019 Aaron Taylor <ataylor at subgeniuskitty dot com>
/*
* (c) 2019 Aaron Taylor <ataylor at subgeniuskitty dot com>
- *
All rights reserved
.
+ *
See LICENSE.txt file for copyright and license details
.
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-25,9
+25,9
@@
print_usage(char ** argv)
);
}
);
}
-/*
Allows building an ASCII string on the stack.
*/
-/* Th
is syntax: A"test"
*/
-/*
Results in five PUSH_IMMEDIATE commands for the four letters and newline.
*/
+/*
Builds an ASCII string on the stack using VVS PUSH_IMMEDIATE commands.
*/
+/* Th
e syntax: A"test" results in five PUSH_IMMEDIATE commands for the four
*/
+/*
letters, and null-terminator.
*/
/* Expects 'input' to present a double-quoted ('"') ASCII string. */
/* The 'A' has already been chomped. */
void
/* Expects 'input' to present a double-quoted ('"') ASCII string. */
/* The 'A' has already been chomped. */
void
@@
-65,6
+65,9
@@
parse_ascii_string(FILE * input, FILE * output)
fseek(input, -2, SEEK_CUR);
fread(&temp_byte, 1, 1, input);
}
fseek(input, -2, SEEK_CUR);
fread(&temp_byte, 1, 1, input);
}
+
+ /* Advance the stream pointer to the end of the string before returning. */
+ for (fread(&temp_byte,1,1,input); temp_byte != '"'; fread(&temp_byte,1,1,input)) continue;
}
int
}
int