From 4551dd082989f6a3634f2ec52a3488ffd815255f Mon Sep 17 00:00:00 2001 From: Andrea Smith Date: Mon, 5 Oct 2020 20:17:16 -0500 Subject: Comments --- P1/src/mapper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3