Krolyxon
Commit b9cd06d

Branches

Refs →

nsxivb9cd06d

Basic main skeleton

Author
Bert
Date
2011-01-17 16:41 +0100
Parent
6d4c6da
Commit
b9cd06df95af87055492dbd29b465c4748586621

+12 −2

1 file changed

  1. M main.c +12 −2
M main.c View
@@ -16,6 +16,8 @@
1616 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1717 */
1818
19+#include <stdlib.h>
20+
1921 #include "sxiv.h"
2022 #include "app.h"
2123
@@ -24,11 +26,19 @@ app_t app;
2426 void cleanup() {
2527 static int in = 0;
2628
27− if (!in++) {
28− }
29+ if (!in++)
30+ app_quit(&app);
2931 }
3032
3133 int main(int argc, char **argv) {
3234
35+ // TODO: parse cmd line arguments properly
36+ app.filenames = argv + 1;
37+ app.filecnt = argc - 1;
38+
39+ app_init(&app);
40+ app_run(&app);
41+ app_quit(&app);
42+
3343 return 0;
3444 }