File: char-coding.h

package info (click to toggle)
w-scan 20210218-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,872 kB
  • sloc: ansic: 12,752; sh: 4,310; xml: 33; makefile: 17
file content (42 lines) | stat: -rw-r--r-- 1,687 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Simple MPEG/DVB parser to achieve network/service information without initial tuning data
 *
 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Winfried Koehler 
 *
 * This program 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 2
 * of the License, or (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *
 * The author can be reached at: w_scan AT gmx-topmail DOT de
 *
 * The project's page is http://wirbel.htpc-forum.de/w_scan/index2.html
 * v 20110402
 */

#ifndef __CHAR_CODING_H__
#define __CHAR_CODING_H__

int get_user_codepage(void);
int get_codepage_index(const char * codepage);

/*
 * handle character set correctly (via libiconv),
 * ISO/EN 300 468 annex A 
 *
 * WARNING: do NOT pass pointers to temporarly allocated memory here, which should be freed afterwards.
 * *inbuf && *outbuf will point to *different* memory afterwards.
 */
void char_coding(char ** inbuf, size_t * inbytesleft, char ** outbuf, size_t * outbytesleft, unsigned user_charset_id);

#endif