head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.27; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.27; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.15; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.49; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "dmx.h"#include "dmxinput.h"#include "dmxconfig.h"#include "dmxparse.h"#include "dmxlog.h"#include "dmxcb.h"#include "dmxstat.h"#include "parser.h"Data Structures | |
| struct | DMXConfigCmdStruct |
| struct | DMXConfigListStruct |
Defines | |
| #define | GEN(param, glob, def) |
Typedefs | |
| typedef DMXConfigListStruct | DMXConfigList |
| typedef DMXConfigListStruct * | DMXConfigListPtr |
| typedef DMXConfigCmdStruct | DMXConfigCmd |
| typedef DMXConfigCmdStruct * | DMXConfigCmdPtr |
Functions | |
| void | dmxConfigStoreDisplay (const char *display) |
| void | dmxConfigStoreInput (const char *input) |
| void | dmxConfigStoreXInput (const char *input) |
| void | dmxConfigStoreFile (const char *file) |
| void | dmxConfigStoreConfig (const char *config) |
| void | dmxConfigConfigure (void) |
| void | dmxConfigSetMaxScreens (void) |
|
|
Value: void dmxConfigSet##glob(const char *param) { \ if (dmx##glob) free((void *)dmx##glob); \ dmx##glob = strdup(param); \ } \ char *dmxConfigGet##glob(void) { \ return (char *)(dmx##glob ? dmx##glob : def); \ }
|
|
|
This stucture stores the parsed configuration information. |
|
|
This stucture stores the parsed configuration information. |
|
|
Stores lists of configuration information. |
|
|
Stores lists of configuration information. |
|
|
Set up the appropriate global variables so that the DMX server will be initialized using the configuration specified in the config file and on the command line. |
|
|
This function determines the number of displays we WILL have and sets MAXSCREENS to that value. This is difficult since the number depends on the command line (which is easy to count) or on the config file, which has to be parsed. |
|
|
Make a note that config should be used as the configuration for current instantiation of the DMX server. |
|
|
Make a note that display is the name of an X11 display that should be initialized as a backend (output) display. Called from ddxProcessArgument. |
|
|
Make a note that file is the configuration file. |
|
|
Make a note that input is the name of an X11 display that should be used for input (either a backend or a console input device). |
|
|
Make a note that input is the name of an X11 display that should be used for input from XInput extension devices. |
#include "dmx.h"#include "dmxinput.h"#include "dmxconfig.h"#include "dmxparse.h"#include "dmxlog.h"#include "dmxcb.h"#include "dmxstat.h"#include "parser.h"Data Structures | |
| struct | DMXConfigListStruct |
| struct | DMXConfigCmdStruct |
Defines | |
| #define | GEN(param, glob, def) |
Typedefs | |
| typedef struct DMXConfigListStruct | DMXConfigList |
| typedef struct DMXConfigListStruct * | DMXConfigListPtr |
| typedef struct DMXConfigCmdStruct | DMXConfigCmd |
| typedef struct DMXConfigCmdStruct * | DMXConfigCmdPtr |
Functions | |
| int | yyparse (void) |
| void | dmxConfigStoreDisplay (const char *display) |
| void | dmxConfigStoreInput (const char *input) |
| void | dmxConfigStoreXInput (const char *input) |
| void | dmxConfigStoreFile (const char *file) |
| void | dmxConfigStoreConfig (const char *config) |
| static int | dmxConfigReadFile (const char *filename, int debug) |
| static const char * | dmxConfigMatch (const char *target, DMXConfigEntryPtr entry) |
| static DMXScreenInfo * | dmxConfigAddDisplay (const char *name, int scrnWidth, int scrnHeight, int scrnX, int scrnY, int scrnXSign, int scrnYSign, int rootWidth, int rootHeight, int rootX, int rootY, int rootXSign, int rootYSign) |
| DMXInputInfo * | dmxConfigAddInput (const char *name, int core) |
| static void | dmxConfigCopyFromDisplay (DMXConfigDisplayPtr d) |
| static void | dmxConfigCopyFromWall (DMXConfigWallPtr w) |
| static void | dmxConfigCopyFromOption (DMXConfigOptionPtr o) |
| static void | dmxConfigCopyFromParam (DMXConfigParamPtr p) |
| static void | dmxConfigCopyData (DMXConfigVirtualPtr v) |
| static void | dmxConfigFromCommandLine (void) |
| static void | dmxConfigFromConfigFile (void) |
| static void | dmxConfigConfigInputs (void) |
| void | dmxConfigConfigure (void) |
| void | dmxConfigSetMaxScreens (void) |
Variables | |
| FILE * | yyin |
| static char * | dmxXkbRules |
| static char * | dmxXkbModel |
| static char * | dmxXkbLayout |
| static char * | dmxXkbVariant |
| static char * | dmxXkbOptions |
| DMXConfigEntryPtr | dmxConfigEntry |
| static DMXConfigCmd | dmxConfigCmd |
| static int | dmxDisplaysFromCommandLine |
Provides interface for reading DMX configuration files and for combining that information with command-line configuration parameters.
| #define GEN | ( | param, | ||
| glob, | ||||
| def | ||||
| ) |
void dmxConfigSet##glob(const char *param) { \ if (dmx##glob) free((void *)dmx##glob); \ dmx##glob = strdup(param); \ } \ char *dmxConfigGet##glob(void) { \ return (char *)(dmx##glob ? dmx##glob : def); \ }
This macro is used to generate the following access methods:
| typedef struct DMXConfigCmdStruct DMXConfigCmd |
This stucture stores the parsed configuration information.
| typedef struct DMXConfigCmdStruct * DMXConfigCmdPtr |
| typedef struct DMXConfigListStruct DMXConfigList |
Stores lists of configuration information.
| typedef struct DMXConfigListStruct * DMXConfigListPtr |
| static DMXScreenInfo* dmxConfigAddDisplay | ( | const char * | name, | |
| int | scrnWidth, | |||
| int | scrnHeight, | |||
| int | scrnX, | |||
| int | scrnY, | |||
| int | scrnXSign, | |||
| int | scrnYSign, | |||
| int | rootWidth, | |||
| int | rootHeight, | |||
| int | rootX, | |||
| int | rootY, | |||
| int | rootXSign, | |||
| int | rootYSign | |||
| ) | [static] |
References dmxFatal, dmxLog(), dmxNumScreens, dmxScreens, dmxStatAlloc(), _DMXScreenInfo::index, _DMXScreenInfo::name, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, _DMXScreenInfo::rootX, _DMXScreenInfo::rootY, _DMXScreenInfo::scrnHeight, _DMXScreenInfo::scrnWidth, _DMXScreenInfo::scrnX, _DMXScreenInfo::scrnXSign, _DMXScreenInfo::scrnY, _DMXScreenInfo::scrnYSign, and _DMXScreenInfo::stat.
d32 1 a32 1Referenced by dmxConfigCopyFromDisplay(), dmxConfigCopyFromWall(), and dmxConfigFromCommandLine().
d34 1 a34 26| DMXInputInfo* dmxConfigAddInput | ( | const char * | name, | |
| int | core | |||
| ) |
References _DMXInputInfo::core, dmxFatal, dmxInputs, dmxLog(), dmxNumInputs, _DMXInputInfo::inputIdx, _DMXInputInfo::name, and _DMXInputInfo::scrnIdx.
d38 2 a39 1Referenced by dmxConfigConfigInputs(), dmxInputAttachBackend(), and dmxInputAttachConsole().
d41 1 a41 17| static void dmxConfigConfigInputs | ( | void | ) | [static] |
References dmxConfigAddInput(), dmxNumInputs, dmxNumScreens, dmxScreens, DMXConfigCmdStruct::inputs, DMXConfigListStruct::name, DMXConfigListStruct::next, and DMXConfigCmdStruct::xinputs.
d45 1 a45 1Referenced by dmxConfigConfigure().
d47 1 a47 40| void dmxConfigConfigure | ( | void | ) |
Set up the appropriate global variables so that the DMX server will be initialized using the configuration specified in the config file and on the command line.
References DMXConfigCmdStruct::config, DMXConfigCmdStruct::displays, dmxConfigConfigInputs(), dmxConfigFreeEntry(), dmxConfigFromCommandLine(), dmxConfigFromConfigFile(), dmxConfigReadFile(), dmxLog(), dmxWarning, and DMXConfigCmdStruct::filename.
Referenced by dmxConfigSetMaxScreens(), and InitOutput().
| static void dmxConfigCopyData | ( | DMXConfigVirtualPtr | v | ) | [static] |
References _DMXConfigVirtual::dim, _DMXConfigSub::display, dmxConfigCopyFromDisplay(), dmxConfigCopyFromOption(), dmxConfigCopyFromParam(), dmxConfigCopyFromWall(), dmxConfigDisplay, dmxConfigOption, dmxConfigParam, dmxConfigWall, dmxFatal, dmxLog(), dmxSetWidthHeight(), _DMXConfigSub::next, _DMXConfigSub::option, _DMXConfigSub::param, _DMXConfigVirtual::subentry, _DMXConfigSub::type, _DMXConfigSub::wall, _DMXConfigPair::x, and _DMXConfigPair::y.
d51 1 a51 1Referenced by dmxConfigFromConfigFile().
d53 8 a60 144| static void dmxConfigCopyFromDisplay | ( | DMXConfigDisplayPtr | d | ) | [static] |
References dmxConfigAddDisplay(), _DMXConfigDisplay::name, _DMXConfigDisplay::rootHeight, _DMXConfigDisplay::rootWidth, _DMXConfigDisplay::rootX, _DMXConfigDisplay::rootXOrigin, _DMXConfigDisplay::rootXSign, _DMXConfigDisplay::rootY, _DMXConfigDisplay::rootYOrigin, _DMXConfigDisplay::scrnHeight, _DMXConfigDisplay::scrnWidth, _DMXConfigDisplay::scrnX, _DMXConfigDisplay::scrnXSign, _DMXConfigDisplay::scrnY, _DMXConfigDisplay::scrnYSign, _DMXScreenInfo::where, _DMXScreenInfo::whereX, and _DMXScreenInfo::whereY.
Referenced by dmxConfigCopyData().
| static void dmxConfigCopyFromOption | ( | DMXConfigOptionPtr | o | ) | [static] |
References _DMXConfigString::next, _DMXConfigOption::option, _DMXConfigString::string, and _DMXConfigOption::string.
Referenced by dmxConfigCopyData().
| static void dmxConfigCopyFromParam | ( | DMXConfigParamPtr | p | ) | [static] |
References dmxConfigLookupParam(), dmxConfigSetXkbLayout(), dmxConfigSetXkbModel(), dmxConfigSetXkbOptions(), dmxConfigSetXkbRules(), and dmxConfigSetXkbVariant().
Referenced by dmxConfigCopyData().
| static void dmxConfigCopyFromWall | ( | DMXConfigWallPtr | w | ) | [static] |
References dmxConfigAddDisplay(), dmxInfo, dmxLog(), dmxNumScreens, dmxScreens, _DMXConfigWall::height, _DMXScreenInfo::name, _DMXConfigWall::nameList, _DMXConfigString::next, PosAbsolute, PosBelow, _DMXConfigString::string, _DMXScreenInfo::where, _DMXScreenInfo::whereRefScreen, _DMXScreenInfo::whereX, _DMXScreenInfo::whereY, _DMXConfigWall::width, _DMXConfigWall::xwall, and _DMXConfigWall::ywall.
Referenced by dmxConfigCopyData().
| static void dmxConfigFromCommandLine | ( | void | ) | [static] |
References DMXConfigCmdStruct::displays, dmxConfigAddDisplay(), dmxInfo, dmxLog(), dmxNumScreens, dmxScreens, _DMXScreenInfo::name, DMXConfigListStruct::name, DMXConfigListStruct::next, PosBelow, _DMXScreenInfo::where, _DMXScreenInfo::whereRefScreen, _DMXScreenInfo::whereX, and _DMXScreenInfo::whereY.
Referenced by dmxConfigConfigure().
| static void dmxConfigFromConfigFile | ( | void | ) | [static] |
| static const char* dmxConfigMatch | ( | const char * | target, | a65 4 | DMXConfigEntryPtr | entry |
| ) | [static] |
References DMXConfigCmdStruct::config, _DMXConfigVirtual::name, and _DMXConfigEntry::virtual.
Referenced by dmxConfigFromConfigFile().
| static int dmxConfigReadFile | ( | const char * | filename, | |||||||||||||||||||||||
| a68 4 | int | debug | ||||||||||||||||||||||||
| ) | [static] |
| void dmxConfigSetMaxScreens | ( | void | ) |
| void dmxConfigStoreConfig | ( | const char * | config | ) |
| void dmxConfigStoreDisplay | ( | const char * | display | ) |
| void dmxConfigStoreFile | ( | const char * | file | ) |
| void dmxConfigStoreInput | ( | const char * | input | ) | d201 1 d203 26 a228 21 |
| void dmxConfigStoreXInput | ( | const char * | input | ) | d230 1 d232 26 a257 21 |
| int yyparse | ( | void | ) | a258 5 |
Referenced by dmxConfigReadFile(), and main().
a259 10DMXConfigCmd dmxConfigCmd [static] |
| DMXConfigEntryPtr dmxConfigEntry | a287 5
Referenced by main().
a288 9int dmxDisplaysFromCommandLine [static] |
char* dmxXkbLayout [static] |
a316 3
char* dmxXkbModel [static] |
char* dmxXkbOptions [static] |
a345 3
char* dmxXkbRules [static] |
char* dmxXkbVariant [static] |
a374 3
| FILE* yyin |