Example #1
0
static void	post_process(t_context *context, t_list *tokens)
{
	t_token	*token;

	while (tokens)
	{
		token = (t_token *)tokens->content;
		if (token->type == VAR)
			fetch_variable(context, token);
		else if (token->type == COMMAND)
			fetch_command(context, token);
		tokens = tokens->next;
	}
}
Example #2
0
int main(int argc , char *argv[]){
	printf("Welcome to use Kevin - mini shell!\n");
	printf("Type in \"help\" to learn more , Type in \"exit\" to exit mini shell \n\n");
	// Initialize the valid file table
	int i;
	memset(current_disk,'\0',sizeof(current_disk));
	strcpy(current_disk,"NULL");
	for(i=0;i<128;i++){
		validFile[i].file_id = -1;
		validFile[i].name = "";
		validFile[i].disk = "";
	}
	// implement the mini shell , to ask user to do the operation
	fetch_command();
	return 0;
}