> Bram Moolenaar wrote: > > > 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
I have modified a version freshly downloaded from github; patch attached. > > > 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 have given the defines meaningful names, and changed octal to 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. > > Test99 failed, as it should, in both EBCDIC and ASCII environments, when I introduced a typo into the new code. It passes correctly in both environments when the typo is corrected. I understand why you want a newer test; it is easy to make a trivial addition to the tests, but it will take a while to come up with something comprehensive. I will continue to look into that. When all the new code was ported to z/OS, there were compile errors in eval.c and window.c (missing definition for mb_char2bytes in the former and mb_ptr2char in the latter). I was able to come up with a simple workaround in each case, but, since it looks to me like they ought to be defined via vim.h/globals.h, I am unsure why the error showed up, and so am not satisfied that I have the "correct" solution. I will continue to research. This email and any files transmitted with it are confidential, proprietary and intended solely for the individual or entity to whom they are addressed. If you have received this email in error please delete it immediately. -- -- 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.
regexp_nfa.patch
Description: regexp_nfa.patch
