/*
	perform a partial massage of Xenix lint output into the
	format used by errorin.
*/
char	ls[128];
char	fn[128];
char	ws[128];
int		xp[16];
int		nx;
int		cx;
int		co;
{
	co = 1;
	setofn("error.2");
	while(co && fgetls(ls,128))	{
		strcpy(fn,ls);
		puts(fn);
		if(strlen(ls) <= 0)	continue;
			if(ls[0] == '=')	{
				print("CANNOT PROCESS REMAINING STATEMENTS\n");
				co = 0;
				continue;
				}
		while(fgetls(ls,128) && strlen(ls) >= 1)	{
			if(ls[0] == ' ' || ls[0] == '\t')	{
				strcnd(ls);
				nx = splitc(xp,16,ls,' ');
				for(cx = 0; cx < nx; cx += 1)	{
					printf("%s%s: %s\n",fn,xp[cx],ws);
					}
				}
			else
			if(strncmp(ls,"warning:",8) == 0)	{
				strcpy(ws,ls);
				}
			else
			if(ls[0] == '(')	{
				if(haspat(ls,"_iobuf never"))	{
					/* print("%s\n",ls); */
					continue;
					}
				cx = cindex(ls,')');
				ls[cx] = ':';
				printf("%s%s\n",fn,ls);
				}
			}
		}
	print("output to error.2\n");
	print("run errorin; ex - < error.3;exlp === file(s)\n");
}
