Lines Matching defs:ofd
484 char *ofd, *ols, *oe, *nfd, *nls, *ne;
494 ofd = o;
506 while (ofd < o) {
529 if (*ofd == '\0' && *nfd == '\0') {
536 while ((o > ofd) && (n > nfd) && (*--o == *--n))
550 * case 1: insert: scan from nfd to nls looking for *ofd
552 if (*ofd) {
553 for (c = *ofd, n = nfd; n < nls; n++) {
555 for (o = ofd, p = n;
567 osb = ofd;
574 * case 2: delete: scan from ofd to ols looking for *nfd
577 for (c = *nfd, o = ofd; o < ols; o++) {
588 (2 * (p - o) > o - ofd)) {
614 fx = (int)((nsb - nfd) - (osb - ofd));
632 if ((ols - ofd) < (nls - nfd)) {
648 if ((ols - ofd) > (nls - nfd)) {
668 fx = (int)((nsb - nfd) - (osb - ofd));
672 ELRE_DEBUG(1, (__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n",
673 ofd - old, osb - old, ose - old, ols - old, oe - old));
683 re_printstr(el, "old-ofd", old, ofd);
685 re_printstr(el, "ofd-osb", ofd, osb);
705 * /old /ofd /osb /ose /ols /oe
713 * nsb, and the chars between ofd and osb, and is thus the number of
722 * net amount ((nsb-nfd) - (osb-ofd)) won't push the last useful
765 re_insert(el, old, (int)(ofd - old),
774 re__strncopy(ofd + fx, nfd + fx, len);
779 re__strncopy(ofd, nfd, len);
787 (__F, "first diff delete at %d...\r\n", ofd - old));
791 term_move_to_char(el, (int)(ofd - old));
805 re_delete(el, old, (int)(ofd - old),
813 re__strncopy(ofd, nfd, len);
871 if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) {
886 fx = (int)((nsb - nfd) - (osb - ofd));
894 re_insert(el, old, (int)(ofd - old),
903 re__strncopy(ofd + fx, nfd + fx, len);
908 re__strncopy(ofd, nfd, len);