Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

dep-summary.cc

Go to the documentation of this file.
00001 /***********************************************************************
00002  *  $Id: dep-summary.cc,v 1.2 2003/09/29 22:26:28 rhatcher Exp $
00003  *
00004  *  A simple filter for the log file produced by dep.pl. This strips
00005  *  off things that are not related to the warnings about circular
00006  *  dependencies.
00007  *
00008  *  messier@huhepl.harvard.edu 
00009  **********************************************************************/
00010 #include <stdio.h>
00011 #include <string.h>
00012 #include <stdlib.h>
00013 int main(int argc, char **argv) {
00014   char buff[1024];
00015   FILE *fp;
00016   if ( argc < 2 ) {
00017     fprintf(stderr, "No filename provided.\n");
00018     fprintf(stderr, "Usage: %s [filename]\n", argv[0]);
00019     exit(1);
00020   }    
00021   if (!(fp = fopen(argv[1], "r"))) {
00022     fprintf(stderr, "Can not open file %s for read.\n", argv[1]);
00023     fprintf(stderr, "Usage: %s [filename]\n", argv[0]);
00024     exit(1);
00025   }
00026   while (fgets(buff, 1024, fp)) {
00027     /* Flag the things I don't want reported... */
00028     if (strstr(buff, "Error") || 
00029         strstr(buff, "ERROR") || 
00030         strstr(buff, "error") ||
00031         strstr(buff, "No such")) {
00032       continue;
00033     }
00034     else {
00035       /* Print the rest */
00036       printf("%s",buff);
00037     }
00038   }
00039   fclose(fp);
00040   return 0;
00041 }

Generated on Mon Feb 15 11:06:37 2010 for loon by  doxygen 1.3.9.1