diff options
author | Tim Wiederhake <twied@gmx.net> | 2023-12-30 20:49:48 +0100 |
---|---|---|
committer | Tim Wiederhake <twied@gmx.net> | 2024-01-21 13:14:37 +0100 |
commit | 7ef32a37be9e293fde3c2a18e043a2d4bc9d1eed (patch) | |
tree | fe33c5c358f28d3347cacc7c367c27172cf899a6 | |
parent | f63f0a7416793f42030f56a79930b3f76c82a24d (diff) |
Rename argument 'class' to 'xclass' in LookInList
'class' is a keyword in c++. Its usage confuses some tools that work
with c and c++ source code.
Signed-off-by: Tim Wiederhake <twied@gmx.net>
-rw-r--r-- | src/list.c | 10 | ||||
-rw-r--r-- | src/list.h | 2 |
2 files changed, 6 insertions, 6 deletions
@@ -111,10 +111,10 @@ AddToList(name_list ** list_head, char *name, char *ptr) * * \param list a pointer to the head of a list * \param name a pointer to the name to look for - * \param class a pointer to the class to look for + * \param xclass a pointer to the class to look for */ char * -LookInList(name_list * list_head, const char *name, XClassHint *class) +LookInList(name_list * list_head, const char *name, XClassHint *xclass) { name_list *nptr; @@ -123,15 +123,15 @@ LookInList(name_list * list_head, const char *name, XClassHint *class) if (strcmp(name, nptr->name) == 0) return (nptr->ptr); - if (class) { + if (xclass) { /* look for the res_name next */ for (nptr = list_head; nptr != NULL; nptr = nptr->next) - if (strcmp(class->res_name, nptr->name) == 0) + if (strcmp(xclass->res_name, nptr->name) == 0) return (nptr->ptr); /* finally look for the res_class */ for (nptr = list_head; nptr != NULL; nptr = nptr->next) - if (strcmp(class->res_class, nptr->name) == 0) + if (strcmp(xclass->res_class, nptr->name) == 0) return (nptr->ptr); } return (NULL); @@ -72,7 +72,7 @@ extern void FreeList(name_list ** list); extern int GetColorFromList(name_list * list_head, const char *name, XClassHint *class, Pixel *ptr); extern char *LookInList(name_list * list_head, const char *name, - XClassHint *class); + XClassHint *xclass); extern char *LookInNameList(name_list * list_head, const char *name); #endif /* LIST_H */ |