Mercurial > sci
view 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 |
line wrap: on
line source
/* * scid.c -- main scid file and configuration * * Copyright (c) 2021-2022 David Demelier <markand@malikania.fr> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <assert.h> #include <stdio.h> #include "db.h" #include "log.h" #include "scid.h" #include "theme.h" struct scid scid = { .dbpath = VARDIR "/db/sci/sci.db" }; void scid_init(void) { log_open("scid: version " VERSION); log_info("scid: opening database %s", scid.dbpath); if (db_open(scid.dbpath) < 0) log_die("scid: abort: unable to open database"); theme_open(scid.themedir); } void scid_finish(void) { db_finish(); log_finish(); }