Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!wuarchive!decwrl!granite.pa.dec.com!mwm From: mwm@raven.pa.dec.com (Mike (With friends like these, who needs hallucinations) Meyer) Newsgroups: comp.sys.amiga.tech Subject: Walking a file tree (Was: Memory allocation) Message-ID: Date: 2 Jan 90 23:14:58 GMT References: <2617@jolnet.ORPK.IL.US> Sender: news@decwrl.dec.com Organization: Missionaria Phonibalonica Lines: 22 In-reply-to: caw@jolnet.ORPK.IL.US's message of 31 Dec 89 01:03:55 GMT >> If you can get around using a recursive function then by all means so >> so. I had a routine that scanned a dir and did various things that >> needed a stack of 30k to work with my HD (I have some rather sever >> levels of directory depth in some places...). I re-wrote the routine >> inside a big for(;;) {} loop adding a couple of variables to make it >> `think' it was recursive and now the same program will work just dandy >> with a 4000 byte stack (the AmigaDOS default). I wrote a generic non-recursive routine for walking file trees a while back. It's modelled after the ftw & ftwalk routines from Unix. Last time I looked, it could be ftp'ed off of ucbvax.berkeley.edu, along with a command-line interface modelled after ftw from v8, complete with ARexx interface and sample scripts. There are also some timings of a beta version against programs with hand-coded file tree walking routines. The file was pub/amiga/treewalk.tar.Z.