Yegappan wrote:

> The quickfix.c file uses several function prototypes for static
> functions in the file. The attached patch removes these
> prototypes by moving the functions around. Even though the
> diff is large, no new functionality is introduced in this diff
> and the contents of the functions are not changed.

I'm not a fan of moving functions around just to remove the function
prototype.  It's better to keep functions in an order that makes it easy
to overview their relation.

There is a conflict in this: It's natural to first start with the main
entry point, and have lower level functions below it.  But to avoid
prototypes one has to do it the other way around.

I know some people who write C put main() at the bottom and everything
it needs above it, but that does feel like it's upside down.  Especially
if you have worked with a language that doesn't have this requirement
(or function prototypes at all).

I've been thinking of generating the prototypes automatically, like we
do for the files in src/proto.  But never got around getting all the
details right (e.g., need some way to skip certain functions, recognize
#ifdefs, etc.).

-- 
hundred-and-one symptoms of being an internet addict:
123. You ask the car dealer to install an extra cigarette lighter
     on your new car to power your notebook.

 /// 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.

Raspunde prin e-mail lui