Skip to content
Snippets Groups Projects
Commit dd7096c2 authored by m2-almarri's avatar m2-almarri
Browse files

coding tokenisation began

parent dc6ffd2c
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,20 @@ process_execute (const char *file_name) ...@@ -41,6 +41,20 @@ process_execute (const char *file_name)
/* Create a new thread to execute FILE_NAME. */ /* Create a new thread to execute FILE_NAME. */
tid = thread_create (file_name, PRI_DEFAULT, start_process, fn_copy); tid = thread_create (file_name, PRI_DEFAULT, start_process, fn_copy);
// tokenisation code
char *file_name_extracted; /* this to get echo, exit, halt... commands as file name alone */
char *args1;
char *args2;
char *args3;
char *token;
char *saveptr;
token = strtok_r(user_str, " ", &saveptr);
if (tid == TID_ERROR) if (tid == TID_ERROR)
palloc_free_page (fn_copy); palloc_free_page (fn_copy);
return tid; return tid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment