Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!dkuug!diku!bombadil From: bombadil@diku.dk (Kristian Nielsen) Newsgroups: comp.sys.amiga.programmer Subject: Re: Question About FileInfoBlock Structures Keywords: FileInfoBlock directories dos amigados Message-ID: <1991Feb5.095106.14457@odin.diku.dk> Date: 5 Feb 91 09:51:06 GMT References: <18a052ee.ARN02d3@aquarium.buffalo.ny.us> Sender: news@odin.diku.dk (Netnews System) Organization: Department of Computer Science, U of Copenhagen Lines: 53 ernie@aquarium.buffalo.ny.us (Ernest J. Gainey III) writes: >Hello Everyone, > I'm curious if anyone knows why this little bit of code produces such > a strange result, from what I can tell, it should do a directory > listing filename, filesize, and protections... > Problem is... the fib_Protection field of the FileInfoBlock structure > is Empty... when I print it as a "%d", i get a 0... all the other fields > appear to have values... but do a... > printf("Protection==%d\n",MyFileInfoBlock->fib_Protection); > and I get a: Protection==0 ... >Here, I'll include my little test program, and show ya... and maybe someone >can figure out whats wrong... [...] > for (x=6; x>=0; x--) > { > if (MyFileInfoBlock->fib_Protection && (1< { > Protection[6-x]=*ProtectionNames[x]; > } > else > { > Protection[6-x]='-'; > } >} [...] >Thanks all for your help... Kristian ========================================================================== Kristian Nielsen | /// Only the AMIGA Student at DIKU, University of Copenhagen | /// (Department of Computer Science) | \\\/// makes it possible! Denmark | \XX/ ==========================================================================