[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fasttext bug fix



In article <199501182255.RAA05966@terminator.rs.itd.umich.edu> you write:
>I found that if I tabbed to the end of a line on the fasttext device in
>ST medium resolution, the cursor address was updated wrongly.  This was
>because the calculation used to update the cursor address assumed that
>the cursor would end up on an even x-coordinate.

oh :)  here's the relevant part from vtdev.c (virtual consoles),
somehow the tab bug fix didn't make it back into the kernels
fasttext.c, sorry.

		case '\t':
			if (v->cx <= v->maxx) {
			/* this can't be register for an ANSI compiler */
				union {
					long l;
					short i[2];
				} j;
				j.l = 0;
				j.i[1] = 8 - (v->cx & 7);
				v->cx += j.i[1];
				if (v->cx - v->maxx > 0) {
					j.i[1] -= v->cx - v->maxx;
					v->cx = v->maxx;
					if (v->flags & FWRAP) {
						normal_putch(v, '\n');
						goto col0;
					}
					if (j.i[1] <= 0)
						return;
				}
				v->cursaddr += j.l;
				if ((i = v->planes-1)) {
					if (j.l & 1)
						j.i[1]++;
					do v->cursaddr += j.l;
					while (--i);
				}
			}
			return;
>
>I think there was a problem with high resolution too, but I can't try

 yes it affected all resolutions.

 actually if you want you could also put some of vtdev's new features
back into fasttext i guess...  but unless your extremely short on memory
i'd just build a kernel without /dev/fasttext and use /dev/ttyv* instead.

 :-)
	Juergen