aboutsummaryrefslogtreecommitdiff
path: root/src/tests/testKeys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/testKeys.cc')
-rw-r--r--src/tests/testKeys.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/tests/testKeys.cc b/src/tests/testKeys.cc
index beb2d17..27873e0 100644
--- a/src/tests/testKeys.cc
+++ b/src/tests/testKeys.cc
@@ -34,34 +34,34 @@ uds::uds_flags_t uds::flags = uds::leak_check|uds::log_allocs;
34using namespace std; 34using namespace std;
35 35
36void testKeys(int argc, char **argv) { 36void testKeys(int argc, char **argv) {
37 Display *display = XOpenDisplay(0); 37 Display *display = XOpenDisplay(0);
38 38
39 if (display==0) { 39 if (display==0) {
40 cerr<<"Cant open display."<<endl; 40 cerr<<"Cant open display."<<endl;
41 return; 41 return;
42 } 42 }
43 43
44 Keys *keys = new Keys(display); 44 Keys *keys = new Keys(display);
45 const char default_keyfile[] = "keys"; 45 const char default_keyfile[] = "keys";
46 46
47 if (argc>1) { 47 if (argc>1) {
48 cerr<<"Loading file: "<<argv[1]<<endl; 48 cerr<<"Loading file: "<<argv[1]<<endl;
49 keys->load(const_cast<char *>(argv[1])); 49 keys->load(const_cast<char *>(argv[1]));
50 } else { 50 } else {
51 cerr<<"Using default file: "<<default_keyfile<<endl; 51 cerr<<"Using default file: "<<default_keyfile<<endl;
52 keys->load(const_cast<char *>(default_keyfile)); 52 keys->load(const_cast<char *>(default_keyfile));
53 } 53 }
54 54
55 keys->load(const_cast<char *>(default_keyfile)); 55 keys->load(const_cast<char *>(default_keyfile));
56 56
57 delete keys; 57 delete keys;
58 58
59 XCloseDisplay(display); 59 XCloseDisplay(display);
60} 60}
61 61
62int main(int argc, char **argv) { 62int main(int argc, char **argv) {
63 #ifdef UDS 63#ifdef UDS
64 uds::Init uds_init; 64 uds::Init uds_init;
65 #endif 65#endif
66 testKeys(argc, argv); 66 testKeys(argc, argv);
67} 67}