Since every command now has its own help, I decided to point the user to
[ctodo.git] / quit.c
blob59b1d6c1e32666f41b5f8541b9af5a6a544b2697
1 #include <quit.h>
2 #include <stdio.h>
3 #include <string.h>
5 void quit_help() {
6 printf(" Usage: quit\n");
7 printf(" Exits the program.\n");
10 int quit(sqlite3 *db, MArray tokens) {
11 if (tokens->len == 2 && !strcmp(myarray_get(tokens, char *, 1), "help")) {
12 quit_help();
13 return 0;
14 } else if (tokens->len != 1) {
15 printf("Invalid amount of arguments.\n");
16 quit_help();
17 return 0;
20 return 1;