unicodeio.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Unicode character output to streams with locale dependent encoding.
  2. Copyright (C) 2000-2002 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU Library General Public License as published
  5. by the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public
  12. License along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
  14. USA. */
  15. #ifndef UNICODEIO_H
  16. # define UNICODEIO_H
  17. # include <stdio.h>
  18. # ifndef PARAMS
  19. # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
  20. # define PARAMS(Args) Args
  21. # else
  22. # define PARAMS(Args) ()
  23. # endif
  24. # endif
  25. /* Outputs the Unicode character CODE to the output stream STREAM.
  26. Upon failure, exit if exit_on_error is true, otherwise output a fallback
  27. notation. */
  28. extern void print_unicode_char PARAMS ((FILE *stream, unsigned int code,
  29. int exit_on_error));
  30. /* Simple success callback that outputs the converted string.
  31. The STREAM is passed as callback_arg. */
  32. extern long fwrite_success_callback PARAMS ((const char *buf, size_t buflen,
  33. void *callback_arg));
  34. #endif