diff --git a/config.h b/config.h index 1a0b410..0e35272 100644 --- a/config.h +++ b/config.h @@ -66,6 +66,7 @@ static const binding key_binding[] = { { "gD", jump_to_dir, "$HOME/Downloads", "jump to $HOME/Downloads" }, { "gd", jump_to_dir, "/dev", "jump to /dev" }, { "ge", jump_to_dir, "/etc", "jump to /etc" }, + { "gp", jump_to_dir, "/etc/portage", "jump to /etc/portage" }, { "gm", jump_to_dir, "/mnt", "jump to /mnt" }, { "go", jump_to_dir, "/opt", "jump to /opt" }, { "gt", jump_to_dir, "/tmp", "jump to /tmp" }, diff --git a/dir.c b/dir.c index 726c77c..e5ed483 100644 --- a/dir.c +++ b/dir.c @@ -336,7 +336,6 @@ void update_selected_file(){ } void dir_set_selected_file_current(unsigned long selected_file_current){ current_dir->selected_file_current = selected_file_current; - mvwaddch(stdscr, 0,0, selected_file_current + '0'); } unsigned long dir_get_selected_file_current(){ diff --git a/interactions.c b/interactions.c index 1ee690e..c90b4b4 100644 --- a/interactions.c +++ b/interactions.c @@ -523,16 +523,25 @@ void update(){ status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL); } void enter_shell(int passes, int index){ + (void)passes; + + endwin(); if (system(key_binding[index].black_magic) != 0) { /*do nothing*/ } + initscr(); + status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL); } void not_implemented(int passes, int index){ - mvaddstr(terminal_height-1, 0, key_binding[index].comment); - mvaddstr(terminal_height-1, strlen(key_binding[index].comment), "\t"); - mvaddstr(terminal_height-1, strlen(key_binding[index].comment) + strlen("\t"), "is not yet implemented"); + (void)passes; + + mvaddstr(terminal_height-1, 0, key_binding[index].comment); + mvaddstr(terminal_height-1, strlen(key_binding[index].comment), "\t"); + mvaddstr(terminal_height-1, strlen(key_binding[index].comment) + strlen("\t"), "is not yet implemented"); } void jump_to_dir(int passes, int index){ + (void)passes; + char *ch = (char*)key_binding[index].black_magic; char slash = 0; unsigned int env_len = 0; @@ -588,11 +597,14 @@ void jump_to_dir(int passes, int index){ status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY); } void order_by(int passes, int index){ - + (void)passes; + order_func = key_binding[index].black_magic; status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY); } void cmd_on_selected(int passes, int index){ + (void)passes; + unsigned int i = 0; unsigned int hits = 0; char *file_str = " "; @@ -675,6 +687,8 @@ void cmd_on_selected(int passes, int index){ } } void yank_file(int passes, int index){ + (void)passes; + unsigned long i; if (yank_files.status & YANK_IS_USED) { free(yank_files.path); diff --git a/main.c b/main.c index 5bb3ee7..91a974c 100644 --- a/main.c +++ b/main.c @@ -117,9 +117,9 @@ int main(){ delwin(win_t); delwin(win_b); noraw(); - endwin(); - curs_set(1); echo(); + curs_set(1); + endwin(); return 0; } diff --git a/threading.c b/threading.c index bb4cc28..bea9bd7 100644 --- a/threading.c +++ b/threading.c @@ -146,6 +146,8 @@ void *thread_lft(void *data){ } void *thread_rgt(void *data){ unsigned int status = *(unsigned int*)data; + (void)status; + pthread_mutex_lock(&mutex_rgt); pthread_mutex_lock(&mutex_wait); wait_count++; @@ -206,6 +208,8 @@ void *thread_rgt(void *data){ } void *thread_top(void *data){ unsigned int status = *(unsigned int*)data; + (void)status; + pthread_mutex_lock(&mutex_top); free(top_buffer); @@ -225,6 +229,8 @@ void *thread_top(void *data){ } void *thread_btm(void *data){ unsigned int status = *(unsigned int*)data; + (void)status; + pthread_mutex_lock(&mutex_btm); pthread_mutex_lock(&mutex_wait); wait_count++; diff --git a/threading.h b/threading.h index c5ed6b3..3c0da32 100644 --- a/threading.h +++ b/threading.h @@ -1,5 +1,9 @@ #include + +#ifndef THREADING_GUARD +#define THREADING_GUARD #include "threading.c" +#endif void *thread_lft(void *data); void *thread_mid(void *data);