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 #include "unicode/localpointer.h"
00032 #include "unicode/unum.h"
00033
00034 #if !UCONFIG_NO_CONVERSION
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
00207 #define U_EOF 0xFFFF
00208
00210 typedef struct UFILE UFILE;
00211
00217 typedef enum {
00218 U_READ = 1,
00219 U_WRITE = 2,
00220 U_READWRITE =3
00221 } UFileDirection;
00222
00240 U_STABLE UFILE* U_EXPORT2
00241 u_fopen(const char *filename,
00242 const char *perm,
00243 const char *locale,
00244 const char *codepage);
00245
00263 U_STABLE UFILE* U_EXPORT2
00264 u_fopen_u(const UChar *filename,
00265 const char *perm,
00266 const char *locale,
00267 const char *codepage);
00268
00285 U_STABLE UFILE* U_EXPORT2
00286 u_finit(FILE *f,
00287 const char *locale,
00288 const char *codepage);
00289
00306 U_STABLE UFILE* U_EXPORT2
00307 u_fadopt(FILE *f,
00308 const char *locale,
00309 const char *codepage);
00310
00325 U_STABLE UFILE* U_EXPORT2
00326 u_fstropen(UChar *stringBuf,
00327 int32_t capacity,
00328 const char *locale);
00329
00336 U_STABLE void U_EXPORT2
00337 u_fclose(UFILE *file);
00338
00339 #if U_SHOW_CPLUSPLUS_API
00340
00341 U_NAMESPACE_BEGIN
00342
00352 U_DEFINE_LOCAL_OPEN_POINTER(LocalUFILEPointer, UFILE, u_fclose);
00353
00354 U_NAMESPACE_END
00355
00356 #endif
00357
00366 U_STABLE UBool U_EXPORT2
00367 u_feof(UFILE *f);
00368
00379 U_STABLE void U_EXPORT2
00380 u_fflush(UFILE *file);
00381
00387 U_STABLE void
00388 u_frewind(UFILE *file);
00389
00396 U_STABLE FILE* U_EXPORT2
00397 u_fgetfile(UFILE *f);
00398
00399 #if !UCONFIG_NO_FORMATTING
00400
00409 U_STABLE const char* U_EXPORT2
00410 u_fgetlocale(UFILE *file);
00411
00420 U_STABLE int32_t U_EXPORT2
00421 u_fsetlocale(UFILE *file,
00422 const char *locale);
00423
00424 #endif
00425
00435 U_STABLE const char* U_EXPORT2
00436 u_fgetcodepage(UFILE *file);
00437
00453 U_STABLE int32_t U_EXPORT2
00454 u_fsetcodepage(const char *codepage,
00455 UFILE *file);
00456
00457
00464 U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00465
00466 #if !UCONFIG_NO_FORMATTING
00467
00473 U_STABLE const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *f);
00474
00475
00476
00484 U_STABLE int32_t U_EXPORT2
00485 u_printf(const char *patternSpecification,
00486 ... );
00487
00496 U_STABLE int32_t U_EXPORT2
00497 u_fprintf(UFILE *f,
00498 const char *patternSpecification,
00499 ... );
00500
00513 U_STABLE int32_t U_EXPORT2
00514 u_vfprintf(UFILE *f,
00515 const char *patternSpecification,
00516 va_list ap);
00517
00525 U_STABLE int32_t U_EXPORT2
00526 u_printf_u(const UChar *patternSpecification,
00527 ... );
00528
00534 U_STABLE UFILE * U_EXPORT2
00535 u_get_stdout(void);
00536
00545 U_STABLE int32_t U_EXPORT2
00546 u_fprintf_u(UFILE *f,
00547 const UChar *patternSpecification,
00548 ... );
00549
00562 U_STABLE int32_t U_EXPORT2
00563 u_vfprintf_u(UFILE *f,
00564 const UChar *patternSpecification,
00565 va_list ap);
00566 #endif
00567
00577 U_STABLE int32_t U_EXPORT2
00578 u_fputs(const UChar *s,
00579 UFILE *f);
00580
00588 U_STABLE UChar32 U_EXPORT2
00589 u_fputc(UChar32 uc,
00590 UFILE *f);
00591
00603 U_STABLE int32_t U_EXPORT2
00604 u_file_write(const UChar *ustring,
00605 int32_t count,
00606 UFILE *f);
00607
00608
00609
00610 #if !UCONFIG_NO_FORMATTING
00611
00621 U_STABLE int32_t U_EXPORT2
00622 u_fscanf(UFILE *f,
00623 const char *patternSpecification,
00624 ... );
00625
00639 U_STABLE int32_t U_EXPORT2
00640 u_vfscanf(UFILE *f,
00641 const char *patternSpecification,
00642 va_list ap);
00643
00653 U_STABLE int32_t U_EXPORT2
00654 u_fscanf_u(UFILE *f,
00655 const UChar *patternSpecification,
00656 ... );
00657
00671 U_STABLE int32_t U_EXPORT2
00672 u_vfscanf_u(UFILE *f,
00673 const UChar *patternSpecification,
00674 va_list ap);
00675 #endif
00676
00689 U_STABLE UChar* U_EXPORT2
00690 u_fgets(UChar *s,
00691 int32_t n,
00692 UFILE *f);
00693
00703 U_STABLE UChar U_EXPORT2
00704 u_fgetc(UFILE *f);
00705
00716 U_STABLE UChar32 U_EXPORT2
00717 u_fgetcx(UFILE *f);
00718
00730 U_STABLE UChar32 U_EXPORT2
00731 u_fungetc(UChar32 c,
00732 UFILE *f);
00733
00744 U_STABLE int32_t U_EXPORT2
00745 u_file_read(UChar *chars,
00746 int32_t count,
00747 UFILE *f);
00748
00749 #if !UCONFIG_NO_TRANSLITERATION
00750
00768 U_STABLE UTransliterator* U_EXPORT2
00769 u_fsettransliterator(UFILE *file, UFileDirection direction,
00770 UTransliterator *adopt, UErrorCode *status);
00771
00772 #endif
00773
00774
00775
00776 #if !UCONFIG_NO_FORMATTING
00777
00778
00789 U_STABLE int32_t U_EXPORT2
00790 u_sprintf(UChar *buffer,
00791 const char *patternSpecification,
00792 ... );
00793
00811 U_STABLE int32_t U_EXPORT2
00812 u_snprintf(UChar *buffer,
00813 int32_t count,
00814 const char *patternSpecification,
00815 ... );
00816
00830 U_STABLE int32_t U_EXPORT2
00831 u_vsprintf(UChar *buffer,
00832 const char *patternSpecification,
00833 va_list ap);
00834
00855 U_STABLE int32_t U_EXPORT2
00856 u_vsnprintf(UChar *buffer,
00857 int32_t count,
00858 const char *patternSpecification,
00859 va_list ap);
00860
00870 U_STABLE int32_t U_EXPORT2
00871 u_sprintf_u(UChar *buffer,
00872 const UChar *patternSpecification,
00873 ... );
00874
00891 U_STABLE int32_t U_EXPORT2
00892 u_snprintf_u(UChar *buffer,
00893 int32_t count,
00894 const UChar *patternSpecification,
00895 ... );
00896
00910 U_STABLE int32_t U_EXPORT2
00911 u_vsprintf_u(UChar *buffer,
00912 const UChar *patternSpecification,
00913 va_list ap);
00914
00935 U_STABLE int32_t U_EXPORT2
00936 u_vsnprintf_u(UChar *buffer,
00937 int32_t count,
00938 const UChar *patternSpecification,
00939 va_list ap);
00940
00941
00942
00953 U_STABLE int32_t U_EXPORT2
00954 u_sscanf(const UChar *buffer,
00955 const char *patternSpecification,
00956 ... );
00957
00972 U_STABLE int32_t U_EXPORT2
00973 u_vsscanf(const UChar *buffer,
00974 const char *patternSpecification,
00975 va_list ap);
00976
00987 U_STABLE int32_t U_EXPORT2
00988 u_sscanf_u(const UChar *buffer,
00989 const UChar *patternSpecification,
00990 ... );
00991
01006 U_STABLE int32_t U_EXPORT2
01007 u_vsscanf_u(const UChar *buffer,
01008 const UChar *patternSpecification,
01009 va_list ap);
01010
01011
01012 #endif
01013 #endif
01014 #endif
01015
01016