aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-01-17 16:41:50 +0100
committerBert <ber.t@gmx.com>2011-01-17 16:41:50 +0100
commitb9cd06df95af87055492dbd29b465c4748586621 (patch)
tree0d5988e9977d0f79445621936db91d8cf0125ffe /main.c
parent6d4c6daea0e6c3af28ff9a42804178b588f4a8fa (diff)
downloadnsxiv-b9cd06df95af87055492dbd29b465c4748586621.tar.zst
Basic main skeleton
Diffstat (limited to 'main.c')
-rw-r--r--main.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/main.c b/main.c
index b2f739a..a4f9add 100644
--- a/main.c
+++ b/main.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include <stdlib.h>
+
#include "sxiv.h"
#include "app.h"
@@ -24,11 +26,19 @@ app_t app;
void cleanup() {
static int in = 0;
- if (!in++) {
- }
+ if (!in++)
+ app_quit(&app);
}
int main(int argc, char **argv) {
+ // TODO: parse cmd line arguments properly
+ app.filenames = argv + 1;
+ app.filecnt = argc - 1;
+
+ app_init(&app);
+ app_run(&app);
+ app_quit(&app);
+
return 0;
}