summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wiederhake <twied@gmx.net>2023-12-30 20:49:48 +0100
committerTim Wiederhake <twied@gmx.net>2024-01-21 13:14:37 +0100
commitea79e73344dfa09a6ed3dd34c4f1383add924b12 (patch)
treeaf4e046862c2cbb91b9541f91b37e4e5a495807b
parent7ef32a37be9e293fde3c2a18e043a2d4bc9d1eed (diff)
Rename argument 'class' to 'xclass' in GetColorFromList
'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.c10
-rw-r--r--src/list.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/list.c b/src/list.c
index 2597471..f7fa724 100644
--- a/src/list.c
+++ b/src/list.c
@@ -151,11 +151,11 @@ LookInNameList(name_list * list_head, const char *name)
*
* \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
* \param[out] ptr fill in the list value if the name was found
*/
int
-GetColorFromList(name_list * list_head, const char *name, XClassHint *class,
+GetColorFromList(name_list * list_head, const char *name, XClassHint *xclass,
Pixel *ptr)
{
int save;
@@ -170,9 +170,9 @@ GetColorFromList(name_list * list_head, const char *name, XClassHint *class,
return (TRUE);
}
- if (class) {
+ if (xclass) {
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) {
save = Scr->FirstTime;
Scr->FirstTime = TRUE;
GetColor(Scr->Monochrome, ptr, nptr->ptr);
@@ -181,7 +181,7 @@ GetColorFromList(name_list * list_head, const char *name, XClassHint *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) {
save = Scr->FirstTime;
Scr->FirstTime = TRUE;
GetColor(Scr->Monochrome, ptr, nptr->ptr);
diff --git a/src/list.h b/src/list.h
index 15b4fef..bc9c16c 100644
--- a/src/list.h
+++ b/src/list.h
@@ -70,7 +70,7 @@ extern void AddToList(name_list ** list_head, char *name, char *ptr);
extern void FreeList(name_list ** list);
extern int GetColorFromList(name_list * list_head, const char *name,
- XClassHint *class, Pixel *ptr);
+ XClassHint *xclass, Pixel *ptr);
extern char *LookInList(name_list * list_head, const char *name,
XClassHint *xclass);
extern char *LookInNameList(name_list * list_head, const char *name);