Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!ihlpl!swanson From: swanson@ihlpl.UUCP Newsgroups: comp.lang.c Subject: Generating code with the preprocessor Message-ID: <1523@ihlpl.UUCP> Date: Mon, 24-Nov-86 12:05:54 EST Article-I.D.: ihlpl.1523 Posted: Mon Nov 24 12:05:54 1986 Date-Received: Wed, 26-Nov-86 06:36:55 EST Distribution: net Organization: AT&T Bell Labs, Naperville, IL Lines: 18 I need to construct a preprocessor scaffolding which will generate code at the beginning of main() to call once each function defined in the program. I do not know anything about the functions except that I need an array of pointers by which to call the functions. The scaffolding should either provide this array of pointers initialized, or provide the code to call each function once. The scaffolding needs to be resiliant enough such that if I add a function, without doing anything more than include a macro in the function, a pointer to this new function gets put into the array during the next compile. Can such a beast be created? cpp or m4 are both fine. Any pointers? Thanks. Robert Swanson ihnp4!ihlpj!tss