sources/main.cpp

changeset 88
08ccaf26cffd
parent 81
a18aaf460648
child 89
777b2a10b835
equal deleted inserted replaced
87:53c2aecb9704 88:08ccaf26cffd
41 #include "huffman.h" 41 #include "huffman.h"
42 #include "interface.h" 42 #include "interface.h"
43 43
44 // ------------------------------------------------------------------------------------------------- 44 // -------------------------------------------------------------------------------------------------
45 // 45 //
46 FUNCTION 46 int main (int argc, char* argv[])
47 main (int argc, char* argv[]) -> int
48 { 47 {
49 #ifdef _WIN32 48 #ifdef _WIN32
50 FreeConsole(); 49 FreeConsole();
51 50
52 WSADATA wsaData; 51 WSADATA wsaData;
65 { 64 {
66 fprintf (stderr, "usage: %s\nusage: %s <address> <password>\n", argv[0], argv[0]); 65 fprintf (stderr, "usage: %s\nusage: %s <address> <password>\n", argv[0], argv[0]);
67 return EXIT_FAILURE; 66 return EXIT_FAILURE;
68 } 67 }
69 68
70 Interface iface; 69 zfc::Interface iface;
71 70
72 if (argc == 3) 71 if (argc == 3)
73 iface.connect (argv[1], argv[2]); 72 iface.connect (argv[1], argv[2]);
74 73
75 try 74 try
98 97
99 iface.get_session()->tick(); 98 iface.get_session()->tick();
100 iface.render(); 99 iface.render();
101 } 100 }
102 } 101 }
103 catch (const Exitception&) {} 102 catch (const zfc::Exitception&) {}
104 103
105 iface.get_session()->disconnect(); 104 iface.get_session()->disconnect();
106 return EXIT_SUCCESS; 105 return EXIT_SUCCESS;
107 } 106 }

mercurial