/usr/include/cconv.h is in libcconv-dev 0.6.2-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | /*
* Copyright (C) 2008, 2009
* Free Software Foundation, Inc.
*
* 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, or (at your option)
* any later version.
*
* \author Yang Jianyu <xiaoyjy@hotmail.com>
*/
#ifndef _CCONV_H_
#define _CCONV_H_
#include <iconv.h>
#define CCONV_CODE_UTF "UTF-8"
// GBL means LARGEST of GB encoding.
#define CCONV_CODE_GBL "GB18030"
#define CCONV_CODE_BIG "BIG5"
#define CCONV_CODE_UCN "UTF8-CN"
#define CCONV_CODE_UTW "UTF8-TW"
#define CCONV_CODE_UHK "UTF8-HK"
#define CCONV_CODE_UHS "UTF8-HANS"
#define CCONV_CODE_UHT "UTF8-HANT"
#define CCONV_CODE_GHS "GB-HANS"
#define CCONV_CODE_GHT "GB-HANT"
typedef enum cconv_type
{
CCONV_ERROR = -1,
CCONV_NULL = 0 ,
CCONV_GBL_TO_BIG = 1,
CCONV_GBL_TO_UHS,
CCONV_GBL_TO_UHT,
CCONV_GBL_TO_GHS,
CCONV_GBL_TO_GHT,
CCONV_BIG_TO_GBL,
CCONV_BIG_TO_UHS,
CCONV_UTF_TO_UHT,
CCONV_UTF_TO_UHS,
CCONV_UTF_TO_GBL,
CCONV_UTF_TO_BIG,
}
cconv_type;
typedef void* cconv_t;
/* {{{ cconv_t cconv_open(const char* tocode, const char* fromcode) */
/**
* Open a cconv handle.
*
* @param tocode Convert to-code.
* @param fromcode Convert from-code.
* @retval t_handle Cconv handle,(-1: error).
*/
extern cconv_t cconv_open(const char* tocode, const char* fromcode);
/**
* Convert character code.
*
* @param t_handle cconv handle.
* @param inbuf Input buffer.
* @param inbytesleft Input buffer left.
* @retval t_handle cconv handle,(-1: error).
*/
extern size_t cconv(cconv_t cd,
#ifdef FreeBSD
const char** inbuf,
#else
char** inbuf,
#endif
size_t* inbytesleft,
char** outbuf,
size_t* outbytesleft);
/* {{{ int cconv_close( cconv_t cd ) */
/**
* Close a cconv handle.
*
* @param cd cconv handle.
* @return 0: succ, -1: fail.
*/
extern int cconv_close(cconv_t cd);
#endif
|