-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
40 lines (32 loc) · 927 Bytes
/
main.c
File metadata and controls
40 lines (32 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* File: main.c
* Author: Tamaran
*
* Created on 13. Januar 2013, 23:26
*/
#include "ImageReaderProcessor.h"
#include "ComparatorProcessor.h"
#include "FileTreeParser.h"
/*
*
*/
int main(int argc, char** argv) {
Processor* imageReader = ImageReaderProcessor_create();
Processor* comparator = ComparatorProcessor_create();
imageReader->next = comparator;
Processor_addThread(imageReader);
Processor_addThread(comparator);
MyString* start = MyString_create("C:\\Users\\Tamaran\\Downloads");
List* files = FileTreeParser_getAllFiles(start);
ListIterator* it = List_getIterator(files);
void* s;
while((s = ListIterator_next(it)) != NULL)
{
Processor_add(imageReader, s);
}
Processor_dispose(imageReader);
Processor_join(imageReader);
Processor_dispose(comparator);
Processor_join(comparator);
return (EXIT_SUCCESS);
}