ProWesS is a highly configurable system, many parameters in the system can be changed. However, these can be situated either in the ProWesS program, or in the external types. Therefore, all configurable items have been grouped in a configuration file, called ProWesS_cfg, which is loaded when ProWesS is started.
Each line in the configuration file is interpreted as a configuration command. Empty lines are discarded as comments. All the other lines are divided in two types, commands and definitions of configuration constants. The lines with a command have a fixed format : the first character is the actual command, the second character should be a space, and the rest of the line is the parameter. All lines which don't have a space as second character are considered as configuration constants.
The configuration commands currently supported by ProWesS are :
Lines which contain the definition of a configuration constant contain the name of the configuration constant, followed by the parameter, separated by one or more spaces or tabs. Each definition is passed to the system and each of the types for processing, which can thus modify their behaviour.
By convention, the name of the configuration constant starts with the type which is intended to process the result. However, all other types also see the definition and get a chance to modify their behaviour according. As the name of the configuration constant may not contain spaces, a dashe ('-') is used to separate the words. The names are case dependant.
ProWesS can also be configured further while it is already active. ProWesS contains a special entry point which allows you to pass configuration lines which are then processed.
The ProWesS thing has a CNFG extension which is used for this purpose. This extension is a function which accepts a character array as parameter ("char *"). This string is handled as if it were a line in the configuration file. It is thus possible (as mentioned in the previous section) to set the searchpath, load external types, pass a configuration constant or check whether a certain type is already available.
The call to this routine can be done as follows :
#include#include ... Error err; /* the error returned by the config routine */ char *str; /* the config line which is passed */ ... err=THINGCall(PW_THING_NAME,PW_THING_CNFG,1,str); if (err) ... /* error handling */ ...
The constants are type specific. Some are globally defined and interpreted by the ProWesS system, but most are specific to the types. However, all constants are passed to all types which are loaded at that moment. It is allowed to interpret definitions which are originally intended for another type.
However, to make sure that this is not necessary, and to make configuring ProWesS applications easier, ProWesS also stores some default values which can be changed by definition constants, but which can also be queried. This allows types and applications to use this information as default values. This way, the default font and fontsize can be defined, and the default colours for the background, foreground and middleground can be set.