mirror of
https://gittea.dev/nova/th.git
synced 2025-10-21 18:30:15 -04:00
Compare commits
4 Commits
23ff0b07ec
...
3fa16fd8b2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
3fa16fd8b2 | ||
![]() |
ac6d0e8408 | ||
![]() |
731bfe722a | ||
![]() |
3082fed378 |
12
config.h
12
config.h
@@ -69,8 +69,11 @@ static const binding key_binding[] = {
|
|||||||
{ "G", jump_bottom, NULL, "jump to last file in dir" },
|
{ "G", jump_bottom, NULL, "jump to last file in dir" },
|
||||||
{ "gg", jump_top, NULL, "jump to first file in dir" },
|
{ "gg", jump_top, NULL, "jump to first file in dir" },
|
||||||
{ "gh", jump_to_dir, "$HOME", "jump to $HOME" },
|
{ "gh", jump_to_dir, "$HOME", "jump to $HOME" },
|
||||||
{ "gs", jump_to_dir, "$START_PATH", "jump to $START_PATH" },
|
{ "gs", jump_to_dir, "$START_PATH", "jump to $START_PATH" }, /* the path you started th in */
|
||||||
{ "gD", jump_to_dir, "$HOME/Downloads", "jump to $HOME/Downloads" },
|
{ "gD", jump_to_dir, "$HOME/Downloads", "jump to $HOME/Downloads" },
|
||||||
|
{ "gC", jump_to_dir, "$HOME/Documents", "jump to $HOME/Documents" },
|
||||||
|
{ "gP", jump_to_dir, "$HOME/Pictures", "jump to $HOME/Pictures" },
|
||||||
|
{ "gM", jump_to_dir, "$HOME/Music", "jump to $HOME/Music" },
|
||||||
{ "gd", jump_to_dir, "/dev", "jump to /dev" },
|
{ "gd", jump_to_dir, "/dev", "jump to /dev" },
|
||||||
{ "ge", jump_to_dir, "/etc", "jump to /etc" },
|
{ "ge", jump_to_dir, "/etc", "jump to /etc" },
|
||||||
{ "gp", jump_to_dir, "/etc/portage", "jump to /etc/portage" },
|
{ "gp", jump_to_dir, "/etc/portage", "jump to /etc/portage" },
|
||||||
@@ -87,11 +90,10 @@ static const binding key_binding[] = {
|
|||||||
{ "uz", cmd_on_selected, "unzip ", "unzip zip" },
|
{ "uz", cmd_on_selected, "unzip ", "unzip zip" },
|
||||||
|
|
||||||
{ "on", order_by, sort_natural, "order natural" },
|
{ "on", order_by, sort_natural, "order natural" },
|
||||||
{ "or", not_implemented, "", "order reverse" },
|
{ "oe", not_implemented, NULL, "order extension" },
|
||||||
{ "oe", not_implemented, "", "order extension" },
|
|
||||||
{ "os", order_by, sort_size, "order size" },
|
{ "os", order_by, sort_size, "order size" },
|
||||||
{ "ot", order_by, sort_type, "order type" },
|
{ "ot", order_by, sort_type, "order type" },
|
||||||
{ "oz", order_by, sort_random, "order random" },
|
{ "or", order_by, sort_random, "order random" },
|
||||||
{ "oa", order_by, sort_alpha, "order alphabetically" },
|
{ "oa", order_by, sort_alpha, "order alphabetically" },
|
||||||
|
|
||||||
{ "mk", makedir, NULL, "create directory" },
|
{ "mk", makedir, NULL, "create directory" },
|
||||||
@@ -105,7 +107,7 @@ static const char size_unit[] = { 'B', 'K', 'M', 'G', 'T', 'P' }; /* this define
|
|||||||
|
|
||||||
static const char clipboard_cmd[] = "xsel -ib --trim"; /* assembles the following shell cmd: echo "hovered_file" | clipboard_cmd */
|
static const char clipboard_cmd[] = "xsel -ib --trim"; /* assembles the following shell cmd: echo "hovered_file" | clipboard_cmd */
|
||||||
static const char ui_btm_text_storage_left[] = "total free";
|
static const char ui_btm_text_storage_left[] = "total free";
|
||||||
static const char ui_btm_current_dir_size[] = "sum of dir";
|
static const char ui_btm_current_dir_size[] = "sum of dir,";
|
||||||
|
|
||||||
/* {{{ */
|
/* {{{ */
|
||||||
static const unsigned long binding_count = sizeof(key_binding) / sizeof(binding);
|
static const unsigned long binding_count = sizeof(key_binding) / sizeof(binding);
|
||||||
|
@@ -258,20 +258,22 @@ void move_right(){
|
|||||||
char match = 0;
|
char match = 0;
|
||||||
char *mime = get_mimetype(mid_content[selected_file_current].file_name);
|
char *mime = get_mimetype(mid_content[selected_file_current].file_name);
|
||||||
char *extension = strrchr(mid_content[selected_file_current].file_name, '.');
|
char *extension = strrchr(mid_content[selected_file_current].file_name, '.');
|
||||||
for (i = 0; i < file_extension_default_count; i++) {
|
if (extension != NULL) {
|
||||||
if (strstr(extension, file_extension_default_cmd[i].file_extension)) {
|
for (i = 0; i < file_extension_default_count; i++) {
|
||||||
char *cmd = concat(file_extension_default_cmd[i].command, " ./\"");
|
if (strstr(extension, file_extension_default_cmd[i].file_extension)) {
|
||||||
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
char *cmd = concat(file_extension_default_cmd[i].command, " ./\"");
|
||||||
cmd = concat(cmd, "\"");
|
cmd = concat(cmd, mid_content[selected_file_current].file_name);
|
||||||
|
cmd = concat(cmd, "\"");
|
||||||
|
|
||||||
|
|
||||||
if (system(cmd) == -1) {
|
if (system(cmd) == -1) {
|
||||||
/*do nothing*/
|
/*do nothing*/
|
||||||
|
}
|
||||||
|
curs_set(1); /*for some reason, 1 here turns it invisible once again */
|
||||||
|
match = 1;
|
||||||
|
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
curs_set(1); /*for some reason, 1 here turns it invisible once again */
|
|
||||||
match = 1;
|
|
||||||
status |= (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY | STATUS_UPDATE_SCREEN_RELOAD_FULL);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (match == 0) {
|
if (match == 0) {
|
||||||
@@ -640,6 +642,7 @@ void order_by(int passes, int index){
|
|||||||
(void)passes;
|
(void)passes;
|
||||||
|
|
||||||
free(seed);
|
free(seed);
|
||||||
|
seed = NULL;
|
||||||
seed = malloc(sizeof(time_t));
|
seed = malloc(sizeof(time_t));
|
||||||
*seed = time(NULL);
|
*seed = time(NULL);
|
||||||
|
|
||||||
|
2
main.c
2
main.c
@@ -112,6 +112,7 @@ int main(){
|
|||||||
threading_free();
|
threading_free();
|
||||||
free(start_path);
|
free(start_path);
|
||||||
|
|
||||||
|
/*
|
||||||
if (threading) {
|
if (threading) {
|
||||||
pthread_join(thread_l, NULL);
|
pthread_join(thread_l, NULL);
|
||||||
pthread_join(thread_r, NULL);
|
pthread_join(thread_r, NULL);
|
||||||
@@ -119,6 +120,7 @@ int main(){
|
|||||||
pthread_join(thread_t, NULL);
|
pthread_join(thread_t, NULL);
|
||||||
pthread_join(thread_b, NULL);
|
pthread_join(thread_b, NULL);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
delwin(win_l);
|
delwin(win_l);
|
||||||
delwin(win_m);
|
delwin(win_m);
|
||||||
|
@@ -119,15 +119,15 @@ int sort_random(const void *file0, const void *file1){
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
time_t num = (time_t)&seed;
|
time_t num = (time_t)&seed;
|
||||||
unsigned long i;
|
time_t i;
|
||||||
for (i = 0; i < 6; i++){
|
for (i = num%2; i < 6+(((time_t)&seed)%2); i++){
|
||||||
num ^= *seed;
|
num ^= *seed;
|
||||||
if (num%2) {
|
if (num%2) {
|
||||||
num ^= (time_t)#
|
num ^= (time_t)#
|
||||||
num ^= num << i;
|
num ^= num << (i + (((time_t)&seed)%5));
|
||||||
} else {
|
} else {
|
||||||
num ^= (time_t)&seed;
|
num ^= (time_t)&seed;
|
||||||
num ^= num >> i;
|
num ^= num >> (i + (((time_t)&num)%5));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
num ^= getpid();
|
num ^= getpid();
|
||||||
|
152
threading.c
152
threading.c
@@ -48,12 +48,15 @@ volatile unsigned long selected_file_last = 0;
|
|||||||
extern unsigned int terminal_width;
|
extern unsigned int terminal_width;
|
||||||
extern unsigned int status;
|
extern unsigned int status;
|
||||||
|
|
||||||
|
unsigned int btm_status;
|
||||||
|
|
||||||
|
|
||||||
void *thread_mid(){
|
void *thread_mid(){
|
||||||
|
|
||||||
while(!(status & STATUS_QUIT_PROGRAM)){
|
while(!(status & STATUS_QUIT_PROGRAM)){
|
||||||
pthread_mutex_lock(&mutex_mid);
|
pthread_mutex_lock(&mutex_mid);
|
||||||
pthread_cond_wait(&cond_mid, &mutex_mid);
|
pthread_cond_wait(&cond_mid, &mutex_mid);
|
||||||
|
unsigned int local_status = status;
|
||||||
|
|
||||||
char *path;
|
char *path;
|
||||||
if((path=getcwd(NULL, 0)) == NULL) {
|
if((path=getcwd(NULL, 0)) == NULL) {
|
||||||
@@ -63,7 +66,7 @@ void *thread_mid(){
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
if (status & STATUS_RELOAD_DIRECTORY) {
|
if (local_status & STATUS_RELOAD_DIRECTORY) {
|
||||||
unsigned long i = 0;
|
unsigned long i = 0;
|
||||||
for (i = 0; i < mid_file_count; i++) {
|
for (i = 0; i < mid_file_count; i++) {
|
||||||
free(mid_content[i].file_name);
|
free(mid_content[i].file_name);
|
||||||
@@ -92,6 +95,7 @@ void *thread_mid(){
|
|||||||
pthread_mutex_unlock(&mutex_selection);
|
pthread_mutex_unlock(&mutex_selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
btm_status = local_status;
|
||||||
pthread_cond_signal(&cond_rgt);
|
pthread_cond_signal(&cond_rgt);
|
||||||
pthread_cond_signal(&cond_btm);
|
pthread_cond_signal(&cond_btm);
|
||||||
|
|
||||||
@@ -106,6 +110,7 @@ void *thread_lft(){
|
|||||||
while(!(status & STATUS_QUIT_PROGRAM)){
|
while(!(status & STATUS_QUIT_PROGRAM)){
|
||||||
pthread_mutex_lock(&mutex_lft);
|
pthread_mutex_lock(&mutex_lft);
|
||||||
pthread_cond_wait(&cond_lft, &mutex_lft);
|
pthread_cond_wait(&cond_lft, &mutex_lft);
|
||||||
|
unsigned int local_status = status;
|
||||||
|
|
||||||
char *path;
|
char *path;
|
||||||
if((path=getcwd(NULL, 0)) == NULL) {
|
if((path=getcwd(NULL, 0)) == NULL) {
|
||||||
@@ -117,7 +122,7 @@ void *thread_lft(){
|
|||||||
path[strrchr(path, '/')-path] = '\0';
|
path[strrchr(path, '/')-path] = '\0';
|
||||||
path[0] = '/';
|
path[0] = '/';
|
||||||
|
|
||||||
if (status & STATUS_RELOAD_DIRECTORY) {
|
if (local_status & STATUS_RELOAD_DIRECTORY) {
|
||||||
lft_file_count = get_dir_size(path);
|
lft_file_count = get_dir_size(path);
|
||||||
free(lft_content);
|
free(lft_content);
|
||||||
lft_content = malloc(lft_file_count * sizeof(file));
|
lft_content = malloc(lft_file_count * sizeof(file));
|
||||||
@@ -231,7 +236,8 @@ void *thread_top(){
|
|||||||
top_width = sizeof("cannot open directory");
|
top_width = sizeof("cannot open directory");
|
||||||
top_buffer = "cannot open directory";
|
top_buffer = "cannot open directory";
|
||||||
} else {
|
} else {
|
||||||
top_buffer = getcwd(NULL, 0);
|
top_buffer = malloc(strlen(path)+1);
|
||||||
|
memcpy(top_buffer, path, strlen(path)+1);
|
||||||
top_width = strlen(top_buffer);
|
top_width = strlen(top_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,17 +247,97 @@ void *thread_top(){
|
|||||||
pthread_exit(0);
|
pthread_exit(0);
|
||||||
}
|
}
|
||||||
void *thread_btm(){
|
void *thread_btm(){
|
||||||
|
char *path = malloc(sizeof(char));
|
||||||
|
char *ui_btm_right_block = malloc(sizeof(char));
|
||||||
|
unsigned int ui_btm_right_block_size = 0;
|
||||||
|
unsigned int buffer_width = 0;
|
||||||
|
|
||||||
while(!(status & STATUS_QUIT_PROGRAM)){
|
while(!(status & STATUS_QUIT_PROGRAM)){
|
||||||
pthread_mutex_lock(&mutex_btm);
|
pthread_mutex_lock(&mutex_btm);
|
||||||
pthread_cond_wait(&cond_btm, &mutex_btm);
|
pthread_cond_wait(&cond_btm, &mutex_btm);
|
||||||
|
unsigned int local_status = btm_status;
|
||||||
|
|
||||||
|
|
||||||
free(btm_buffer);
|
if (local_status & (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY)) {
|
||||||
int buffer_width = terminal_width;
|
/*{{{ parse storage info; the fold of shame*/
|
||||||
btm_buffer = malloc(buffer_width);
|
pthread_mutex_lock(&mutex_mid);
|
||||||
memset(btm_buffer, ' ', buffer_width);
|
unsigned long i;
|
||||||
|
float total_dir_size = 0;
|
||||||
|
for(i = 0; i < mid_file_count; i++) {
|
||||||
|
if ((mid_content[i].file_type & (FILE_TYPE_DIR)) != FILE_TYPE_DIR) {
|
||||||
|
total_dir_size += mid_content[i].file_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&mutex_mid);
|
||||||
|
|
||||||
|
|
||||||
|
free(path);
|
||||||
|
free(ui_btm_right_block);
|
||||||
|
|
||||||
|
path = getcwd(NULL, 0);
|
||||||
|
struct statvfs fs;
|
||||||
|
statvfs(path, &fs);
|
||||||
|
|
||||||
|
float disk_size_free = fs.f_bsize * fs.f_bavail;
|
||||||
|
|
||||||
|
float parsed_number[2] = { 0 };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
char size_index[2] = { 0 };
|
||||||
|
if (total_dir_size > 1) {
|
||||||
|
size_index[0] = -1;
|
||||||
|
while (total_dir_size > 1 && size_index[0] < size_unit_count) {
|
||||||
|
parsed_number[0]=total_dir_size;
|
||||||
|
size_index[0]++;
|
||||||
|
total_dir_size /= 1024;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
size_index[0] = 0;
|
||||||
|
parsed_number[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (disk_size_free > 1) {
|
||||||
|
size_index[1] = -1;
|
||||||
|
while (disk_size_free > 1 && size_index[1] < size_unit_count) {
|
||||||
|
parsed_number[1]=disk_size_free;
|
||||||
|
size_index[1]++;
|
||||||
|
disk_size_free /= 1024;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
size_index[1] = 0;
|
||||||
|
}
|
||||||
|
if (size_index[0] > 0 && size_index[1] > 0) {
|
||||||
|
ui_btm_right_block_size = snprintf(NULL, 0, "%0.2lf%c %s %0.2lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left)+1;
|
||||||
|
ui_btm_right_block = malloc(ui_btm_right_block_size);
|
||||||
|
sprintf(ui_btm_right_block, "%0.2lf%c %s %0.2lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left);
|
||||||
|
} else if (size_index[0] <= 0 && size_index[1] > 0) {
|
||||||
|
ui_btm_right_block_size = snprintf(NULL, 0, "%0.0lf%c %s %0.2lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left)+1;
|
||||||
|
ui_btm_right_block = malloc(ui_btm_right_block_size);
|
||||||
|
sprintf(ui_btm_right_block, "%0.0lf%c %s %0.2lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left);
|
||||||
|
} else if (size_index[0] > 0 && size_index[1] <= 0) {
|
||||||
|
ui_btm_right_block_size = snprintf(NULL, 0, "%0.2lf%c %s %0.0lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left)+1;
|
||||||
|
ui_btm_right_block = malloc(ui_btm_right_block_size);
|
||||||
|
sprintf(ui_btm_right_block, "%0.2lf%c %s %0.0lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left);
|
||||||
|
} else {
|
||||||
|
ui_btm_right_block_size = snprintf(NULL, 0, "%0.0lf%c %s %0.0lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left)+1;
|
||||||
|
ui_btm_right_block = malloc(ui_btm_right_block_size);
|
||||||
|
sprintf(ui_btm_right_block, "%0.0lf%c %s %0.0lf%c %s", parsed_number[0], size_unit[(unsigned)size_index[0]], ui_btm_current_dir_size, parsed_number[1], size_unit[(unsigned)size_index[1]], ui_btm_text_storage_left);
|
||||||
|
}
|
||||||
|
/*}}}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buffer_width != terminal_width) {
|
||||||
|
buffer_width = terminal_width;
|
||||||
|
free(btm_buffer);
|
||||||
|
btm_buffer = malloc(buffer_width);
|
||||||
|
memset(btm_buffer, ' ', buffer_width/2);
|
||||||
|
}
|
||||||
|
memset(btm_buffer + (buffer_width/2), ' ', buffer_width/2);
|
||||||
btm_buffer[buffer_width] = '\0';
|
btm_buffer[buffer_width] = '\0';
|
||||||
|
|
||||||
|
memcpy(btm_buffer + buffer_width - ui_btm_right_block_size, ui_btm_right_block, ui_btm_right_block_size);
|
||||||
|
|
||||||
btm_buffer[0] = (S_ISDIR(mid_content[selected_file_current].permissions)) ? 'd' : '-';
|
btm_buffer[0] = (S_ISDIR(mid_content[selected_file_current].permissions)) ? 'd' : '-';
|
||||||
btm_buffer[1] = (mid_content[selected_file_current].permissions & S_IRUSR) ? 'r' : '-';
|
btm_buffer[1] = (mid_content[selected_file_current].permissions & S_IRUSR) ? 'r' : '-';
|
||||||
btm_buffer[2] = (mid_content[selected_file_current].permissions & S_IWUSR) ? 'w' : '-';
|
btm_buffer[2] = (mid_content[selected_file_current].permissions & S_IWUSR) ? 'w' : '-';
|
||||||
@@ -264,58 +350,6 @@ void *thread_btm(){
|
|||||||
btm_buffer[9] = (mid_content[selected_file_current].permissions & S_IXOTH) ? 'x' : '-';
|
btm_buffer[9] = (mid_content[selected_file_current].permissions & S_IXOTH) ? 'x' : '-';
|
||||||
|
|
||||||
|
|
||||||
char *path;
|
|
||||||
path=getcwd(NULL, 0);
|
|
||||||
struct statvfs fs;
|
|
||||||
statvfs(path, &fs);
|
|
||||||
|
|
||||||
float disk_size_free = fs.f_bsize * fs.f_bavail;
|
|
||||||
float parsed_number = 0;
|
|
||||||
int offset_back = buffer_width - strlen(ui_btm_text_storage_left);
|
|
||||||
strcpy(btm_buffer + offset_back, ui_btm_text_storage_left);
|
|
||||||
char *float_str = malloc(buffer_width / 4);
|
|
||||||
|
|
||||||
char size_index = -1;
|
|
||||||
|
|
||||||
pthread_mutex_lock(&mutex_mid);
|
|
||||||
unsigned long i;
|
|
||||||
unsigned long total_dir_size = 0;
|
|
||||||
for(i = 0; i < mid_file_count; i++) {
|
|
||||||
if (!(mid_content[i].file_type & (FILE_TYPE_DIR))) {
|
|
||||||
total_dir_size += mid_content[i].file_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pthread_mutex_unlock(&mutex_mid);
|
|
||||||
|
|
||||||
do {
|
|
||||||
parsed_number=disk_size_free;
|
|
||||||
disk_size_free /= 1024;
|
|
||||||
size_index++;
|
|
||||||
} while (disk_size_free > 1 && size_index < size_unit_count);
|
|
||||||
|
|
||||||
|
|
||||||
snprintf(float_str, 10, "%0.2lf", parsed_number);
|
|
||||||
|
|
||||||
btm_buffer[offset_back - 2] = size_unit[(unsigned)size_index];
|
|
||||||
offset_back -= strlen(float_str) + 2;
|
|
||||||
memcpy(btm_buffer + offset_back, float_str, strlen(float_str));
|
|
||||||
|
|
||||||
parsed_number = 0;
|
|
||||||
size_index = -1;
|
|
||||||
do {
|
|
||||||
parsed_number=total_dir_size;
|
|
||||||
total_dir_size /= 1024;
|
|
||||||
size_index++;
|
|
||||||
} while (total_dir_size > 1 && size_index < size_unit_count);
|
|
||||||
|
|
||||||
offset_back -= strlen(ui_btm_current_dir_size) + 5;
|
|
||||||
memcpy(btm_buffer + offset_back, ui_btm_current_dir_size, strlen(ui_btm_current_dir_size));
|
|
||||||
|
|
||||||
snprintf(float_str, 10, "%0.2lf", parsed_number);
|
|
||||||
btm_buffer[offset_back - 2] = size_unit[(unsigned)size_index];
|
|
||||||
offset_back -= strlen(float_str) + 2;
|
|
||||||
memcpy(btm_buffer + offset_back, float_str, strlen(float_str));
|
|
||||||
free(path);
|
|
||||||
|
|
||||||
pthread_mutex_unlock(&mutex_btm);
|
pthread_mutex_unlock(&mutex_btm);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user