Ali Gholami Rudi wrote:

> This patch replaces switch statements in arabic.c with a static array of
> struct achars.  This makes adding new letters a lot easier and that
> usually involves only adding an entry to this array (I've already added
> Farsi letters).
> 
> This is also a clean up patch and reduces more than 1k lines.  After
> applying this patch arabic.h holds only a macro definition.  So it is
> probably a good idea to remove arabic.h completely and move the trivial
> ARABIC_CHAR macro to another header.

It's good to see some cleanup work in this area.

I wonder how we check for any mistakes.  Very few people use this code,
thus a mistake may go unnoticed for a long time.

Perhaps you can write a test that passes before this change and also
after this change?  The test could use some kind of table, so that we
can see all the combinations are used.

-- 
The budget process was invented by an alien race of sadistic beings who
resemble large cats.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui