fixed some compiler warnings
This commit is contained in:
@ -13,6 +13,7 @@ extern unsigned int settings;
|
|||||||
extern unsigned int file_modifiers;
|
extern unsigned int file_modifiers;
|
||||||
extern unsigned int color_count;
|
extern unsigned int color_count;
|
||||||
extern color *colors;
|
extern color *colors;
|
||||||
|
unsigned long file_offset;
|
||||||
|
|
||||||
char* concat(const char *s1, const char *s2){
|
char* concat(const char *s1, const char *s2){
|
||||||
const size_t len1 = strlen(s1);
|
const size_t len1 = strlen(s1);
|
||||||
@ -150,10 +151,9 @@ void print_dir(WINDOW *win, unsigned long *line_width, unsigned long *dir_file_c
|
|||||||
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;
|
||||||
}
|
}
|
||||||
for (i = 0; i < *dir_file_count; i++) {
|
for (i = file_offset; i < *dir_file_count; i++) {
|
||||||
|
|
||||||
unsigned long offset_back = *line_width - (snprintf(NULL,0,"%ld",dir_content[i].file_size) + 1);
|
unsigned long offset_back = *line_width - (snprintf(NULL,0,"%ld",dir_content[i].file_size) + 1);
|
||||||
unsigned long allowed_width = *line_width+1;
|
|
||||||
|
|
||||||
if (dir_content[i].status & FILE_STATUS_SELECTED) {
|
if (dir_content[i].status & FILE_STATUS_SELECTED) {
|
||||||
is_selected = 1;
|
is_selected = 1;
|
||||||
|
@ -40,6 +40,7 @@ extern char *terminal_width_empty_line;
|
|||||||
|
|
||||||
int read_string(WINDOW *win, int y, int x, char *str);
|
int read_string(WINDOW *win, int y, int x, char *str);
|
||||||
int strcmp_offset(char *in0, char *in1, char offset);
|
int strcmp_offset(char *in0, char *in1, char offset);
|
||||||
|
extern void render_pass();
|
||||||
|
|
||||||
|
|
||||||
void user_interactions() {
|
void user_interactions() {
|
||||||
@ -268,9 +269,8 @@ void open_with(){
|
|||||||
wresize(win_b, 5, terminal_width/3); /*the div3 just looks cool*/
|
wresize(win_b, 5, terminal_width/3); /*the div3 just looks cool*/
|
||||||
|
|
||||||
render_pass();
|
render_pass();
|
||||||
unsigned long local_width;
|
|
||||||
unsigned long local_height;
|
unsigned long local_height;
|
||||||
getmaxyx(win_b, local_height, local_width);
|
local_height = getmaxy(win_b);
|
||||||
|
|
||||||
|
|
||||||
/* TODO(2025-06-22T01:24:36) fix fixed buffer size */
|
/* TODO(2025-06-22T01:24:36) fix fixed buffer size */
|
||||||
@ -308,9 +308,8 @@ void rename_hovered(){
|
|||||||
|
|
||||||
render_pass();
|
render_pass();
|
||||||
|
|
||||||
unsigned long local_width;
|
|
||||||
unsigned long local_height;
|
unsigned long local_height;
|
||||||
getmaxyx(win_b, local_height, local_width);
|
local_height = getmaxy(win_b);
|
||||||
|
|
||||||
/* TODO(2025-06-22T01:24:30) fix fixed buffer size */
|
/* TODO(2025-06-22T01:24:30) fix fixed buffer size */
|
||||||
char *str = malloc(255);
|
char *str = malloc(255);
|
||||||
@ -366,9 +365,6 @@ void delete(){
|
|||||||
|
|
||||||
render_pass();
|
render_pass();
|
||||||
|
|
||||||
unsigned long local_width;
|
|
||||||
unsigned long local_height;
|
|
||||||
getmaxyx(win_b, local_height, local_width);
|
|
||||||
|
|
||||||
timeout(-1); /* negative numbers block until enter is pressed */
|
timeout(-1); /* negative numbers block until enter is pressed */
|
||||||
/* TODO(2025-06-22T01:24:30) fix fixed buffer size */
|
/* TODO(2025-06-22T01:24:30) fix fixed buffer size */
|
||||||
@ -421,9 +417,8 @@ void makedir(){
|
|||||||
wresize(win_b, 5, terminal_width/3); /*the div3 just looks cool*/
|
wresize(win_b, 5, terminal_width/3); /*the div3 just looks cool*/
|
||||||
render_pass();
|
render_pass();
|
||||||
|
|
||||||
unsigned long local_width;
|
|
||||||
unsigned long local_height;
|
unsigned long local_height;
|
||||||
getmaxyx(win_b, local_height, local_width);
|
local_height = getmaxy(win_b);
|
||||||
|
|
||||||
/* TODO(2025-07-03T01:19:55) fix fixed buffer size */
|
/* TODO(2025-07-03T01:19:55) fix fixed buffer size */
|
||||||
char *str = malloc(255);
|
char *str = malloc(255);
|
||||||
@ -444,9 +439,8 @@ void makefile(){
|
|||||||
wresize(win_b, 5, terminal_width/3); /*the div3 just looks cool*/
|
wresize(win_b, 5, terminal_width/3); /*the div3 just looks cool*/
|
||||||
render_pass();
|
render_pass();
|
||||||
|
|
||||||
unsigned long local_width;
|
|
||||||
unsigned long local_height;
|
unsigned long local_height;
|
||||||
getmaxyx(win_b, local_height, local_width);
|
local_height = getmaxy(win_b);
|
||||||
|
|
||||||
/* TODO(2025-07-03T01:19:49) fix fixed buffer size */
|
/* TODO(2025-07-03T01:19:49) fix fixed buffer size */
|
||||||
char *str = malloc(255);
|
char *str = malloc(255);
|
||||||
|
2
main.c
2
main.c
@ -89,7 +89,6 @@ int main(){
|
|||||||
render_pass();
|
render_pass();
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
threading_free();
|
threading_free();
|
||||||
|
|
||||||
pthread_join(thread_l, NULL);
|
pthread_join(thread_l, NULL);
|
||||||
@ -97,7 +96,6 @@ int main(){
|
|||||||
pthread_join(thread_m, NULL);
|
pthread_join(thread_m, NULL);
|
||||||
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);
|
||||||
|
Reference in New Issue
Block a user