Gnucap source files are organized into groups by the name prefix as follows:
The files ap_, io_, l_, m_ are not Gnucap specific. Although they were created for Gnucap, they are public domain and may be used by anyone for any purpose.
The remaining files bm_, c_, d_, e_, s_, u_ are Gnucap specific, and reuse is subject to the Gnu Public License.
Some of the d_ files are automatically generated during compilation. Do not change them, because your changes may be lost in a recompile. For licensing and distribution legal purposes, these files are considered to be ``object'' code, even though they are readable C++.
The files d_.model, where present, contain the actual model descriptions as input for modelgen, the model compiler. These files are the source that is used to generate the corresponding .cc and .h files. All changes should be done to the .model file. For GPL purposes, these files are considered to be ``source''.
Gnucap uses a 4 part Makefile, designed for simultaneous builds on several systems. A true Makefile is built by selecting and catenating the four pieces. A master Makefile switches to a subdirectory and builds a specialized Makefile there.
It all starts at ``main'', in main.cc. The function ``main'' has a loop that gets input and calls `` CMD::cmdproc'' to dispatch the command.
Batch mode is done in ``process_cmd_line'', by using `` CMD::cmdproc'' to execute the commands ``get'' or ``<'' which is passed to ``CMD::cmdproc'' as text.
The function ``CMD::cmdproc'' dispatches the command to its handler. The handlers are located in the ``CMD'' namespace, and the ``c_'' files.