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

Fix compile issues from the last commit

parent 4758846b
Pipeline #324 canceled with stage
......@@ -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)
......@@ -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];
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment