annotate lib/unicodeio.h @ 4739:04758f7475fd

Merge changes from glibc.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 26 Sep 2003 07:35:01 +0000
parents d4efdb886b2a
children a48fb0e98c8c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
1 /* Unicode character output to streams with locale dependent encoding.
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
2
4401
493e0f7fc4f7 Assume ANSI C.
Bruno Haible <bruno@clisp.org>
parents: 4101
diff changeset
3 Copyright (C) 2000-2003 Free Software Foundation, Inc.
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
4
4435
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
5 This program is free software; you can redistribute it and/or modify
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
6 it under the terms of the GNU General Public License as published by
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
8 any later version.
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
9
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
10 This program is distributed in the hope that it will be useful,
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
4435
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
13 GNU General Public License for more details.
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
14
4435
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
15 You should have received a copy of the GNU General Public License along
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
16 with this program; if not, write to the Free Software Foundation,
d4efdb886b2a Switch from LGPL to GPL.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4401
diff changeset
17 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
18
2306
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
19 #ifndef UNICODEIO_H
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
20 # define UNICODEIO_H
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
21
4101
cf248975b9d3 Make getline.h and unicodeio.h self-contained.
Bruno Haible <bruno@clisp.org>
parents: 3727
diff changeset
22 # include <stddef.h>
2306
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
23 # include <stdio.h>
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
24
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
25 /* Outputs the Unicode character CODE to the output stream STREAM.
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
26 Upon failure, exit if exit_on_error is true, otherwise output a fallback
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
27 notation. */
4401
493e0f7fc4f7 Assume ANSI C.
Bruno Haible <bruno@clisp.org>
parents: 4101
diff changeset
28 extern void print_unicode_char (FILE *stream, unsigned int code,
493e0f7fc4f7 Assume ANSI C.
Bruno Haible <bruno@clisp.org>
parents: 4101
diff changeset
29 int exit_on_error);
3727
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
30
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
31 /* Simple success callback that outputs the converted string.
f80e972daf0f 2002-02-02 Paul Eggert <eggert@twinsun.com>
Jim Meyering <jim@meyering.net>
parents: 2336
diff changeset
32 The STREAM is passed as callback_arg. */
4401
493e0f7fc4f7 Assume ANSI C.
Bruno Haible <bruno@clisp.org>
parents: 4101
diff changeset
33 extern long fwrite_success_callback (const char *buf, size_t buflen,
493e0f7fc4f7 Assume ANSI C.
Bruno Haible <bruno@clisp.org>
parents: 4101
diff changeset
34 void *callback_arg);
2306
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
35
8818a3f18fb7 New file from Bruno.
Jim Meyering <jim@meyering.net>
parents:
diff changeset
36 #endif