>Wow, I'm completely lost on that.
Now now, let's skip the flattery.
>Could you break it down explaining what each line does, please.
Okay, let's start with line = "C 14st 80kg 10".
>next = strcspn ( line, " \t" );
If you print &p[next], you'll get " 14st 80kg 10". strcspn essentially finds the first occurrence of any of the characters in the second argument (ie. a tab or a space) and returns the index of that occurrence. In this case, next has a value of 1.
>strncat ( user, line, next );
strcat appends the first argument with N characters from the second argument, where N is specified by the third argument. It copies 1 character from "C 14st 80kg 10" into user, so user becomes "C".
>weighta = strtol ( line + next, &nextp, 0 );
strtol skips whitespace and tries to convert the next non-whitespace characters into an integer. It stores the point where it can't convert anymore in the second argument, and uses the third argument as a radix. Put simply, this guy will store 14 in weighta because after whitespace the string is "14st 80kg 10". It's that way because I added next to line, thus shifting line forward by one character. nextp points to the string "st 80kg 10" because the 's' was the first non-digit character that strtol found.
The rest of the lines just repeat that process until there's nothing left to read.