168  4.  ++-   

92 {

93   char *Directory;

94   Directory = static_cast<char *>(X);

95   depthFirstTraversal(Directory) ;

96   re turn(NULL);

97

98 }

 4.6    ^"",    -
  .

//. 4.6

1 void *keySearch(void *X)

2  {

3   string Temp, Filename;

4   less<string> Comp;

5

6   while(!Key?ile.eo?() && Keyfile.good())

7      {

8       Keyfile  Temp;

9       iff!Keyfile.eof()){

10         Keywords.insert(Temp) ;

11      }

12   }

13   Keyfile.close() ;

14

15   while(TextFiles.empty())

16   { }

17

18   while(!TextFiles.empty )

19   {

20      pthread_mutex_lock(&QueueMutex) ;

21      Filename = TextFiles.front();

22      TextFiles.pop ;

23      pthread_mutex_unlock(&QueueMutex) ;

24      Infile.open(Filename.c_str()) ;

2 5      SearchWords . erase (SearchWords . begin () ,
2 6                        SearchWords.end()) ;

27      while(!Infile.eo?() && Infile.good())

28      {

29         Infile  Temp;

30         SearchWords . insert (Temp) ;

31      }

32

33      Infile.close ;

34      i f(includes(SearchWords.begin(),SearchWords.end (),
Keywords.begin(),Keywords.end(),Comp)){

35          Outfile  Filename  endl;

36          pthread_mutex_lock(&CountMutex) ;

37          FileCount--;

38          pthread_mutex_unlock(&CountMutex) ;

39          FoundCount++;

40      }

41   }

42   return(NULL) ;

43

44 }