aboutsummaryrefslogtreecommitdiffstats
path: root/P1
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-10-04 14:28:28 -0500
committerMatt Strapp <strap012@umn.edu>2020-10-04 14:28:28 -0500
commit060d45656dfbb3d66e714923eca4b199c4177648 (patch)
treef6ccf4d6db019a840ebe07f08857d45ea71efb1e /P1
parentAdd filestream stuff to mapper.c (diff)
downloadcsci4061-060d45656dfbb3d66e714923eca4b199c4177648.tar
csci4061-060d45656dfbb3d66e714923eca4b199c4177648.tar.gz
csci4061-060d45656dfbb3d66e714923eca4b199c4177648.tar.bz2
csci4061-060d45656dfbb3d66e714923eca4b199c4177648.tar.lz
csci4061-060d45656dfbb3d66e714923eca4b199c4177648.tar.xz
csci4061-060d45656dfbb3d66e714923eca4b199c4177648.tar.zst
csci4061-060d45656dfbb3d66e714923eca4b199c4177648.zip
It's fucked mate, big time
Diffstat (limited to '')
-rw-r--r--P1/src/mapper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/P1/src/mapper.c b/P1/src/mapper.c
index 4a1bf1b..dfb6d22 100644
--- a/P1/src/mapper.c
+++ b/P1/src/mapper.c
@@ -100,15 +100,16 @@ void map(char *chunkData){
// poops the data out into separate .txt files named after the word
void writeIntermediateDS() {
intermediateDS *tempNode = &DS;
- valueList *tempNode2;
+ valueList *tempNode2 = tempNode -> value;
while(tempNode != NULL) {
// Get string of 1's associated with the word
char ones[100];
tempNode2 = tempNode2 -> value;
while(tempNode2 != NULL) {
+ printf("This loop is being run\n");
strcat(ones, "1 ");
- tempNode2 = tempNode -> next;
+ tempNode2 = tempNode2 -> next;
}
// Shove word and ones in a file named word.txt