diff --git a/twander.py b/twander.py index 43edde6..d5e6f09 100755 --- a/twander.py +++ b/twander.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "twander" -RCSID = "$Id: twander.py,v 2.77 2003/01/22 02:27:59 tundra Exp $" +RCSID = "$Id: twander.py,v 2.78 2003/01/22 21:32:08 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -354,6 +354,12 @@ ST_SZLEN + ST_SZMTIME +# Special Bit Masks + +STICKY_MASK = 1 +SETGID_MASK = 2 +SETUID_MASK = 4 + # Misc. Stat-Related Strings FILEGROUP = "group" @@ -365,7 +371,7 @@ ##### -# Configuration File Related Constants +# Configuration File-Related Constants ##### ASSIGN = "=" # Assignment for variable definitions @@ -408,8 +414,8 @@ # Title-Bar Strings -TTLFILES = " Total Files: " -TTLSIZE = " Total Size: " +TTLFILES = "Total Files:" +TTLSIZE = "Total Size:" # Menu Button Titles @@ -515,6 +521,15 @@ " -c file name of configuration file (default: $HOME/." + PROGNAME + " or PROGDIR/." + PROGNAME + ")", " -d level set debugging level (default: 0, debugging off)", + " Bit Assignments:", + " 0 - Dump Requested Debug Information And Exit Immediately", + " 1 - Dump Internal Program Variables And User-Settable Options", + " 2 - Dump User-Defined Variables", + " 3 - Dump Command Definitions", + " 4 - Display, Do Not Execute, Commands When Invoked", + " 5 - Dump Key Bindings And Directory Shortcut Assignments", + " 6 - Dump Directory Stack As It Changes", + " 7 - Dump Command History Stack After Command Executes", " -h print this help information", " -q quiet mode - no warnings (default: warnings on)", " -r turn off automatic content refreshing (default: refresh on)", @@ -538,7 +553,6 @@ ##### def ErrMsg(emsg): - showerror(PROGNAME + " " + VERSION + " " + eERROR, emsg) # End of 'ErrMsg()' @@ -1135,7 +1149,6 @@ # Bind handler for "Mouse Select" self.DirList.bind(self.KeyBindings["MOUSESEL"], MouseDblClick) - ##### # Function Keys ##### @@ -1150,8 +1163,6 @@ # End Of method 'twanderUI.BindAllHandlers() - - ##### # Return tuple of all selected items @@ -1295,7 +1306,7 @@ def UpdateTitle(self, mainwin): - mainwin.title("%s %s %s: %s %s: %s %s: %s" % + mainwin.title("%s %s %s: %s %s %s %s %s" % (PROGNAME, VERSION, FULLNAME, UI.CurrentDir, TTLFILES, str(self.DirList.size()), TTLSIZE, FileLength(self.TotalSize))) @@ -2241,7 +2252,7 @@ # Sticky Bit - if 1 & sp: + if sp & STICKY_MASK: if mode[-1] == "x": mode = mode[:-1] + "t" else: @@ -2249,19 +2260,19 @@ # Setgid Bit - if 2 & sp: + if sp & SETGID_MASK: if mode[-4] == "x": - mode = mode[:-4] + "g" + mode[-3:] + mode = mode[:-4] + "s" + mode[-3:] else: - mode = mode[:-4] + "G" + mode[-3:] + mode = mode[:-4] + "S" + mode[-3:] # Setuid Bit - if 4 & sp: + if sp & SETUID_MASK: if mode[-7] == "x": - mode = mode[:-7] + "g" + mode[-6:] + mode = mode[:-7] + "s" + mode[-6:] else: - mode = mode[:-7] + "G" + mode[-6:] + mode = mode[:-7] + "S" + mode[-6:] # Pickup the special file types mode = ST_SPECIALS.get(modestr[0:2], "?") + mode @@ -2393,7 +2404,7 @@ ##### -# Process A Command Line Containing Unresolved Variables +# Process A Command Line Containing Built-In Variables ##### def ProcessBuiltIns(cmd, name):