aboutsummaryrefslogtreecommitdiffstats
path: root/P1/src
diff options
context:
space:
mode:
authorAndrea Smith <smit9523@umn.edu>2020-10-05 20:17:16 -0500
committerAndrea Smith <smit9523@umn.edu>2020-10-05 20:17:16 -0500
commit4551dd082989f6a3634f2ec52a3488ffd815255f (patch)
tree8f7fdc51099c6e491bacf02d1c7e7b47e9ef9342 /P1/src
parentGet rid of comment (diff)
downloadcsci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.tar
csci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.tar.gz
csci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.tar.bz2
csci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.tar.lz
csci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.tar.xz
csci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.tar.zst
csci4061-4551dd082989f6a3634f2ec52a3488ffd815255f.zip
Comments
Diffstat (limited to '')
-rw-r--r--P1/src/mapper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/P1/src/mapper.c b/P1/src/mapper.c
index 466fd0f..3e50170 100644
--- a/P1/src/mapper.c
+++ b/P1/src/mapper.c
@@ -109,11 +109,13 @@ void writeIntermediateDS() {
// Get string of 1's associated with the word
char ones[BUFFSIZE]= "";
valueList *tempNode2 = tempNode -> value;
+
+ // Kinda jank way to deal with collecting the word's corresponding 1's
while(tempNode2 != NULL) {
strcat(ones, "1 ");
tempNode2 = tempNode2 -> next;
}
- // Shove word and ones in a file named word.txt
+ // Put words and their corresponding 1's in a file named word.txt
char filename[BUFFSIZE] = "";
//sprintf(filename, "output/MapOut/Map_%d/%s.txt", mapperID, tempNode -> key);
sprintf(filename, "%s/%s.txt", mapOutDir, tempNode -> key);