write_marked()
- New function used to write the current marked selection to a
file, split out from do_writeout(). (DLR)
+ filestat()
+ - Removed, as it is only called in one place and is
+ redundant. (DLR)
+ do_browser()
+ - Replace the filestat() call with an equivalent stat() call.
+ (DLR)
- global.c:
shortcut_init()
- Only allow verbatim input when we're not in view mode. (DLR)
#endif /* !DISABLE_TABCOMP */
#ifndef DISABLE_BROWSER
-/* Return the stat of the file pointed to by path */
-struct stat filestat(const char *path)
-{
- struct stat st;
-
- stat(path, &st);
- return st;
-}
-
/* Our sort routine for file listings -- sort directories before
* files, and then alphabetically. */
int diralphasort(const void *va, const void *vb)
if (S_ISLNK(st.st_mode)) {
/* Aha! It's a symlink! Now, is it a dir? If so,
mark it as such */
- st = filestat(filelist[j]);
+ stat(filelist[j], &st);
if (S_ISDIR(st.st_mode))
strcpy(foo + longest - 5, "(dir)");
else
char *input_tab(char *buf, int place, int *lastwastab, int *newplace, int *list);
#endif
#ifndef DISABLE_BROWSER
-struct stat filestat(const char *path);
int diralphasort(const void *va, const void *vb);
void free_charptrarray(char **array, int len);
const char *tail(const char *foo);