예제 #1
0
파일: n7.c 프로젝트: 99years/plan9
Tchar gettch(void)
{
	extern int c_isalnum;
	Tchar i;
	int j;

	if (TROFF)
		return getch();

	i = getch();
	j = cbits(i);
	if (ismot(i) || fbits(i) != ulfont)
		return(i);
	if (cu) {
		if (trtab[j] == ' ') {
			setcbits(i, '_');
			setfbits(i, FT);	/* default */
		}
		return(i);
	}
	/* should test here for characters that ought to be underlined */
	/* in the old nroff, that was the 200 bit on the width! */
	/* for now, just do letters, digits and certain special chars */
	if (j <= 127) {
		if (!isalnum(j))
			setfbits(i, FT);
	} else {
		if (j < c_isalnum)
			setfbits(i, FT);
	}
	return(i);
}
예제 #2
0
tchar
mkxfunc(int f, int s)
{
	tchar	_t = XFUNC;
	setfbits(_t, f);
	setsbits(_t, s);
	return _t;
}
예제 #3
0
파일: n6.c 프로젝트: n-t-roff/DWB3.3
void n_mchbits(void)
{
	chbits = 0;
	setfbits(chbits, font);
	sps = width(' ' | chbits);
}