comparison scid/scid.c @ 33:1d0ddf9e6efd

misc: general documentation
author David Demelier <markand@malikania.fr>
date Thu, 04 Aug 2022 16:47:10 +0200
parents 43333d18e4b8
children 576f4b1ec79f
comparison
equal deleted inserted replaced
32:081e1c258e64 33:1d0ddf9e6efd
1 /*
2 * scid.c -- main scid file and configuration
3 *
4 * Copyright (c) 2021-2022 David Demelier <markand@malikania.fr>
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
1 #include <assert.h> 19 #include <assert.h>
2 #include <stdio.h> 20 #include <stdio.h>
3 21
4 #include "db.h" 22 #include "db.h"
5 #include "log.h" 23 #include "log.h"
11 }; 29 };
12 30
13 void 31 void
14 scid_init(void) 32 scid_init(void)
15 { 33 {
16 log_open("scid"); 34 log_open("scid: version " VERSION);
17 log_info("opening database %s", scid.dbpath); 35 log_info("scid: opening database %s", scid.dbpath);
18 36
19 if (db_open(scid.dbpath) < 0) 37 if (db_open(scid.dbpath) < 0)
20 log_die("abort: unable to open database"); 38 log_die("scid: abort: unable to open database");
21 39
22 theme_open(scid.themedir); 40 theme_open(scid.themedir);
23 } 41 }
24 42
25 void 43 void