Commit 62faf159 authored by Matthew Burket's avatar Matthew Burket
Browse files

Fix compile issues from the last commit

parent 4758846b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,5 +3,5 @@ project(coms352_shell C)

set(CMAKE_C_STANDARD 11)

add_executable(coms352_shell main.c tokenize.c tokenize.h file_operations.c file_operations.h)
add_executable(coms352_shell main.c tokenize.c tokenize.h)
target_link_libraries(coms352_shell)
+8 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@


#include "tokenize.h"
#include "file_operations.h"

#define TRUE 0
#define READ 0
@@ -44,6 +43,14 @@ int main() {
        if (doMore != NULL) {
            readBuff = strtok(readBuff, "|");
        }
        char commands[10][BUFFSIZE];
        char *doMany = strchr(readBuff, ';');
        if (doMany != NULL) {

        } else {

        }

        char **tokens = malloc(sizeof(char) * 5000);
        int numTokens = tokenize(readBuff, tokens);
        char *lastToken = tokens[numTokens - 2];
+3 −0
Original line number Diff line number Diff line
@@ -5,5 +5,8 @@
#ifndef COMS352_SHELL_TOKENIZE_H
#define COMS352_SHELL_TOKENIZE_H
#include <string.h>

#define BUFFSIZE (sizeof(char) * 5000)

int tokenize(char *string, char **output);
#endif //COMS352_SHELL_TOKENIZE_H