wvtest_filecountprefix.cc

00001 #include "wvtest_filecountprefix.h"
00002 #include "wvdiriter.h"
00003 #include "wvtest.h"
00004 #include <string.h>
00005 
00006 #define SLIP_COUNT 500
00007 
00008 int wvtest_file_count_prefix(WvStringParm dirname, WvStringParm prefix)
00009 {
00010     WvDirIter di(dirname, false);
00011     int len = strlen(prefix);
00012     int count = 0;
00013 
00014     int i = 0;
00015 
00016     for (di.rewind(); di.next(); ) {
00017         if (strncmp(prefix, di->name, len) == 0) {
00018             count++;
00019         }
00020         if (++i % SLIP_COUNT == 0)
00021         {
00022             i = 0;
00023             WVPASS(".");
00024         }
00025     }
00026     return count;
00027 }
00028 

Generated on Thu May 25 21:51:04 2006 for WvStreams by  doxygen 1.4.6