Skip to content

Commit

Permalink
#74 fix mscv warnings and restore ci automation for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fdefelici committed Dec 15, 2023
1 parent 5b6362a commit 5ce356e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
SHELL: bash
SEP: /
LS_CMD: ls -la
# - label: windows_msvc
# os: windows-latest
# compiler: default
# SHELL: cmd
# SEP: \
# LS_CMD: dir /a
- label: windows_msvc
os: windows-latest
compiler: default
SHELL: cmd
SEP: \
LS_CMD: dir /a
defaults:
run:
shell: ${{ matrix.SHELL }}
Expand Down
9 changes: 4 additions & 5 deletions clove-unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -2242,6 +2242,8 @@ void __clove_stream_console_seek(__clove_stream_t* stream, long offset, int orig
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
bool __clove_stream_console_has_ansi_support(__clove_stream_t* stream) {
__CLOVE_UNUSED_VAR(stream);

DWORD outMode = 0, inMode = 0;
HANDLE stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
HANDLE stdinHandle = GetStdHandle(STD_INPUT_HANDLE);
Expand All @@ -2256,9 +2258,6 @@ bool __clove_stream_console_has_ansi_support(__clove_stream_t* stream) {
return false;
}

DWORD outModeInit = outMode;
DWORD inModeInit = inMode;

// Enable ANSI escape codes
outMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;

Expand Down Expand Up @@ -3339,7 +3338,7 @@ PIMAGE_EXPORT_DIRECTORY __clove_symbols_win_get_export_table_from(HMODULE module
}

// Get the COFF file header.
PIMAGE_FILE_HEADER cfh = &nt_header->FileHeader;
//PIMAGE_FILE_HEADER cfh = &nt_header->FileHeader;

// Get the "optional" header (it's not actually optional for executables).
PIMAGE_OPTIONAL_HEADER oh = &nt_header->OptionalHeader;
Expand Down Expand Up @@ -3368,7 +3367,7 @@ int __clove_symbols_for_each_function_by_prefix(__clove_symbols_context_t* conte
}

PBYTE base_addr = (PBYTE)module;
DWORD names_count = export_dir->NumberOfNames;
//DWORD names_count = export_dir->NumberOfNames;
PDWORD names_ptr = (PDWORD)(base_addr + export_dir->AddressOfNames);
DWORD ordinal_base_number = export_dir->Base;
PWORD ordinals_ptr = (PWORD)(base_addr + export_dir->AddressOfNameOrdinals); //ordinal offset from base ordinal
Expand Down

0 comments on commit 5ce356e

Please sign in to comment.