On 2014/06/26, at 15:08, Kazunobu Kuriyama <[email protected]> wrote: > On my Mac, I've been unable to install vim due to a failure of test55 coming > with Patch 7.4.341.
Yes, I've noticed the same error and just been writing a bug report when I received your post. > But... It looks the Mac just gave one of possible correct results, doesn't > it? Yes. The qsort(3) is not a stable sort, i.e., it is not guaranteed that the original order is preserved among the "equal" elements. The Linux version of qsort(3) is apparently stable for test55, but I guess it may be not stable for other input (e.g., longer list). man qsort(3) says: "If two members compare as equal, their order in the sorted array is undefined." On Mac OS X (and freeBSD), man qsort(3) says: "The algorithms implemented by qsort() ... are not stable; ... The mergesort() algorithm is stable." But it seems mergesort() is available only on BSDs. It would be possible to make vim's sort() function stable if we save the original order in a separate array and use the array as the 2nd key for the comparison. But I guess such elaboration is not worthwhile here. Jun -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
