Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!vsi1!wyse!mips!prls!philabs!philmtl!belanger From: belanger@philmtl.philips.ca (Robert Belanger) Newsgroups: comp.sys.amiga.tech Subject: Find program Bug Summary: Find,Bug Keywords: Find,Bug Message-ID: <455@philmtl.philips.ca> Date: 12 Apr 89 23:14:11 GMT References: <2124@pur-phy> Reply-To: belanger@philmtl.philips.ca (Robert Belanger) Followup-To: comp.sys.amiga.tech Distribution: comp.sys.amiga.tech Organization: Philips Electronics Ltd. - St. Laurent P.Q., Canada Lines: 43 I don't know if anybody tried to re-compile the find program that was posted on the net a little while ago. I could compile it but When I ran it it gave me not output :-(, so I looked in the code and found out that if the we are using a AND combination as in >find "" -name #?.c -print That is "find all the files that match #?.c and print them". This would not work because the compile tree is not built properly The tree is built using a register local variable in the procedure compile for node_head, and it initializes it to NULL always. In the compile routine, if the node_head (the wrong one is used here,because there is a global one and a local one (==NULL)) is NULL then the node_head is assigned the operation rather than a AND operation. So instead of building: AND / \ -name #?.c -print It builds: -name #?.c only. So the tree is never scanned down for obvious reason. So how does the original work or am I the only one with this problem. On a side note if you define a global and a local with the same name you should access the local before right? Robert Belanger ============================================================================ Philips Electronics Ltd. Harfang des Neiges: Robert L. Belanger 600 Frederick Philips BlvD. Embleme aviaire du Advanced Development Group St-Laurent, Quebec, CANADA Quebec ECHO project H4M 2S9 (514)-744-8200-2495 Eternity is very long!! E-MAIL belanger@philmtl.philips.ca Especially in the end!!! ============================================================================