summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-12 10:57:28 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-12 10:57:28 +0200
commitca65478c8968434c78aacf4a102ccbbe4a66ad9e (patch)
treea7b8e02be5fb457e1c3f0e646e212911048390b6 /main.c
parentsome more simplifications of intro comment in dwm.h, this should suffice for ... (diff)
downloaddwm-ca65478c8968434c78aacf4a102ccbbe4a66ad9e.tar.gz
dwm-ca65478c8968434c78aacf4a102ccbbe4a66ad9e.zip
removed a bunch of lines through making function signatures more consistent with my style ( { does not belong to a new line, if function args are single-lined)
Diffstat (limited to 'main.c')
-rw-r--r--main.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/main.c b/main.c
index f63a697..c6e67e9 100644
--- a/main.c
+++ b/main.c
@@ -39,8 +39,7 @@ static int (*xerrorxlib)(Display *, XErrorEvent *);
39static Bool otherwm, readin; 39static Bool otherwm, readin;
40 40
41static void 41static void
42cleanup() 42cleanup() {
43{
44 close(STDIN_FILENO); 43 close(STDIN_FILENO);
45 while(sel) { 44 while(sel) {
46 resize(sel, True, TopLeft); 45 resize(sel, True, TopLeft);
@@ -60,8 +59,7 @@ cleanup()
60} 59}
61 60
62static void 61static void
63scan() 62scan() {
64{
65 unsigned int i, num; 63 unsigned int i, num;
66 Window *wins, d1, d2; 64 Window *wins, d1, d2;
67 XWindowAttributes wa; 65 XWindowAttributes wa;
@@ -82,8 +80,7 @@ scan()
82} 80}
83 81
84static void 82static void
85setup() 83setup() {
86{
87 int i, j; 84 int i, j;
88 unsigned int mask; 85 unsigned int mask;
89 Window w; 86 Window w;
@@ -112,7 +109,8 @@ setup()
112 } 109 }
113 XFree(modmap); 110 XFree(modmap);
114 111
115 wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask | EnterWindowMask | LeaveWindowMask; 112 wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
113 | EnterWindowMask | LeaveWindowMask;
116 wa.cursor = cursor[CurNormal]; 114 wa.cursor = cursor[CurNormal];
117 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); 115 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
118 116
@@ -163,8 +161,7 @@ setup()
163 * is already running. 161 * is already running.
164 */ 162 */
165static int 163static int
166xerrorstart(Display *dsply, XErrorEvent *ee) 164xerrorstart(Display *dsply, XErrorEvent *ee) {
167{
168 otherwm = True; 165 otherwm = True;
169 return -1; 166 return -1;
170} 167}
@@ -172,8 +169,7 @@ xerrorstart(Display *dsply, XErrorEvent *ee)
172/* extern */ 169/* extern */
173 170
174int 171int
175getproto(Window w) 172getproto(Window w) {
176{
177 int i, format, protos, status; 173 int i, format, protos, status;
178 unsigned long extra, res; 174 unsigned long extra, res;
179 Atom *protocols, real; 175 Atom *protocols, real;
@@ -191,8 +187,7 @@ getproto(Window w)
191} 187}
192 188
193void 189void
194sendevent(Window w, Atom a, long value) 190sendevent(Window w, Atom a, long value) {
195{
196 XEvent e; 191 XEvent e;
197 192
198 e.type = ClientMessage; 193 e.type = ClientMessage;
@@ -206,8 +201,7 @@ sendevent(Window w, Atom a, long value)
206} 201}
207 202
208void 203void
209quit(Arg *arg) 204quit(Arg *arg) {
210{
211 readin = running = False; 205 readin = running = False;
212} 206}
213 207
@@ -217,8 +211,7 @@ quit(Arg *arg)
217 * default error handler, which may call exit. 211 * default error handler, which may call exit.
218 */ 212 */
219int 213int
220xerror(Display *dpy, XErrorEvent *ee) 214xerror(Display *dpy, XErrorEvent *ee) {
221{
222 if(ee->error_code == BadWindow 215 if(ee->error_code == BadWindow
223 || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) 216 || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
224 || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable) 217 || (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
@@ -234,8 +227,7 @@ xerror(Display *dpy, XErrorEvent *ee)
234} 227}
235 228
236int 229int
237main(int argc, char *argv[]) 230main(int argc, char *argv[]) {
238{
239 int r, xfd; 231 int r, xfd;
240 fd_set rd; 232 fd_set rd;
241 233