diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2014-01-20 21:34:33 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2014-01-20 21:34:33 +0000 |
commit | f6715155e783b3619e3f1b9439bad94d9e83cb87 (patch) | |
tree | bf6da2763496bb94aa4715776944e1eddc12ebaa /app/cwm/conf.c | |
parent | 2d6c7336611ee172bf61009451f9682a6453b432 (diff) |
constify and rename some confusing variables around cmdq.
Diffstat (limited to 'app/cwm/conf.c')
-rw-r--r-- | app/cwm/conf.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c index 83db44405..efffc1355 100644 --- a/app/cwm/conf.c +++ b/app/cwm/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.156 2014/01/20 19:06:04 okan Exp $ + * $OpenBSD: conf.c,v 1.157 2014/01/20 21:34:32 okan Exp $ */ #include <sys/param.h> @@ -37,23 +37,23 @@ static void conf_unbind_mouse(struct conf *, struct mousebinding *); /* Add an command menu entry to the end of the menu */ void -conf_cmd_add(struct conf *c, char *image, char *label) +conf_cmd_add(struct conf *c, const char *name, const char *path) { /* "term" and "lock" have special meanings. */ - if (strcmp(label, "term") == 0) - (void)strlcpy(c->termpath, image, sizeof(c->termpath)); - else if (strcmp(label, "lock") == 0) - (void)strlcpy(c->lockpath, image, sizeof(c->lockpath)); + if (strcmp(name, "term") == 0) + (void)strlcpy(c->termpath, path, sizeof(c->termpath)); + else if (strcmp(name, "lock") == 0) + (void)strlcpy(c->lockpath, path, sizeof(c->lockpath)); else { struct cmd *cmd = xmalloc(sizeof(*cmd)); - (void)strlcpy(cmd->image, image, sizeof(cmd->image)); - (void)strlcpy(cmd->label, label, sizeof(cmd->label)); + (void)strlcpy(cmd->name, name, sizeof(cmd->name)); + (void)strlcpy(cmd->path, path, sizeof(cmd->path)); TAILQ_INSERT_TAIL(&c->cmdq, cmd, entry); } } void -conf_autogroup(struct conf *c, int no, char *val) +conf_autogroup(struct conf *c, int no, const char *val) { struct autogroupwin *aw; char *p; @@ -74,7 +74,7 @@ conf_autogroup(struct conf *c, int no, char *val) } void -conf_ignore(struct conf *c, char *val) +conf_ignore(struct conf *c, const char *val) { struct winmatch *wm; |