general stability improvements
This commit is contained in:
10
window.c
10
window.c
@@ -3,14 +3,14 @@
|
||||
#include <unistd.h>
|
||||
#include "defines.h"
|
||||
|
||||
extern unsigned int status;
|
||||
extern volatile unsigned int status;
|
||||
extern char *input;
|
||||
|
||||
extern unsigned int timeout_time;
|
||||
extern unsigned int color_count;
|
||||
extern color *colors;
|
||||
|
||||
extern file *mid_content;
|
||||
extern volatile file *mid_content;
|
||||
extern file *lft_content;
|
||||
extern file *rgt_content;
|
||||
extern char *top_buffer;
|
||||
@@ -69,7 +69,7 @@ void window_lft(WINDOW *win){
|
||||
unsigned long local_height;
|
||||
getmaxyx(win, local_height, local_width);
|
||||
if (pthread_mutex_trylock(&mutex_lft) == 0) {
|
||||
print_dir(win, 0, &local_width, &lft_file_count, lft_content);
|
||||
print_dir(win, 0, &lft_file_count, lft_content);
|
||||
pthread_mutex_unlock(&mutex_lft);
|
||||
|
||||
} else {
|
||||
@@ -88,7 +88,7 @@ void window_mid(WINDOW *win){
|
||||
if (mid_file_count == 0) {
|
||||
mvwprintw(win, 0, 0, "empty");
|
||||
} else {
|
||||
print_dir(win, 1, &local_width, &mid_file_count, mid_content);
|
||||
print_dir(win, 1, &mid_file_count, mid_content);
|
||||
}
|
||||
pthread_mutex_unlock(&mutex_mid);
|
||||
} else {
|
||||
@@ -113,7 +113,7 @@ void window_rgt(WINDOW *win){
|
||||
|
||||
|
||||
} else {
|
||||
print_dir(win, 0, &local_width, &rgt_file_count, rgt_content);
|
||||
print_dir(win, 0, &rgt_file_count, rgt_content);
|
||||
}
|
||||
pthread_mutex_unlock(&mutex_rgt);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user