/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/ /* treenode APL2 V1.0.0 ************************************************ * Called by assign and treesrch. * * Searches a list of binary trees for a particular node. * ***********************************************************************/ #define INCLUDES TREE #include "includes.h" Avlnode treenode(s) char *s; /* Key of node to find. */ { Avlsrch; extern Treelist treehdr; Treelist symp; Avlnode p; for(symp = (Treelist ) treehdr;;symp = symp->treenext) { p = avlsrch(symp->avlhdr,s); /* look for name */ if (p != NULL) break; if (symp->treenext == NULL) break; /* not found */ } return(p); }