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,
'$');
162 if (strcmp(Remote, k->Remote()) == 0)
171 if (Remote && Code) {
173 if (strcmp(Remote, k->Remote()) == 0 && strcmp(Code, k->Code()) == 0)
184 if (strcmp(Remote, k->Remote()) == 0 && k->Key() ==
k_Setup)
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");
240 esyslog(
"ERROR: key macro too long");
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)
void Add(cListObject *Object, cListObject *After=NULL)
static eKeys FromString(const char *Name)
void PutSetup(const char *Remote, const char *Setup)
eKeys Get(const char *Remote, const char *Code)
const cKeyMacro * Get(eKeys Key)
const cKey * Next(const cKey *Object) const
< Returns the element immediately before Object in this list, or NULL if Object is the first element ...
static cPlugin * GetPlugin(int Index)
const cKey * First(void) const
Returns the first element in this list, or NULL if the list is empty.
eKeys macro[MAXKEYSINMACRO]
const char * GetSetup(const char *Remote)
static const char * ToString(eKeys Key, bool Translate=false)