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
00203 #define U_EOF 0xFFFF
00204
00206 typedef struct UFILE UFILE;
00207
00208 #ifndef U_HIDE_DRAFT_API
00209
00214 typedef enum {
00215 U_READ = 1,
00216 U_WRITE = 2,
00217 U_READWRITE =3
00218 } UFileDirection;
00219
00220 #endif
00221
00239 U_DRAFT UFILE* U_EXPORT2
00240 u_fopen(const char *filename,
00241 const char *perm,
00242 const char *locale,
00243 const char *codepage);
00244
00258 U_DRAFT UFILE* U_EXPORT2
00259 u_finit(FILE *f,
00260 const char *locale,
00261 const char *codepage);
00262
00277 U_DRAFT UFILE* U_EXPORT2
00278 u_fstropen(UChar *stringBuf,
00279 int32_t capacity,
00280 const char *locale);
00281
00287 U_DRAFT void U_EXPORT2
00288 u_fclose(UFILE *file);
00289
00298 U_DRAFT UBool U_EXPORT2
00299 u_feof(UFILE *f);
00300
00309 U_DRAFT void U_EXPORT2
00310 u_fflush(UFILE *file);
00311
00317 U_DRAFT void
00318 u_frewind(UFILE *file);
00319
00326 U_DRAFT FILE* U_EXPORT2
00327 u_fgetfile(UFILE *f);
00328
00329 #if !UCONFIG_NO_FORMATTING
00330
00339 U_DRAFT const char* U_EXPORT2
00340 u_fgetlocale(UFILE *file);
00341
00350 U_DRAFT int32_t U_EXPORT2
00351 u_fsetlocale(UFILE *file,
00352 const char *locale);
00353
00354 #endif
00355
00365 U_DRAFT const char* U_EXPORT2
00366 u_fgetcodepage(UFILE *file);
00367
00383 U_DRAFT int32_t U_EXPORT2
00384 u_fsetcodepage(const char *codepage,
00385 UFILE *file);
00386
00387
00394 U_DRAFT UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00395
00396 #if !UCONFIG_NO_FORMATTING
00397
00398
00399
00408 U_DRAFT int32_t U_EXPORT2
00409 u_fprintf(UFILE *f,
00410 const char *patternSpecification,
00411 ... );
00412
00425 U_DRAFT int32_t U_EXPORT2
00426 u_vfprintf(UFILE *f,
00427 const char *patternSpecification,
00428 va_list ap);
00429
00438 U_DRAFT int32_t U_EXPORT2
00439 u_fprintf_u(UFILE *f,
00440 const UChar *patternSpecification,
00441 ... );
00442
00455 U_DRAFT int32_t U_EXPORT2
00456 u_vfprintf_u(UFILE *f,
00457 const UChar *patternSpecification,
00458 va_list ap);
00459 #endif
00460
00470 U_DRAFT int32_t U_EXPORT2
00471 u_fputs(const UChar *s,
00472 UFILE *f);
00473
00481 U_DRAFT UChar32 U_EXPORT2
00482 u_fputc(UChar32 uc,
00483 UFILE *f);
00484
00496 U_DRAFT int32_t U_EXPORT2
00497 u_file_write(const UChar *ustring,
00498 int32_t count,
00499 UFILE *f);
00500
00501
00502
00503 #if !UCONFIG_NO_FORMATTING
00504
00514 U_DRAFT int32_t U_EXPORT2
00515 u_fscanf(UFILE *f,
00516 const char *patternSpecification,
00517 ... );
00518
00532 U_DRAFT int32_t U_EXPORT2
00533 u_vfscanf(UFILE *f,
00534 const char *patternSpecification,
00535 va_list ap);
00536
00546 U_DRAFT int32_t U_EXPORT2
00547 u_fscanf_u(UFILE *f,
00548 const UChar *patternSpecification,
00549 ... );
00550
00564 U_DRAFT int32_t U_EXPORT2
00565 u_vfscanf_u(UFILE *f,
00566 const UChar *patternSpecification,
00567 va_list ap);
00568 #endif
00569
00582 U_DRAFT UChar* U_EXPORT2
00583 u_fgets(UChar *s,
00584 int32_t n,
00585 UFILE *f);
00586
00596 U_DRAFT UChar U_EXPORT2
00597 u_fgetc(UFILE *f);
00598
00609 U_DRAFT UChar32 U_EXPORT2
00610 u_fgetcx(UFILE *f);
00611
00623 U_DRAFT UChar32 U_EXPORT2
00624 u_fungetc(UChar32 c,
00625 UFILE *f);
00626
00637 U_DRAFT int32_t U_EXPORT2
00638 u_file_read(UChar *chars,
00639 int32_t count,
00640 UFILE *f);
00641
00642 #if !UCONFIG_NO_TRANSLITERATION
00643
00661 U_DRAFT UTransliterator* U_EXPORT2
00662 u_fsettransliterator(UFILE *file, UFileDirection direction,
00663 UTransliterator *adopt, UErrorCode *status);
00664
00665 #endif
00666
00667
00668
00669 #if !UCONFIG_NO_FORMATTING
00670
00671
00682 U_DRAFT int32_t U_EXPORT2
00683 u_sprintf(UChar *buffer,
00684 const char *patternSpecification,
00685 ... );
00686
00704 U_DRAFT int32_t U_EXPORT2
00705 u_snprintf(UChar *buffer,
00706 int32_t count,
00707 const char *patternSpecification,
00708 ... );
00709
00723 U_DRAFT int32_t U_EXPORT2
00724 u_vsprintf(UChar *buffer,
00725 const char *patternSpecification,
00726 va_list ap);
00727
00748 U_DRAFT int32_t U_EXPORT2
00749 u_vsnprintf(UChar *buffer,
00750 int32_t count,
00751 const char *patternSpecification,
00752 va_list ap);
00753
00763 U_DRAFT int32_t U_EXPORT2
00764 u_sprintf_u(UChar *buffer,
00765 const UChar *patternSpecification,
00766 ... );
00767
00784 U_DRAFT int32_t U_EXPORT2
00785 u_snprintf_u(UChar *buffer,
00786 int32_t count,
00787 const UChar *patternSpecification,
00788 ... );
00789
00803 U_DRAFT int32_t U_EXPORT2
00804 u_vsprintf_u(UChar *buffer,
00805 const UChar *patternSpecification,
00806 va_list ap);
00807
00828 U_DRAFT int32_t U_EXPORT2
00829 u_vsnprintf_u(UChar *buffer,
00830 int32_t count,
00831 const UChar *patternSpecification,
00832 va_list ap);
00833
00834
00835
00846 U_DRAFT int32_t U_EXPORT2
00847 u_sscanf(const UChar *buffer,
00848 const char *patternSpecification,
00849 ... );
00850
00865 U_DRAFT int32_t U_EXPORT2
00866 u_vsscanf(const UChar *buffer,
00867 const char *patternSpecification,
00868 va_list ap);
00869
00880 U_DRAFT int32_t U_EXPORT2
00881 u_sscanf_u(const UChar *buffer,
00882 const UChar *patternSpecification,
00883 ... );
00884
00899 U_DRAFT int32_t U_EXPORT2
00900 u_vsscanf_u(const UChar *buffer,
00901 const UChar *patternSpecification,
00902 va_list ap);
00903
00904 #endif
00905 #endif
00906
00907