-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearch.c.save
More file actions
47 lines (43 loc) · 880 Bytes
/
Search.c.save
File metadata and controls
47 lines (43 loc) · 880 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
40
41
42
43
44
45
46
47
#include<mpi.h>
#include<stdio.h>
#include<
char getcaseless(char in){
char out;
if(out > 64&&out < 91) out = out + 32;
return out;
}
void DataFinder(char* sKey,char* fPath){
FILE *domain;
printf("Got here");
domain = fopen(fPath,'r');
printf("Opened file.");
int length = sizeof(sKey);
printf("Found key length");
int backPointer;
char* stack = "";
for(int i = 0;i < length;i++){
stack += getcaseless(fgetc(domain));
}
printf("%s\n",stack);
fclose(domain);
}
void list(char* sKey){
DIR *dir;
struct dirent *ent;
if ((dir = opendir ("c:\\src\\")) != NULL) {
while ((ent = readdir (dir)) != NULL) {
printf ("%s\n", ent->d_name);
}
closedir (dir);
} else {
return;
}
}
int main(int argc,char** argv){
MPI_Init(NULL, NULL);
char* sKey = argv[1];
printf("%s\n",sKey);
DataFinder(sKey);//,"./data/testrange.txt");
MPI_Finalize();
return 0;
}