Mercurial > hg > sidinfo
view sidutil.h @ 337:7ad937740139
Change how --help option is handled and show currently set HVSC/SLDB/STIL
path information in --help.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 13 Jan 2020 13:52:43 +0200 |
parents | f3ba2ba894b1 |
children | a6153837c138 |
line wrap: on
line source
/* * SIDLib common utility functions * Programmed and designed by Matti 'ccr' Hämäläinen <ccr@tnsp.org> * (C) Copyright 2014-2020 Tecnic Software productions (TNSP) */ #ifndef SIDUTIL_H #define SIDUTIL_H 1 #include "th_util.h" #ifdef HAVE_ICONV # include <iconv.h> #endif #ifdef __cplusplus extern "C" { #endif // // Some constants // // HVSC documents directory #define SIDUTIL_HVSC_DOCUMENTS "DOCUMENTS" // Songlengths database filename prefix (.md5|.txt appended) #define SIDUTIL_SLDB_FILEBASE "Songlengths" // STIL database file #define SIDUTIL_STILDB_FILENAME "STIL.txt" enum { TH_LANG_UTF8, TH_LANG_ISO88591, TH_LANG_CP850, TH_LANG_CP437, }; // // Typedefs // typedef struct { BOOL enabled; char *outLang; #ifdef HAVE_ICONV iconv_t iconvCtx; #else int outLangID; #endif } SIDUtilChConvCtx; // // Functions // void sidutil_print_license(void); char * sidutil_escape_string(const char *str, const char *escchars); void sidutil_print_string_escaped(FILE *outFile, const char *str); const char * sidutil_strip_hvsc_path(const char *hvscPath, const char *filename); char * sidutil_check_hvsc_file(const char *hvscPath, const char *filebase, const char *fext); char * sidutil_chconv_convert(SIDUtilChConvCtx *ctx, const char *src); int sidutil_chconv_init(SIDUtilChConvCtx *ctx, const char *outLang); void sidutil_chconv_close(SIDUtilChConvCtx *ctx); #ifdef __cplusplus } #endif #endif // SIDUTIL_H