From 47ce125aa2b1104711f8ed9bd757ff191b6f1e42 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 18 Mar 2021 06:46:47 -0400 Subject: main: Add comments and newlines --- (limited to 'src') diff --git a/src/main.c b/src/main.c index b547a9f..6ea2d49 100644 --- a/src/main.c +++ b/src/main.c @@ -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 . + */ + #include #include #include @@ -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; } -- cgit v0.9.1