diff --git a/src/ChangeLog b/src/ChangeLog index 3d664882c..aaf4f7e41 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-10-13 Pavel Roskin + + * color.c: Rename stalledlink to stalelink. Make the same + change elsewhere. + 2002-10-09 Andrew V. Samoilov * popt.h: Adjust poptHelpOptions[] declaration. diff --git a/src/color.c b/src/color.c index 0689bd0ee..258d1354c 100644 --- a/src/color.c +++ b/src/color.c @@ -81,8 +81,8 @@ struct colorpair color_map [] = { /* Per file types colors */ { "directory=", 0, 0 }, /* 23 */ { "executable=", 0, 0 }, - { "link=", 0, 0 }, /* symbolic link (neither stalled nor link to directory) */ - { "stalledlink=",0, 0 }, /* stalled symbolic link */ + { "link=", 0, 0 }, /* symbolic link (neither stale nor link to directory) */ + { "stalelink=", 0, 0 }, /* stale symbolic link */ { "device=", 0, 0 }, { "special=", 0, 0 }, /* sockets, fifo */ { "core=", 0, 0 }, /* core files */ /* 29 */ diff --git a/src/color.h b/src/color.h index 1346f9936..71cdecfd1 100644 --- a/src/color.h +++ b/src/color.h @@ -64,7 +64,7 @@ extern int alarm_colors[4]; #define DIRECTORY_COLOR BEST_COLOR (23, 0) #define EXECUTABLE_COLOR BEST_COLOR (24, 0) #define LINK_COLOR BEST_COLOR (25, 0) -#define STALLED_LINK_COLOR BEST_COLOR (26, A_UNDERLINE) +#define STALE_LINK_COLOR BEST_COLOR (26, A_UNDERLINE) #define DEVICE_COLOR BEST_COLOR (27, 0) #define SPECIAL_COLOR BEST_COLOR (28, 0) #define CORE_COLOR BEST_COLOR (29, 0) diff --git a/src/dir.c b/src/dir.c index 308421452..14f8c54db 100644 --- a/src/dir.c +++ b/src/dir.c @@ -273,7 +273,7 @@ file_type_to_num (const file_entry *fe) if (S_ISLNK (s->st_mode)){ if (fe->f.link_to_dir) return 1; - if (fe->f.stalled_link) + if (fe->f.stale_link) return 2; else return 3; @@ -353,7 +353,7 @@ add_dotdot_to_list (dir_list *list, int index) (list->list) [index].fnamelen = 2; (list->list) [index].fname = g_strdup (".."); (list->list) [index].f.link_to_dir = 0; - (list->list) [index].f.stalled_link = 0; + (list->list) [index].f.stale_link = 0; (list->list) [index].f.dir_size_computed = 0; (list->list) [index].f.marked = 0; (list->list) [index].buf.st_mode = 040755; @@ -372,7 +372,7 @@ set_zero_dir (dir_list *list) int handle_dirent (dir_list *list, char *filter, struct dirent *dp, struct stat *buf1, int next_free, int *link_to_dir, - int *stalled_link) + int *stale_link) { if (dp->d_name [0] == '.' && dp->d_name [1] == 0) return 0; @@ -392,13 +392,13 @@ handle_dirent (dir_list *list, char *filter, struct dirent *dp, /* A link to a file or a directory? */ *link_to_dir = 0; - *stalled_link = 0; + *stale_link = 0; if (S_ISLNK(buf1->st_mode)){ struct stat buf2; if (!mc_stat (dp->d_name, &buf2)) *link_to_dir = S_ISDIR(buf2.st_mode) != 0; else - *stalled_link = 1; + *stale_link = 1; } if (!(S_ISDIR(buf1->st_mode) || *link_to_dir) && filter && !regexp_match (filter, dp->d_name, match_file)) @@ -423,7 +423,7 @@ handle_dirent (dir_list *list, char *filter, struct dirent *dp, int handle_path (dir_list *list, char *path, struct stat *buf1, int next_free, int *link_to_dir, - int *stalled_link) + int *stale_link) { if (path [0] == '.' && path [1] == 0) return 0; @@ -437,13 +437,13 @@ handle_path (dir_list *list, char *path, /* A link to a file or a directory? */ *link_to_dir = 0; - *stalled_link = 0; + *stale_link = 0; if (S_ISLNK(buf1->st_mode)){ struct stat buf2; if (!mc_stat (path, &buf2)) *link_to_dir = S_ISDIR(buf2.st_mode) != 0; else - *stalled_link = 1; + *stale_link = 1; } /* Need to grow the *list? */ @@ -462,7 +462,7 @@ do_load_dir (dir_list *list, sortfn *sort, int reverse, int case_sensitive, char { DIR *dirp; struct dirent *dp; - int status, link_to_dir, stalled_link; + int status, link_to_dir, stale_link; int next_free = 0; struct stat buf; int dotdot_found = 0; @@ -476,7 +476,7 @@ do_load_dir (dir_list *list, sortfn *sort, int reverse, int case_sensitive, char } for (dp = mc_readdir (dirp); dp; dp = mc_readdir (dirp)){ status = handle_dirent (list, filter, dp, &buf, next_free, &link_to_dir, - &stalled_link); + &stale_link); if (status == 0) continue; if (status == -1){ @@ -488,7 +488,7 @@ do_load_dir (dir_list *list, sortfn *sort, int reverse, int case_sensitive, char list->list [next_free].fname = g_strdup (dp->d_name); list->list [next_free].f.marked = 0; list->list [next_free].f.link_to_dir = link_to_dir; - list->list [next_free].f.stalled_link = stalled_link; + list->list [next_free].f.stale_link = stale_link; list->list [next_free].f.dir_size_computed = 0; list->list [next_free].buf = buf; if (strcmp (dp->d_name, ".." ) == 0) @@ -568,7 +568,7 @@ do_reload_dir (dir_list * list, sortfn * sort, int count, int rev, DIR *dirp; struct dirent *dp; int next_free = 0; - int i, status, link_to_dir, stalled_link; + int i, status, link_to_dir, stale_link; struct stat buf; int dotdot_found = 0; int marked_cnt; @@ -590,7 +590,7 @@ do_reload_dir (dir_list * list, sortfn * sort, int count, int rev, dir_copy.list[i].f.dir_size_computed = list->list[i].f.dir_size_computed; dir_copy.list[i].f.link_to_dir = list->list[i].f.link_to_dir; - dir_copy.list[i].f.stalled_link = list->list[i].f.stalled_link; + dir_copy.list[i].f.stale_link = list->list[i].f.stale_link; if (list->list[i].f.marked) { g_hash_table_insert (marked_files, dir_copy.list[i].fname, &dir_copy.list[i]); @@ -601,7 +601,7 @@ do_reload_dir (dir_list * list, sortfn * sort, int count, int rev, for (dp = mc_readdir (dirp); dp; dp = mc_readdir (dirp)) { status = handle_dirent (list, filter, dp, &buf, next_free, &link_to_dir, - &stalled_link); + &stale_link); if (status == 0) continue; if (status == -1) { @@ -639,7 +639,7 @@ do_reload_dir (dir_list * list, sortfn * sort, int count, int rev, list->list[next_free].fnamelen = NLENGTH (dp); list->list[next_free].fname = g_strdup (dp->d_name); list->list[next_free].f.link_to_dir = link_to_dir; - list->list[next_free].f.stalled_link = stalled_link; + list->list[next_free].f.stale_link = stale_link; list->list[next_free].f.dir_size_computed = 0; list->list[next_free].buf = buf; if (strcmp (dp->d_name, "..") == 0) diff --git a/src/dir.h b/src/dir.h index a93e704ec..1c4a1c5e9 100644 --- a/src/dir.h +++ b/src/dir.h @@ -17,7 +17,7 @@ typedef struct { struct { unsigned int marked:1; /* File marked in pane window */ unsigned int link_to_dir:1; /* If this is a link, does it point to directory? */ - unsigned int stalled_link:1; /* If this is a symlink and points to Charon's land */ + unsigned int stale_link:1; /* If this is a symlink and points to Charon's land */ unsigned int dir_size_computed:1; /* Size of directory was computed with dirsizes_cmd */ } f; } file_entry; @@ -41,9 +41,9 @@ int set_zero_dir (dir_list *list); #ifdef DIR_H_INCLUDE_HANDLE_DIRENT int handle_dirent (dir_list *list, char *filter, struct dirent *dp, - struct stat *buf1, int next_free, int *link_to_dir, int *stalled_link); + struct stat *buf1, int next_free, int *link_to_dir, int *stale_link); int handle_path (dir_list *list, char *path, struct stat *buf1, int next_free, - int *link_to_dir, int *stalled_link); + int *link_to_dir, int *stale_link); #endif /* Sorting functions */ diff --git a/src/find.c b/src/find.c index fea7d515d..4a701eb5f 100644 --- a/src/find.c +++ b/src/find.c @@ -873,7 +873,7 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char *filename = g_strdup (file_tmp); if (return_value == B_PANELIZE && *filename){ - int status, link_to_dir, stalled_link; + int status, link_to_dir, stale_link; int next_free = 0; int i; struct stat buf; @@ -899,7 +899,7 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char else name = concat_dir_and_file (dir, filename); status = handle_path (list, name, &buf, next_free, &link_to_dir, - &stalled_link); + &stale_link); if (status == 0) { g_free (name); continue; @@ -923,7 +923,7 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char list->list [next_free].fname = name; file_mark (cpanel, next_free, 0); list->list [next_free].f.link_to_dir = link_to_dir; - list->list [next_free].f.stalled_link = stalled_link; + list->list [next_free].f.stale_link = stale_link; list->list [next_free].f.dir_size_computed = 0; list->list [next_free].buf = buf; next_free++; diff --git a/src/panelize.c b/src/panelize.c index a03d45b5d..5f29136dd 100644 --- a/src/panelize.c +++ b/src/panelize.c @@ -358,7 +358,7 @@ void done_panelize (void) void do_external_panelize (char *command) { - int status, link_to_dir, stalled_link; + int status, link_to_dir, stale_link; int next_free = 0; struct stat buf; dir_list *list = &cpanel->dir; @@ -392,7 +392,7 @@ void do_external_panelize (char *command) else name = line; status = handle_path (list, name, &buf, next_free, &link_to_dir, - &stalled_link); + &stale_link); if (status == 0) continue; if (status == -1) @@ -401,7 +401,7 @@ void do_external_panelize (char *command) list->list [next_free].fname = g_strdup (name); file_mark (cpanel, next_free, 0); list->list [next_free].f.link_to_dir = link_to_dir; - list->list [next_free].f.stalled_link = stalled_link; + list->list [next_free].f.stale_link = stale_link; list->list [next_free].f.dir_size_computed = 0; list->list [next_free].buf = buf; next_free++; diff --git a/src/screen.c b/src/screen.c index f53a28fbc..bdf68ebdb 100644 --- a/src/screen.c +++ b/src/screen.c @@ -213,7 +213,7 @@ string_file_type (file_entry *fe, int len) else if (S_ISLNK (fe->buf.st_mode)) { if (fe->f.link_to_dir) buffer [0] = '~'; - else if (fe->f.stalled_link) + else if (fe->f.stale_link) buffer [0] = '!'; else buffer [0] = '@'; @@ -453,8 +453,8 @@ file_compute_color (int attr, file_entry *fe) else if (S_ISLNK (fe->buf.st_mode)){ if (fe->f.link_to_dir) return (DIRECTORY_COLOR); - else if (fe->f.stalled_link) - return (STALLED_LINK_COLOR); + else if (fe->f.stale_link) + return (STALE_LINK_COLOR); else return (LINK_COLOR); } else if (S_ISSOCK (fe->buf.st_mode)) diff --git a/src/text.c b/src/text.c index 36d805422..725ea7550 100644 --- a/src/text.c +++ b/src/text.c @@ -56,7 +56,7 @@ char *default_edition_colors = "directory=white,blue:" "executable=brightgreen,blue:" "link=lightgray,blue:" -"stalledlink=brightred,blue:" +"stalelink=brightred,blue:" "device=brightmagenta,blue:" "core=red,blue:" "special=black,blue:"