From 43aa4122fc84ca2695e7644f7dd942e9808c73c2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 3 Feb 1999 05:16:22 +0000 Subject: [PATCH] (print_type_indicator): Print doors as '>'. (length_of_file_name_and_frills): Account for this. --- src/ls.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/ls.c b/src/ls.c index 4760279a2e..4e40aa835a 100644 --- a/src/ls.c +++ b/src/ls.c @@ -1,5 +1,5 @@ /* `dir', `vdir' and `ls' directory listing programs for GNU. - Copyright (C) 85, 88, 90, 91, 95, 96, 97, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 85, 88, 90, 91, 1995-1999 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -372,13 +372,13 @@ enum color_type enum indicator_no { C_LEFT, C_RIGHT, C_END, C_NORM, C_FILE, C_DIR, C_LINK, C_FIFO, C_SOCK, - C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC + C_BLK, C_CHR, C_MISSING, C_ORPHAN, C_EXEC, C_DOOR }; static const char *const indicator_name[]= { "lc", "rc", "ec", "no", "fi", "di", "ln", "pi", "so", - "bd", "cd", "mi", "or", "ex", NULL + "bd", "cd", "mi", "or", "ex", "do", NULL }; struct color_ext_type @@ -2415,6 +2415,11 @@ print_type_indicator (unsigned int mode) DIRED_PUTCHAR ('='); #endif +#ifdef S_ISDOOR + if (S_ISDOOR (mode)) + DIRED_PUTCHAR ('>'); +#endif + if (S_ISREG (mode) && indicator_style == classify && (mode & S_IXUGO)) DIRED_PUTCHAR ('*'); @@ -2465,6 +2470,11 @@ print_color_indicator (const char *name, unsigned int mode, int linkok) type = C_CHR; #endif +#ifdef S_ISDOOR + else if (S_ISDOOR (mode)) + type = C_DOOR; +#endif + if (type == C_FILE && (mode & S_IXUGO) != 0) type = C_EXEC; @@ -2536,6 +2546,9 @@ length_of_file_name_and_frills (const struct fileinfo *f) #endif #ifdef S_ISSOCK || S_ISSOCK (filetype) +#endif +#ifdef S_ISDOOR + || S_ISDOOR (filetype) #endif ) len += 1; -- 2.47.3