Skip to content

Commit

Permalink
calc84maniac: Add support for outputting to .8xv files
Browse files Browse the repository at this point in the history
  • Loading branch information
NanoWar committed Mar 28, 2015
1 parent cfe9a9d commit 3b7c2da
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 139 deletions.
2 changes: 1 addition & 1 deletion SPASM/bitmap.cpp
Expand Up @@ -482,7 +482,7 @@ void handle_bitmap(FILE *file)
add_label(strdup(base_name), bmp_num - 1);
}

set_define(img_map, "0", -1, NULL);
set_define(img_map, "0", -1, false);
}
if (base_name)
free(base_name);
Expand Down
2 changes: 2 additions & 0 deletions SPASM/console.cpp
Expand Up @@ -30,6 +30,8 @@ WORD save_console_attributes () {
CONSOLE_SCREEN_BUFFER_INFO csbiScreenBufferInfo;
GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &csbiScreenBufferInfo);
return csbiScreenBufferInfo.wAttributes;
#else
return 0;
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions SPASM/directive.cpp
Expand Up @@ -262,8 +262,8 @@ char *handle_directive (const char *ptr) {
strncpy(temp_filename, skip_whitespace (filename), sizeof (temp_filename));
} else {
strncpy(temp_filename, temp_path, sizeof (temp_filename));
strncat(temp_filename, "/", sizeof (temp_filename));
strncat(temp_filename, skip_whitespace (filename), sizeof (temp_filename));
strncat(temp_filename, "/", sizeof (temp_filename) - 1);
strncat(temp_filename, skip_whitespace (filename), sizeof (temp_filename) - 1);
}
echo_target = fopen (fix_filename (temp_filename), target_format);
if (echo_target == NULL) {
Expand Down Expand Up @@ -418,7 +418,7 @@ char *handle_directive (const char *ptr) {
read_expr (&ptr, value_str, "");
parse_num (value_str, (int *) &value);

if (get_output_type () == 8) // APP
if (get_output_type () == TYPE_8XK) // APP
{
// In apps a PC of $14000 means start of page 2,
// but is actually only at $8000 in the ouput buffer.
Expand Down Expand Up @@ -652,7 +652,7 @@ char *parse_emit_string (const char *ptr, ES_TYPE type, void *echo_target) {
{
if (echo_target != NULL)
{
fprintf ((FILE *) echo_target, word);
fprintf ((FILE *) echo_target, "%s", word);
}
}
else if (type == ES_FCREATE) {
Expand Down

0 comments on commit 3b7c2da

Please sign in to comment.