Mercurial > emacs
changeset 4804:810826b6e19a
* etags.c (process_file): dead code removed.
(S_ISREG): #define it using S_IFREG if not defined.
(process_file): regular files have nothing to do with symlinks.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Fri, 01 Oct 1993 09:51:07 +0000 |
parents | ce4372eaa443 |
children | 6d9ebfc05a1f |
files | lib-src/etags.c |
diffstat | 1 files changed, 7 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/etags.c Thu Sep 30 23:36:54 1993 +0000 +++ b/lib-src/etags.c Fri Oct 01 09:51:07 1993 +0000 @@ -25,7 +25,7 @@ * Gnu Emacs TAGS format and modifications by RMS? * Sam Kendall added C++. * - * Francesco Potorti` is the current maintainer. 8.3 + * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer. 9.4 */ #ifdef HAVE_CONFIG_H @@ -37,6 +37,10 @@ #include <sys/types.h> #include <sys/stat.h> +#if !defined (S_ISREG) && defined (S_IFREG) +# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + #include "getopt.h" extern char *malloc (), *realloc (); @@ -784,12 +788,7 @@ { struct stat stat_buf; - stat (file, &stat_buf); - if (!(stat_buf.st_mode & S_IFREG) -#ifdef S_IFLNK - || !(stat_buf.st_mode & S_IFLNK) -#endif - ) + if (stat (file, &stat_buf) || !S_ISREG (stat_buf.st_mode)) { fprintf (stderr, "Skipping %s: it is not a regular file.\n", file); return; @@ -800,19 +799,10 @@ fprintf (stderr, "Skipping inclusion of %s in self.\n", file); return; } - if (emacs_tags_format) - { - char *cp = etags_rindex (file, '/'); - if (cp) - ++cp; - else - cp = file; - } find_entries (file); if (emacs_tags_format) { - fprintf (outf, "\f\n%s,%d\n", - file, total_size_of_entries (head)); + fprintf (outf, "\f\n%s,%d\n", file, total_size_of_entries (head)); put_entries (head); free_tree (head); head = NULL;