aboutsummaryrefslogtreecommitdiff
path: root/tsalis/src
diff options
context:
space:
mode:
Diffstat (limited to 'tsalis/src')
-rw-r--r--tsalis/src/printer.c2
-rw-r--r--tsalis/src/tsalis.c13
2 files changed, 7 insertions, 8 deletions
diff --git a/tsalis/src/printer.c b/tsalis/src/printer.c
index c835f24..ec01ada 100644
--- a/tsalis/src/printer.c
+++ b/tsalis/src/printer.c
@@ -102,12 +102,14 @@ tsp_check(void)
return SFALSE;
}
+ endwin();
return STRUE;
}
void
tsp_init(void)
{
+ initscr();
cbreak();
noecho();
curs_set(0);
diff --git a/tsalis/src/tsalis.c b/tsalis/src/tsalis.c
index 7722ca9..dc57fa4 100644
--- a/tsalis/src/tsalis.c
+++ b/tsalis/src/tsalis.c
@@ -59,14 +59,11 @@ init(int argc, char **argv)
if (argc == 1) {
onDefault();
- } else if (argc == 2) {
- char cmd = argv[1][0];
- char *val = &argv[1][1];
-
- if (cmd == 'n') {
- s_init(atoi(val));
- } else if (cmd == 'l') {
- onLoad(val);
+ } else if (argc == 3) {
+ if (!strcmp(argv[1], "-n") || !strcmp(argv[1], "--new")) {
+ s_init(atoi(argv[2]));
+ } else if (!strcmp(argv[1], "-l") || !strcmp(argv[1], "--load")) {
+ onLoad(argv[2]);
} else {
fputs("ERROR: Incorrect arguments\n", stderr);
exit(1);