From: "Ullrich von Bassewitz"; on Mon, Nov 29, 2010; at 03:48 PM -0500 > > On Sun, Nov 28, 2010 at 11:17:45PM +0100, Stefan wrote: > > I just recognized that cbm_readdir() does not return the > > "x blocks free." statement at the end of the directory. > > That entry is filtered out because it's not a real directory entry. No, it isn't! It is returned. The problem is that it isn't documented. It needs to be described in two places: 1. <cbm.h>, 2. the function reference document. cbm_readdir() returns a result code. When that code is 0, struct cbm_dirent contains valid data in _all_ of its members. But, when that code is 2, the structure still has valid data! The size member has the number of "free" blocks on the disk (IDEDOS gives the sum of the displayed file sizes). [CBM-Command uses that cbm_readdir() feature.] P.S., it's the /* Size in 254B blocks */, not 256. ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Thu Dec 2 16:35:44 2010
This archive was generated by hypermail 2.1.8 : 2010-12-02 16:35:47 CET