OwenLeibman Leibman wrote: > Porting the current source code (latest stable version vim-7.4.tar.bz2 > from vim.org download page) to z/OS, I encountered the following > problem: > ERROR CCN3052 ./regexp_nfa.c:745 Duplicate case label for value 193. Labels > must be unique.
That version is already quite old. The switch statement has changed. If you can't use git to get the latest version, you can use a snapshot: https://github.com/vim/vim/releases > There were many other messages for similar errors. > > The cause is similar to an error reported and fixed in 2010 > (http://comments.gmane.org/gmane.editors.vim.devel/28288), > although that problem was in regexp.c, not regexp_nfa.c (which is > included from regexp.c). > > I am attaching a patch which allows the compile to proceed in z/OS. > The resulting executable appears to function correctly. > I have also tested the patch on an ASCII system, where it builds > correctly, and "make test" reports no errors. The method seems OK, although the list of defines is a bit hard to read. Why not use some underscores, and ALT instead of ALTERNATE: #define A_ALT_1 0x62 And change the octal numbers to hex, the multi-byte numbers are also in hex. I'm not sure this code is covered by a test. Would be good to make one, so that we can check it still passes after the change (assuming any test passes on this system...). Hmm, test99 is supposed to cover this, but when I try a change in the code it doesn't break. Ah, it only tests [[=A=]], not the other equivalence characters. So only an error in the EMIT entries is found, not a mistake in the case list. If you want to take the time to look into this, please create a new style test, it should be much simpler to write and maintain. -- hundred-and-one symptoms of being an internet addict: 164. You got out to buy software, instead of going out for a beer. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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.
