00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef USTDIO_H
00023 #define USTDIO_H
00024
00025 #include <stdio.h>
00026 #include <stdarg.h>
00027
00028 #include "unicode/utypes.h"
00029 #include "unicode/ucnv.h"
00030 #include "unicode/utrans.h"
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00167 #define U_EOF 0xFFFF
00168
00170 typedef struct UFILE UFILE;
00171
00177 typedef enum {
00178 U_READ = 1,
00179 U_WRITE = 2,
00180 U_READWRITE =3
00181 } UFileDirection;
00182
00200 U_CAPI UFILE* U_EXPORT2
00201 u_fopen(const char *filename,
00202 const char *perm,
00203 const char *locale,
00204 const char *codepage);
00205
00219 U_CAPI UFILE* U_EXPORT2
00220 u_finit(FILE *f,
00221 const char *locale,
00222 const char *codepage);
00223
00238 U_CAPI UFILE* U_EXPORT2
00239 u_fstropen(UChar *stringBuf,
00240 int32_t capacity,
00241 const char *locale);
00242
00248 U_CAPI void U_EXPORT2
00249 u_fclose(UFILE *file);
00250
00259 U_CAPI UBool U_EXPORT2
00260 u_feof(UFILE *f);
00261
00270 U_CAPI void U_EXPORT2
00271 u_fflush(UFILE *file);
00272
00278 U_CAPI void
00279 u_frewind(UFILE *file);
00280
00287 U_CAPI FILE* U_EXPORT2
00288 u_fgetfile(UFILE *f);
00289
00290 #if !UCONFIG_NO_FORMATTING
00291
00300 U_CAPI const char* U_EXPORT2
00301 u_fgetlocale(UFILE *file);
00302
00311 U_CAPI int32_t U_EXPORT2
00312 u_fsetlocale(UFILE *file,
00313 const char *locale);
00314
00315 #endif
00316
00326 U_CAPI const char* U_EXPORT2
00327 u_fgetcodepage(UFILE *file);
00328
00344 U_CAPI int32_t U_EXPORT2
00345 u_fsetcodepage(const char *codepage,
00346 UFILE *file);
00347
00348
00355 U_CAPI UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00356
00357 #if !UCONFIG_NO_FORMATTING
00358
00359
00360
00369 U_CAPI int32_t U_EXPORT2
00370 u_fprintf(UFILE *f,
00371 const char *patternSpecification,
00372 ... );
00373
00386 U_CAPI int32_t U_EXPORT2
00387 u_vfprintf(UFILE *f,
00388 const char *patternSpecification,
00389 va_list ap);
00390
00399 U_CAPI int32_t U_EXPORT2
00400 u_fprintf_u(UFILE *f,
00401 const UChar *patternSpecification,
00402 ... );
00403
00416 U_CAPI int32_t U_EXPORT2
00417 u_vfprintf_u(UFILE *f,
00418 const UChar *patternSpecification,
00419 va_list ap);
00420 #endif
00421
00431 U_CAPI int32_t U_EXPORT2
00432 u_fputs(const UChar *s,
00433 UFILE *f);
00434
00442 U_CAPI UChar32 U_EXPORT2
00443 u_fputc(UChar32 uc,
00444 UFILE *f);
00445
00457 U_CAPI int32_t U_EXPORT2
00458 u_file_write(const UChar *ustring,
00459 int32_t count,
00460 UFILE *f);
00461
00462
00463
00464 #if !UCONFIG_NO_FORMATTING
00465
00475 U_CAPI int32_t U_EXPORT2
00476 u_fscanf(UFILE *f,
00477 const char *patternSpecification,
00478 ... );
00479
00493 U_CAPI int32_t U_EXPORT2
00494 u_vfscanf(UFILE *f,
00495 const char *patternSpecification,
00496 va_list ap);
00497
00507 U_CAPI int32_t U_EXPORT2
00508 u_fscanf_u(UFILE *f,
00509 const UChar *patternSpecification,
00510 ... );
00511
00525 U_CAPI int32_t U_EXPORT2
00526 u_vfscanf_u(UFILE *f,
00527 const UChar *patternSpecification,
00528 va_list ap);
00529 #endif
00530
00543 U_CAPI UChar* U_EXPORT2
00544 u_fgets(UChar *s,
00545 int32_t n,
00546 UFILE *f);
00547
00557 U_CAPI UChar U_EXPORT2
00558 u_fgetc(UFILE *f);
00559
00570 U_CAPI UChar32 U_EXPORT2
00571 u_fgetcx(UFILE *f);
00572
00584 U_CAPI UChar32 U_EXPORT2
00585 u_fungetc(UChar32 c,
00586 UFILE *f);
00587
00598 U_CAPI int32_t U_EXPORT2
00599 u_file_read(UChar *chars,
00600 int32_t count,
00601 UFILE *f);
00602
00603 #if !UCONFIG_NO_TRANSLITERATION
00604
00622 U_CAPI UTransliterator* U_EXPORT2
00623 u_fsettransliterator(UFILE *file, UFileDirection direction,
00624 UTransliterator *adopt, UErrorCode *status);
00625
00626 #endif
00627
00628
00629
00630 #if !UCONFIG_NO_FORMATTING
00631
00632
00643 U_CAPI int32_t U_EXPORT2
00644 u_sprintf(UChar *buffer,
00645 const char *patternSpecification,
00646 ... );
00647
00664 U_CAPI int32_t U_EXPORT2
00665 u_snprintf(UChar *buffer,
00666 int32_t count,
00667 const char *patternSpecification,
00668 ... );
00669
00683 U_CAPI int32_t U_EXPORT2
00684 u_vsprintf(UChar *buffer,
00685 const char *patternSpecification,
00686 va_list ap);
00687
00707 U_CAPI int32_t U_EXPORT2
00708 u_vsnprintf(UChar *buffer,
00709 int32_t count,
00710 const char *patternSpecification,
00711 va_list ap);
00712
00722 U_CAPI int32_t U_EXPORT2
00723 u_sprintf_u(UChar *buffer,
00724 const UChar *patternSpecification,
00725 ... );
00726
00742 U_CAPI int32_t U_EXPORT2
00743 u_snprintf_u(UChar *buffer,
00744 int32_t count,
00745 const UChar *patternSpecification,
00746 ... );
00747
00761 U_CAPI int32_t U_EXPORT2
00762 u_vsprintf_u(UChar *buffer,
00763 const UChar *patternSpecification,
00764 va_list ap);
00765
00785 U_CAPI int32_t U_EXPORT2
00786 u_vsnprintf_u(UChar *buffer,
00787 int32_t count,
00788 const UChar *patternSpecification,
00789 va_list ap);
00790
00791
00792
00803 U_CAPI int32_t U_EXPORT2
00804 u_sscanf(const UChar *buffer,
00805 const char *patternSpecification,
00806 ... );
00807
00822 U_CAPI int32_t U_EXPORT2
00823 u_vsscanf(const UChar *buffer,
00824 const char *patternSpecification,
00825 va_list ap);
00826
00837 U_CAPI int32_t U_EXPORT2
00838 u_sscanf_u(const UChar *buffer,
00839 const UChar *patternSpecification,
00840 ... );
00841
00856 U_CAPI int32_t U_EXPORT2
00857 u_vsscanf_u(const UChar *buffer,
00858 const UChar *patternSpecification,
00859 va_list ap);
00860
00861 #endif
00862 #endif
00863
00864