about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/dwm.c b/dwm.c
index a4447f6..cce68cb 100644
--- a/dwm.c
+++ b/dwm.c
@@ -25,6 +25,8 @@
  *
  * To understand everything else, start reading main().
  */
+#include "dwm.h"
+
 #include <errno.h>
 #include <locale.h>
 #include <stdarg.h>
@@ -39,7 +41,6 @@
 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
-#include <X11/Xlib.h>
 #include <X11/Xproto.h>
 #include <X11/Xutil.h>
 
@@ -55,25 +56,6 @@ enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
 
-/* typedefs */
-typedef struct Client Client;
-
-struct Client {
-	char name[256];
-	int x, y, w, h;
-	int rx, ry, rw, rh; /* revert geometry */
-	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
-	int minax, maxax, minay, maxay;
-	long flags;
-	unsigned int border, oldborder;
-	Bool isbanned, isfixed, ismax, isfloating, wasfloating;
-	Bool *tags;
-	Client *next;
-	Client *prev;
-	Client *snext;
-	Window win;
-};
-
 typedef struct {
 	int x, y, w, h;
 	unsigned long norm[ColLast];
7 +0100 committer James Booth <boothj5@gmail.com> 2015-05-27 01:06:17 +0100 Simplified expect tests' href='/danisanti/profani-tty/commit/stabbertests/stabbertestsuite.c?id=db9376d82bcb71caae627b05f79849369798aa2f'>db9376d8 ^
f17afcf5 ^
37600846 ^

f17afcf5 ^

f8c5ed57 ^

f17afcf5 ^
f8c5ed57 ^

f17afcf5 ^

f8c5ed57 ^

a522d022 ^






4ec78920 ^























272e9f83 ^





a5cf83d2 ^


373f47c7 ^





c6ff761a ^



















97c5072f ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122












                         

                       
                          
                         
                              



                                  
 


                                             











                                                                                   
                                                                

                             

                                               

                             
                                               

                             

                                             

                             






                                                            























                                                              





                                                            


                                                   





                                                 



















                                                                                          



                                
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <sys/stat.h>

#include "config.h"

#include "proftest.h"
#include "test_connect.h"
#include "test_ping.h"
#include "test_rooms.h"
#include "test_presence.h"
#include "test_message.h"
#include "test_chat_session.h"

int main(int argc, char* argv[]) {

    const UnitTest all_tests[] = {

        unit_test_setup_teardown(connect_jid,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(connect_jid_requests_roster,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(connect_jid_sends_presence_after_receiving_roster,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(connect_jid_requests_bookmarks,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(connect_bad_password,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(connect_shows_presence_updates,
            init_prof_test,
            close_prof_test),

        unit_test_setup_teardown(ping_multiple,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(ping_responds,
            init_prof_test,
            close_prof_test),

        unit_test_setup_teardown(rooms_query,
            init_prof_test,
            close_prof_test),

        unit_test_setup_teardown(presence_away,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_away_with_message,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_online,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_online_with_message,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_xa,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_xa_with_message,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_dnd,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_dnd_with_message,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_chat,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_chat_with_message,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_set_priority,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_includes_priority,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(presence_received,
            init_prof_test,
            close_prof_test),

        unit_test_setup_teardown(message_send,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(message_receive,
            init_prof_test,
            close_prof_test),

        unit_test_setup_teardown(sends_message_to_barejid_when_contact_offline,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(sends_message_to_barejid_when_contact_online,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(sends_message_to_fulljid_when_received_from_fulljid,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(sends_subsequent_messages_to_fulljid,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(resets_to_barejid_after_presence_received,
            init_prof_test,
            close_prof_test),
        unit_test_setup_teardown(new_session_when_message_received_from_different_fulljid,
            init_prof_test,
            close_prof_test),
    };

    return run_tests(all_tests);
}