Compare commits
2 Commits
f40cc91cce
...
f5d0c8bc85
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5d0c8bc85 | ||
|
|
9e8bd3c022 |
37
backend.c
37
backend.c
@@ -131,5 +131,40 @@ char* parse_cmd(const char *cmd, file *f){
|
||||
}
|
||||
|
||||
return out;
|
||||
|
||||
}
|
||||
char* parse_path(char *path){
|
||||
int count = 0;
|
||||
char *out;
|
||||
char *pos;
|
||||
unsigned long i = 0;
|
||||
while(path[i]) {
|
||||
if (path[i] == '\'') {
|
||||
count++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
out = malloc((strlen(path)+(count*3)) + 4);
|
||||
|
||||
pos = out;
|
||||
pos++;
|
||||
|
||||
out[0] = '\'';
|
||||
|
||||
i = 0;
|
||||
while(path[i]) {
|
||||
if (path[i] == '\'') {
|
||||
*pos++ = '\'';
|
||||
*pos++ = '\\';
|
||||
*pos++ = '\'';
|
||||
}
|
||||
*pos = path[i];
|
||||
pos++;
|
||||
i++;
|
||||
}
|
||||
pos[0] = '\'';
|
||||
pos[1]= ' ';
|
||||
pos[2] = '\0';
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
2
dir.c
2
dir.c
@@ -17,8 +17,6 @@ extern unsigned int settings;
|
||||
extern unsigned int file_modifiers;
|
||||
extern unsigned int color_count;
|
||||
extern unsigned int terminal_height;
|
||||
extern volatile unsigned long selected_file_current;
|
||||
extern volatile unsigned long selected_file_last;
|
||||
extern color *colors;
|
||||
int (*order_func)() = sort_natural;
|
||||
linked_dir *visited_dirs;
|
||||
|
||||
5
main.c
5
main.c
@@ -19,8 +19,8 @@ unsigned int terminal_width;
|
||||
unsigned int temp_heigth = 0; /*used for screen refresh*/
|
||||
unsigned int temp_width = 0;
|
||||
unsigned int settings;
|
||||
unsigned int file_modifiers;
|
||||
unsigned int status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY);
|
||||
unsigned int file_modifiers = 0;
|
||||
unsigned int status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY) & ~STATUS_UPDATE_SCREEN_RESIZE;
|
||||
char *start_path;
|
||||
char *global_path;
|
||||
time_t seed;
|
||||
@@ -36,7 +36,6 @@ extern pthread_mutex_t mutex_btm;
|
||||
extern pthread_mutex_t mutex_lft;
|
||||
extern pthread_mutex_t mutex_mid;
|
||||
extern pthread_mutex_t mutex_rgt;
|
||||
extern volatile char render_queue[5];
|
||||
|
||||
char *input; /*used in user_interactions*/
|
||||
char *terminal_width_empty_line; /* used in user_interactions */
|
||||
|
||||
Reference in New Issue
Block a user