summaryrefslogtreecommitdiff
path: root/src/icons.c
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
commitabd6ec6e468a067ea072fee9e8ba0303c1e95a2e (patch)
treec41c25b7fef56ac4c1613d8ec49da32a23aa200f /src/icons.c
parentea79e73344dfa09a6ed3dd34c4f1383add924b12 (diff)
Rename variable 'new' to 'entry' in splitEntry
'new' 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>
Diffstat (limited to 'src/icons.c')
-rw-r--r--src/icons.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/icons.c b/src/icons.c
index 493eb7e..47ff670 100644
--- a/src/icons.c
+++ b/src/icons.c
@@ -50,7 +50,7 @@ static void mergeEntries(IconEntry *old, IconEntry *ie);
static void
splitEntry(IconEntry *ie, int grav1, int grav2, int w, int h)
{
- IconEntry *new;
+ IconEntry *entry;
switch (grav1) {
case D_NORTH:
@@ -58,21 +58,21 @@ splitEntry(IconEntry *ie, int grav1, int grav2, int w, int h)
if (w != ie->w)
splitEntry(ie, grav2, grav1, w, ie->h);
if (h != ie->h) {
- new = malloc(sizeof(IconEntry));
- new->twm_win = 0;
- new->used = 0;
- new->next = ie->next;
- ie->next = new;
- new->x = ie->x;
- new->h = (ie->h - h);
- new->w = ie->w;
+ entry = malloc(sizeof(IconEntry));
+ entry->twm_win = 0;
+ entry->used = 0;
+ entry->next = ie->next;
+ ie->next = entry;
+ entry->x = ie->x;
+ entry->h = (ie->h - h);
+ entry->w = ie->w;
ie->h = h;
if (grav1 == D_SOUTH) {
- new->y = ie->y;
- ie->y = new->y + new->h;
+ entry->y = ie->y;
+ ie->y = entry->y + entry->h;
}
else
- new->y = ie->y + ie->h;
+ entry->y = ie->y + ie->h;
}
break;
case D_EAST:
@@ -80,21 +80,21 @@ splitEntry(IconEntry *ie, int grav1, int grav2, int w, int h)
if (h != ie->h)
splitEntry(ie, grav2, grav1, ie->w, h);
if (w != ie->w) {
- new = malloc(sizeof(IconEntry));
- new->twm_win = 0;
- new->used = 0;
- new->next = ie->next;
- ie->next = new;
- new->y = ie->y;
- new->w = (ie->w - w);
- new->h = ie->h;
+ entry = malloc(sizeof(IconEntry));
+ entry->twm_win = 0;
+ entry->used = 0;
+ entry->next = ie->next;
+ ie->next = entry;
+ entry->y = ie->y;
+ entry->w = (ie->w - w);
+ entry->h = ie->h;
ie->w = w;
if (grav1 == D_EAST) {
- new->x = ie->x;
- ie->x = new->x + new->w;
+ entry->x = ie->x;
+ ie->x = entry->x + entry->w;
}
else
- new->x = ie->x + ie->w;
+ entry->x = ie->x + ie->w;
}
break;
}