Hi Matthew, > The telldir function has to return a long int which says where we > currently are in reading the directory and these special > subdirectories. The seekdir function has to take that value and turn > it back into a GBPB position in the directory and in the corresponding > subdirectory if we are in the middle of one.
Given the DIR that these functions use is opaque, it seems to me it could store an array of every unique (dir, sub) RISC OS position ever returned by telldir(), with telldir returning the index, and seekdir() plucks the tuple from that index. I don't see anything in the POSIX man page that suggests telldir results have an ordering, merely they can be passed back to seekdir. No clean-up of the list is possible until the whole DIR is scrapped with closedir(), but it's unlikely to be a problem in practice. Cheers, Ralph. _______________________________________________ GCCSDK mailing list gcc@gccsdk.riscos.info Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK