Path: utzoo!utgpu!watmath!clyde!att!rutgers!ucsd!ames!amdahl!kim From: kim@amdahl.uts.amdahl.com (Kim DeVaughn) Newsgroups: comp.sys.amiga Subject: Re: Hidden bit Summary: what do the CATS'n'DOGS have to say ...? Keywords: protect hidden ls Message-ID:Date: 4 Dec 88 00:41:34 GMT References: <999@hub.ucsb.edu> <1527@nmtsun.nmt.edu> Organization: Amdahl Corporation, Sunnyvale, CA 94086 Lines: 60 In article <1527@nmtsun.nmt.edu>, wbnsnsr@nmtsun.nmt.edu (William Norris) writes: > In article kim@amdahl.uts.amdahl.com (Kim DeVaughn) writes: > > >I read about the "hidden" attribute someplace too (AmigaWorld's series > >on 1.3 maybe ?), but the 1.3 Protect command doesn't support it. > > Using the Omega 7 version of Workbench, list shows eight bit positions. > The highest is supposed to be for the hidden attribute. When I issue: > PROTECT ADD H, protect does in fact set the hidden bit. I *swear* I tried this out with "Protect" ... I *know* I did, because I got the "Invalid flag - must be one of SPARWED" message. And I tried it under "shell", "Shell", and the "CLI". They *all* gave me the error msg. But it certainly does work now. I can only guess that I must have been typing "n" instead of "h". Several times. Ah well ... I should know better at 3:30 AM ... > >I also checked in my newly received 1.3 includes (thanks, Lauren!), and > >it's not defined in them either ... only the other seven: sparwed (gee, > >that's even pronouncable ... sparwed). > > They're not in mine, either. So I went into libraries/dos.h and added: > > #define FIBB_HIDDEN 7 > #define FIBF_HIDDEN (1 << FIBB_HIDDEN) I'd really like for CBM to "bless" this. True, the current "Protect" does do this, but it isn't documented anywhere I could find. So the question for the CATS and/or DOGS is: "is the 'h' bit 'official', or is this a 'keep your hands off of this bit' situation"? > As far as the original intent of the question (making .info files hiddent), > I'm almost finished my ls UNIX equivalent (defaults to NOT listing .info > files and doesn't ignore the hidden bit). Funny ... that's exactly what I'm working on, too. My implementation will allow the user to specify what is "hidden" via an env variable (default is to hide .files, info files, and anything with the "h" bit set). BTW, the "ls" command that comes with Manx (v3.6a) shows a file with the "h" bit set as a directory (i.e., it uses the dir color). Another interesting tidbit ... take a look at the protection bits for vd0: sometime (that's the FileInfoBlock entry for ASDG-RAM:). It seems to use bits 0-15 of the fib_Protection longword for something quite different than the intended use ... the bit settings change significantly by just adding or deleting an entry in vd0:. Anyone know what they're using them for (Eric ?) /kim -- UUCP: kim@amdahl.amdahl.com or: {sun,decwrl,hplabs,pyramid,uunet,oliveb,ames}!amdahl!kim DDD: 408-746-8462 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 BIX: kdevaughn GEnie: K.DEVAUGHN CIS: 76535,25