Lines Matching refs:ofd
504 Char *ofd, *ols, *oe, *nfd, *nls, *ne;
514 ofd = o;
526 while (ofd < o) {
549 if (*ofd == '\0' && *nfd == '\0') {
556 while ((o > ofd) && (n > nfd) && (*--o == *--n))
570 * case 1: insert: scan from nfd to nls looking for *ofd
572 if (*ofd) {
573 for (c = *ofd, n = nfd; n < nls; n++) {
575 for (o = ofd, p = n;
587 osb = ofd;
594 * case 2: delete: scan from ofd to ols looking for *nfd
597 for (c = *nfd, o = ofd; o < ols; o++) {
608 (2 * (p - o) > o - ofd)) {
634 fx = (int)((nsb - nfd) - (osb - ofd));
652 if ((ols - ofd) < (nls - nfd)) {
668 if ((ols - ofd) > (nls - nfd)) {
688 fx = (int)((nsb - nfd) - (osb - ofd));
692 ELRE_DEBUG(1, (__F, "ofd %d, osb %d, ose %d, ols %d, oe %d\n",
693 ofd - old, osb - old, ose - old, ols - old, oe - old));
703 re_printstr(el, "old-ofd", old, ofd);
705 re_printstr(el, "ofd-osb", ofd, osb);
725 * /old /ofd /osb /ose /ols /oe
733 * nsb, and the chars between ofd and osb, and is thus the number of
742 * net amount ((nsb-nfd) - (osb-ofd)) won't push the last useful
785 re_insert(el, old, (int)(ofd - old),
794 re__strncopy(ofd + fx, nfd + fx, len);
799 re__strncopy(ofd, nfd, len);
807 (__F, "first diff delete at %d...\r\n", ofd - old));
811 terminal_move_to_char(el, (int)(ofd - old));
825 re_delete(el, old, (int)(ofd - old),
833 re__strncopy(ofd, nfd, len);
891 if ((nsb != nfd) && (osb - ofd) <= (nsb - nfd) && (fx == 0)) {
906 fx = (int)((nsb - nfd) - (osb - ofd));
914 re_insert(el, old, (int)(ofd - old),
923 re__strncopy(ofd + fx, nfd + fx, len);
928 re__strncopy(ofd, nfd, len);