Adding a parameter to a function

I often realize I need a new parameter added to a function after I've already got a dozen calls to the function. To add a parameter to a function in C, you need to do three things:

  1. Change the function declaration
  2. Change the header
  3. Change all the callers

In this demo, I add a parameter to the 'model_token_has_function' function, change the header, and modify the three callers to use a default value for the new parameter. Note: this demo uses capabilities added by the cscope-Vim interface, which allows me to jump to all the function callers using 'g^]'.