00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef USTDIO_H
00025 #define USTDIO_H
00026
00027 #include <stdio.h>
00028 #include <stdarg.h>
00029
00030 #include "unicode/utypes.h"
00031 #include "unicode/ucnv.h"
00032 #include "unicode/utrans.h"
00033 #include "unicode/unum.h"
00034
00035 #if U_SHOW_CPLUSPLUS_API
00036 #include "unicode/localpointer.h"
00037 #endif // U_SHOW_CPLUSPLUS_API
00038
00039 #if !UCONFIG_NO_CONVERSION
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
00212 #define U_EOF 0xFFFF
00213
00215 typedef struct UFILE UFILE;
00216
00222 typedef enum {
00223 U_READ = 1,
00224 U_WRITE = 2,
00225 U_READWRITE =3
00226 } UFileDirection;
00227
00245 U_CAPI UFILE* U_EXPORT2
00246 u_fopen(const char *filename,
00247 const char *perm,
00248 const char *locale,
00249 const char *codepage);
00250
00268 U_CAPI UFILE* U_EXPORT2
00269 u_fopen_u(const UChar *filename,
00270 const char *perm,
00271 const char *locale,
00272 const char *codepage);
00273
00290 U_CAPI UFILE* U_EXPORT2
00291 u_finit(FILE *f,
00292 const char *locale,
00293 const char *codepage);
00294
00311 U_CAPI UFILE* U_EXPORT2
00312 u_fadopt(FILE *f,
00313 const char *locale,
00314 const char *codepage);
00315
00330 U_CAPI UFILE* U_EXPORT2
00331 u_fstropen(UChar *stringBuf,
00332 int32_t capacity,
00333 const char *locale);
00334
00341 U_CAPI void U_EXPORT2
00342 u_fclose(UFILE *file);
00343
00344 #if U_SHOW_CPLUSPLUS_API
00345
00346 U_NAMESPACE_BEGIN
00347
00357 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFILEPointer, UFILE, u_fclose);
00358
00359 U_NAMESPACE_END
00360
00361 #endif
00362
00371 U_CAPI UBool U_EXPORT2
00372 u_feof(UFILE *f);
00373
00384 U_CAPI void U_EXPORT2
00385 u_fflush(UFILE *file);
00386
00392 U_CAPI void
00393 u_frewind(UFILE *file);
00394
00401 U_CAPI FILE* U_EXPORT2
00402 u_fgetfile(UFILE *f);
00403
00404 #if !UCONFIG_NO_FORMATTING
00405
00414 U_CAPI const char* U_EXPORT2
00415 u_fgetlocale(UFILE *file);
00416
00425 U_CAPI int32_t U_EXPORT2
00426 u_fsetlocale(UFILE *file,
00427 const char *locale);
00428
00429 #endif
00430
00440 U_CAPI const char* U_EXPORT2
00441 u_fgetcodepage(UFILE *file);
00442
00458 U_CAPI int32_t U_EXPORT2
00459 u_fsetcodepage(const char *codepage,
00460 UFILE *file);
00461
00462
00469 U_CAPI UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00470
00471 #if !UCONFIG_NO_FORMATTING
00472
00478 U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
00479
00480
00481
00489 U_CAPI int32_t U_EXPORT2
00490 u_printf(const char *patternSpecification,
00491 ... );
00492
00501 U_CAPI int32_t U_EXPORT2
00502 u_fprintf(UFILE *f,
00503 const char *patternSpecification,
00504 ... );
00505
00518 U_CAPI int32_t U_EXPORT2
00519 u_vfprintf(UFILE *f,
00520 const char *patternSpecification,
00521 va_list ap);
00522
00530 U_CAPI int32_t U_EXPORT2
00531 u_printf_u(const UChar *patternSpecification,
00532 ... );
00533
00539 U_CAPI UFILE * U_EXPORT2
00540 u_get_stdout(void);
00541
00550 U_CAPI int32_t U_EXPORT2
00551 u_fprintf_u(UFILE *f,
00552 const UChar *patternSpecification,
00553 ... );
00554
00567 U_CAPI int32_t U_EXPORT2
00568 u_vfprintf_u(UFILE *f,
00569 const UChar *patternSpecification,
00570 va_list ap);
00571 #endif
00572
00582 U_CAPI int32_t U_EXPORT2
00583 u_fputs(const UChar *s,
00584 UFILE *f);
00585
00593 U_CAPI UChar32 U_EXPORT2
00594 u_fputc(UChar32 uc,
00595 UFILE *f);
00596
00608 U_CAPI int32_t U_EXPORT2
00609 u_file_write(const UChar *ustring,
00610 int32_t count,
00611 UFILE *f);
00612
00613
00614
00615 #if !UCONFIG_NO_FORMATTING
00616
00626 U_CAPI int32_t U_EXPORT2
00627 u_fscanf(UFILE *f,
00628 const char *patternSpecification,
00629 ... );
00630
00644 U_CAPI int32_t U_EXPORT2
00645 u_vfscanf(UFILE *f,
00646 const char *patternSpecification,
00647 va_list ap);
00648
00658 U_CAPI int32_t U_EXPORT2
00659 u_fscanf_u(UFILE *f,
00660 const UChar *patternSpecification,
00661 ... );
00662
00676 U_CAPI int32_t U_EXPORT2
00677 u_vfscanf_u(UFILE *f,
00678 const UChar *patternSpecification,
00679 va_list ap);
00680 #endif
00681
00694 U_CAPI UChar* U_EXPORT2
00695 u_fgets(UChar *s,
00696 int32_t n,
00697 UFILE *f);
00698
00708 U_CAPI UChar U_EXPORT2
00709 u_fgetc(UFILE *f);
00710
00721 U_CAPI UChar32 U_EXPORT2
00722 u_fgetcx(UFILE *f);
00723
00735 U_CAPI UChar32 U_EXPORT2
00736 u_fungetc(UChar32 c,
00737 UFILE *f);
00738
00749 U_CAPI int32_t U_EXPORT2
00750 u_file_read(UChar *chars,
00751 int32_t count,
00752 UFILE *f);
00753
00754 #if !UCONFIG_NO_TRANSLITERATION
00755
00773 U_CAPI UTransliterator* U_EXPORT2
00774 u_fsettransliterator(UFILE *file, UFileDirection direction,
00775 UTransliterator *adopt, UErrorCode *status);
00776
00777 #endif
00778
00779
00780
00781 #if !UCONFIG_NO_FORMATTING
00782
00783
00794 U_CAPI int32_t U_EXPORT2
00795 u_sprintf(UChar *buffer,
00796 const char *patternSpecification,
00797 ... );
00798
00816 U_CAPI int32_t U_EXPORT2
00817 u_snprintf(UChar *buffer,
00818 int32_t count,
00819 const char *patternSpecification,
00820 ... );
00821
00835 U_CAPI int32_t U_EXPORT2
00836 u_vsprintf(UChar *buffer,
00837 const char *patternSpecification,
00838 va_list ap);
00839
00860 U_CAPI int32_t U_EXPORT2
00861 u_vsnprintf(UChar *buffer,
00862 int32_t count,
00863 const char *patternSpecification,
00864 va_list ap);
00865
00875 U_CAPI int32_t U_EXPORT2
00876 u_sprintf_u(UChar *buffer,
00877 const UChar *patternSpecification,
00878 ... );
00879
00896 U_CAPI int32_t U_EXPORT2
00897 u_snprintf_u(UChar *buffer,
00898 int32_t count,
00899 const UChar *patternSpecification,
00900 ... );
00901
00915 U_CAPI int32_t U_EXPORT2
00916 u_vsprintf_u(UChar *buffer,
00917 const UChar *patternSpecification,
00918 va_list ap);
00919
00940 U_CAPI int32_t U_EXPORT2
00941 u_vsnprintf_u(UChar *buffer,
00942 int32_t count,
00943 const UChar *patternSpecification,
00944 va_list ap);
00945
00946
00947
00958 U_CAPI int32_t U_EXPORT2
00959 u_sscanf(const UChar *buffer,
00960 const char *patternSpecification,
00961 ... );
00962
00977 U_CAPI int32_t U_EXPORT2
00978 u_vsscanf(const UChar *buffer,
00979 const char *patternSpecification,
00980 va_list ap);
00981
00992 U_CAPI int32_t U_EXPORT2
00993 u_sscanf_u(const UChar *buffer,
00994 const UChar *patternSpecification,
00995 ... );
00996
01011 U_CAPI int32_t U_EXPORT2
01012 u_vsscanf_u(const UChar *buffer,
01013 const UChar *patternSpecification,
01014 va_list ap);
01015
01016
01017 #endif
01018 #endif
01019 #endif
01020
01021