Sprinkle a few more const; from Tiago Cunha.
This commit is contained in:
parent
69bb069674
commit
b92e846e56
@ -15,7 +15,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: calmwm.c,v 1.82 2014/01/03 15:29:06 okan Exp $
|
* $OpenBSD: calmwm.c,v 1.83 2014/01/21 15:42:44 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -46,7 +46,7 @@ struct client_ctx_q Clientq = TAILQ_HEAD_INITIALIZER(Clientq);
|
|||||||
|
|
||||||
int HasRandr, Randr_ev;
|
int HasRandr, Randr_ev;
|
||||||
struct conf Conf;
|
struct conf Conf;
|
||||||
char *homedir;
|
const char *homedir;
|
||||||
|
|
||||||
static void sigchld_cb(int);
|
static void sigchld_cb(int);
|
||||||
static int x_errorhandler(Display *, XErrorEvent *);
|
static int x_errorhandler(Display *, XErrorEvent *);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: calmwm.h,v 1.245 2014/01/20 23:03:51 okan Exp $
|
* $OpenBSD: calmwm.h,v 1.246 2014/01/21 15:42:44 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CALMWM_H_
|
#ifndef _CALMWM_H_
|
||||||
@ -325,7 +325,7 @@ extern Time Last_Event_Time;
|
|||||||
extern struct screen_ctx_q Screenq;
|
extern struct screen_ctx_q Screenq;
|
||||||
extern struct client_ctx_q Clientq;
|
extern struct client_ctx_q Clientq;
|
||||||
extern struct conf Conf;
|
extern struct conf Conf;
|
||||||
extern char *homedir;
|
extern const char *homedir;
|
||||||
extern int HasRandr, Randr_ev;
|
extern int HasRandr, Randr_ev;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -502,7 +502,7 @@ void mousefunc_menu_unhide(struct client_ctx *,
|
|||||||
union arg *);
|
union arg *);
|
||||||
|
|
||||||
struct menu *menu_filter(struct screen_ctx *, struct menu_q *,
|
struct menu *menu_filter(struct screen_ctx *, struct menu_q *,
|
||||||
char *, char *, int,
|
const char *, const char *, int,
|
||||||
void (*)(struct menu_q *, struct menu_q *, char *),
|
void (*)(struct menu_q *, struct menu_q *, char *),
|
||||||
void (*)(struct menu *, int));
|
void (*)(struct menu *, int));
|
||||||
void menuq_add(struct menu_q *, void *, const char *, ...);
|
void menuq_add(struct menu_q *, void *, const char *, ...);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: conf.c,v 1.159 2014/01/20 23:03:51 okan Exp $
|
* $OpenBSD: conf.c,v 1.160 2014/01/21 15:42:44 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -85,7 +85,7 @@ conf_ignore(struct conf *c, const char *val)
|
|||||||
TAILQ_INSERT_TAIL(&c->ignoreq, wm, entry);
|
TAILQ_INSERT_TAIL(&c->ignoreq, wm, entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *color_binds[] = {
|
static const char *color_binds[] = {
|
||||||
"#CCCCCC", /* CWM_COLOR_BORDER_ACTIVE */
|
"#CCCCCC", /* CWM_COLOR_BORDER_ACTIVE */
|
||||||
"#666666", /* CWM_COLOR_BORDER_INACTIVE */
|
"#666666", /* CWM_COLOR_BORDER_INACTIVE */
|
||||||
"#FC8814", /* CWM_COLOR_BORDER_URGENCY */
|
"#FC8814", /* CWM_COLOR_BORDER_URGENCY */
|
||||||
@ -147,9 +147,9 @@ conf_screen(struct screen_ctx *sc)
|
|||||||
conf_grab_kbd(sc->rootwin);
|
conf_grab_kbd(sc->rootwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
static const struct {
|
||||||
char *key;
|
const char *key;
|
||||||
char *func;
|
const char *func;
|
||||||
} kbd_binds[] = {
|
} kbd_binds[] = {
|
||||||
{ "CM-Return", "terminal" },
|
{ "CM-Return", "terminal" },
|
||||||
{ "CM-Delete", "lock" },
|
{ "CM-Delete", "lock" },
|
||||||
@ -318,8 +318,8 @@ conf_client(struct client_ctx *cc)
|
|||||||
cc->flags |= ignore ? CLIENT_IGNORE : 0;
|
cc->flags |= ignore ? CLIENT_IGNORE : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
static const struct {
|
||||||
char *tag;
|
const char *tag;
|
||||||
void (*handler)(struct client_ctx *, union arg *);
|
void (*handler)(struct client_ctx *, union arg *);
|
||||||
int flags;
|
int flags;
|
||||||
union arg argument;
|
union arg argument;
|
||||||
@ -432,8 +432,8 @@ static struct {
|
|||||||
{ "vtile", kbfunc_tile, CWM_WIN, {.i = CWM_TILE_VERT} },
|
{ "vtile", kbfunc_tile, CWM_WIN, {.i = CWM_TILE_VERT} },
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct {
|
static const struct {
|
||||||
char ch;
|
const char ch;
|
||||||
int mask;
|
int mask;
|
||||||
} bind_mods[] = {
|
} bind_mods[] = {
|
||||||
{ 'C', ControlMask },
|
{ 'C', ControlMask },
|
||||||
@ -525,8 +525,8 @@ conf_unbind_kbd(struct conf *c, struct keybinding *unbind)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct {
|
static const struct {
|
||||||
char *tag;
|
const char *tag;
|
||||||
void (*handler)(struct client_ctx *, union arg *);
|
void (*handler)(struct client_ctx *, union arg *);
|
||||||
int flags;
|
int flags;
|
||||||
union arg argument;
|
union arg argument;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: kbfunc.c,v 1.89 2014/01/20 23:18:47 okan Exp $
|
* $OpenBSD: kbfunc.c,v 1.90 2014/01/21 15:42:45 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -229,8 +229,9 @@ kbfunc_exec(struct client_ctx *cc, union arg *arg)
|
|||||||
{
|
{
|
||||||
#define NPATHS 256
|
#define NPATHS 256
|
||||||
struct screen_ctx *sc = cc->sc;
|
struct screen_ctx *sc = cc->sc;
|
||||||
char **ap, *paths[NPATHS], *path, *pathcpy, *label;
|
char **ap, *paths[NPATHS], *path, *pathcpy;
|
||||||
char tpath[MAXPATHLEN];
|
char tpath[MAXPATHLEN];
|
||||||
|
const char *label;
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
struct dirent *dp;
|
struct dirent *dp;
|
||||||
struct menu *mi;
|
struct menu *mi;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: menu.c,v 1.73 2014/01/20 18:58:03 okan Exp $
|
* $OpenBSD: menu.c,v 1.74 2014/01/21 15:42:45 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -78,8 +78,8 @@ static struct menu *menu_complete_path(struct menu_ctx *);
|
|||||||
static int menu_keycode(XKeyEvent *, enum ctltype *, char *);
|
static int menu_keycode(XKeyEvent *, enum ctltype *, char *);
|
||||||
|
|
||||||
struct menu *
|
struct menu *
|
||||||
menu_filter(struct screen_ctx *sc, struct menu_q *menuq, char *prompt,
|
menu_filter(struct screen_ctx *sc, struct menu_q *menuq, const char *prompt,
|
||||||
char *initial, int flags,
|
const char *initial, int flags,
|
||||||
void (*match)(struct menu_q *, struct menu_q *, char *),
|
void (*match)(struct menu_q *, struct menu_q *, char *),
|
||||||
void (*print)(struct menu *, int))
|
void (*print)(struct menu *, int))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user