>> If you're typecasting a pointer, wouldn't you put it like this: (*list)
No, whenever pointers are involved, the statement/expression/declaration/whatever is always read from right to left.
Here are a few examples of how the code is read.
Code:
int *i_ptr; //i_ptr is a pointer to an int
float *f_ptr; //f_ptr is a pointer to a float
char **c_pptr; //c_pptr is a pointer to a pointer to a char
void *function(); //function returns a pointer to void
So, to cast malloc(), the indirection operator, *, is placed after the type. So in this case :
(list*)malloc(sizeof(struct list));
malloc() would be casted to a pointer to list.