home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.064 < prev    next >
Encoding:
Internet Message Format  |  2003-10-13  |  20.7 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.064
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.064
  11. Problem:    resolve() only handles one symbolic link, need to repeat it to
  12.         resolve all of them.  Then need to simplify the file name.
  13. Solution:   Make resolve() resolve all symbolic links and simplify the result.
  14.         Add simplify() to just simplify a file name.  Fix that test49
  15.         doesn't work if /tmp is a symbolic link.  (Servatius Brandt)
  16. Files:        runtime/doc/eval.txt, src/eval.c, src/tag.c,
  17.         src/testdir/test49.vim
  18.  
  19.  
  20. *** ../vim-6.2.063/runtime/doc/eval.txt    Sun Jun  1 14:45:23 2003
  21. --- runtime/doc/eval.txt    Thu Aug  7 19:31:16 2003
  22. ***************
  23. *** 1,4 ****
  24. ! *eval.txt*      For Vim version 6.2.  Last change: 2003 Jun 01
  25.   
  26.   
  27.             VIM REFERENCE MANUAL    by Bram Moolenaar
  28. --- 1,4 ----
  29. ! *eval.txt*      For Vim version 6.2.  Last change: 2003 Aug 07
  30.   
  31.   
  32.             VIM REFERENCE MANUAL    by Bram Moolenaar
  33. ***************
  34. *** 885,890 ****
  35. --- 887,893 ----
  36.   setline( {lnum}, {line})    Number    set line {lnum} to {line}
  37.   setreg( {n}, {v}[, {opt}])    Number  set register to value and type
  38.   setwinvar( {nr}, {varname}, {val})    set {varname} in window {nr} to {val}
  39. + simplify( {filename})        String  simplify filename as much as possible
  40.   strftime( {format}[, {time}])    String    time in specified format
  41.   stridx( {haystack}, {needle})    Number    first index of {needle} in {haystack}
  42.   strlen( {expr})            Number    length of the String {expr}
  43. ***************
  44. *** 2104,2116 ****
  45.           successfully, and non-zero when the renaming failed.
  46.           This function is not available in the |sandbox|.
  47.   
  48. ! resolve({filename})                    *resolve()*
  49.           On MS-Windows, when {filename} is a shortcut (a .lnk file),
  50. !         returns the path the shortcut points to.
  51. !         On Unix, when {filename} is a symbolic link, returns the path
  52. !         the symlink points to.  This only happens once, the returned
  53. !         path could be a symlink again.
  54. !         Otherwise {filename} is returned.
  55.   
  56.   search({pattern} [, {flags}])                *search()*
  57.           Search for regexp pattern {pattern}.  The search starts at the
  58. --- 2112,2129 ----
  59.           successfully, and non-zero when the renaming failed.
  60.           This function is not available in the |sandbox|.
  61.   
  62. ! resolve({filename})                    *resolve()* *E655*
  63.           On MS-Windows, when {filename} is a shortcut (a .lnk file),
  64. !         returns the path the shortcut points to in a simplified form.
  65. !         On Unix, repeat resolving symbolic links in all path
  66. !         components of {filename} and return the simplified result.
  67. !         To cope with link cycles, resolving of symbolic links is
  68. !         stopped after 100 iterations.
  69. !         On other systems, return the simplified {filename}.
  70. !         The simplification step is done as by |simplify()|.
  71. !         resolve() keeps a leading path component specifying the
  72. !         current directory (provided the result is still a relative
  73. !         path name) and also keeps a trailing path separator.
  74.   
  75.   search({pattern} [, {flags}])                *search()*
  76.           Search for regexp pattern {pattern}.  The search starts at the
  77. ***************
  78. *** 2302,2307 ****
  79. --- 2315,2335 ----
  80.               :call setwinvar(2, "myvar", "foobar")
  81.   <        This function is not available in the |sandbox|.
  82.   
  83. + simplify({filename})                    *simplify()*
  84. +         Simplify the file name as much as possible without changing
  85. +         the meaning.  Shortcuts (on MS-Windows) or symbolic links (on
  86. +         Unix) are not resolved.  If the first path component in
  87. +         {filename} designates the current directory, this will be
  88. +         valid for the result as well.  A trailing path separator is
  89. +         not removed either.
  90. +         Example: >
  91. +             simplify("./dir/.././/file/") == "./file/"
  92. + <        Note: The combination "dir/.." is only removed if "dir" is
  93. +         a searchable directory or does not exist.  On Unix, it is also
  94. +         removed when "dir" is a symbolic link within the same
  95. +         directory.  In order to resolve all the involved symbolic
  96. +         links before simplifying the path name, use |resolve()|.
  97.   strftime({format} [, {time}])                *strftime()*
  98.           The result is a String, which is a formatted date and time, as
  99.           specified by the {format} string.  The given {time} is used,
  100. *** ../vim-6.2.063/src/eval.c    Sun Aug 10 22:24:37 2003
  101. --- src/eval.c    Thu Jul 31 19:47:34 2003
  102. ***************
  103. *** 318,323 ****
  104. --- 318,324 ----
  105.   static void f_serverlist __ARGS((VAR argvars, VAR retvar));
  106.   static void f_setline __ARGS((VAR argvars, VAR retvar));
  107.   static void f_setreg __ARGS((VAR argvars, VAR retvar));
  108. + static void f_simplify __ARGS((VAR argvars, VAR retvar));
  109.   static void find_some_match __ARGS((VAR argvars, VAR retvar, int start));
  110.   static void f_strftime __ARGS((VAR argvars, VAR retvar));
  111.   static void f_stridx __ARGS((VAR argvars, VAR retvar));
  112. ***************
  113. *** 2812,2817 ****
  114. --- 2813,2819 ----
  115.       {"setline",        2, 2, f_setline},
  116.       {"setreg",        2, 3, f_setreg},
  117.       {"setwinvar",    3, 3, f_setwinvar},
  118. +     {"simplify",    1, 1, f_simplify},
  119.   #ifdef HAVE_STRFTIME
  120.       {"strftime",    1, 2, f_strftime},
  121.   #endif
  122. ***************
  123. *** 5808,5813 ****
  124. --- 5810,5816 ----
  125.       VAR        retvar;
  126.   {
  127.       char_u    *p;
  128. +     int        limit = 100;
  129.   
  130.       p = get_var_string(&argvars[0]);
  131.   #ifdef FEAT_SHORTCUT
  132. ***************
  133. *** 5826,5858 ****
  134.       char_u    buf[MAXPATHL + 1];
  135.       char_u    *cpy;
  136.       int    len;
  137.   
  138. !     len = readlink((char *)p, (char *)buf, MAXPATHL);
  139. !     if (len > 0)
  140.       {
  141. !         buf[len] = NUL;
  142. !         if (gettail(p) > p && !mch_isFullName(buf))
  143.           {
  144. !         /* symlink is relative to directory of argument */
  145. !         cpy = alloc((unsigned)(STRLEN(p) + STRLEN(buf) + 1));
  146. !         if (cpy != NULL)
  147.           {
  148. !             STRCPY(cpy, p);
  149. !             STRCPY(gettail(cpy), buf);
  150. !             retvar->var_val.var_string = cpy;
  151. !             p = NULL;
  152.           }
  153.           }
  154.           else
  155. !         p = buf;
  156.       }
  157. !     if (p != NULL)
  158. !         retvar->var_val.var_string = vim_strsave(p);
  159.       }
  160.   # else
  161.       retvar->var_val.var_string = vim_strsave(p);
  162.   # endif
  163.   #endif
  164.       retvar->var_type = VAR_STRING;
  165.   }
  166.   
  167. --- 5829,6020 ----
  168.       char_u    buf[MAXPATHL + 1];
  169.       char_u    *cpy;
  170.       int    len;
  171. +     char_u    *remain = NULL;
  172. +     char_u    *q;
  173. +     int    is_relative_to_current = FALSE;
  174. +     int    has_trailing_pathsep = FALSE;
  175.   
  176. !     p = vim_strsave(p);
  177. !     if (p[0] == '.' && (vim_ispathsep(p[1])
  178. !                    || (p[1] == '.' && (vim_ispathsep(p[2])))))
  179. !         is_relative_to_current = TRUE;
  180. !     len = STRLEN(p);
  181. !     if (len > 0 && vim_ispathsep(p[len-1]))
  182. !         has_trailing_pathsep = TRUE;
  183. !     q = getnextcomp(p);
  184. !     if (*q != NUL)
  185. !     {
  186. !         /* Separate the first path component in "p", and keep the
  187. !          * remainder (beginning with the path separator). */
  188. !         remain = vim_strsave(q - 1);
  189. !         q[-1] = NUL;
  190. !     }
  191. !     for(;;)
  192.       {
  193. !         for (;;)
  194.           {
  195. !         len = readlink((char *)p, (char *)buf, MAXPATHL);
  196. !         if (len <= 0)
  197. !             break;
  198. !         buf[len] = NUL;
  199. !         if (limit-- == 0)
  200. !         {
  201. !             vim_free(p);
  202. !             vim_free(remain);
  203. !             EMSG(_("E655: Too much symbolic links (cycle?)"));
  204. !             retvar->var_val.var_string = NULL;
  205. !             goto fail;
  206. !         }
  207. !         /* Ensure that the result will have a trailing path separator
  208. !          * if the argument has one. */
  209. !         if (remain == NULL && has_trailing_pathsep)
  210. !             add_pathsep(buf);
  211. !         /* Separate the first path component in the link value and
  212. !          * concatenate the remainders. */
  213. !         q = getnextcomp(vim_ispathsep(*buf) ? buf + 1 : buf);
  214. !         if (*q != NUL)
  215. !         {
  216. !             if (remain == NULL)
  217. !             remain = vim_strsave(q - 1);
  218. !             else
  219. !             {
  220. !             cpy = vim_strnsave(q-1, STRLEN(q-1)+STRLEN(remain));
  221. !             if (cpy != NULL)
  222. !             {
  223. !                 STRCAT(cpy, remain);
  224. !                 vim_free(remain);
  225. !                 remain = cpy;
  226. !             }
  227. !             }
  228. !             q[-1] = NUL;
  229. !         }
  230. !         q = gettail(p);
  231. !         if (q > p && *q == NUL)
  232. !         {
  233. !             /* Ignore trailing path separator. */
  234. !             q[-1] = NUL;
  235. !             q = gettail(p);
  236. !         }
  237. !         if (q > p && !mch_isFullName(buf))
  238. !         {
  239. !             /* symlink is relative to directory of argument */
  240. !             cpy = alloc((unsigned)(STRLEN(p) + STRLEN(buf) + 1));
  241. !             if (cpy != NULL)
  242. !             {
  243. !             STRCPY(cpy, p);
  244. !             STRCPY(gettail(cpy), buf);
  245. !             vim_free(p);
  246. !             p = cpy;
  247. !             }
  248. !         }
  249. !         else
  250.           {
  251. !             vim_free(p);
  252. !             p = vim_strsave(buf);
  253.           }
  254.           }
  255. +         if (remain == NULL)
  256. +         break;
  257. +         /* Append the first path component of "remain" to "p". */
  258. +         q = getnextcomp(remain + 1);
  259. +         len = q - remain - (*q != NUL);
  260. +         cpy = vim_strnsave(p, STRLEN(p) + len);
  261. +         if (cpy != NULL)
  262. +         {
  263. +         STRNCAT(cpy, remain, len);
  264. +         vim_free(p);
  265. +         p = cpy;
  266. +         }
  267. +         /* Shorten "remain". */
  268. +         if (*q != NUL)
  269. +         STRCPY(remain, q - 1);
  270.           else
  271. !         {
  272. !         vim_free(remain);
  273. !         remain = NULL;
  274. !         }
  275.       }
  276. !     /* If the result is a relative path name, make it explicitly relative to
  277. !      * the current directory if and only if the argument had this form. */
  278. !     if (!vim_ispathsep(*p))
  279. !     {
  280. !         if (is_relative_to_current
  281. !             && *p != NUL
  282. !             && !(p[0] == '.'
  283. !             && (p[1] == NUL
  284. !                 || vim_ispathsep(p[1])
  285. !                 || (p[1] == '.'
  286. !                 && (p[2] == NUL
  287. !                     || vim_ispathsep(p[2]))))))
  288. !         {
  289. !         /* Prepend "./". */
  290. !         cpy = vim_strnsave((char_u *)"./", 2 + STRLEN(p));
  291. !         if (cpy != NULL)
  292. !         {
  293. !             STRCAT(cpy, p);
  294. !             vim_free(p);
  295. !             p = cpy;
  296. !         }
  297. !         }
  298. !         else if (!is_relative_to_current)
  299. !         {
  300. !         /* Strip leading "./". */
  301. !         q = p;
  302. !         while (q[0] == '.' && vim_ispathsep(q[1]))
  303. !             q += 2;
  304. !         if (q > p)
  305. !             mch_memmove(p, p + 2, STRLEN(p + 2) + (size_t)1);
  306. !         }
  307. !     }
  308. !     /* Ensure that the result will have no trailing path separator
  309. !      * if the argument had none.  But keep "/" or "//". */
  310. !     if (!has_trailing_pathsep)
  311. !     {
  312. !         q = p + STRLEN(p);
  313. !         while ((q > p + 2 || (q == p + 2 && !vim_ispathsep(*p)))
  314. !            && vim_ispathsep(q[-1]))
  315. !         --q;
  316. !         *q = NUL;
  317. !     }
  318. !     retvar->var_val.var_string = p;
  319.       }
  320.   # else
  321.       retvar->var_val.var_string = vim_strsave(p);
  322.   # endif
  323.   #endif
  324. +     simplify_filename(retvar->var_val.var_string);
  325. + fail:
  326. +     retvar->var_type = VAR_STRING;
  327. + }
  328. + /*
  329. +  * "simplify()" function
  330. +  */
  331. +     static void
  332. + f_simplify(argvars, retvar)
  333. +     VAR        argvars;
  334. +     VAR        retvar;
  335. + {
  336. +     char_u    *p;
  337. +     p = get_var_string(&argvars[0]);
  338. +     retvar->var_val.var_string = vim_strsave(p);
  339. +     simplify_filename(retvar->var_val.var_string);    /* simplify in place */
  340.       retvar->var_type = VAR_STRING;
  341.   }
  342.   
  343. *** ../vim-6.2.063/src/tag.c    Sun Aug 10 22:24:37 2003
  344. --- src/tag.c    Thu Jul 31 18:27:34 2003
  345. ***************
  346. *** 2864,2875 ****
  347.   #ifndef AMIGA        /* Amiga doesn't have "..", it uses "/" */
  348.       int        components = 0;
  349.       char_u    *p, *tail, *start;
  350. ! #ifdef UNIX
  351. !     char_u    *orig = vim_strsave(filename);
  352. !     if (orig == NULL)
  353. !     return;
  354. ! #endif
  355.   
  356.       p = filename;
  357.   #ifdef BACKSLASH_IN_FILENAME
  358. --- 2864,2871 ----
  359.   #ifndef AMIGA        /* Amiga doesn't have "..", it uses "/" */
  360.       int        components = 0;
  361.       char_u    *p, *tail, *start;
  362. !     int        stripping_disabled = FALSE;
  363. !     int        relative = TRUE;
  364.   
  365.       p = filename;
  366.   #ifdef BACKSLASH_IN_FILENAME
  367. ***************
  368. *** 2877,2889 ****
  369.       p += 2;
  370.   #endif
  371.   
  372. !     while (vim_ispathsep(*p))
  373. !     ++p;
  374. !     start = p;        /* remember start after "c:/" or "/" or "//" */
  375.   
  376.       do
  377.       {
  378. !     /* At this point "p" is pointing to the char following a "/". */
  379.   #ifdef VMS
  380.       /* VMS allows device:[path] - don't strip the [ in directory  */
  381.       if ((*p == '[' || *p == '<') && p > filename && p[-1] == ':')
  382. --- 2873,2891 ----
  383.       p += 2;
  384.   #endif
  385.   
  386. !     if (vim_ispathsep(*p))
  387. !     {
  388. !     relative = FALSE;
  389. !     do
  390. !         ++p;
  391. !     while (vim_ispathsep(*p));
  392. !     }
  393. !     start = p;        /* remember start after "c:/" or "/" or "///" */
  394.   
  395.       do
  396.       {
  397. !     /* At this point "p" is pointing to the char following a single "/"
  398. !      * or "p" is at the "start" of the (absolute or relative) path name. */
  399.   #ifdef VMS
  400.       /* VMS allows device:[path] - don't strip the [ in directory  */
  401.       if ((*p == '[' || *p == '<') && p > filename && p[-1] == ':')
  402. ***************
  403. *** 2898,2952 ****
  404.           /* ":: composition: vms host/passwd component */
  405.           ++components;
  406.           p = getnextcomp(p + 2);
  407.       }
  408.       else
  409.   #endif
  410.         if (vim_ispathsep(*p))
  411.           movetail(p, p + 1);        /* remove duplicate "/" */
  412. !     else if (p[0] == '.' && vim_ispathsep(p[1]))
  413. !         movetail(p, p + 2);        /* strip "./" */
  414. !     else if (p[0] == '.' && p[1] == '.' && vim_ispathsep(p[2]))
  415.       {
  416.           if (components > 0)        /* strip one preceding component */
  417.           {
  418. !         tail = p + 3;        /* skip to after "../" or "..///" */
  419. !         while (vim_ispathsep(*tail))
  420. !             ++tail;
  421. !         --p;
  422. !         /* skip back to after previous '/' */
  423. !         while (p > start && !vim_ispathsep(p[-1]))
  424. !             --p;
  425. !         /* skip back to after first '/' in a row */
  426. !         while (p - 1 > start && vim_ispathsep(p[-2]))
  427.               --p;
  428. !         movetail(p, tail);    /* strip previous component */
  429. !         --components;
  430.           }
  431. -         else            /* leading "../" */
  432. -         p += 3;            /* skip to char after "/" */
  433.       }
  434.       else
  435.       {
  436.           ++components;        /* simple path component */
  437.           p = getnextcomp(p);
  438.       }
  439. !     } while (p != NULL && *p != NUL);
  440. ! #ifdef UNIX
  441. !     /* Check that the new file name is really the same file.  This will not be
  442. !      * the case when using symbolic links: "dir/link/../name" != "dir/name". */
  443. !     {
  444. !     struct stat    orig_st, new_st;
  445. !     if (       mch_stat((char *)orig, &orig_st) < 0
  446. !         || mch_stat((char *)filename, &new_st) < 0
  447. !         || orig_st.st_ino != new_st.st_ino
  448. !         || orig_st.st_dev != new_st.st_dev)
  449. !         STRCPY(filename, orig);
  450. !     vim_free(orig);
  451. !     }
  452. ! #endif
  453.   #endif /* !AMIGA */
  454.   }
  455.   
  456. --- 2900,3064 ----
  457.           /* ":: composition: vms host/passwd component */
  458.           ++components;
  459.           p = getnextcomp(p + 2);
  460.       }
  461.       else
  462.   #endif
  463.         if (vim_ispathsep(*p))
  464.           movetail(p, p + 1);        /* remove duplicate "/" */
  465. !     else if (p[0] == '.' && (vim_ispathsep(p[1]) || p[1] == NUL))
  466. !     {
  467. !         if (p == start && relative)
  468. !         p += 1 + (p[1] != NUL);    /* keep single "." or leading "./" */
  469. !         else
  470. !         {
  471. !         /* Strip "./" or ".///".  If we are at the end of the file name
  472. !          * and there is no trailing path separator, either strip "/." if
  473. !          * we are after "start", or strip "." if we are at the beginning
  474. !          * of an absolute path name . */
  475. !         tail = p + 1;
  476. !         if (p[1] != NUL)
  477. !             while (vim_ispathsep(*tail))
  478. !             ++tail;
  479. !         else if (p > start)
  480. !             --p;        /* strip preceding path separator */
  481. !         movetail(p, tail);
  482. !         }
  483. !     }
  484. !     else if (p[0] == '.' && p[1] == '.' &&
  485. !         (vim_ispathsep(p[2]) || p[2] == NUL))
  486.       {
  487. +         /* Skip to after ".." or "../" or "..///". */
  488. +         tail = p + 2;
  489. +         while (vim_ispathsep(*tail))
  490. +         ++tail;
  491.           if (components > 0)        /* strip one preceding component */
  492.           {
  493. !         int        do_strip = FALSE;
  494. !         char_u        saved_char;
  495. !         struct stat    st, new_st;
  496. !         /* Don't strip for an erroneous file name. */
  497. !         if (!stripping_disabled)
  498. !         {
  499. !             /* If the preceding component does not exist in the file
  500. !              * system, we strip it.  On Unix, we don't accept a symbolic
  501. !              * link that refers to a non-existent file. */
  502. !             saved_char = p[-1];
  503. !             p[-1] = NUL;
  504. ! #ifdef UNIX
  505. !             if (mch_lstat((char *)filename, &st) < 0)
  506. ! #else
  507. !             if (mch_stat((char *)filename, &st) < 0)
  508. ! #endif
  509. !                 do_strip = TRUE;
  510. !             p[-1] = saved_char;
  511.               --p;
  512. !             /* Skip back to after previous '/'. */
  513. !             while (p > start && !vim_ispathsep(p[-1]))
  514. !             --p;
  515. !             if (!do_strip)
  516. !             {
  517. !             /* If the component exists in the file system, check
  518. !              * that stripping it won't change the meaning of the
  519. !              * file name.  First get information about the
  520. !              * unstripped file name.  This may fail if the component
  521. !              * to strip is not a searchable directory (but a regular
  522. !              * file, for instance), since the trailing "/.." cannot
  523. !              * be applied then.  We don't strip it then since we
  524. !              * don't want to replace an erroneous file name by
  525. !              * a valid one, and we disable stripping of later
  526. !              * components. */
  527. !             saved_char = *tail;
  528. !             *tail = NUL;
  529. !             if (mch_stat((char *)filename, &st) >= 0)
  530. !                 do_strip = TRUE;
  531. !             else
  532. !                 stripping_disabled = TRUE;
  533. !             *tail = saved_char;
  534. ! #ifdef UNIX
  535. !             if (do_strip)
  536. !             {
  537. !                 /* On Unix, the check for the unstripped file name
  538. !                  * above works also for a symbolic link pointing to
  539. !                  * a searchable directory.  But then the parent of
  540. !                  * the directory pointed to by the link must be the
  541. !                  * same as the stripped file name.  (The latter
  542. !                  * exists in the file system since it is the
  543. !                  * component's parent directory.) */
  544. !                 if (p == start && relative)
  545. !                 (void)mch_stat(".", &new_st);
  546. !                 else
  547. !                 {
  548. !                 saved_char = *p;
  549. !                 *p = NUL;
  550. !                 (void)mch_stat((char *)filename, &new_st);
  551. !                 *p = saved_char;
  552. !                 }
  553. !                 if (new_st.st_ino != st.st_ino ||
  554. !                 new_st.st_dev != st.st_dev)
  555. !                 {
  556. !                 do_strip = FALSE;
  557. !                 /* We don't disable stripping of later
  558. !                  * components since the unstripped path name is
  559. !                  * still valid. */
  560. !                 }
  561. !             }
  562. ! #endif
  563. !             }
  564. !         }
  565. !         if (!do_strip)
  566. !         {
  567. !             /* Skip the ".." or "../" and reset the counter for the
  568. !              * components that might be stripped later on. */
  569. !             p = tail;
  570. !             components = 0;
  571. !         }
  572. !         else
  573. !         {
  574. !             /* Strip previous component.  If the result would get empty
  575. !              * and there is no trailing path separator, leave a single
  576. !              * "." instead.  If we are at the end of the file name and
  577. !              * there is no trailing path separator and a preceding
  578. !              * component is left after stripping, strip its trailing
  579. !              * path separator as well. */
  580. !             if (p == start && relative && tail[-1] == '.')
  581. !             {
  582. !             *p++ = '.';
  583. !             *p = NUL;
  584. !             }
  585. !             else
  586. !             {
  587. !             if (p > start && tail[-1] == '.')
  588. !                 --p;
  589. !             movetail(p, tail);    /* strip previous component */
  590. !             }
  591. !             --components;
  592. !         }
  593. !         }
  594. !         else if (p == start && !relative)    /* leading "/.." or "/../" */
  595. !         movetail(p, tail);        /* strip ".." or "../" */
  596. !         else
  597. !         {
  598. !         if (p == start + 2 && p[-2] == '.')    /* leading "./../" */
  599. !         {
  600. !             movetail(p - 2, p);            /* strip leading "./" */
  601. !             tail -= 2;
  602. !         }
  603. !         p = tail;        /* skip to char after ".." or "../" */
  604.           }
  605.       }
  606.       else
  607.       {
  608.           ++components;        /* simple path component */
  609.           p = getnextcomp(p);
  610.       }
  611. !     } while (*p != NUL);
  612.   #endif /* !AMIGA */
  613.   }
  614.   
  615. *** ../vim-6.2.063/src/testdir/test49.vim    Fri May 30 21:45:31 2003
  616. --- src/testdir/test49.vim    Thu Jul 31 18:25:02 2003
  617. ***************
  618. *** 1,6 ****
  619.   " Vim script language tests
  620.   " Author:    Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
  621. ! " Last Change:    2003 May 30
  622.   
  623.   "-------------------------------------------------------------------------------
  624.   " Test environment                                {{{1
  625. --- 1,6 ----
  626.   " Vim script language tests
  627.   " Author:    Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
  628. ! " Last Change:    2003 Jul 30
  629.   
  630.   "-------------------------------------------------------------------------------
  631.   " Test environment                                {{{1
  632. ***************
  633. *** 5076,5082 ****
  634.           Xpath 1048576            " X: 1048576
  635.           let exception  = v:exception
  636.           let throwpoint = v:throwpoint
  637. !         call CHECK(7, "autsch", scriptT, '\<6\>')
  638.       finally
  639.           Xpath 2097152            " X: 2097152
  640.           let exception  = v:exception
  641. --- 5076,5085 ----
  642.           Xpath 1048576            " X: 1048576
  643.           let exception  = v:exception
  644.           let throwpoint = v:throwpoint
  645. !         " Symbolic links in tempname()s are not resolved, whereas resolving
  646. !         " is done for v:throwpoint.  Resolve the temporary file name for
  647. !         " scriptT, so that it can be matched against v:throwpoint.
  648. !         call CHECK(7, "autsch", resolve(scriptT), '\<6\>')
  649.       finally
  650.           Xpath 2097152            " X: 2097152
  651.           let exception  = v:exception
  652. ***************
  653. *** 5091,5097 ****
  654.           Xpath 8388608            " X: 8388608
  655.           let exception  = v:exception
  656.           let throwpoint = v:throwpoint
  657. !         call CHECK(9, "brrrr", scriptT, '\<8\>')
  658.           finally
  659.           Xpath 16777216            " X: 16777216
  660.           let exception  = v:exception
  661. --- 5094,5101 ----
  662.           Xpath 8388608            " X: 8388608
  663.           let exception  = v:exception
  664.           let throwpoint = v:throwpoint
  665. !         " Resolve scriptT for matching it against v:throwpoint.
  666. !         call CHECK(9, "brrrr", resolve(scriptT), '\<8\>')
  667.           finally
  668.           Xpath 16777216            " X: 16777216
  669.           let exception  = v:exception
  670. *** ../vim-6.2.063/src/version.c    Sun Aug 10 22:24:37 2003
  671. --- src/version.c    Sun Aug 10 22:26:34 2003
  672. ***************
  673. *** 632,633 ****
  674. --- 632,635 ----
  675.   {   /* Add new patch number below this line */
  676. + /**/
  677. +     64,
  678.   /**/
  679.  
  680. -- 
  681. From "know your smileys":
  682.  :-{}    Too much lipstick
  683.  
  684.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  685. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  686. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  687.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  688.