Skip to content

Commit

Permalink
enable ansi sequences on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sgraham committed May 6, 2024
1 parent a6d256f commit cc94458
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@ static void parse_args(int argc,
}
}

#if X64WIN
extern _Bool __stdcall SetConsoleMode(void*, int);
extern void* __stdcall GetStdHandle(int);
#endif

int main(int argc, char** argv) {
#if X64WIN
SetConsoleMode(GetStdHandle(-11), 7);
#endif

alloc_init(AL_Link);

StringArray include_paths = {0};
Expand Down
2 changes: 1 addition & 1 deletion src/libdyibicc.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef struct DyibiccContext DyibiccContext;
// multiple. See notes in the structure about how it should be filled out.
DyibiccContext* dyibicc_set_environment(DyibiccEnviromentData* env_data);

// Called once on initializtion with a file == NULL and contents == NULL, and
// Called once on initialization with a file == NULL and contents == NULL, and
// subsequently whenever any file contents are updated and the running code
// should be recompiled/relinked.
bool dyibicc_update(DyibiccContext* context, char* file, char* contents);
Expand Down

0 comments on commit cc94458

Please sign in to comment.