about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTFile.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-12-03 18:41:23 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-12-03 18:41:23 -0500
commit0654c7025fbe241efddf0c3b9e58817f262aeda9 (patch)
tree763b5e6a40224fd71653797b3066bf276c81f308 /WWW/Library/Implementation/HTFile.c
parente87f21b4ae754e738cbb577215a039a26e28ad52 (diff)
downloadlynx-snapshots-0654c7025fbe241efddf0c3b9e58817f262aeda9.tar.gz
snapshot of project "lynx", label v2-8-2dev_8
Diffstat (limited to 'WWW/Library/Implementation/HTFile.c')
-rw-r--r--WWW/Library/Implementation/HTFile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c
index a4f35b1a..4dd8960a 100644
--- a/WWW/Library/Implementation/HTFile.c
+++ b/WWW/Library/Implementation/HTFile.c
@@ -178,6 +178,13 @@ PRIVATE void LYListFmtParse ARGS5(
 		"r-S", "r-s", "rwS", "rws", 0 };
 #define PBIT(a, n, s)  (s) ? psbits[((a) >> (n)) & 0x7] : \
 	pbits[((a) >> (n)) & 0x7]
+#ifdef S_ISVTX
+	static char *ptbits[] = { "--T", "--t", "-wT", "-wt",
+		"r-T", "r-t", "rwT", "rwt", 0 };
+#define PTBIT(a, s)  (s) ? ptbits[(a) & 0x7] : pbits[(a) & 0x7]
+#else
+#define PTBIT(a, s)  (a, 0, 0)
+#endif
 
 	if (lstat(file, &st) < 0)
 		fmtstr = "%a";	/* can't stat so just do anchor */
@@ -294,7 +301,7 @@ PRIVATE void LYListFmtParse ARGS5(
 			sprintf(buf, "%c%s%s%s", type,
 			  PBIT(st.st_mode, 6, st.st_mode & S_ISUID),
 			  PBIT(st.st_mode, 3, st.st_mode & S_ISGID),
-			  PBIT(st.st_mode, 0, 0));
+			  PTBIT(st.st_mode,   st.st_mode & S_ISVTX));
 			sprintf(fmt, "%%%ss", start);
 			sprintf(buf, fmt, buf);
 			break;