mirror of
https://github.com/tstack/lnav.git
synced 2024-08-17 00:40:30 +03:00
[cygwin] more windows nits and cleanup
This commit is contained in:
parent
7feeaf0fde
commit
2fa081c00a
@ -1,4 +1,4 @@
|
||||
#! /bin/sh
|
||||
#! /bin/bash
|
||||
|
||||
top_srcdir="@abssrcdir@"
|
||||
export top_srcdir
|
||||
|
@ -549,7 +549,6 @@ void rebuild_indexes(bool force)
|
||||
logfile *front_file = NULL;
|
||||
int front_top = -1;
|
||||
bool new_data = false;
|
||||
size_t new_count;
|
||||
|
||||
old_bottom = text_view.get_top_for_last_row();
|
||||
scroll_down = text_view.get_top() >= old_bottom;
|
||||
@ -616,7 +615,6 @@ void rebuild_indexes(bool force)
|
||||
}
|
||||
text_view.reload_data();
|
||||
|
||||
new_count = tss->text_line_count();
|
||||
if (scroll_down && text_view.get_top_for_last_row() > text_view.get_top()) {
|
||||
text_view.set_top(text_view.get_top_for_last_row());
|
||||
}
|
||||
@ -2847,7 +2845,6 @@ static void looper(void)
|
||||
readline_context search_context("search");
|
||||
readline_context index_context("capture");
|
||||
readline_context sql_context("sql", NULL, false);
|
||||
textview_curses *tc;
|
||||
readline_curses rlc;
|
||||
int lpc;
|
||||
|
||||
@ -2904,8 +2901,6 @@ static void looper(void)
|
||||
lnav_data.ld_view_stack.push(&lnav_data.ld_views[LNV_LOG]);
|
||||
update_view_name();
|
||||
|
||||
tc = lnav_data.ld_view_stack.top();
|
||||
|
||||
for (lpc = 0; lpc < LNV__MAX; lpc++) {
|
||||
lnav_data.ld_views[lpc].set_window(lnav_data.ld_window);
|
||||
lnav_data.ld_views[lpc].set_y(1);
|
||||
@ -3082,7 +3077,7 @@ static void looper(void)
|
||||
lnav_data.ld_mouse.handle_mouse(ch);
|
||||
}
|
||||
else {
|
||||
for (int lpc = 0; lpc < escape_index; lpc++) {
|
||||
for (size_t lpc = 0; lpc < escape_index; lpc++) {
|
||||
handle_key(escape_buffer[lpc]);
|
||||
}
|
||||
}
|
||||
@ -3782,10 +3777,8 @@ int main(int argc, char *argv[])
|
||||
if (file_iter != lnav_data.ld_files.end()) {
|
||||
logfile::iterator line_iter;
|
||||
logfile *lf = *file_iter;
|
||||
int offset;
|
||||
string str;
|
||||
|
||||
offset = std::max((int)0, (int)lf->size() - 200);
|
||||
for (line_iter = lf->begin();
|
||||
line_iter != lf->end();
|
||||
++line_iter) {
|
||||
|
@ -279,14 +279,14 @@ void view_colors::init_roles(void)
|
||||
this->vc_role_colors[lpc] | A_REVERSE;
|
||||
}
|
||||
|
||||
static short basic_hl_pairs[HL_BASIC_COLOR_COUNT] = {
|
||||
static int basic_hl_pairs[HL_BASIC_COLOR_COUNT] = {
|
||||
ansi_color_pair(COLOR_BLUE, COLOR_BLACK),
|
||||
ansi_color_pair(COLOR_CYAN, COLOR_BLACK),
|
||||
ansi_color_pair(COLOR_GREEN, COLOR_BLACK),
|
||||
ansi_color_pair(COLOR_MAGENTA, COLOR_BLACK),
|
||||
};
|
||||
|
||||
static short basic_rev_hl_pairs[HL_BASIC_COLOR_COUNT] = {
|
||||
static int basic_rev_hl_pairs[HL_BASIC_COLOR_COUNT] = {
|
||||
ansi_color_pair(COLOR_BLUE, COLOR_WHITE),
|
||||
ansi_color_pair(COLOR_CYAN, COLOR_BLACK),
|
||||
ansi_color_pair(COLOR_GREEN, COLOR_WHITE),
|
||||
|
@ -1,19 +1,19 @@
|
||||
#! /bin/bash
|
||||
|
||||
run_test ./drive_line_buffer ${top_srcdir}/src/line_buffer.hh
|
||||
run_test ./drive_line_buffer "${top_srcdir}/src/line_buffer.hh"
|
||||
|
||||
check_output "Line buffer output doesn't match input?" < \
|
||||
${top_srcdir}/src/line_buffer.hh
|
||||
"${top_srcdir}/src/line_buffer.hh"
|
||||
|
||||
run_test ./drive_line_buffer < ${top_srcdir}/src/line_buffer.hh
|
||||
|
||||
check_output "Line buffer output doesn't match input from pipe?" < \
|
||||
${top_srcdir}/src/line_buffer.hh
|
||||
"${top_srcdir}/src/line_buffer.hh"
|
||||
|
||||
run_test ./drive_line_buffer -d " " ${top_srcdir}/src/line_buffer.hh
|
||||
run_test ./drive_line_buffer -d " " "${top_srcdir}/src/line_buffer.hh"
|
||||
|
||||
check_output "Line buffer with delim output doesn't match input?" < \
|
||||
${top_srcdir}/src/line_buffer.hh
|
||||
"${top_srcdir}/src/line_buffer.hh"
|
||||
|
||||
cat > lb.dat <<EOF
|
||||
1
|
||||
@ -32,7 +32,7 @@ check_output "Seeking in the line buffer doesn't work?" <<EOF
|
||||
5
|
||||
EOF
|
||||
|
||||
cat ${top_srcdir}/src/*.hh ${top_srcdir}/src/*.cc > lb-2.dat
|
||||
cat "${top_srcdir}/src/"*.hh "${top_srcdir}/src/"*.cc > lb-2.dat
|
||||
grep -b '$' lb-2.dat | cut -f 1 -d : > lb.index
|
||||
line_count=`wc -l lb-2.dat`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user