File: codeconv.h

package info (click to toggle)
eblook 1%3A1.6.1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,952 kB
  • ctags: 368
  • sloc: sh: 8,319; ansic: 5,377; makefile: 52
file content (60 lines) | stat: -rw-r--r-- 1,802 bytes parent folder | download | duplicates (8)
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
/*
 * codeconv.h - header file for code conversion
 *
 * 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. 
 *
 * Written by Takashi Nemoto (tnemoto@mvi.biglobe.ne.jp).
 * Modified by Kazuhiko <kazuhiko@ring.gr.jp>
 * Modified by Satomi <satomi@ring.gr.jp>
 */

#ifndef __CODECONV_H__
#define __CODECONV_H__

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef STDC_HEADERS
#include <stdio.h>
#endif

#if defined(__STDC__) || defined(WIN32)
#include <stdarg.h>
#define USE_STDARG_H
#endif

#define CODECONV_BUFFER_OVERFLOW ((size_t)-2)
#define CODECONV_ERROR ((size_t)-1)
#define CODECONV_OK 0

#ifndef PROTO
#if defined(__STDC__)
#define PROTO(p) p
#else
#define PROTO(p) ()
#endif
#endif /* PROTO */

extern int locale_init PROTO((const char *encoding));
extern int xvfprintf PROTO((FILE *fp, const char *fmt, va_list ap));
extern int xfprintf PROTO((FILE *fp, const char *fmt, ...));
extern int xprintf PROTO((const char *fmt, ...));
extern int xfputs PROTO((const char *str, FILE *fp));
extern int xputs PROTO((const char *str));
extern char *xfgets PROTO((char *str, int size, FILE *fp));

extern char *euc_to_jis PROTO((char *jis, const char *euc, int len));
extern char *jis_to_euc PROTO((char *euc, const char *jis, int len));
extern size_t current_to_euc PROTO((char **current, size_t *in_len,
				    char **euc, size_t *out_len));

#endif