希望有好人人帮我注释一下,表示很多地方看不懂
// 按英语成绩排序struct stu *sort_english(struct stu *head)
{
struct stu *p;
struct stu *p1;
struct stu *p2;
struct stu *p3;
struct stu h;
struct stu t;
if (head == NULL)
{
return NULL;
}
h.next=head;
p=&h;
while (p->next!=NULL)
{
p=p->next;
}
p=p->next=&t;
while (p!=h.next)
{
p3=&h;
p1=p3->next;
p2=p1->next;
while (p2!=p)
{
if ((p1->s[2] )<(p2->s[2]))
{
p1->next=p2->next;
p2->next=p1;
p3->next=p2;
p3=p2;
p2=p1->next;
}
else
{
p3=p1;
p1=p2;
p2=p2->next;
}
}
p=p1;
}
while (p->next!=&t)
{
p=p->next;
}
p->next=NULL;
return h.next;
}