Lines Matching +full:multi +full:- +full:attr
4 /*-
38 /* refresh.c -- refresh the current set of lines on the screen */
86 static int fd = -1; in reprintf()
94 if (fd == -1) in reprintf()
130 if (litlen + addlitlen + len + 1 + (LIT_FACTOR - 1) > litalloc) { in MakeLiteral()
133 while (len + addlitlen + 1 + (LIT_FACTOR - 1) > add) in MakeLiteral()
163 Char c, attr; in Draw() local
166 if (!drawPrompt) { /* draw command-line */ in Draw()
167 attr = 0; in Draw()
177 attr = (*cp & ATTRIBUTES); in Draw()
183 attr = 0; in Draw()
187 attr = 0; in Draw()
192 attr = *cp & ~CHAR; in Draw()
208 Vdraw('^' | attr, 1); in Draw()
210 Vdraw('?' | attr, 1); in Draw()
213 /* uncontrolify it; works only for iso8859-1 like sets */ in Draw()
214 Vdraw(c | 0100 | attr, 1); in Draw()
216 Vdraw(_toebcdic[_toascii[c]|0100] | attr, 1); in Draw()
221 Vdraw('\\' | attr, 1); in Draw()
222 Vdraw((((c >> 6) & 7) + '0') | attr, 1); in Draw()
223 Vdraw((((c >> 3) & 7) + '0') | attr, 1); in Draw()
224 Vdraw(((c & 7) + '0') | attr, 1); in Draw()
233 for (i = 16 + 4 * (-w-5); i >= 0; i -= 4) in Draw()
234 Vdraw("0123456789ABCDEF"[(c >> i) & 15] | attr, 1); in Draw()
240 lh--; in Draw()
242 lv--; in Draw()
245 lh = Strlen(Vdisplay[lv]) - 1; in Draw()
251 Vdraw('\\' | attr, 1); in Draw()
252 Vdraw((((c >> 6) & 7) + '0') | attr, 1); in Draw()
253 Vdraw((((c >> 3) & 7) + '0') | attr, 1); in Draw()
254 Vdraw(((c & 7) + '0') | attr, 1); in Draw()
277 /* Hopefully this is what all the terminals do with multi-column characters in Vdraw()
284 while (--width > 0) in Vdraw()
319 Vdraw(MakeLiteral(litstart, cp + 1 - litstart, 0), w); in RefreshPromptpart()
338 * line, then goes line-by-line changing the real image to the new
339 * virtual image. The routine to re-draw a line can be replaced
361 GettingInput = 0; /* avoid re-entrance via SIGWINCH */ in Refresh()
374 cur_h = -1; /* set flag in case I'm not set */ in Refresh()
378 if (cp >= Cursor && cur_h == -1) { in Refresh()
386 if (cur_h == -1) { /* if I haven't been set yet, I'm at the end */ in Refresh()
391 rhdiff = TermH - vcursor_h - rprompt_h; in Refresh()
394 * have a right-hand side prompt that will fit on in Refresh()
398 while (--rhdiff > 0) /* pad out with spaces */ in Refresh()
486 if (num > dlen - dat) in str_insert()
487 num = dlen - dat; in str_insert()
497 b = d + dlen - 1; in str_insert()
498 a = b - num; in str_insert()
500 *b-- = *a--; in str_insert()
510 for (a = d + dat; (a < d + dlen) && (num > 0); num--) in str_insert()
555 while (n-- && *b) in str_cp()
567 old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as
611 if (o[-1] != ' ') in update_line()
613 o--; in update_line()
624 if (n[-1] != ' ') in update_line()
626 n--; in update_line()
645 while ((o > ofd) && (n > nfd) && (*--o == *--n)) in update_line()
678 if (((nse - nsb) < (p - n)) && (2 * (p - n) > n - nfd)) { in update_line()
700 if (((ose - osb) < (p - o)) && (2 * (p - o) > o - ofd)) { in update_line()
711 * If `last same' is before `same end' re-adjust in update_line()
723 if ((oe - ols) < MIN_END_KEEP) { in update_line()
737 fx = (int) ((nsb - nfd) - (osb - ofd)); in update_line()
742 sx = (int) ((nls - nse) - (ols - ose)); in update_line()
755 if ((ols - ofd) < (nls - nfd)) { in update_line()
771 if ((ols - ofd) > (nls - nfd)) { in update_line()
783 if ((ose - osb) < MIN_END_KEEP) { in update_line()
793 fx = (int) ((nsb - nfd) - (osb - ofd)); in update_line()
794 sx = (int) ((nls - nse) - (ols - ose)); in update_line()
799 ofd - old, osb - old, ose - old, ols - old, oe - old); in update_line()
801 nfd - new, nsb - new, nse - new, nls - new, ne - new); in update_line()
802 reprintf("xxx-xxx:\"00000000001111111111222222222233333333334\"\r\n"); in update_line()
803 reprintf("xxx-xxx:\"01234567890123456789012345678901234567890\"\r\n"); in update_line()
804 dprintstr("old- oe", old, oe); in update_line()
805 dprintstr("new- ne", new, ne); in update_line()
806 dprintstr("old-ofd", old, ofd); in update_line()
807 dprintstr("new-nfd", new, nfd); in update_line()
808 dprintstr("ofd-osb", ofd, osb); in update_line()
809 dprintstr("nfd-nsb", nfd, nsb); in update_line()
810 dprintstr("osb-ose", osb, ose); in update_line()
811 dprintstr("nsb-nse", nsb, nse); in update_line()
812 dprintstr("ose-ols", ose, ols); in update_line()
813 dprintstr("nse-nls", nse, nls); in update_line()
814 dprintstr("ols- oe", ols, oe); in update_line()
815 dprintstr("nls- ne", nls, ne); in update_line()
830 * eddie> Oh, my fredded gruntle-buggy is to me, as foo var lurgid as in update_line()
831 * eddie> Oh, my fredded quiux buggy is to me, as gruntle-lurgid as in update_line()
845 * amount ((nsb-nfd) - (osb-ofd)) won't push the last useful character in update_line()
847 * (TermH - 1) else we do the deletes first so that we keep everything we in update_line()
864 if ((nsb != nfd) && fx > 0 && ((p - old) + fx < TermH)) { in update_line()
866 reprintf("first diff insert at %d...\r\n", nfd - new); in update_line()
871 MoveToChar(nfd - new); in update_line()
888 str_insert(old, (int) (ofd - old), TermH, nfd, fx); in update_line()
891 * write (nsb-nfd) - fx chars of new starting at (nfd + fx) in update_line()
893 so_write(nfd + fx, (nsb - nfd) - fx); in update_line()
894 str_cp(ofd + fx, nfd + fx, (int) ((nsb - nfd) - fx)); in update_line()
900 so_write(nfd, (nsb - nfd)); in update_line()
901 str_cp(ofd, nfd, (int) (nsb - nfd)); in update_line()
910 reprintf("first diff delete at %d...\r\n", ofd - old); in update_line()
915 MoveToChar(ofd - old); in update_line()
932 DeleteChars(-fx); in update_line()
933 str_delete(old, (int) (ofd - old), TermH, -fx); in update_line()
936 * write (nsb-nfd) chars of new starting at nfd in update_line()
938 so_write(nfd, (nsb - nfd)); in update_line()
939 str_cp(ofd, nfd, (int) (nsb - nfd)); in update_line()
947 * write (nsb-nfd) chars of new starting at nfd in update_line()
949 so_write(nfd, (nsb - nfd)); in update_line()
951 reprintf("cleareol %d\n", (oe - old) - (ne - new)); in update_line()
954 ClearEOL((oe - old) - (ne - new)); in update_line()
959 ClearEOL(TermH - CursorH); in update_line()
972 reprintf("second diff delete at %d...\r\n", (ose - old) + fx); in update_line()
978 * fx is the number of characters inserted (+) or deleted (-) in update_line()
981 MoveToChar((ose - old) + fx); in update_line()
997 DeleteChars(-sx); in update_line()
1001 * write (nls-nse) chars of new starting at nse in update_line()
1003 so_write(nse, (nls - nse)); in update_line()
1006 int olen = (int) (oe - old + fx); in update_line()
1012 so_write(nse, (nls - nse)); in update_line()
1014 reprintf("cleareol %d\n", olen - (ne - new)); in update_line()
1017 ClearEOL(olen - (ne - new)); in update_line()
1022 ClearEOL(TermH - CursorH); in update_line()
1030 if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) { in update_line()
1032 reprintf("late first diff insert at %d...\r\n", nfd - new); in update_line()
1035 MoveToChar(nfd - new); in update_line()
1048 fx = (int) ((nsb - nfd) - (osb - ofd)); in update_line()
1058 str_insert(old, (int) (ofd - old), TermH, nfd, fx); in update_line()
1062 * write (nsb-nfd) - fx chars of new starting at (nfd + fx) in update_line()
1064 so_write(nfd + fx, (nsb - nfd) - fx); in update_line()
1065 str_cp(ofd + fx, nfd + fx, (int) ((nsb - nfd) - fx)); in update_line()
1071 so_write(nfd, (nsb - nfd)); in update_line()
1072 str_cp(ofd, nfd, (int) (nsb - nfd)); in update_line()
1081 reprintf("second diff insert at %d...\r\n", nse - new); in update_line()
1083 MoveToChar(nse - new); in update_line()
1098 * write (nls-nse) - sx chars of new starting at (nse + sx) in update_line()
1100 so_write(nse + sx, (nls - nse) - sx); in update_line()
1106 so_write(nse, (nls - nse)); in update_line()
1109 * No need to do a clear-to-end here because we were doing in update_line()
1181 h -= th; in RefCursor()
1213 h -= th; in RefCursor()
1243 while (--width > 0) in PutPlusOne()
1274 if (rprompt_h != 0 && (TermH - CursorH - rprompt_h < 3)) { in RefPlusOne()
1278 cp = Cursor - l; in RefPlusOne()
1289 /* uncontrolify it; works only for iso8859-1 like sets */ in RefPlusOne()
1345 for (i = OldvcV; i >= 0; i--) { /* for each line on the screen */ in ClearLines()