Functions | |
int | mt_ConfRead (APPvar *app) |
read the configuration file and set the WinDom parameters | |
int | mt_ConfInquire (APPvar *app, char *keyword, char *fmt,...) |
read an user variable in the configuration file | |
int | mt_ConfGetLine (APPvar *app, char *line) |
read acces by line in the configuration file | |
int | mt_ConfWrite (APPvar *app, char *keyword, char *fmt,...) |
write the windom config file | |
int | mt_ConfWindom (APPvar *app) |
load winconf (windom configurator) | |
int | ConfInquire (char *keyword, char *fmt,...) |
see mt_ConfInquire() | |
int | ConfWrite (char *keyword, char *fmt,...) |
see mt_ConfWrite() |
|
see mt_ConfInquire()
|
|
see mt_ConfWrite()
|
|
read acces by line in the configuration file
variable = value
|
|
read an user variable in the configuration file
The syntax of variable definition in the configuration file have the following structure:
keyword = value[, value[, ...]]
The '[]' notation means an optional argument. The
Example of configuration file: appli.font.name = "Helvetica Bold" appli.system.path = C:\APPLI\system\ appli.window.size = 400,300 appli.window.sizer = 'S' appli.parameters.save = TRUE appli.parameters.bubble = TRUE void InitAppl( void) { char FontName[33], path[128]; int width, height; char car; #define PARAM_SAVE 0x1 #define PARAM_BUBBLE 0x2 int param; if( ConfInquire( "appli.font.name", "%s", FontName) != 1) strcpy( FontName, "Times"); if( ConfInquire( "appli.system.path", "%s", path) != 1) strcpy( path, ""); if( ConfInquire( "appli.window.size", "%d,%d", &width, &height) != 2) width = height = 200; if( ConfInquire( "appli.window.sizer", "%s", &car) != 1) car = 'S'; ConfInquire( "appli.parameters.save", "%B", ¶m, PARAM_SAVE); ConfInquire( "appli.parameters.bubble", "%B", ¶m, PARAM_BUBBLE); }
|
|
read the configuration file and set the WinDom parameters
This function is used by mt_ApplInit() to initialize the WinDom settings and by mt_EvntWindom() when it receives the The WinDom configuration file is an unique text file grouping the configuration of all WinDom application in a similar way then the '.Xdefaults' X11 file for example. This file is typically located in the HOME folder. Actually, WinDom searchs this file in the following directories :
This file is nammed 'windom.cnf' or '.windomrc' if the file system supports the long name file.
keyword = value list ...
|
|
load winconf (windom configurator)
|
|
write the windom config file
|