aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-10-05 20:23:19 -0500
committerMatt Strapp <strap012@umn.edu>2020-10-05 20:23:19 -0500
commit582397f8a11e02ffcb21bf7c9e32084ea6c8f38c (patch)
tree6e5e14d7aaccfb846565fbe2c04894c620907b33
parentEdit reducer (#6) (diff)
parentComments (diff)
downloadcsci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.tar
csci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.tar.gz
csci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.tar.bz2
csci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.tar.lz
csci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.tar.xz
csci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.tar.zst
csci4061-582397f8a11e02ffcb21bf7c9e32084ea6c8f38c.zip
Merge branch 'master' of github.umn.edu:STRAP012/csci4061Projects
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);