lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev show sticky bit


From: Klaus Weide
Subject: lynx-dev show sticky bit
Date: Tue, 24 Nov 1998 05:46:19 -0600 (CST)

Since we recommend the sticky bit for tmp directories,
we should also attempt to show it in directory listings...



*** lynx2-8-1.orig/WWW/Library/Implementation/HTFile.c  Wed Oct 14 07:23:56 1998
--- lynx2-8-1/WWW/Library/Implementation/HTFile.c       Tue Nov 24 05:41:04 1998
***************
*** 183,188 ****
--- 183,193 ----
                "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]
+ #endif
  
        if (lstat(file, &st) < 0)
                fmtstr = "%a";  /* can't stat so just do anchor */
***************
*** 299,305 ****
                        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));
                        sprintf(fmt, "%%%ss", start);
                        sprintf(buf, fmt, buf);
                        break;
--- 304,315 ----
                        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),
! #ifdef S_ISVTX
!                         PTBIT(st.st_mode, st.st_mode & S_ISVTX)
! #else
!                         PBIT(st.st_mode, 0, 0)
! #endif
!                           );
                        sprintf(fmt, "%%%ss", start);
                        sprintf(buf, fmt, buf);
                        break;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]