Skip to content

Commit

Permalink
Whitespace fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mridgers committed Aug 6, 2018
1 parent 4b8a7c7 commit 2ac62db
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions clink/app/src/host/host_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,14 +392,14 @@ bool host_cmd::initialise_system()
buffer << "\"" << dll_path;
buffer << "/" CLINK_EXE "\" $*";
m_doskey.add_alias("clink", buffer.c_str());

// Add an alias to operate on the command history.
buffer.clear();
buffer << "\"" << dll_path;
buffer << "/" CLINK_EXE "\" history $*";
m_doskey.add_alias("history", buffer.c_str());
}

// Tag the prompt again just incase it got unset by by something like
// setlocal/endlocal in a boot Batch script.
tag_prompt();
Expand Down
4 changes: 2 additions & 2 deletions clink/app/src/loader/draw_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class test_editor
line_editor* m_editor;
handle m_thread;
};

//------------------------------------------------------------------------------
void test_editor::start(const char* prompt)
{
Expand Down Expand Up @@ -333,7 +333,7 @@ void runner::line_test()
{
editor.press_keys("_");
int j = rand() % (sizeof(word) - 2);
editor.press_keys(word + j);
editor.press_keys(word + j);
i += sizeof(word) - j;
}

Expand Down
2 changes: 1 addition & 1 deletion clink/core/test/path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ TEST_CASE("path::join(get_dir(), get_name())")
str<> dir, name;
path::get_directory(in, dir);
path::get_name(in, name);

str<> join;
path::join(dir.c_str(), name.c_str(), join);
path::normalise(join, '/');
Expand Down
2 changes: 1 addition & 1 deletion clink/core/test/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ TEST_CASE("settings : enum")
{
REQUIRE(test.set(options[i]));
REQUIRE(test.get() == i);

test.get(out);
REQUIRE(out.equals(options[i]));
}
Expand Down
2 changes: 1 addition & 1 deletion clink/lib/include/lib/matches.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class match_builder
bool add_match(const char* match);
bool add_match(const match_desc& desc);
void set_prefix_included(bool included=true);

private:
matches& m_matches;
};
2 changes: 1 addition & 1 deletion clink/lib/src/binder.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class binder

struct node
{
unsigned short is_group : 1;
unsigned short is_group : 1;
unsigned short next : link_bits;
unsigned short module : module_bits;

Expand Down
4 changes: 2 additions & 2 deletions clink/lib/src/rl/rl_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ void rl_module::on_input(const input& input, result& result, const context& cont
virtual void end() override {}
virtual void select() override {}
virtual int read() override { return *(unsigned char*)(data++); }
const char* data;
const char* data;
} term_in;

term_in.data = input.keys;
rl_instream = (FILE*)(&term_in);

Expand Down
4 changes: 2 additions & 2 deletions clink/lib/test/binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ TEST_CASE("Binder")
SECTION("Invalid chords")
{
const char* chords[] = {
"\\C", "\\Cx", "\\C-",
"\\M", "\\Mx", "\\M-",
"\\C", "\\Cx", "\\C-",
"\\M", "\\Mx", "\\M-",
"\\M-C-",
};

Expand Down
2 changes: 1 addition & 1 deletion clink/lua/src/line_state_lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ int line_state_lua::get_word(lua_State* state)
{
if (!lua_isnumber(state, 1))
return 0;

unsigned int index = int(lua_tointeger(state, 1)) - 1;
str_iter word = m_line.get_word(index);
lua_pushlstring(state, word.get_pointer(), word.length());
Expand Down
6 changes: 3 additions & 3 deletions clink/lua/test/args.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,21 +380,21 @@ TEST_CASE("Lua arg parsers.")
";

REQUIRE(lua.do_string(script));

SECTION("Not looped yet")
{
tester.set_input("argcmd_parser t");
tester.set_expected_matches("two", "three");
tester.run();
}

SECTION("Looped once")
{
tester.set_input("argcmd_parser two four t");
tester.set_expected_matches("two", "three");
tester.run();
}

SECTION("Looped twice")
{
tester.set_input("argcmd_parser two four abc ba");
Expand Down
2 changes: 1 addition & 1 deletion clink/terminal/src/ecma48_iter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ bool ecma48_code::get_c1_str(str_base& out) const
{
if (c == 0x9c || c == 0x1b)
break;

iter.next();
}

Expand Down
12 changes: 6 additions & 6 deletions clink/terminal/src/win_screen_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ void win_screen_buffer::clear(clear_type type)
case clear_type_all:
width = csbi.dwSize.X;
height = (csbi.srWindow.Bottom - csbi.srWindow.Top) + 1;
xy = { 0, csbi.srWindow.Top };
xy = { 0, csbi.srWindow.Top };
break;

case clear_type_before:
width = csbi.dwSize.X;
height = csbi.dwCursorPosition.Y - csbi.srWindow.Top;
xy = { 0, csbi.srWindow.Top };
xy = { 0, csbi.srWindow.Top };
count = csbi.dwCursorPosition.X + 1;
break;

case clear_type_after:
width = csbi.dwSize.X;
height = csbi.srWindow.Bottom - csbi.dwCursorPosition.Y;
xy = { csbi.dwCursorPosition.X, csbi.dwCursorPosition.Y };
xy = { csbi.dwCursorPosition.X, csbi.dwCursorPosition.Y };
count = width - csbi.dwCursorPosition.X;
break;
}
Expand All @@ -130,17 +130,17 @@ void win_screen_buffer::clear_line(clear_type type)
{
case clear_type_all:
width = csbi.dwSize.X;
xy = { 0, csbi.dwCursorPosition.Y };
xy = { 0, csbi.dwCursorPosition.Y };
break;

case clear_type_before:
width = csbi.dwCursorPosition.X + 1;
xy = { 0, csbi.dwCursorPosition.Y };
xy = { 0, csbi.dwCursorPosition.Y };
break;

case clear_type_after:
width = csbi.dwSize.X - csbi.dwCursorPosition.X;
xy = { csbi.dwCursorPosition.X, csbi.dwCursorPosition.Y };
xy = { csbi.dwCursorPosition.X, csbi.dwCursorPosition.Y };
break;
}

Expand Down
2 changes: 1 addition & 1 deletion clink/test/src/line_editor_tester.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class test_terminal_in
{
public:
bool has_input() const { return (m_read == nullptr) ? false : (*m_read != '\0'); }
void set_input(const char* input) { m_input = m_read = input; }
void set_input(const char* input) { m_input = m_read = input; }
virtual void begin() override {}
virtual void end() override {}
virtual void select() override {}
Expand Down

0 comments on commit 2ac62db

Please sign in to comment.