diff options
author | P. J. McDermott <pj@pehjota.net> | 2021-03-18 06:46:47 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2021-03-18 06:46:47 (EDT) |
commit | 47ce125aa2b1104711f8ed9bd757ff191b6f1e42 (patch) | |
tree | 2b5d7e36ae8d5c1583a24826f6a16ef5f5176e74 /src | |
parent | 2e95f5355515c6d7e9fe791d0f519a84eaf70416 (diff) | |
download | dodge-balls-47ce125aa2b1104711f8ed9bd757ff191b6f1e42.zip dodge-balls-47ce125aa2b1104711f8ed9bd757ff191b6f1e42.tar.gz dodge-balls-47ce125aa2b1104711f8ed9bd757ff191b6f1e42.tar.bz2 |
main: Add comments and newlines
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -1,3 +1,22 @@ +/* + * Copyright (C) 2021 P. J. McDermott + * + * This file is part of Dodge Balls + * + * Dodge Balls is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dodge Balls is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Dodge Balls. If not, see <http://www.gnu.org/licenses/>. + */ + #include <libgen.h> #include <stdio.h> #include <stdlib.h> @@ -13,6 +32,7 @@ main(int argc, char *argv[]) int n; int i; + /* Find data directories */ program_dir = realpath(dirname(argv[0]), NULL); if (strcmp(program_dir, ABS_BUILDDIR) == 0) { /* Running in place */ @@ -22,6 +42,8 @@ main(int argc, char *argv[]) games_dir = GAMESDIR; } free(program_dir); + + /* Find games */ n = db_games_find(games_dir, &games); if (n > 0) { printf("%d games:\n", n); @@ -32,5 +54,6 @@ main(int argc, char *argv[]) } free(games); } + return EXIT_SUCCESS; } |