diff options
author | Jeroen Roovers <jer@gentoo.org> | 2014-01-07 18:20:05 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2014-01-07 18:20:05 +0000 |
commit | 77e93de90ad09f27626ed1cda5508ba4047581cd (patch) | |
tree | d6ec7c0aabe4b7ffd47b2a0e1306b1c47199b591 /x11-wm | |
parent | Stable for amd64 wrt bug #495312 (diff) | |
download | gentoo-2-77e93de90ad09f27626ed1cda5508ba4047581cd.tar.gz gentoo-2-77e93de90ad09f27626ed1cda5508ba4047581cd.tar.bz2 gentoo-2-77e93de90ad09f27626ed1cda5508ba4047581cd.zip |
Fix some coding issues.
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/musca/ChangeLog | 10 | ||||
-rw-r--r-- | x11-wm/musca/files/musca-0.9.24_p20100226-null.patch | 151 | ||||
-rw-r--r-- | x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild | 66 |
3 files changed, 225 insertions, 2 deletions
diff --git a/x11-wm/musca/ChangeLog b/x11-wm/musca/ChangeLog index afe04c97ca22..3128cafbc231 100644 --- a/x11-wm/musca/ChangeLog +++ b/x11-wm/musca/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-wm/musca -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/musca/ChangeLog,v 1.22 2012/03/06 21:44:23 jer Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/musca/ChangeLog,v 1.23 2014/01/07 18:20:04 jer Exp $ + +*musca-0.9.24_p20100226-r3 (07 Jan 2014) + + 07 Jan 2014; Jeroen Roovers <jer@gentoo.org> + +musca-0.9.24_p20100226-r3.ebuild, +files/musca-0.9.24_p20100226-null.patch: + Fix some coding issues. 06 Mar 2012; Jeroen Roovers <jer@gentoo.org> musca-0.9.24_p20100226-r2.ebuild: diff --git a/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch b/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch new file mode 100644 index 000000000000..6efb77ff0b35 --- /dev/null +++ b/x11-wm/musca/files/musca-0.9.24_p20100226-null.patch @@ -0,0 +1,151 @@ +https://bugs.launchpad.net/musca/+bug/1236500 + + +--- a/musca.c ++++ b/musca.c +@@ -421,7 +421,7 @@ + if (s->depth) + { + int *indexes = allocate(sizeof(int) * s->depth); +- int count = 0, i; Window *w; ++ int count = 0, i; Window *w = NULL; + FOR_STACK (w, s, Window*, i) + { + note("%d", i); +@@ -1673,7 +1673,6 @@ + frame *f = t->frames; + frame **group = NULL; + int i = 0, x, y, w, h; +- ubyte changes = 0; + if (direction == HORIZONTAL) + { + if (f->x + f->w >= t->head->screen->width - t->r) +@@ -1684,7 +1683,6 @@ + group = frame_siblings(f, LEFT); + if (frame_siblings_growable(group, LEFT, size)) + { +- changes = 1; + x = f->x - size; w = size; y = f->y; h = 0; + for (i = 0; group[i]; i++) + y = MIN(y, group[i]->y), h += group[i]->h; +@@ -1702,7 +1700,6 @@ + group = frame_siblings(f, RIGHT); + if (frame_siblings_growable(group, RIGHT, size)) + { +- changes = 1; + x = f->x + f->w; w = size; y = f->y; h = 0; + for (i = 0; group[i]; i++) + y = MIN(y, group[i]->y), h += group[i]->h; +@@ -1725,7 +1722,6 @@ + group = frame_siblings(f, TOP); + if (frame_siblings_growable(group, TOP, size)) + { +- changes = 1; + y = f->y - size; h = size; x = f->x; w = 0; + for (i = 0; group[i]; i++) + x = MIN(x, group[i]->x), w += group[i]->w; +@@ -1743,7 +1739,6 @@ + group = frame_siblings(f, BOTTOM); + if (frame_siblings_growable(group, BOTTOM, size)) + { +- changes = 1; + y = f->y + f->h; h = size; x = f->x; w = 0; + for (i = 0; group[i]; i++) + x = MIN(x, group[i]->x), w += group[i]->w; +@@ -2205,11 +2200,9 @@ + char* com_frame_split(char *cmd, regmatch_t *subs) + { + group *g = heads->groups; frame *f = g->frames; +- int sw = heads->screen->width - g->l - g->r, +- sh = heads->screen->height - g->t - g->b; + char *mode = regsubstr(cmd, subs, 1); +- ucell fs = f->h, ss = sh; ubyte dir = VERTICAL; +- if (*mode == 'h') { fs = f->w; ss = sw; dir = HORIZONTAL; } ++ ucell fs = f->h; ubyte dir = VERTICAL; ++ if (*mode == 'h') { fs = f->w; dir = HORIZONTAL; } + dcell size = parse_size(cmd, subs, 2, fs); + frame_split(dir, size / fs); + free(mode); +@@ -2630,7 +2623,7 @@ + } + char* com_command(char *cmd, regmatch_t *subs) + { +- int i; alias *a; autostr s; str_create(&s); ++ int i; alias *a = NULL; autostr s; str_create(&s); + str_print(&s, strlen(command_hints)+NOTE, "%s \n", command_hints); + FOR_STACK (a, aliases, alias*, i) str_print(&s, NOTE, "%s \n", a->name); + menu_wrapper(s.pad, settings[ms_run_musca_command].s); +@@ -2747,7 +2740,7 @@ + char* show_aliases() + { + autostr s; str_create(&s); +- alias *a; int i; ++ alias *a = NULL; int i; + FOR_STACK (a, aliases, alias*, i) + str_print(&s, strlen(a->name)+strlen(a->command)+10, "alias %s %s\n", + a->name, a->command); +@@ -2849,7 +2842,7 @@ + } + char* com_place(char *cmd, regmatch_t *subs) + { +- placement *p; int i; ++ placement *p = NULL; int i; + char *class = regsubstr(cmd, subs, 1); + ubyte flag = parse_flag(cmd, subs, 2, 0); + char *group = regsubstr(cmd, subs, 3); +@@ -3441,7 +3434,7 @@ + autostr s; str_create(&s); + for (;;) + { +- char c = getchar(); ++ int c = getchar(); + if (c == EOF) break; + str_push(&s, c); + } +@@ -3530,7 +3523,7 @@ + } + void grab_stuff() + { +- int i, j, k; head *h; binding *b; ucell *m; ++ int i, j, k; head *h; binding *b; ucell *m = NULL; + refresh_bindings(); + ungrab_stuff(); + ucell modifiers[] = { 0, LockMask, NumlockMask, LockMask|NumlockMask }; +@@ -3550,7 +3543,7 @@ + { + int i; + command_hash = hash_create(); +- command *c; autostr str; str_create(&str); ++ command *c = NULL; autostr str; str_create(&str); + FOR_ARRAY (c, commands, command, i) + { + char *keys = c->keys; +@@ -3566,7 +3559,7 @@ + strtrim(command_hints); + // compile setting regex + setting_hash = hash_create(); +- setting *s; ++ setting *s = NULL; + FOR_ARRAY (s, settings, setting, i) + hash_set(setting_hash, s->name, s); + // compile modmask regex +@@ -3597,7 +3590,7 @@ + } + void setup_bindings() + { +- int i; keymap *k; ++ int i; keymap *k = NULL; + // prepare key bindings + bindings = stack_create(); + FOR_ARRAY (k, keymaps, keymap, i) +--- a/tools.c ++++ b/tools.c +@@ -227,7 +227,7 @@ + ucell ptr = 0; + for (;;) + { +- byte c = fgetc(src); ++ int c = fgetc(src); + if (c == EOF) + break; + diff --git a/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild b/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild new file mode 100644 index 000000000000..37e52d2d458c --- /dev/null +++ b/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-wm/musca/musca-0.9.24_p20100226-r3.ebuild,v 1.1 2014/01/07 18:20:04 jer Exp $ + +EAPI="4" + +inherit eutils savedconfig toolchain-funcs + +DESCRIPTION="A simple dynamic window manager for X, with features nicked from +ratpoison and dwm" +HOMEPAGE="http://aerosuidae.net/musca.html" +SRC_URI="mirror://gentoo/${P}.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="apis xlisten" + +COMMON="x11-libs/libX11" +DEPEND="${COMMON} + sys-apps/sed" +RDEPEND=" + ${COMMON} + >=x11-misc/dmenu-4.4 + apis? ( x11-misc/xbindkeys ) +" + +src_prepare() { + restore_config config.h + + sed -i config.h \ + -e 's:"sort | dmenu -i -b":"-i -b":g' \ + -e 's:sed.*exec.*-i::g' \ + || die + + epatch \ + "${FILESDIR}"/${PN}-0.9.24-make.patch \ + "${FILESDIR}"/${PN}-0.9.24_p20100226-dmenu-4.4.patch \ + "${FILESDIR}"/${PN}-0.9.24_p20100226-null.patch + + local i + for i in apis xlisten; do + if ! use ${i}; then + sed -e "s|${i}||g" -i Makefile || die + fi + done + + tc-export CC +} + +src_install() { + dobin musca + + local i + for i in xlisten apis; do + if use ${i}; then + dobin ${i} + fi + done + doman musca.1 + + exeinto /etc/X11/Sessions + newexe "${FILESDIR}"/${PN}.xsession musca + + save_config config.h +} |