Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 0.4.9-{build}
environment:
matrix:
- TOOLSET: vs2017

os: Visual Studio 2017
matrix:
fast_finish: true

install:
# Download Premake
- ps: Start-FileDownload 'https://github.com/premake/premake-core/releases/download/v5.0.0-alpha11/premake-5.0.0-alpha11-windows.zip' 'premake.zip'

# Extract it in-place; premake5.exe is at the top level.
- 7z x premake.zip

## Add NSIS to PATH
- cmd: set PATH=%PATH%;C:\Program Files (x86)\NSIS\;

# Generate solution files using premake.
- premake5.exe %TOOLSET%

configuration:
- Release

build_script:
- premake5.exe clink_release

artifacts:
- path: .build/release/**/clink_DEV.zip
name: clink_DEV
- path: .build/release/**/clink_DEV_pdb.zip
name: clink_DEV_pdb
- path: .build/release/**/clink_DEV_setup.exe
name: clink_DEV_setup
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Clink can be extended through its Lua API which allows easy creation context sen

### Building Clink

Clink's uses [Premake](http://premake.github.io) to generate Visual Studio solutions or makefiles for MinGW. Note that Premake >= 5.0-alpha8 is required.
Clink's uses [Premake](http://premake.github.io) to generate Visual Studio solutions or makefiles for MinGW. Note that Premake >= 5.0-alpha11 is required.

1. Cd to your clone of Clink.
2. Run "premake <toolchain>" (where "<toolchain>" is one of Premake's actions - see "premake --help")
Expand Down
2 changes: 1 addition & 1 deletion clink/dll/doskey.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int continue_doskey(wchar_t* chars, unsigned max_chars)
{
wchar_t* read = g_state.alias_next;

if (g_state.alias_text == NULL)
if (g_state.alias_text == NULL || read == NULL)
return 0;

if (*read == '\0')
Expand Down
4 changes: 3 additions & 1 deletion clink/dll/rl.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,10 @@ static char* call_readline_impl(const char* prompt)
// Make sure that EOL wrap is on. Readline's told the terminal supports it.
{
int stdout_flags = ENABLE_PROCESSED_OUTPUT|ENABLE_WRAP_AT_EOL_OUTPUT;
int oldstdout_flags = 0;
HANDLE handle_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleMode(handle_stdout, stdout_flags);
GetConsoleMode(handle_stdout, &oldstdout_flags);
SetConsoleMode(handle_stdout, stdout_flags|oldstdout_flags);
}

// Initialisation
Expand Down
2 changes: 1 addition & 1 deletion installer/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ newaction {
local x64_ok = true;
local toolchain = "ERROR"
if have_msbuild then
toolchain = _OPTIONS["clink_vs_ver"] or "vs2013"
toolchain = _OPTIONS["clink_vs_ver"] or "vs2017"
exec(premake .. " --clink_ver=" .. clink_ver .. " " .. toolchain)

ret = exec("msbuild /m /v:q /p:configuration=release /p:platform=win32 .build/" .. toolchain .. "/clink.sln")
Expand Down
4 changes: 2 additions & 2 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function get_last_git_commit()
return line:sub(1, 6)
end

return "?"
return "unknown"
end

--------------------------------------------------------------------------------
Expand Down Expand Up @@ -102,7 +102,7 @@ solution("clink")
location(to)

characterset("MBCS")
flags("Symbols")
symbols "on"
flags("StaticRuntime")
defines("HAVE_CONFIG_H")
defines("HANDLE_MULTIBYTE")
Expand Down
2 changes: 1 addition & 1 deletion readline/readline/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ _rl_read_file (filename, sizep)
char *buffer;
int i, file;

if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0)
if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
return ((char *)NULL);

file_size = (size_t)finfo.st_size;
Expand Down