9.2. Where does TrEd look for macros

On startup, TrEd looks for two files with macros.

  1. The default set of macros (described in more detail in Section 9.7) tred.def

  2. The user set of macros tred.mac or any other file given after the -m parameter on the command line or a file specified in the TrEd's configuration option MacroFile.

Macro programmers are supposed to keep the tred.def file unchanged, but are encouraged to modify or append the tred.mac macro file according to their needs.

Other macro files may be included into any tred.mac file using one of the following #include directives where filename is supposed to provide a relative or absolute path to the macro file, under the terms described below each item:

#include "filename"

The filename must be relative to the directory of the file to which it is included.

#include <filename>

The filename must be relative to the TrEd's library directory.

#include filename

The filename may be both absolute or relative. In the latter case the directories are searched in the following order:

  1. Current directory is searched.

  2. The directory of the file where the #include directive occured is searched.

  3. TrEd's library directory is searched.

If #include fails to find given file, it is a fatal error and TrEd/bTrEd immediatelly stops. You may use #ifinclude directive, if you wish TrEd to continue (without error or warning) even if the requested file was not found.