多孔陶瓷的制备.ppt:请问以下的链表是什么意思?

来源:百度文库 编辑:神马品牌网 时间:2024/05/04 17:55:49
/* 构造链表 */
struct node *makelist(char *fname)
{
FILE *fp;
struct student s;
struct node *p,*u,*v,*h;
int i;
if((fp=fopen(fname,"r"))==NULL)
{
printf("Can't open file %s.\n",fname);
return NULL;
}
h=NULL;
p=(struct node *)malloc(sizeof(struct node));
while(readrecord(fp,(struct record *)p)!=0)
{
v=h;
while(v&&p->total<=v->total)
{
u=v;
v=v->next;
}
if(v==h)
h=p;
else
u->next=p;
p->next=v;
p=(struct node *)malloc(sizeof(struct node));
}
free(p);
fclose(fp);
return h;
}