Gentoo Archives: gentoo-commits

From: "Alex Alexander (wired)" <wired@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-misc/vifm/files: vifm-0.5-ncurses-5.8.patch
Date: Tue, 29 Mar 2011 20:41:15
Message-Id: 20110329204103.3CF8C20057@flycatcher.gentoo.org
1 wired 11/03/29 20:41:03
2
3 Added: vifm-0.5-ncurses-5.8.patch
4 Log:
5 fixed segfault with ncurses-5.8. bug #359179
6
7 (Portage version: 2.2.0_alpha29/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/vifm/files/vifm-0.5-ncurses-5.8.patch?rev=1.1&content-type=text/plain
14
15 Index: vifm-0.5-ncurses-5.8.patch
16 ===================================================================
17 this makes vifm compatible with ncurses-5.8
18
19 patch source:
20 http://projects.archlinux.org/svntogit/community.git/plain/vifm/repos/community-x86_64/ncurses58.patch
21 bug:
22 https://bugs.gentoo.org/show_bug.cgi?id=359179
23 --- vifm-0.5/src/keys.c
24 +++ vifm-0.5-new//src/keys.c
25 @@ -721,7 +721,6 @@
26 redrawwin(stat_win);
27 redrawwin(status_bar);
28 redrawwin(pos_win);
29 - redrawwin(lwin.title);
30 redrawwin(lwin.win);
31 redrawwin(num_win);
32 redrawwin(rborder);
33 @@ -740,7 +739,6 @@
34 touchwin(num_win);
35 touchwin(rborder);
36
37 - redrawwin(rwin.title);
38 redrawwin(rwin.win);
39 redrawwin(lborder);
40 redrawwin(stat_win);
41 @@ -768,10 +766,8 @@
42 touchwin(num_win);
43 touchwin(rborder);
44
45 - redrawwin(lwin.title);
46 redrawwin(lwin.win);
47 redrawwin(mborder);
48 - redrawwin(rwin.title);
49 redrawwin(rwin.win);
50 redrawwin(lborder);
51 redrawwin(stat_win);
52 --- vifm-0.5/src/ui.c
53 +++ vifm-0.5-new//src/ui.c
54 @@ -158,32 +158,32 @@
55
56 werase(stdscr);
57
58 - menu_win = newwin(screen_y - 1, screen_x , 0, 0);
59 + menu_win = newwin(screen_y - 1, screen_x , 1, 1);
60 wbkgdset(menu_win, COLOR_PAIR(WIN_COLOR));
61 werase(menu_win);
62
63 - sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2, (screen_x -30)/2);
64 + sort_win = newwin(NUM_SORT_OPTIONS + 3, 30, (screen_y -12)/2 > 0 ? (screen_y -12/2) :1, (screen_x -30)/2 > 0 ? (screen_x -30)/2: 1);
65 wbkgdset(sort_win, COLOR_PAIR(WIN_COLOR));
66 werase(sort_win);
67
68 - change_win = newwin(20, 30, (screen_y -20)/2, (screen_x -30)/2);
69 + change_win = newwin(20, 30, ((screen_y -20)/2 > 0 ? (screen_y -20)/2 : 1), (screen_x -30)/2 > 0 ? (screen_x -30/2) : 1 );
70 wbkgdset(change_win, COLOR_PAIR(WIN_COLOR));
71 werase(change_win);
72
73 - error_win = newwin(10, screen_x -2, (screen_y -10)/2, 1);
74 + error_win = newwin(10, screen_x -2, (screen_y -10)/2 > 0 ? (screen_y -10)/2 : 1, 1);
75 wbkgdset(error_win, COLOR_PAIR(WIN_COLOR));
76 werase(error_win);
77
78 - lborder = newwin(screen_y - 2, 1, 0, 0);
79 + lborder = newwin(screen_y - 2, 1, 1, 1);
80
81 wbkgdset(lborder, COLOR_PAIR(BORDER_COLOR));
82
83 werase(lborder);
84
85 if (curr_stats.number_of_windows == 1)
86 - lwin.title = newwin(0, screen_x -2, 0, 1);
87 + lwin.title = newwin(0, screen_x -2, 1, 1);
88 else
89 - lwin.title = newwin(0, screen_x/2 -1, 0, 1);
90 + lwin.title = newwin(0, screen_x/2 -1, 1, 1);
91
92 wattrset(lwin.title, A_BOLD);
93 wbkgdset(lwin.title, COLOR_PAIR(BORDER_COLOR));
94 @@ -204,16 +204,16 @@
95 lwin.window_rows = y -1;
96 lwin.window_width = x -1;
97
98 - mborder = newwin(screen_y, 2, 0, screen_x/2 -1);
99 + mborder = newwin(screen_y, 2, 1, screen_x/2 -1 > 0 ? screen_x/2 -1 : 1);
100
101 wbkgdset(mborder, COLOR_PAIR(BORDER_COLOR));
102
103 werase(mborder);
104
105 if (curr_stats.number_of_windows == 1)
106 - rwin.title = newwin(0, screen_x -2 , 0, 1);
107 + rwin.title = newwin(0, screen_x -2 , 1, 1);
108 else
109 - rwin.title = newwin(1, screen_x/2 -1 , 0, screen_x/2 +1);
110 + rwin.title = newwin(1, screen_x/2 -1 , 1, screen_x/2 +1 > 0 ? screen_x/2 +1 :1);
111
112 wbkgdset(rwin.title, COLOR_PAIR(BORDER_COLOR));
113 wattrset(rwin.title, A_BOLD);
114 @@ -224,7 +224,7 @@
115 if (curr_stats.number_of_windows == 1)
116 rwin.win = newwin(screen_y - 3, screen_x -2 , 1, 1);
117 else
118 - rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1);
119 + rwin.win = newwin(screen_y - 3, screen_x/2 -2 , 1, screen_x/2 +1 > 0 ? screen_x/2 +1 : 1);
120
121 keypad(rwin.win, TRUE);
122 wattrset(rwin.win, A_BOLD);
123 @@ -235,32 +235,32 @@
124 rwin.window_rows = y - 1;
125 rwin.window_width = x -1;
126
127 - rborder = newwin(screen_y - 2, 1, 0, screen_x -1);
128 + rborder = newwin(screen_y - 2, 1, 1, screen_x -1 > 0 ? screen_x-1 : 1);
129
130 wbkgdset(rborder, COLOR_PAIR(BORDER_COLOR));
131
132 werase(rborder);
133
134 - stat_win = newwin(1, screen_x, screen_y -2, 0);
135 + stat_win = newwin(1, screen_x, screen_y -2 > 0 ? screen_y -2 : 1, 1);
136
137 wbkgdset(stat_win, COLOR_PAIR(BORDER_COLOR));
138
139 werase(stat_win);
140
141 - status_bar = newwin(1, screen_x - 19, screen_y -1, 0);
142 + status_bar = newwin(1, screen_x - 19, screen_y -1 > 0 ? screen_y -2: 1, 1);
143 keypad(status_bar, TRUE);
144 wattrset(status_bar, A_BOLD);
145 wattron(status_bar, A_BOLD);
146 wbkgdset(status_bar, COLOR_PAIR(STATUS_BAR_COLOR));
147 werase(status_bar);
148
149 - pos_win = newwin(1, 13, screen_y - 1, screen_x -13);
150 + pos_win = newwin(1, 13, screen_y - 1 > 0 ? screen_y -1 : 1, screen_x -13 > 0 ? screen_x -13 : 1);
151 wattrset(pos_win, A_BOLD);
152 wattron(pos_win, A_BOLD);
153 wbkgdset(pos_win, COLOR_PAIR(STATUS_BAR_COLOR));
154 werase(pos_win);
155
156 - num_win = newwin(1, 6, screen_y - 1, screen_x -19);
157 + num_win = newwin(1, 6, screen_y - 1 > 0 ? screen_y -1 : 1, screen_x -19 > 0 ? screen_x -19 : 1);
158 wattrset(num_win, A_BOLD);
159 wattron(num_win, A_BOLD);
160 wbkgdset(num_win, COLOR_PAIR(STATUS_BAR_COLOR));