]>
Dogcows Code - chaz/tar/blob - lib/unicodeio.h
1 /* Unicode character output to streams with locale dependent encoding.
3 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation,
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25 # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
26 # define PARAMS(Args) Args
28 # define PARAMS(Args) ()
32 /* Converts the Unicode character CODE to its multibyte representation
33 in the current locale and calls the CALLBACK on the resulting byte
34 sequence. If an error occurs, invokes ERROR_CALLBACK instead,
35 passing it CODE with errno set appropriately. Returns whatever the
37 extern int unicode_to_mb
38 PARAMS ((unsigned int code
,
39 int (*callback
) PARAMS ((const char *buf
, size_t buflen
,
41 int (*error_callback
) PARAMS ((unsigned int code
,
42 void * callback_arg
)),
45 /* Success callback that outputs the conversion of the character. */
46 extern int print_unicode_success
PARAMS((const char *buf
, size_t buflen
,
49 /* Failure callback that outputs an ASCII representation. */
50 extern int print_unicode_failure
PARAMS((unsigned int code
,
53 /* Outputs the Unicode character CODE to the output stream STREAM.
54 Returns -1 (setting errno) if unsuccessful. */
55 extern int print_unicode_char
PARAMS((FILE *stream
, unsigned int code
));
This page took 0.042555 seconds and 5 git commands to generate.