DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C programmer's productivity tools

Adding an argument to a function

The cscope tool makes it easy to add an argument to a function. This involves two steps: editing the function itself and adding the new argument to each place where the function is called.

First, edit the function by using the second menu item, "Edit this function or #define". Next, find out where the function is called. By invoking the fourth menu item, "List functions calling this function", you can get a list of all functions that call it. With this list, you can either invoke the editor on each line found by entering the list number for each line individually, or invoke the editor on all lines automatically by typing <Ctrl>e. cscope is especially useful when making this kind of change because it guarantees that none of the functions you need to edit will be overlooked.


Next topic: Changing the value of a variable
Previous topic: Changing a text string

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003