mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
alter a few function returns and prototypes; found by lint.
ok oga@
This commit is contained in:
parent
69cc58555d
commit
f6fcd0eb5d
6
calmwm.h
6
calmwm.h
@ -307,8 +307,8 @@ __dead void usage(void);
|
|||||||
|
|
||||||
void client_applysizehints(struct client_ctx *);
|
void client_applysizehints(struct client_ctx *);
|
||||||
struct client_ctx *client_current(void);
|
struct client_ctx *client_current(void);
|
||||||
struct client_ctx *client_cycle(struct screen_ctx *, int);
|
void client_cycle(struct screen_ctx *, int);
|
||||||
int client_delete(struct client_ctx *);
|
void client_delete(struct client_ctx *);
|
||||||
void client_draw_border(struct client_ctx *);
|
void client_draw_border(struct client_ctx *);
|
||||||
struct client_ctx *client_find(Window);
|
struct client_ctx *client_find(Window);
|
||||||
void client_freeze(struct client_ctx *);
|
void client_freeze(struct client_ctx *);
|
||||||
@ -463,7 +463,7 @@ void xu_setstate(struct client_ctx *, int);
|
|||||||
void xu_setwmname(struct screen_ctx *);
|
void xu_setwmname(struct screen_ctx *);
|
||||||
|
|
||||||
void u_exec(char *);
|
void u_exec(char *);
|
||||||
int u_spawn(char *);
|
void u_spawn(char *);
|
||||||
|
|
||||||
void *xcalloc(size_t, size_t);
|
void *xcalloc(size_t, size_t);
|
||||||
void xfree(void *);
|
void xfree(void *);
|
||||||
|
17
client.c
17
client.c
@ -137,7 +137,7 @@ client_new(Window win, struct screen_ctx *sc, int mapped)
|
|||||||
return (cc);
|
return (cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
client_delete(struct client_ctx *cc)
|
client_delete(struct client_ctx *cc)
|
||||||
{
|
{
|
||||||
struct screen_ctx *sc = cc->sc;
|
struct screen_ctx *sc = cc->sc;
|
||||||
@ -189,8 +189,6 @@ client_delete(struct client_ctx *cc)
|
|||||||
|
|
||||||
client_freehints(cc);
|
client_freehints(cc);
|
||||||
xfree(cc);
|
xfree(cc);
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -550,8 +548,7 @@ client_setname(struct client_ctx *cc)
|
|||||||
char *newname;
|
char *newname;
|
||||||
|
|
||||||
if (!xu_getstrprop(cc->win, _NET_WM_NAME, &newname))
|
if (!xu_getstrprop(cc->win, _NET_WM_NAME, &newname))
|
||||||
xu_getstrprop(cc->win, XA_WM_NAME, &newname);
|
if (!xu_getstrprop(cc->win, XA_WM_NAME, &newname))
|
||||||
if (newname == NULL)
|
|
||||||
newname = emptystring;
|
newname = emptystring;
|
||||||
|
|
||||||
TAILQ_FOREACH(wn, &cc->nameq, entry)
|
TAILQ_FOREACH(wn, &cc->nameq, entry)
|
||||||
@ -580,11 +577,9 @@ match:
|
|||||||
xfree(wn);
|
xfree(wn);
|
||||||
cc->nameqlen--;
|
cc->nameqlen--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct client_ctx *
|
void
|
||||||
client_cycle(struct screen_ctx *sc, int reverse)
|
client_cycle(struct screen_ctx *sc, int reverse)
|
||||||
{
|
{
|
||||||
struct client_ctx *oldcc, *newcc;
|
struct client_ctx *oldcc, *newcc;
|
||||||
@ -594,7 +589,7 @@ client_cycle(struct screen_ctx *sc, int reverse)
|
|||||||
|
|
||||||
/* If no windows then you cant cycle */
|
/* If no windows then you cant cycle */
|
||||||
if (TAILQ_EMPTY(&sc->mruq))
|
if (TAILQ_EMPTY(&sc->mruq))
|
||||||
return (NULL);
|
return;
|
||||||
|
|
||||||
if (oldcc == NULL)
|
if (oldcc == NULL)
|
||||||
oldcc = (reverse ? TAILQ_LAST(&sc->mruq, cycle_entry_q) :
|
oldcc = (reverse ? TAILQ_LAST(&sc->mruq, cycle_entry_q) :
|
||||||
@ -614,7 +609,7 @@ client_cycle(struct screen_ctx *sc, int reverse)
|
|||||||
/* Is oldcc the only non-hidden window? */
|
/* Is oldcc the only non-hidden window? */
|
||||||
if (newcc == oldcc) {
|
if (newcc == oldcc) {
|
||||||
if (again)
|
if (again)
|
||||||
return (NULL); /* No windows visible. */
|
return; /* No windows visible. */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -624,8 +619,6 @@ client_cycle(struct screen_ctx *sc, int reverse)
|
|||||||
sc->altpersist = 1;
|
sc->altpersist = 1;
|
||||||
client_ptrsave(oldcc);
|
client_ptrsave(oldcc);
|
||||||
client_ptrwarp(newcc);
|
client_ptrwarp(newcc);
|
||||||
|
|
||||||
return (newcc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct client_ctx *
|
static struct client_ctx *
|
||||||
|
1
conf.c
1
conf.c
@ -521,7 +521,6 @@ conf_bindname(struct conf *c, char *name, char *binding)
|
|||||||
current_binding->flags = 0;
|
current_binding->flags = 0;
|
||||||
conf_grab(c, current_binding);
|
conf_grab(c, current_binding);
|
||||||
TAILQ_INSERT_TAIL(&c->keybindingq, current_binding, entry);
|
TAILQ_INSERT_TAIL(&c->keybindingq, current_binding, entry);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
5
util.c
5
util.c
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#define MAXARGLEN 20
|
#define MAXARGLEN 20
|
||||||
|
|
||||||
int
|
void
|
||||||
u_spawn(char *argstr)
|
u_spawn(char *argstr)
|
||||||
{
|
{
|
||||||
switch (fork()) {
|
switch (fork()) {
|
||||||
@ -42,12 +42,9 @@ u_spawn(char *argstr)
|
|||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
warn("fork");
|
warn("fork");
|
||||||
return (-1);
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user