/[ascend]/trunk/base/generic/utilities/error.c
ViewVC logotype

Diff of /trunk/base/generic/utilities/error.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 932 by johnpye, Thu Nov 23 13:23:33 2006 UTC revision 933 by johnpye, Thu Nov 23 22:28:00 2006 UTC
# Line 167  int error_reporter_tree_end(){ Line 167  int error_reporter_tree_end(){
167  }    }  
168    
169  static void error_reporter_tree_free(error_reporter_tree_t *t){  static void error_reporter_tree_free(error_reporter_tree_t *t){
     CONSOLE_DEBUG("FREEING TREE AT %p",t);  
170      if(t->head){      if(t->head){
         CONSOLE_DEBUG("FREEING SUBTREE...");  
171          error_reporter_tree_free(t->head);          error_reporter_tree_free(t->head);
172      }      }
173      if(t->next){      if(t->next){
         CONSOLE_DEBUG("FREEING NEXT...");  
174          error_reporter_tree_free(t->next);          error_reporter_tree_free(t->next);
175      }      }
176      if(t->err)ASC_FREE(t->err);      if(t->err)ASC_FREE(t->err);
     CONSOLE_DEBUG("DONE WITH  %p",t);  
177      ASC_FREE(t);      ASC_FREE(t);
178  }  }
179    
# Line 189  void error_reporter_tree_clear(){ Line 185  void error_reporter_tree_clear(){
185          return;          return;
186      }      }
187      if(TREECURRENT->parent){      if(TREECURRENT->parent){
         CONSOLE_DEBUG("MOVING UP TO PARENT");  
188          t = TREECURRENT->parent;          t = TREECURRENT->parent;
189      }else{      }else{
         CONSOLE_DEBUG("REACHED TOP LEVEL");  
190          TREE = NULL;          TREE = NULL;
191          t = NULL;          t = NULL;
192      }      }
193      error_reporter_tree_free(TREECURRENT);      error_reporter_tree_free(TREECURRENT);
194      TREECURRENT = t;      TREECURRENT = t;
     CONSOLE_DEBUG("SET TREECURRENT TO %p",TREECURRENT);  
195  }  }
196    
197  static int error_reporter_tree_match_sev(error_reporter_tree_t *t, unsigned match){  static int error_reporter_tree_match_sev(error_reporter_tree_t *t, unsigned match){
# Line 223  static int error_reporter_tree_match_sev Line 216  static int error_reporter_tree_match_sev
216      @return 1 if errors found      @return 1 if errors found
217  */  */
218  int error_reporter_tree_has_error(){  int error_reporter_tree_has_error(){
219        int res;
220      if(TREECURRENT){      if(TREECURRENT){
221          return error_reporter_tree_match_sev(TREECURRENT,ASC_ERR_ERR);          res = error_reporter_tree_match_sev(TREECURRENT,ASC_ERR_ERR);
222            if(res)CONSOLE_DEBUG("ERROR(S) FOUND IN TREECURRENT %p",TREECURRENT);
223            return res;
224      }else{      }else{
225          CONSOLE_DEBUG("NO TREE FOUND");          CONSOLE_DEBUG("NO TREE FOUND");
226          return 0;          return 0;

Legend:
Removed from v.932  
changed lines
  Added in v.933

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22