Lines Matching refs:cfg

81             "-cfg <file>          Specify a config file\n"
104 else if (strcmp(argv[i], "-cfg") == 0) {
263 InterpretConfigs(CfgEntryPtr cfg)
265 config = cfg;
266 while (cfg != NULL) {
267 char *name = cfg->name.str;
268 if (cfg->entry_type == VariableDef) {
272 soundDir = cfg->action.text;
273 cfg->name.str = NULL;
274 cfg->action.text = NULL;
280 soundCmd = cfg->action.text;
281 cfg->name.str = NULL;
282 cfg->action.text = NULL;
290 else if (cfg->entry_type == EventDef) {
293 switch (cfg->event_type) {
296 cfg->name.atom = XInternAtom(dpy, name, False);
298 cfg->name.atom = None;
322 cfg->name.priv = priv;
329 eventMask |= (1L << cfg->event_type);
330 cfg = cfg->next;
345 cfg = config;
346 while ((cfg != NULL) && (cfg->next != NULL)) {
349 next = cfg->next;
357 cfg->next = next->next;
362 cfg = next;
370 CfgEntryPtr cfg, dflt;
373 for (cfg = config; (cfg != NULL); cfg = cfg->next) {
374 if ((ev->type != xkbEventCode) || (cfg->event_type != ev->any.xkb_type))
378 if (ev->bell.name == cfg->name.atom)
379 return cfg;
380 else if ((cfg->name.atom == None) && (dflt == NULL))
381 dflt = cfg;
384 if (cfg->name.priv & (1L << ev->accessx.detail))
385 return cfg;
388 if (cfg->name.str == NULL)
389 dflt = cfg;
390 else if (strncmp(cfg->name.str, ev->message.message,
392 return cfg;
406 CfgEntryPtr cfg;
411 cfg = FindMatchingConfig(ev);
412 if (!cfg) {
417 if (cfg->action.type == UnknownAction) {
418 if (cfg->action.text == NULL)
419 cfg->action.type = NoAction;
420 else if (cfg->action.text[0] == '!') {
423 cfg->action.type = ShellAction;
424 tmp = uStringDup(&cfg->action.text[1]);
425 free(cfg->action.text);
426 cfg->action.text = tmp;
429 cfg->action.type = SoundAction;
431 switch (cfg->action.type) {
435 if (cfg->action.text != NULL) {
436 snprintf(buf, sizeof(buf), "%s", cfg->action.text);
445 if (cfg->action.text == NULL) {
450 cmd = cfg->action.text;
453 if (cfg->action.text == NULL) {
459 cfg->action.text);
463 uInternalError("Unknown error action type %d\n", cfg->action.type);