From 073225cc6903924869d463a1014860a78f73b008 Mon Sep 17 00:00:00 2001 From: oga Date: Mon, 19 May 2008 18:53:09 +0000 Subject: General cleanup. ok okan@. --- calmwm.c | 14 +++++++------- conf.c | 8 ++++---- kbfunc.c | 22 +++++++++++----------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/calmwm.c b/calmwm.c index d4e20ef..8eb2ad6 100644 --- a/calmwm.c +++ b/calmwm.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. * - * $Id: calmwm.c,v 1.17 2008/05/06 15:12:04 tobias Exp $ + * $Id: calmwm.c,v 1.18 2008/05/19 18:53:09 oga Exp $ */ #include "headers.h" @@ -52,14 +52,14 @@ int main(int argc, char **argv) { int ch; - const char *conffile = NULL; + const char *conf_file = NULL; char *display_name = NULL; while ((ch = getopt(argc, argv, "c:d:")) != -1) { switch (ch) { case 'c': - conffile = optarg; + conf_file = optarg; break; case 'd': display_name = optarg; @@ -82,7 +82,7 @@ main(int argc, char **argv) Starting = 1; bzero(&Conf, sizeof(Conf)); - conf_setup(&Conf, conffile); + conf_setup(&Conf, conf_file); client_setup(); x_setup(display_name); Starting = 0; @@ -238,7 +238,7 @@ x_setupscreen(struct screen_ctx *sc, u_int which) LeaveWindowMask|ColormapChangeMask|ButtonMask; XChangeWindowAttributes(X_Dpy, sc->rootwin, - /* CWCursor| */CWEventMask, &rootattr); + CWEventMask, &rootattr); XSync(X_Dpy, False); @@ -257,10 +257,10 @@ x_screenname(int which) dstr = xstrdup(DisplayString(X_Dpy)); - if ((cp = rindex(dstr, ':')) == NULL) + if ((cp = strrchr(dstr, ':')) == NULL) return (NULL); - if ((cp = index(cp, '.')) != NULL) + if ((cp = strchr(cp, '.')) != NULL) *cp = '\0'; snlen = strlen(dstr) + 3; /* string, dot, number, null */ diff --git a/conf.c b/conf.c index 35f3577..7cd5d2b 100644 --- a/conf.c +++ b/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. * - * $Id: conf.c,v 1.34 2008/05/19 17:11:19 okan Exp $ + * $Id: conf.c,v 1.35 2008/05/19 18:53:09 oga Exp $ */ #include "headers.h" @@ -157,9 +157,9 @@ conf_init(struct conf *c) } void -conf_setup(struct conf *c, const char *conffile) +conf_setup(struct conf *c, const char *conf_file) { - if (conffile == NULL) { + if (conf_file == NULL) { char *home = getenv("HOME"); if (home == NULL) @@ -168,7 +168,7 @@ conf_setup(struct conf *c, const char *conffile) snprintf(c->conf_path, sizeof(c->conf_path), "%s/%s", home, CONFFILE); } else - snprintf(c->conf_path, sizeof(c->conf_path), "%s", conffile); + snprintf(c->conf_path, sizeof(c->conf_path), "%s", conf_file); conf_init(c); diff --git a/kbfunc.c b/kbfunc.c index 6f7a881..af2fc76 100644 --- a/kbfunc.c +++ b/kbfunc.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. * - * $Id: kbfunc.c,v 1.26 2008/05/19 17:24:19 okan Exp $ + * $Id: kbfunc.c,v 1.27 2008/05/19 18:53:09 oga Exp $ */ #include @@ -46,9 +46,9 @@ kbfunc_client_raise(struct client_ctx *cc, void *arg) void kbfunc_moveresize(struct client_ctx *cc, void *arg) { - struct screen_ctx *sc = screen_current(); - int x,y,flags,amt; - u_int mx,my; + struct screen_ctx *sc = screen_current(); + int x, y, flags, amt; + u_int mx, my; mx = my = 0; @@ -57,7 +57,7 @@ kbfunc_moveresize(struct client_ctx *cc, void *arg) if (flags & CWM_BIGMOVE) { flags -= CWM_BIGMOVE; - amt = amt*10; + amt = amt * 10; } switch (flags & movemask) { @@ -115,9 +115,9 @@ kbfunc_moveresize(struct client_ctx *cc, void *arg) void kbfunc_client_search(struct client_ctx *scratch, void *arg) { - struct menu_q menuq; - struct client_ctx *cc, *old_cc = client_current(); - struct menu *mi; + struct menu_q menuq; + struct client_ctx *cc, *old_cc = client_current(); + struct menu *mi; TAILQ_INIT(&menuq); @@ -149,9 +149,9 @@ kbfunc_client_search(struct client_ctx *scratch, void *arg) void kbfunc_menu_search(struct client_ctx *scratch, void *arg) { - struct menu_q menuq; - struct menu *mi; - struct cmd *cmd; + struct menu_q menuq; + struct menu *mi; + struct cmd *cmd; TAILQ_INIT(&menuq); -- cgit v1.2.3-2-gb3c3