|
|
|
|
|
by nhaehnle
4496 days ago
|
|
The code if fill of typedefs for AMIGA and OS/2. There's nothing wrong with that as long as those typedefs are properly isolated in some platform-specific header files. It's natural to have an initial feeling of being overwhelmed by that kind of stuff. However, it often turns out that there's nothing to gain from removing that stuff. The only real cost is when people expect a platform to work, but nobody from that platform is willing to put in the testing effort. |
|
That function is over 400 lines and has over 50 ifdefs. What does it do? It waits for any key to be pressed. Unfortunately, Vim is single-threaded and synchronously character-driven, so it has to try and process some autocmds and other events in the same loop.
Oh and the wait loop uses gettimeofday(), which is not monotonic.
To get another taste of Vim's source, take a look at https://github.com/b4winckler/macvim/blob/master/src/eval.c (Warning, may crash your browser.) That file is 25,000 lines and checks hundreds of different ifdefs.