Mercurial > vim
comparison src/farsi.c @ 388:f92bb1845823 v7.0101
updated for version 7.0101
author | vimboss |
---|---|
date | Sun, 03 Jul 2005 21:39:27 +0000 |
parents | 3fc0f57ecb91 |
children | afc60a6339a6 |
comparison
equal
deleted
inserted
replaced
387:a509e3ba61f6 | 388:f92bb1845823 |
---|---|
1937 } | 1937 } |
1938 return cmdbuf; | 1938 return cmdbuf; |
1939 } | 1939 } |
1940 | 1940 |
1941 /* | 1941 /* |
1942 * Reverse the characters in the seach path and substitude section accordingly | 1942 * Reverse the characters in the search path and substitute section accordingly |
1943 */ | 1943 */ |
1944 char_u * | 1944 char_u * |
1945 lrF_sub(ibuf) | 1945 lrF_sub(ibuf) |
1946 char_u *ibuf; | 1946 char_u *ibuf; |
1947 { | 1947 { |
1948 char_u *p, *ep; | 1948 char_u *p, *ep; |
1949 int i, cnt; | 1949 int i, cnt; |
1950 | 1950 |
1951 p = ibuf; | 1951 p = ibuf; |
1952 | 1952 |
1953 /* Find the boundry of the search path */ | 1953 /* Find the boundary of the search path */ |
1954 while (((p = vim_strchr(++p, '/')) != NULL) && p[-1] == '\\') | 1954 while (++p, ((p = vim_strchr(p, '/')) != NULL) && p[-1] == '\\') |
1955 ; | 1955 ; |
1956 | 1956 |
1957 if (p == NULL) | 1957 if (p == NULL) |
1958 return ibuf; | 1958 return ibuf; |
1959 | 1959 |
1960 /* Reverse the Farsi characters in the search path. */ | 1960 /* Reverse the Farsi characters in the search path. */ |
1961 lrFswap(ibuf, (int)(p-ibuf)); | 1961 lrFswap(ibuf, (int)(p-ibuf)); |
1962 | 1962 |
1963 /* Now find the boundry of the substitute section */ | 1963 /* Now find the boundary of the substitute section */ |
1964 if ((ep = (char_u *)strrchr((char *)++p, '/')) != NULL) | 1964 if ((ep = (char_u *)strrchr((char *)++p, '/')) != NULL) |
1965 cnt = (int)(ep - p); | 1965 cnt = (int)(ep - p); |
1966 else | 1966 else |
1967 cnt = (int)STRLEN(p); | 1967 cnt = (int)STRLEN(p); |
1968 | 1968 |