How to avoiding writing switch-case too long?
<p>In my current project, there are lots of code using 
switch statements with too many cases.</p>

<pre><code>Switch(c)
{
case CASENUMBERONE:
//50-100 lines of code in each code
...
case CASENUMBERTWENTY:
..
}


//thousands of lines of macro definition in another file
#define CASENUMBERONE 1
...
#define CASENUMBERTWENTY 20
...
</code></pre>

<p>It seems not reasonable programming style.
How to avoid this?</p>
