Beispiel #1
0
//prints the stacks on the screen
void printStacks(){
	int j;
	emptyArrays();
	filla(headA); //first convert eack stack into its
	fillb(headB); //corresponding array
	fillc(headC);
	for(j=0;j<10;j++){ //then use the for loop to print the values in the arrays
		disp(a[j]);
		disp(b[j]);
		disp(c[j]);
		printf("\n");
    }
    printf("*************\t\t*************\t\t*************\nStack A\t\t\tStack B\t\t\tStack C\n");
}
Beispiel #2
0
void	recursive(char *path, int *state, int n)
{
	struct dirent	*dir;
	DIR				*yolo;
	t_ls			*a;

	pathnames(path, state, n);
	if (!(yolo = opendir(path)))
	{
		ft_putstr("./ft_ls: ");
		perror(path);
	}
	else
	{
		a = NULL;
		while ((dir = readdir(yolo)))
			a = filla(state, a, path, dir);
		closedir(yolo);
		a = sorta(a, state);
		print(a, state, path, findmax(a, path, state));
		recursive2(a, state, path);
	}
}