aboutsummaryrefslogtreecommitdiffstats
path: root/P1/src
diff options
context:
space:
mode:
Diffstat (limited to 'P1/src')
-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);