SCCS-vsn: usr.bin/window/tth19.c 3.7
SCCS-vsn: usr.bin/window/ttgeneric.c 3.9
-static char *sccsid = "@(#)ttgeneric.c 3.8 83/08/17";
+static char *sccsid = "@(#)ttgeneric.c 3.9 83/08/17";
gen_putc(c)
register char c;
{
gen_putc(c)
register char c;
{
+ if (gen_AM && gen_row == gen_LI - 1 && gen_col + 1 >= gen_CO)
+ return;
if (gen_insert) {
if (gen_IC)
tt_tputs(gen_IC, gen_CO - gen_col);
if (gen_insert) {
if (gen_IC)
tt_tputs(gen_IC, gen_CO - gen_col);
tt_tputs(gen_IP, gen_CO - gen_col);
} else
putchar(c);
tt_tputs(gen_IP, gen_CO - gen_col);
} else
putchar(c);
+ if (++gen_col >= gen_CO)
+ if (gen_AM) {
+ gen_col = 0;
+ gen_row++;
+ } else
+ gen_col--;
}
gen_write(start, end)
register char *start, *end;
{
}
gen_write(start, end)
register char *start, *end;
{
+ if (gen_AM && gen_row == gen_LI - 1
+ && gen_col + (end - start + 1) >= gen_CO)
+ end--;
if (gen_insert) {
while (start <= end) {
if (gen_IC)
if (gen_insert) {
while (start <= end) {
if (gen_IC)
while (start <= end)
putchar(*start++);
}
while (start <= end)
putchar(*start++);
}
+ if (gen_col >= gen_CO)
+ if (gen_AM) {
+ gen_col = 0;
+ gen_row++;
+ } else
+ gen_col--;
}
gen_blank(n)
register n;
{
}
gen_blank(n)
register n;
{
+ if (gen_AM && gen_row == gen_LI - 1 && gen_col + n >= gen_CO)
+ n--;
if (n <= 0)
return;
if (gen_insert) {
if (n <= 0)
return;
if (gen_insert) {
while (--n >= 0)
putchar(' ');
}
while (--n >= 0)
putchar(' ');
}
+ if (gen_col >= gen_CO)
+ if (gen_AM) {
+ gen_col = 0;
+ gen_row++;
+ } else
+ gen_col--;
if (gen_CL)
tt.tt_clear = gen_clear;
tt.tt_ncol = gen_CO;
if (gen_CL)
tt.tt_clear = gen_clear;
tt.tt_ncol = gen_CO;
- if (gen_AM)
- tt.tt_ncol--;
tt.tt_nrow = gen_LI;
tt.tt_init = gen_init;
tt.tt_end = gen_end;
tt.tt_nrow = gen_LI;
tt.tt_init = gen_init;
tt.tt_end = gen_end;
-static char *sccsid = "@(#)tth19.c 3.6 83/08/17";
+static char *sccsid = "@(#)tth19.c 3.7 83/08/17";
}
if (h19_insert)
ICPAD();
}
if (h19_insert)
ICPAD();
+ if (++h19_col >= 80)
+ h19_col = 79;
+ if (h19_col >= 80)
+ h19_col = 79;
while (--n >= 0)
putchar(' ');
}
while (--n >= 0)
putchar(' ');
}
+ if (h19_col >= 80)
+ h19_col = 79;