general stability improvements
This commit is contained in:
31
backend.c
31
backend.c
@@ -145,12 +145,13 @@ void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_conten
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_dir(WINDOW *win, char print_info, unsigned long *line_width, unsigned long *dir_file_count, file *dir_content){
|
void print_dir(WINDOW *win, char print_info, unsigned long *dir_file_count, file *dir_content){
|
||||||
/* i am not proud of this function */
|
/* i am not proud of this function */
|
||||||
|
unsigned long line_width = getmaxx(win);
|
||||||
|
|
||||||
char *bg = malloc(*line_width);
|
char *bg = malloc(line_width+1);
|
||||||
memset(bg, ' ', *line_width);
|
memset(bg, ' ', line_width);
|
||||||
bg[*line_width] = '\0';
|
bg[line_width] = '\0';
|
||||||
|
|
||||||
unsigned long i = 0;
|
unsigned long i = 0;
|
||||||
float file_size;
|
float file_size;
|
||||||
@@ -159,7 +160,7 @@ void print_dir(WINDOW *win, char print_info, unsigned long *line_width, unsigned
|
|||||||
char is_selected = 0;
|
char is_selected = 0;
|
||||||
static const char sizes[6] = { 'B', 'K', 'M', 'G', 'T', 'P' };
|
static const char sizes[6] = { 'B', 'K', 'M', 'G', 'T', 'P' };
|
||||||
|
|
||||||
unsigned long offset_back;
|
unsigned long offset_back = 0;
|
||||||
unsigned long offset_front = 2;
|
unsigned long offset_front = 2;
|
||||||
if (*dir_file_count > 9) {
|
if (*dir_file_count > 9) {
|
||||||
offset_front = (snprintf(NULL, 0, "%ld", *dir_file_count)) + 1;
|
offset_front = (snprintf(NULL, 0, "%ld", *dir_file_count)) + 1;
|
||||||
@@ -178,11 +179,11 @@ void print_dir(WINDOW *win, char print_info, unsigned long *line_width, unsigned
|
|||||||
}
|
}
|
||||||
size_char = sizes[size_index-1];
|
size_char = sizes[size_index-1];
|
||||||
if (dir_content[i].file_type == FILE_TYPE_DIR || dir_content[i].file_type == FILE_TYPE_SYMLINK) {
|
if (dir_content[i].file_type == FILE_TYPE_DIR || dir_content[i].file_type == FILE_TYPE_SYMLINK) {
|
||||||
offset_back = *line_width - (snprintf(NULL,0,"%ld", dir_content[i].file_size) + 1);
|
offset_back = line_width - (snprintf(NULL,0,"%ld", dir_content[i].file_size) + 1);
|
||||||
} else if (size_char =='B') {
|
} else if (size_char =='B') {
|
||||||
offset_back = *line_width - (snprintf(NULL,0,"%0.0lf %c", printed_size, size_char) + 1);
|
offset_back = line_width - (snprintf(NULL,0,"%0.0lf %c", printed_size, size_char) + 1);
|
||||||
} else {
|
} else {
|
||||||
offset_back = *line_width - (snprintf(NULL,0,"%0.2lf %c", printed_size, size_char) + 1);
|
offset_back = line_width - (snprintf(NULL,0,"%0.2lf %c", printed_size, size_char) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,19 +225,21 @@ void print_dir(WINDOW *win, char print_info, unsigned long *line_width, unsigned
|
|||||||
file_name[strlen(extension)] = '\0';
|
file_name[strlen(extension)] = '\0';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
file_name = malloc(dir_content[i].file_name_width);
|
file_name = malloc(dir_content[i].file_name_width+1);
|
||||||
strcpy(file_name, dir_content[i].file_name);
|
memcpy(file_name, dir_content[i].file_name, dir_content[i].file_name_width);
|
||||||
|
file_name[dir_content[i].file_name_width] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
file_name = malloc(dir_content[i].file_name_width);
|
file_name = malloc(dir_content[i].file_name_width+1);
|
||||||
strcpy(file_name, dir_content[i].file_name);
|
memcpy(file_name, dir_content[i].file_name, dir_content[i].file_name_width);
|
||||||
|
file_name[dir_content[i].file_name_width] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
mvwaddstr(win, i, 0, bg);
|
mvwaddstr(win, i, 0, bg);
|
||||||
if(print_info) {
|
if(print_info) {
|
||||||
mvwprintw(win, i, 0, "%ld", i);
|
mvwprintw(win, i, 0, "%ld", i);
|
||||||
mvwaddnstr(win, i, offset_front+is_selected, file_name, *line_width-offset_front-is_selected-2);
|
mvwaddnstr(win, i, offset_front+is_selected, file_name, line_width-offset_front-is_selected-2);
|
||||||
free(file_name);
|
free(file_name);
|
||||||
|
|
||||||
if (dir_content[i].file_type == FILE_TYPE_DIR || dir_content[i].file_type == FILE_TYPE_SYMLINK) {
|
if (dir_content[i].file_type == FILE_TYPE_DIR || dir_content[i].file_type == FILE_TYPE_SYMLINK) {
|
||||||
@@ -247,7 +250,7 @@ void print_dir(WINDOW *win, char print_info, unsigned long *line_width, unsigned
|
|||||||
mvwprintw(win, i, offset_back, "%0.2lf %c", printed_size, size_char);
|
mvwprintw(win, i, offset_back, "%0.2lf %c", printed_size, size_char);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mvwaddnstr(win, i, 0, file_name, *line_width);
|
mvwaddnstr(win, i, 0, file_name, line_width);
|
||||||
free(file_name);
|
free(file_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
unsigned long get_dir_size(char *path);
|
unsigned long get_dir_size(char *path);
|
||||||
void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_content);
|
void get_dir_content(char *path, unsigned long *dir_file_count, file *dir_content);
|
||||||
void print_dir(WINDOW *win, char print_info, unsigned long *line_width, unsigned long *dir_file_count, file *dir_content);
|
void print_dir(WINDOW *win, char print_info, unsigned long *dir_file_count, file *dir_content);
|
||||||
|
2
colors.c
2
colors.c
@@ -13,7 +13,7 @@ extern file *rgt_content;
|
|||||||
extern unsigned long rgt_file_count;
|
extern unsigned long rgt_file_count;
|
||||||
|
|
||||||
extern unsigned int settings;
|
extern unsigned int settings;
|
||||||
extern unsigned int status;
|
extern volatile unsigned int status;
|
||||||
|
|
||||||
void parse_colors(char *line, short *fg, short *bg){
|
void parse_colors(char *line, short *fg, short *bg){
|
||||||
int tmp;
|
int tmp;
|
||||||
|
@@ -12,14 +12,14 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
extern unsigned long selected_file_current;
|
extern volatile unsigned long selected_file_current;
|
||||||
extern unsigned long selected_file_last;
|
extern volatile unsigned long selected_file_last;
|
||||||
|
|
||||||
extern unsigned int file_modifiers;
|
extern unsigned int file_modifiers;
|
||||||
extern pthread_mutex_t mutex_selection;
|
extern pthread_mutex_t mutex_selection;
|
||||||
extern pthread_mutex_t mutex_rgt;
|
extern pthread_mutex_t mutex_rgt;
|
||||||
extern pthread_mutex_t mutex_mid;
|
extern pthread_mutex_t mutex_mid;
|
||||||
extern file *mid_content;
|
extern volatile file *mid_content;
|
||||||
extern file *lft_content;
|
extern file *lft_content;
|
||||||
extern file *rgt_content;
|
extern file *rgt_content;
|
||||||
extern file *file_current;
|
extern file *file_current;
|
||||||
@@ -33,13 +33,12 @@ extern char *rgt_buffer;
|
|||||||
extern char *btm_buffer;
|
extern char *btm_buffer;
|
||||||
extern unsigned long mid_file_count;
|
extern unsigned long mid_file_count;
|
||||||
|
|
||||||
extern unsigned int status;
|
extern volatile unsigned int status;
|
||||||
|
|
||||||
unsigned int timeout_time = 0;
|
unsigned int timeout_time = 0;
|
||||||
extern char *input;
|
extern char *input;
|
||||||
unsigned int input_pass;
|
unsigned int input_pass;
|
||||||
int parsed_input_number;
|
int parsed_input_number;
|
||||||
extern char *terminal_width_empty_line;
|
|
||||||
extern char *start_path;
|
extern char *start_path;
|
||||||
|
|
||||||
int read_string(WINDOW *win, int y, int x, char *str);
|
int read_string(WINDOW *win, int y, int x, char *str);
|
||||||
@@ -65,9 +64,6 @@ void user_interactions() {
|
|||||||
unsigned long binding_matches = 0;
|
unsigned long binding_matches = 0;
|
||||||
static char binding_pass = 0;
|
static char binding_pass = 0;
|
||||||
|
|
||||||
free(terminal_width_empty_line);
|
|
||||||
terminal_width_empty_line = malloc(terminal_width);
|
|
||||||
memset(terminal_width_empty_line, ' ', terminal_width);
|
|
||||||
|
|
||||||
ch = getch();
|
ch = getch();
|
||||||
if(ch != ERR) {
|
if(ch != ERR) {
|
||||||
@@ -118,12 +114,10 @@ void user_interactions() {
|
|||||||
} else if (strncmp(input+number_length, key_binding[i].key, cmp_len) == 0) {
|
} else if (strncmp(input+number_length, key_binding[i].key, cmp_len) == 0) {
|
||||||
binding_matches++;
|
binding_matches++;
|
||||||
attron(A_UNDERLINE);
|
attron(A_UNDERLINE);
|
||||||
mvaddstr(terminal_height-binding_matches-2, 0, terminal_width_empty_line);
|
|
||||||
mvaddstr(terminal_height-binding_matches-2, 0, "input");
|
mvaddstr(terminal_height-binding_matches-2, 0, "input");
|
||||||
mvaddstr(terminal_height-binding_matches-2, sizeof("input"), "\t\t\t");
|
mvaddstr(terminal_height-binding_matches-2, sizeof("input"), "\t\t\t");
|
||||||
mvaddstr(terminal_height-binding_matches-2, sizeof("input") + sizeof("\t\t\t"), "command");
|
mvaddstr(terminal_height-binding_matches-2, sizeof("input") + sizeof("\t\t\t"), "command");
|
||||||
attroff(A_UNDERLINE);
|
attroff(A_UNDERLINE);
|
||||||
mvaddstr(terminal_height-binding_matches-1, 0, terminal_width_empty_line);
|
|
||||||
mvaddstr(terminal_height-binding_matches-1, 0, key_binding[i].key);
|
mvaddstr(terminal_height-binding_matches-1, 0, key_binding[i].key);
|
||||||
mvaddstr(terminal_height-binding_matches-1, 0, key_binding[i].key);
|
mvaddstr(terminal_height-binding_matches-1, 0, key_binding[i].key);
|
||||||
mvaddstr(terminal_height-binding_matches-1, sizeof(key_binding[i].key), "\t");
|
mvaddstr(terminal_height-binding_matches-1, sizeof(key_binding[i].key), "\t");
|
||||||
|
2
main.c
2
main.c
@@ -17,7 +17,7 @@ unsigned int temp_heigth = 0; /*used for screen refresh*/
|
|||||||
unsigned int temp_width = 0;
|
unsigned int temp_width = 0;
|
||||||
unsigned int settings;
|
unsigned int settings;
|
||||||
unsigned int file_modifiers;
|
unsigned int file_modifiers;
|
||||||
unsigned int status;
|
volatile unsigned int status;
|
||||||
char *start_path;
|
char *start_path;
|
||||||
|
|
||||||
WINDOW *win_t;
|
WINDOW *win_t;
|
||||||
|
71
threading.c
71
threading.c
@@ -21,14 +21,14 @@ pthread_cond_t cond_wait;
|
|||||||
volatile char wait_count; /* this is used to determine how many threads are waiting for cont_wait */
|
volatile char wait_count; /* this is used to determine how many threads are waiting for cont_wait */
|
||||||
|
|
||||||
file *rgt_content;
|
file *rgt_content;
|
||||||
file *mid_content;
|
volatile file *mid_content;
|
||||||
file *lft_content;
|
file *lft_content;
|
||||||
char *rgt_buffer; /* used for file previews, unlike rgt_content, which is used for directory previews */
|
char *rgt_buffer; /* used for file previews, unlike rgt_content, which is used for directory previews */
|
||||||
char *btm_buffer;
|
char *btm_buffer;
|
||||||
|
char *top_buffer; /* current path */
|
||||||
|
|
||||||
file *file_current;
|
file *file_current;
|
||||||
|
|
||||||
char *top_buffer; /* current path */
|
|
||||||
|
|
||||||
unsigned long rgt_file_count;
|
unsigned long rgt_file_count;
|
||||||
unsigned long mid_file_count;
|
unsigned long mid_file_count;
|
||||||
@@ -37,13 +37,13 @@ unsigned long top_width;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned long selected_file_current=0;
|
volatile unsigned long selected_file_current = 0;
|
||||||
unsigned long selected_file_last=0;
|
volatile unsigned long selected_file_last = 0;
|
||||||
extern unsigned int terminal_width;
|
extern unsigned int terminal_width;
|
||||||
|
|
||||||
|
|
||||||
void *thread_mid(void *data){
|
void *thread_mid(void *data){
|
||||||
unsigned int status = *(unsigned int*)data;
|
volatile unsigned int status = *(unsigned int*)data;
|
||||||
pthread_mutex_lock(&mutex_mid);
|
pthread_mutex_lock(&mutex_mid);
|
||||||
|
|
||||||
|
|
||||||
@@ -64,6 +64,7 @@ void *thread_mid(void *data){
|
|||||||
memset(mid_content, ' ', mid_file_count * sizeof(file));
|
memset(mid_content, ' ', mid_file_count * sizeof(file));
|
||||||
get_dir_content(path, &mid_file_count, mid_content);
|
get_dir_content(path, &mid_file_count, mid_content);
|
||||||
} else {
|
} else {
|
||||||
|
selected_file_current = 0;
|
||||||
mid_content = malloc(sizeof(file));
|
mid_content = malloc(sizeof(file));
|
||||||
mid_content->status = FILE_STATUS_DIR_EMPTY;
|
mid_content->status = FILE_STATUS_DIR_EMPTY;
|
||||||
mid_content->file_type = 0;
|
mid_content->file_type = 0;
|
||||||
@@ -72,6 +73,7 @@ void *thread_mid(void *data){
|
|||||||
mid_content->color_pair = 0;
|
mid_content->color_pair = 0;
|
||||||
mid_content->file_name_width = sizeof("empty dir");
|
mid_content->file_name_width = sizeof("empty dir");
|
||||||
mid_content->file_name = "empty dir";
|
mid_content->file_name = "empty dir";
|
||||||
|
/*
|
||||||
|
|
||||||
file_current->file_name = mid_content->file_name;
|
file_current->file_name = mid_content->file_name;
|
||||||
file_current->file_name_width = mid_content->file_name_width;
|
file_current->file_name_width = mid_content->file_name_width;
|
||||||
@@ -80,6 +82,7 @@ void *thread_mid(void *data){
|
|||||||
file_current->color_pair = mid_content->color_pair;
|
file_current->color_pair = mid_content->color_pair;
|
||||||
file_current->permissions = mid_content->permissions;
|
file_current->permissions = mid_content->permissions;
|
||||||
file_current->status = mid_content->status;
|
file_current->status = mid_content->status;
|
||||||
|
*/
|
||||||
mid_file_count = 0;
|
mid_file_count = 0;
|
||||||
|
|
||||||
while(wait_count < 2){
|
while(wait_count < 2){
|
||||||
@@ -95,25 +98,28 @@ void *thread_mid(void *data){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pthread_mutex_lock(&mutex_selection);
|
pthread_mutex_lock(&mutex_selection);
|
||||||
if (selected_file_current >= mid_file_count) {
|
if (selected_file_current >= mid_file_count) {
|
||||||
selected_file_current = mid_file_count-1;
|
selected_file_current = mid_file_count-1;
|
||||||
|
selected_file_current = mid_file_count-1;
|
||||||
}
|
}
|
||||||
mid_content[selected_file_current].status |= FILE_STATUS_HOVER;
|
if (selected_file_current != selected_file_last) {
|
||||||
if (selected_file_current != selected_file_last) {
|
mid_content[selected_file_last].status &= ~FILE_STATUS_HOVER;
|
||||||
mid_content[selected_file_last].status &= ~FILE_STATUS_HOVER;
|
}
|
||||||
}
|
selected_file_last = selected_file_current;
|
||||||
selected_file_last = selected_file_current;
|
free(file_current);
|
||||||
|
file_current = malloc(sizeof(file));
|
||||||
|
|
||||||
file_current->file_name = mid_content[selected_file_current].file_name;
|
file_current->file_name_width = mid_content[selected_file_current].file_name_width;
|
||||||
file_current->file_name_width = mid_content[selected_file_current].file_name_width;
|
file_current->file_name = malloc(file_current->file_name_width);
|
||||||
file_current->file_size = mid_content[selected_file_current].file_size;
|
memcpy(file_current->file_name, mid_content[selected_file_current].file_name, file_current->file_name_width);
|
||||||
file_current->file_type = mid_content[selected_file_current].file_type;
|
file_current->file_size = mid_content[selected_file_current].file_size;
|
||||||
file_current->color_pair = mid_content[selected_file_current].color_pair;
|
file_current->file_type = mid_content[selected_file_current].file_type;
|
||||||
file_current->permissions = mid_content[selected_file_current].permissions;
|
file_current->color_pair = mid_content[selected_file_current].color_pair;
|
||||||
file_current->status = mid_content[selected_file_current].status;
|
file_current->permissions = mid_content[selected_file_current].permissions;
|
||||||
|
|
||||||
|
mid_content[selected_file_current].status |= FILE_STATUS_HOVER;
|
||||||
|
file_current->status = mid_content[selected_file_current].status;
|
||||||
pthread_mutex_unlock(&mutex_selection);
|
pthread_mutex_unlock(&mutex_selection);
|
||||||
|
|
||||||
while(wait_count < 2){
|
while(wait_count < 2){
|
||||||
@@ -172,7 +178,8 @@ void *thread_rgt(void *data){
|
|||||||
free(rgt_content);
|
free(rgt_content);
|
||||||
rgt_content = malloc(sizeof(file));
|
rgt_content = malloc(sizeof(file));
|
||||||
rgt_content->file_name = malloc(file_current->file_name_width + 1);
|
rgt_content->file_name = malloc(file_current->file_name_width + 1);
|
||||||
strcpy(rgt_content->file_name, file_current->file_name);
|
memcpy(rgt_content->file_name, file_current->file_name, file_current->file_name_width);
|
||||||
|
rgt_content->file_name[file_current->file_name_width] = '\0';
|
||||||
rgt_content->file_name_width = file_current->file_name_width;
|
rgt_content->file_name_width = file_current->file_name_width;
|
||||||
rgt_content->file_size = file_current->file_size;
|
rgt_content->file_size = file_current->file_size;
|
||||||
rgt_content->file_type = file_current->file_type;
|
rgt_content->file_type = file_current->file_type;
|
||||||
@@ -192,7 +199,7 @@ void *thread_rgt(void *data){
|
|||||||
|
|
||||||
free(rgt_buffer);
|
free(rgt_buffer);
|
||||||
rgt_buffer = malloc(sizeof(char));
|
rgt_buffer = malloc(sizeof(char));
|
||||||
memset(rgt_buffer, ' ', sizeof(char));
|
rgt_buffer[0] = '\0';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
rgt_file_count = 0;
|
rgt_file_count = 0;
|
||||||
@@ -266,23 +273,23 @@ void threading_init(){
|
|||||||
top_buffer = malloc(sizeof(char));
|
top_buffer = malloc(sizeof(char));
|
||||||
rgt_buffer = malloc(sizeof(char));
|
rgt_buffer = malloc(sizeof(char));
|
||||||
btm_buffer = malloc(sizeof(char));
|
btm_buffer = malloc(sizeof(char));
|
||||||
memset(top_buffer, ' ', sizeof(char));
|
memset(top_buffer, '\0', sizeof(char));
|
||||||
memset(rgt_buffer, ' ', sizeof(char));
|
memset(rgt_buffer, '\0', sizeof(char));
|
||||||
memset(btm_buffer, ' ', sizeof(char));
|
memset(btm_buffer, '\0', sizeof(char));
|
||||||
|
|
||||||
|
|
||||||
rgt_content[0].file_type = 0;
|
rgt_content->file_type = 0;
|
||||||
rgt_content[0].file_size = 1;
|
rgt_content->file_size = 0;
|
||||||
rgt_content[0].file_name_width = 1;
|
rgt_content->file_name_width = 0;
|
||||||
rgt_content[0].file_name = malloc(sizeof("a"));
|
rgt_content->file_name = malloc(sizeof(char));
|
||||||
strcpy(rgt_content[0].file_name, "a");
|
rgt_content->file_name[0] = '\0';
|
||||||
|
|
||||||
file_current = malloc(sizeof(file));
|
file_current = malloc(sizeof(file));
|
||||||
file_current->file_type = 0;
|
file_current->file_type = 0;
|
||||||
file_current->file_size = 1;
|
file_current->file_size = 0;
|
||||||
file_current->file_name_width = 1;
|
file_current->file_name_width = 0;
|
||||||
file_current->file_name = malloc(sizeof("a"));
|
file_current->file_name = malloc(sizeof(char));
|
||||||
strcpy(file_current->file_name, "a");
|
file_current->file_name[0] = '\0';
|
||||||
|
|
||||||
volatile char vol; /* needed to make sure higher optimization steps dont move these around */
|
volatile char vol; /* needed to make sure higher optimization steps dont move these around */
|
||||||
vol = pthread_mutex_init(&mutex_top, NULL);
|
vol = pthread_mutex_init(&mutex_top, NULL);
|
||||||
|
10
window.c
10
window.c
@@ -3,14 +3,14 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
|
|
||||||
extern unsigned int status;
|
extern volatile unsigned int status;
|
||||||
extern char *input;
|
extern char *input;
|
||||||
|
|
||||||
extern unsigned int timeout_time;
|
extern unsigned int timeout_time;
|
||||||
extern unsigned int color_count;
|
extern unsigned int color_count;
|
||||||
extern color *colors;
|
extern color *colors;
|
||||||
|
|
||||||
extern file *mid_content;
|
extern volatile file *mid_content;
|
||||||
extern file *lft_content;
|
extern file *lft_content;
|
||||||
extern file *rgt_content;
|
extern file *rgt_content;
|
||||||
extern char *top_buffer;
|
extern char *top_buffer;
|
||||||
@@ -69,7 +69,7 @@ void window_lft(WINDOW *win){
|
|||||||
unsigned long local_height;
|
unsigned long local_height;
|
||||||
getmaxyx(win, local_height, local_width);
|
getmaxyx(win, local_height, local_width);
|
||||||
if (pthread_mutex_trylock(&mutex_lft) == 0) {
|
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);
|
pthread_mutex_unlock(&mutex_lft);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -88,7 +88,7 @@ void window_mid(WINDOW *win){
|
|||||||
if (mid_file_count == 0) {
|
if (mid_file_count == 0) {
|
||||||
mvwprintw(win, 0, 0, "empty");
|
mvwprintw(win, 0, 0, "empty");
|
||||||
} else {
|
} 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);
|
pthread_mutex_unlock(&mutex_mid);
|
||||||
} else {
|
} else {
|
||||||
@@ -113,7 +113,7 @@ void window_rgt(WINDOW *win){
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} 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);
|
pthread_mutex_unlock(&mutex_rgt);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user