/* ***************************************************************************** * libg1m/formatutils.h -- libg1m format decoder helpers. * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey * * This file is part of libg1m. * libg1m is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3.0 of the License, * or (at your option) any later version. * * libg1m 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with libg1m; if not, see . * * Even though the structures and constants are shared in public headers, some * things cannot be defined easily in structures and constants, such as * strings <-> types correspondances. These utilities are there for this. * * If you want to implement the format lecture yourself, either link with * libg1m and use these functions directly, or copy their sources in * `src/utils/type.c` and/or `src/utils/mcstype.c`. * ************************************************************************** */ #ifndef LIBG1M_FORMATUTILS_H # define LIBG1M_FORMATUTILS_H # include /* get type */ int g1m_maketype_std(const char *path, unsigned char *main_id, unsigned char *subtype, const char **info, int *check_one, int *check_two, unsigned int *platform, g1m_type_t *type); /* get mcs type data */ int g1m_maketype_mcs(const char *groupname, const char *filename, unsigned int rawtype, g1m_mcstype_t *type, int *id); /* get cas type data */ int g1m_maketype_cas(const char *datatype, g1m_mcstype_t *type); /* get caspro type data */ int g1m_maketype_caspro(const char *maintype, const char *datatype, g1m_mcstype_t *type); #endif /* LIBG1M_FORMATUTILS_H */