98 char *p = strchr(s,
'.');
102 char *q = strpbrk(p,
" \t");
126 for (
tKey *k = keyTable; k->
name; k++) {
127 const char *n = k->name;
128 const char *p = strchr(n,
'$');
131 if (strcasecmp(n, Name) == 0)
140 for (
tKey *k = keyTable; k->
name; k++) {
141 if (k->type == Key) {
142 const char *n = k->name;
145 const char *p = strchr(n,
'$');
161 for (
cKey *k = First(); k; k =
Next(k)) {
162 if (strcmp(Remote, k->Remote()) == 0)
171 if (Remote && Code) {
172 for (
cKey *k = First(); k; k =
Next(k)) {
173 if (strcmp(Remote, k->Remote()) == 0 && strcmp(Code, k->Code()) == 0)
183 for (
cKey *k = First(); k; k =
Next(k)) {
184 if (strcmp(Remote, k->Remote()) == 0 && k->Key() ==
k_Setup)
193 if (!GetSetup(Remote))
196 esyslog(
"ERROR: called PutSetup() for %s, but setup has already been defined!", Remote);
219 while ((p = strtok_r(s,
" \t", &strtok_next)) != NULL) {
223 esyslog(
"ERROR: only one @plugin allowed per macro");
227 esyslog(
"ERROR: @plugin can't be first in macro");
232 plugin = strdup(p + 1);
234 esyslog(
"ERROR: unknown plugin '%s'", plugin);
240 esyslog(
"ERROR: key macro too long");
246 if (macro[n] ==
kNone) {
247 esyslog(
"ERROR: unknown key '%s'", p);
255 esyslog(
"ERROR: key macro too long");
260 esyslog(
"ERROR: empty key macro");
273 if (*k->Macro() ==
Key)
bool KnowsRemote(const char *Remote)
static eKeys FromString(const char *Name)
void PutSetup(const char *Remote, const char *Setup)
eKeys Get(const char *Remote, const char *Code)
cListObject * Next(void) const
const cKeyMacro * Get(eKeys Key)
static cPlugin * GetPlugin(int Index)
const char * Remote(void)
const char * GetSetup(const char *Remote)
static const char * ToString(eKeys Key, bool Translate=false)