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/localpointer.h"
00034 #include "unicode/unum.h"
00035
00036 #if !UCONFIG_NO_CONVERSION
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
00209 #define U_EOF 0xFFFF
00210
00212 typedef struct UFILE UFILE;
00213
00219 typedef enum {
00220 U_READ = 1,
00221 U_WRITE = 2,
00222 U_READWRITE =3
00223 } UFileDirection;
00224
00242 U_STABLE UFILE* U_EXPORT2
00243 u_fopen(const char *filename,
00244 const char *perm,
00245 const char *locale,
00246 const char *codepage);
00247
00265 U_STABLE UFILE* U_EXPORT2
00266 u_fopen_u(const UChar *filename,
00267 const char *perm,
00268 const char *locale,
00269 const char *codepage);
00270
00287 U_STABLE UFILE* U_EXPORT2
00288 u_finit(FILE *f,
00289 const char *locale,
00290 const char *codepage);
00291
00308 U_STABLE UFILE* U_EXPORT2
00309 u_fadopt(FILE *f,
00310 const char *locale,
00311 const char *codepage);
00312
00327 U_STABLE UFILE* U_EXPORT2
00328 u_fstropen(UChar *stringBuf,
00329 int32_t capacity,
00330 const char *locale);
00331
00338 U_STABLE void U_EXPORT2
00339 u_fclose(UFILE *file);
00340
00341 #if U_SHOW_CPLUSPLUS_API
00342
00343 U_NAMESPACE_BEGIN
00344
00354 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFILEPointer, UFILE, u_fclose);
00355
00356 U_NAMESPACE_END
00357
00358 #endif
00359
00368 U_STABLE UBool U_EXPORT2
00369 u_feof(UFILE *f);
00370
00381 U_STABLE void U_EXPORT2
00382 u_fflush(UFILE *file);
00383
00389 U_STABLE void
00390 u_frewind(UFILE *file);
00391
00398 U_STABLE FILE* U_EXPORT2
00399 u_fgetfile(UFILE *f);
00400
00401 #if !UCONFIG_NO_FORMATTING
00402
00411 U_STABLE const char* U_EXPORT2
00412 u_fgetlocale(UFILE *file);
00413
00422 U_STABLE int32_t U_EXPORT2
00423 u_fsetlocale(UFILE *file,
00424 const char *locale);
00425
00426 #endif
00427
00437 U_STABLE const char* U_EXPORT2
00438 u_fgetcodepage(UFILE *file);
00439
00455 U_STABLE int32_t U_EXPORT2
00456 u_fsetcodepage(const char *codepage,
00457 UFILE *file);
00458
00459
00466 U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00467
00468 #if !UCONFIG_NO_FORMATTING
00469
00475 U_STABLE const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
00476
00477
00478
00486 U_STABLE int32_t U_EXPORT2
00487 u_printf(const char *patternSpecification,
00488 ... );
00489
00498 U_STABLE int32_t U_EXPORT2
00499 u_fprintf(UFILE *f,
00500 const char *patternSpecification,
00501 ... );
00502
00515 U_STABLE int32_t U_EXPORT2
00516 u_vfprintf(UFILE *f,
00517 const char *patternSpecification,
00518 va_list ap);
00519
00527 U_STABLE int32_t U_EXPORT2
00528 u_printf_u(const UChar *patternSpecification,
00529 ... );
00530
00536 U_STABLE UFILE * U_EXPORT2
00537 u_get_stdout(void);
00538
00547 U_STABLE int32_t U_EXPORT2
00548 u_fprintf_u(UFILE *f,
00549 const UChar *patternSpecification,
00550 ... );
00551
00564 U_STABLE int32_t U_EXPORT2
00565 u_vfprintf_u(UFILE *f,
00566 const UChar *patternSpecification,
00567 va_list ap);
00568 #endif
00569
00579 U_STABLE int32_t U_EXPORT2
00580 u_fputs(const UChar *s,
00581 UFILE *f);
00582
00590 U_STABLE UChar32 U_EXPORT2
00591 u_fputc(UChar32 uc,
00592 UFILE *f);
00593
00605 U_STABLE int32_t U_EXPORT2
00606 u_file_write(const UChar *ustring,
00607 int32_t count,
00608 UFILE *f);
00609
00610
00611
00612 #if !UCONFIG_NO_FORMATTING
00613
00623 U_STABLE int32_t U_EXPORT2
00624 u_fscanf(UFILE *f,
00625 const char *patternSpecification,
00626 ... );
00627
00641 U_STABLE int32_t U_EXPORT2
00642 u_vfscanf(UFILE *f,
00643 const char *patternSpecification,
00644 va_list ap);
00645
00655 U_STABLE int32_t U_EXPORT2
00656 u_fscanf_u(UFILE *f,
00657 const UChar *patternSpecification,
00658 ... );
00659
00673 U_STABLE int32_t U_EXPORT2
00674 u_vfscanf_u(UFILE *f,
00675 const UChar *patternSpecification,
00676 va_list ap);
00677 #endif
00678
00691 U_STABLE UChar* U_EXPORT2
00692 u_fgets(UChar *s,
00693 int32_t n,
00694 UFILE *f);
00695
00705 U_STABLE UChar U_EXPORT2
00706 u_fgetc(UFILE *f);
00707
00718 U_STABLE UChar32 U_EXPORT2
00719 u_fgetcx(UFILE *f);
00720
00732 U_STABLE UChar32 U_EXPORT2
00733 u_fungetc(UChar32 c,
00734 UFILE *f);
00735
00746 U_STABLE int32_t U_EXPORT2
00747 u_file_read(UChar *chars,
00748 int32_t count,
00749 UFILE *f);
00750
00751 #if !UCONFIG_NO_TRANSLITERATION
00752
00770 U_STABLE UTransliterator* U_EXPORT2
00771 u_fsettransliterator(UFILE *file, UFileDirection direction,
00772 UTransliterator *adopt, UErrorCode *status);
00773
00774 #endif
00775
00776
00777
00778 #if !UCONFIG_NO_FORMATTING
00779
00780
00791 U_STABLE int32_t U_EXPORT2
00792 u_sprintf(UChar *buffer,
00793 const char *patternSpecification,
00794 ... );
00795
00813 U_STABLE int32_t U_EXPORT2
00814 u_snprintf(UChar *buffer,
00815 int32_t count,
00816 const char *patternSpecification,
00817 ... );
00818
00832 U_STABLE int32_t U_EXPORT2
00833 u_vsprintf(UChar *buffer,
00834 const char *patternSpecification,
00835 va_list ap);
00836
00857 U_STABLE int32_t U_EXPORT2
00858 u_vsnprintf(UChar *buffer,
00859 int32_t count,
00860 const char *patternSpecification,
00861 va_list ap);
00862
00872 U_STABLE int32_t U_EXPORT2
00873 u_sprintf_u(UChar *buffer,
00874 const UChar *patternSpecification,
00875 ... );
00876
00893 U_STABLE int32_t U_EXPORT2
00894 u_snprintf_u(UChar *buffer,
00895 int32_t count,
00896 const UChar *patternSpecification,
00897 ... );
00898
00912 U_STABLE int32_t U_EXPORT2
00913 u_vsprintf_u(UChar *buffer,
00914 const UChar *patternSpecification,
00915 va_list ap);
00916
00937 U_STABLE int32_t U_EXPORT2
00938 u_vsnprintf_u(UChar *buffer,
00939 int32_t count,
00940 const UChar *patternSpecification,
00941 va_list ap);
00942
00943
00944
00955 U_STABLE int32_t U_EXPORT2
00956 u_sscanf(const UChar *buffer,
00957 const char *patternSpecification,
00958 ... );
00959
00974 U_STABLE int32_t U_EXPORT2
00975 u_vsscanf(const UChar *buffer,
00976 const char *patternSpecification,
00977 va_list ap);
00978
00989 U_STABLE int32_t U_EXPORT2
00990 u_sscanf_u(const UChar *buffer,
00991 const UChar *patternSpecification,
00992 ... );
00993
01008 U_STABLE int32_t U_EXPORT2
01009 u_vsscanf_u(const UChar *buffer,
01010 const UChar *patternSpecification,
01011 va_list ap);
01012
01013
01014 #endif
01015 #endif
01016 #endif
01017
01018