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
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00113 #define U_EOF 0xFFFF
00114
00116 typedef struct UFILE UFILE;
00117
00123 typedef enum {
00124 U_READ = 1,
00125 U_WRITE = 2,
00126 U_READWRITE =3
00127 } UFileDirection;
00128
00147 U_CAPI UFILE* U_EXPORT2
00148 u_fopen(const char *filename,
00149 const char *perm,
00150 const char *locale,
00151 const char *codepage);
00152
00166 U_CAPI UFILE* U_EXPORT2
00167 u_finit(FILE *f,
00168 const char *locale,
00169 const char *codepage);
00170
00176 U_CAPI void U_EXPORT2
00177 u_fclose(UFILE *file);
00178
00187 U_CAPI void U_EXPORT2
00188 u_fflush(UFILE *file);
00189
00196 U_CAPI FILE* U_EXPORT2
00197 u_fgetfile(UFILE *f);
00198
00199 #if !UCONFIG_NO_FORMATTING
00200
00209 U_CAPI const char* U_EXPORT2
00210 u_fgetlocale(UFILE *file);
00211
00220 U_CAPI int32_t U_EXPORT2
00221 u_fsetlocale(const char *locale,
00222 UFILE *file);
00223
00224 #endif
00225
00235 U_CAPI const char* U_EXPORT2
00236 u_fgetcodepage(UFILE *file);
00237
00250 U_CAPI int32_t U_EXPORT2
00251 u_fsetcodepage(const char *codepage,
00252 UFILE *file);
00253
00254
00261 U_CAPI UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00262
00263
00264
00273 U_CAPI int32_t U_EXPORT2
00274 u_fprintf( UFILE *f,
00275 const char *patternSpecification,
00276 ... );
00277
00290 U_CAPI int32_t U_EXPORT2
00291 u_vfprintf( UFILE *f,
00292 const char *patternSpecification,
00293 va_list ap);
00294
00303 U_CAPI int32_t U_EXPORT2
00304 u_fprintf_u( UFILE *f,
00305 const UChar *patternSpecification,
00306 ... );
00307
00320 U_CAPI int32_t U_EXPORT2
00321 u_vfprintf_u( UFILE *f,
00322 const UChar *patternSpecification,
00323 va_list ap);
00324
00334 U_CAPI int32_t U_EXPORT2
00335 u_fputs(const UChar *s,
00336 UFILE *f);
00337
00345 U_CAPI int32_t U_EXPORT2
00346 u_fputc(UChar uc,
00347 UFILE *f);
00348
00359 U_CAPI int32_t U_EXPORT2
00360 u_file_write(const UChar *chars,
00361 int32_t count,
00362 UFILE *f);
00363
00364
00365
00366
00376 U_CAPI int32_t U_EXPORT2
00377 u_fscanf( UFILE *f,
00378 const char *patternSpecification,
00379 ... );
00380
00394 U_CAPI int32_t U_EXPORT2
00395 u_vfscanf( UFILE *f,
00396 const char *patternSpecification,
00397 va_list ap);
00398
00408 U_CAPI int32_t U_EXPORT2
00409 u_fscanf_u( UFILE *f,
00410 const UChar *patternSpecification,
00411 ... );
00412
00426 U_CAPI int32_t U_EXPORT2
00427 u_vfscanf_u( UFILE *f,
00428 const UChar *patternSpecification,
00429 va_list ap);
00430
00443 U_CAPI UChar* U_EXPORT2
00444 u_fgets(UFILE *f,
00445 int32_t n,
00446 UChar *s);
00447
00454 U_CAPI UChar U_EXPORT2
00455 u_fgetc(UFILE *f);
00456
00471 U_CAPI UChar32 U_EXPORT2
00472 u_fgetcx(UFILE *f);
00473
00483 U_CAPI UChar U_EXPORT2
00484 u_fungetc(UChar c,
00485 UFILE *f);
00486
00497 U_CAPI int32_t U_EXPORT2
00498 u_file_read(UChar *chars,
00499 int32_t count,
00500 UFILE *f);
00501
00502 #if !UCONFIG_NO_TRANSLITERATION
00503
00521 U_CAPI UTransliterator* U_EXPORT2
00522 u_fsettransliterator(UFILE *file, UFileDirection direction,
00523 UTransliterator *adopt, UErrorCode *status);
00524
00525 #endif
00526
00527
00528
00529
00530
00543 U_CAPI int32_t U_EXPORT2
00544 u_sprintf(UChar *buffer,
00545 const char *locale,
00546 const char *patternSpecification,
00547 ... );
00548
00567 U_CAPI int32_t U_EXPORT2
00568 u_snprintf(UChar *buffer,
00569 int32_t count,
00570 const char *locale,
00571 const char *patternSpecification,
00572 ... );
00573
00589 U_CAPI int32_t U_EXPORT2
00590 u_vsprintf(UChar *buffer,
00591 const char *locale,
00592 const char *patternSpecification,
00593 va_list ap);
00594
00616 U_CAPI int32_t U_EXPORT2
00617 u_vsnprintf(UChar *buffer,
00618 int32_t count,
00619 const char *locale,
00620 const char *patternSpecification,
00621 va_list ap);
00622
00634 U_CAPI int32_t U_EXPORT2
00635 u_sprintf_u(UChar *buffer,
00636 const char *locale,
00637 const UChar *patternSpecification,
00638 ... );
00639
00657 U_CAPI int32_t U_EXPORT2
00658 u_snprintf_u(UChar *buffer,
00659 int32_t count,
00660 const char *locale,
00661 const UChar *patternSpecification,
00662 ... );
00663
00680 U_CAPI int32_t U_EXPORT2
00681 u_vsprintf_u(UChar *buffer,
00682 const char *locale,
00683 const UChar *patternSpecification,
00684 va_list ap);
00685
00706 U_CAPI int32_t U_EXPORT2
00707 u_vsnprintf_u(UChar *buffer,
00708 int32_t count,
00709 const char *locale,
00710 const UChar *patternSpecification,
00711 va_list ap);
00712
00713
00714
00727 U_CAPI int32_t U_EXPORT2
00728 u_sscanf(const UChar *buffer,
00729 const char *locale,
00730 const char *patternSpecification,
00731 ... );
00732
00749 U_CAPI int32_t U_EXPORT2
00750 u_vsscanf(const UChar *buffer,
00751 const char *locale,
00752 const char *patternSpecification,
00753 va_list ap);
00754
00767 U_CAPI int32_t U_EXPORT2
00768 u_sscanf_u(const UChar *buffer,
00769 const char *locale,
00770 const UChar *patternSpecification,
00771 ... );
00772
00789 U_CAPI int32_t U_EXPORT2
00790 u_vsscanf_u(const UChar *buffer,
00791 const char *locale,
00792 const UChar *patternSpecification,
00793 va_list ap);
00794
00795
00796 #endif
00797
00798
00799