You can change the Source Pilot options by choosing the Source Pilot command from the main Options menu. Alternatively, you can override the options when you Source Pilot.
The Source Pilot options are divided into four sections: Source files, Run time, Annotation defaults and ComposeSource. Some of the options are used by both ProSource and ComposeSource and some of the options are used by one of the tools only.
Source files
This section lets you specify the language dependent options of a Source Pilot run. These options are mostly used by ProSource.
Language By selecting an item from the option menu, you can choose to generate the source in ANSI Style C, Kernighan & Ritchie Style C, ANSI Style FORTRAN77, VAX FORTRAN77 or Extended ANSI FORTRAN77.
Default interface extension
Default body extension In addition to the source code templates, ProSource also generates target file names which are used in ComposeSource. ProSource writes the names of the files that it generates into the Annotation Panel for each object, if there are no entries already. ProSource uses the extensions you specify here when generating these file names. Specify the extension without any leading dot.
If you do not specify any extensions the following defaults are used: For the target interface text file name, 'h' for both C and FORTRAN77. For the target body text file name 'c' for C and 'f' for FORTRAN77 (or 'for' under VMS and MS-DOS). If you rerun ProSource, it will use the file names in the Annotation Panel (even if you change the language option).
Run time
Warnings. If you choose this option ProSource and ComposeSource will generate warning messages. Otherwise only failure messages will appear.
Special comments. If you choose this option ProSource will generate special comments in the source.
Where Annotation exists Use this option to tell ProSource how to react if the Annotation of an object to be ProSourced exists already.
Skip. No new annotation text will be generated. ProSource continues working on the next object.
Overwrite. New annotation text will be generated and will overwrite any existing annotation text. If you want to save your current model, we recommend that you backup your existing MD Model before using the overwrite option. Use the Unload command to backup your project library
Abort. ProSource will abort if any existing annotation text is found. The new annotation text generated by ProSource before the abort is not affected.
Annotation defaults
Internal storage. If you choose this option the annotation text is by default stored in the database. You can override this in the Annotation Panel of an individual object.
External storage. If you choose this option the annotation text is by default stored in an external file rather than in the database. You can override this in the Annotation Panel of an individual object.
Directory. This name field enables you to specify the directory that will be used by ProSource when generating annotation files and that will be used by ComposeSource when composing the source code files. It makes sense to enter a directory name even if Internal storage was specified, because external Annotations might already exist for some objects in the database. If no directory is specified and there are some external Annotations then the current working directory will be the default.
The names of the external files that will be placed in this directory are specified in the Annotation Panel. If no name is specified ProSource writes the file name in the Annotation Panel when it generates the file.
ComposeSource
Target directory. Enter the path of the directory for the source files. The default is the current working directory.
If you are running ComposeSource for the whole model (or for the Subsystem and its subtree), the source code directory hierarchy will be built in this directory.
If you are running ComposeSource for part of the model, the source files are stored in this directory.
Backup. Click on this option if you want to back up existing files if source files are generated with the same name.
Backup extension character. If you have chosen to back up existing files, then enter a backup extension character in the box. This character is appended to the last character of the extension of the existing file. If the extension can not be extended in that way, the backup extension character replaces the last character of the extension of the existing file name. If the file name does not have an extension, the backup extension character will become the new extension. The default backup extension character is ~.
For example, if you specify ~ as backup extension character then main.c will be backed up as main.c~, makefile will be backed up as makefile.~ and main.for will be backed up as main.fo~.