There seems to be a typo in the last line of the code. It should be "return head;" instead of "return headl;". Here is the corrected code:

plist creat(void)
{
	plist head = NULL;
	list *p1, *p2;
	char a;

	a = getchar();
	while(a != '\n')
	{
		p1 = (plist)malloc(sizeof(list));
		p1 -> data = a;
		if (head == NULL)
		{
			head = p1;
		}
		else
		{
			p2 -> next = p1;
		}
		p2 = p1;
		a = getchar();
	}
	p2 -> next = NULL;
	return head;
}
plist creatvoid	plist head = NULL;	list p1 p2;	char a;	a = getchar;	whilea != n			p1 = plistmallocsizeoflist;		p1 - data = a;		if head == NULL					head = p1;				else					p2 - next = p1;				p2 = p1;		a