home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / extra / ustdio / ufile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  2.1 KB  |  63 lines

  1. /*
  2. *******************************************************************************
  3. *                                                                             *
  4. * COPYRIGHT:                                                                  *
  5. *   (C) Copyright International Business Machines Corporation, 1998           *
  6. *   Licensed Material - Program-Property of IBM - All Rights Reserved.        *
  7. *   US Government Users Restricted Rights - Use, duplication, or disclosure   *
  8. *   restricted by GSA ADP Schedule Contract with IBM Corp.                    *
  9. *                                                                             *
  10. *******************************************************************************
  11. *
  12. * File ufile.h
  13. *
  14. * Modification History:
  15. *
  16. *   Date        Name        Description
  17. *   12/01/98    stephen        Creation.
  18. *   03/12/99    stephen     Modified for new C API.
  19. *******************************************************************************
  20. */
  21.  
  22. #ifndef UFILE_H
  23. #define UFILE_H
  24.  
  25. #include "utypes.h"
  26. #include "ucnv.h"
  27. #include "locbund.h"
  28.  
  29. /* The buffer size for fromUnicode calls */
  30. #define UFILE_CHARBUFFER_SIZE 1024
  31.  
  32. /* The buffer size for toUnicode calls */
  33. #define UFILE_UCHARBUFFER_SIZE 1024
  34.  
  35. /* A UFILE */
  36. struct UFILE {
  37.   FILE            *fFile;        /* the actual fs interface */
  38.   bool_t        fOwnFile;    /* TRUE if fFile should be closed */
  39.   
  40.   ULocaleBundle        *fBundle;     /* formatters */
  41.   bool_t        fOwnBundle;     /* TRUE if fBundle should be deleted */
  42.  
  43.   UConverter        *fConverter;     /* for codeset conversion */
  44.  
  45.                       /* buffer used for fromUnicode */
  46.   char            fCharBuffer     [UFILE_CHARBUFFER_SIZE];
  47.  
  48.                       /* buffer used for toUnicode */
  49.   UChar            fUCBuffer     [UFILE_UCHARBUFFER_SIZE];
  50.  
  51.   UChar            *fUCLimit;     /* data limit in fUCBuffer */
  52.   UChar         *fUCPos;     /* current pos in fUCBuffer */
  53. };
  54.  
  55. /**
  56.  * Fill a UFILE's buffer with converted codepage data.
  57.  * @param f The UFILE containing the buffer to fill.
  58.  */
  59. void
  60. ufile_fill_uchar_buffer(UFILE *f);
  61.  
  62. #endif
  63.