[net.sources] jove/MSDOS bug fix

km@cadre.ARPA (Ken Mitchum) (09/04/85)

Jove bug: c-mode does not get set on ".h" files and reading in a new file
sets the mode correctly but does not update the mode line.

Solution: replace setcmode() in io.c with the following:

setcmode()
{
	char *p;
	int	len = curbuf->b_fname ? strlen(curbuf->b_fname) : 0;
	
	if (len < 2)
		return;
	p = &curbuf->b_fname[len -2];
	if(strcmp(p,".h") && strcmp(p,".H") && strcmp(p,".c") && strcmp(p,".C"))
		return;
	OnFlag(globflags, CMODE);
	OnFlag(globflags, MATCHING);
	setfuncs(globflags);
}