From 49508f44d644c055ceaaf0cc590657f35c844524 Mon Sep 17 00:00:00 2001 From: Andrea Smith Date: Wed, 28 Oct 2020 19:30:32 -0500 Subject: sendChunkData brainstorming --- P2/lib/utils.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 687f36e..56bd3cc 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -46,8 +46,19 @@ void sendChunkData(char *inputFile, int nMappers) { // printf("%s\n", message.msgText); /* Go to the end of the chunk, check if final character is a space if character is a space, do nothing - else cut off before that word and put back file */ + else cut off before that word and put back file. + + Maybe copy message.msgText into a new array, do the + backwards iteration, and then replace message.msgText + with the temp array? Or something? */ + // TODO! help + + // int i = 1023; + // while(message.msgText[i] != ' ') { + // message.msgText + // } + message.msgType = map++; //THIS IS DEBUG, NOT ACTUALLY FUNCTIONAL (like at all) msgsnd(msgid, &message, map, 0); -- cgit v1.2.3