aboutsummaryrefslogtreecommitdiffstats
path: root/P1
diff options
context:
space:
mode:
authorAndrea Smith <smit9523@umn.edu>2020-10-04 14:16:32 -0500
committerAndrea Smith <smit9523@umn.edu>2020-10-04 14:16:32 -0500
commitf195f950d9d0e450367956b5b389d78bdae2a168 (patch)
tree5edbf3d1aa37374336495a68c2a6a2e8965ef610 /P1
parentChange mapper (diff)
downloadcsci4061-f195f950d9d0e450367956b5b389d78bdae2a168.tar
csci4061-f195f950d9d0e450367956b5b389d78bdae2a168.tar.gz
csci4061-f195f950d9d0e450367956b5b389d78bdae2a168.tar.bz2
csci4061-f195f950d9d0e450367956b5b389d78bdae2a168.tar.lz
csci4061-f195f950d9d0e450367956b5b389d78bdae2a168.tar.xz
csci4061-f195f950d9d0e450367956b5b389d78bdae2a168.tar.zst
csci4061-f195f950d9d0e450367956b5b389d78bdae2a168.zip
Add filestream stuff to mapper.c
Diffstat (limited to 'P1')
-rw-r--r--P1/src/mapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/P1/src/mapper.c b/P1/src/mapper.c
index 21818a8..4a1bf1b 100644
--- a/P1/src/mapper.c
+++ b/P1/src/mapper.c
@@ -115,8 +115,9 @@ void writeIntermediateDS() {
char filename[100];
sprintf(filename, "output/MapOut/Map_%d/%s.txt", mapperID, tempNode -> key);
FILE* fptr = fopen(filename, "w");
- tempNode = tempNode -> next;
+ fprintf(fptr, "%s %s", tempNode -> key, ones);
fclose(fptr);
+ tempNode = tempNode -> next;
}
// freeInterDS(&DS);
}