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
00191 #define U_EOF 0xFFFF
00192
00194 typedef struct UFILE UFILE;
00195
00201 typedef enum {
00202 U_READ = 1,
00203 U_WRITE = 2,
00204 U_READWRITE =3
00205 } UFileDirection;
00206
00224 U_CAPI UFILE* U_EXPORT2
00225 u_fopen(const char *filename,
00226 const char *perm,
00227 const char *locale,
00228 const char *codepage);
00229
00243 U_CAPI UFILE* U_EXPORT2
00244 u_finit(FILE *f,
00245 const char *locale,
00246 const char *codepage);
00247
00262 U_CAPI UFILE* U_EXPORT2
00263 u_fstropen(UChar *stringBuf,
00264 int32_t capacity,
00265 const char *locale);
00266
00272 U_CAPI void U_EXPORT2
00273 u_fclose(UFILE *file);
00274
00283 U_CAPI UBool U_EXPORT2
00284 u_feof(UFILE *f);
00285
00294 U_CAPI void U_EXPORT2
00295 u_fflush(UFILE *file);
00296
00302 U_CAPI void
00303 u_frewind(UFILE *file);
00304
00311 U_CAPI FILE* U_EXPORT2
00312 u_fgetfile(UFILE *f);
00313
00314 #if !UCONFIG_NO_FORMATTING
00315
00324 U_CAPI const char* U_EXPORT2
00325 u_fgetlocale(UFILE *file);
00326
00335 U_CAPI int32_t U_EXPORT2
00336 u_fsetlocale(UFILE *file,
00337 const char *locale);
00338
00339 #endif
00340
00350 U_CAPI const char* U_EXPORT2
00351 u_fgetcodepage(UFILE *file);
00352
00368 U_CAPI int32_t U_EXPORT2
00369 u_fsetcodepage(const char *codepage,
00370 UFILE *file);
00371
00372
00379 U_CAPI UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
00380
00381 #if !UCONFIG_NO_FORMATTING
00382
00383
00384
00393 U_CAPI int32_t U_EXPORT2
00394 u_fprintf(UFILE *f,
00395 const char *patternSpecification,
00396 ... );
00397
00410 U_CAPI int32_t U_EXPORT2
00411 u_vfprintf(UFILE *f,
00412 const char *patternSpecification,
00413 va_list ap);
00414
00423 U_CAPI int32_t U_EXPORT2
00424 u_fprintf_u(UFILE *f,
00425 const UChar *patternSpecification,
00426 ... );
00427
00440 U_CAPI int32_t U_EXPORT2
00441 u_vfprintf_u(UFILE *f,
00442 const UChar *patternSpecification,
00443 va_list ap);
00444 #endif
00445
00455 U_CAPI int32_t U_EXPORT2
00456 u_fputs(const UChar *s,
00457 UFILE *f);
00458
00466 U_CAPI UChar32 U_EXPORT2
00467 u_fputc(UChar32 uc,
00468 UFILE *f);
00469
00481 U_CAPI int32_t U_EXPORT2
00482 u_file_write(const UChar *ustring,
00483 int32_t count,
00484 UFILE *f);
00485
00486
00487
00488 #if !UCONFIG_NO_FORMATTING
00489
00499 U_CAPI int32_t U_EXPORT2
00500 u_fscanf(UFILE *f,
00501 const char *patternSpecification,
00502 ... );
00503
00517 U_CAPI int32_t U_EXPORT2
00518 u_vfscanf(UFILE *f,
00519 const char *patternSpecification,
00520 va_list ap);
00521
00531 U_CAPI int32_t U_EXPORT2
00532 u_fscanf_u(UFILE *f,
00533 const UChar *patternSpecification,
00534 ... );
00535
00549 U_CAPI int32_t U_EXPORT2
00550 u_vfscanf_u(UFILE *f,
00551 const UChar *patternSpecification,
00552 va_list ap);
00553 #endif
00554
00567 U_CAPI UChar* U_EXPORT2
00568 u_fgets(UChar *s,
00569 int32_t n,
00570 UFILE *f);
00571
00581 U_CAPI UChar U_EXPORT2
00582 u_fgetc(UFILE *f);
00583
00594 U_CAPI UChar32 U_EXPORT2
00595 u_fgetcx(UFILE *f);
00596
00608 U_CAPI UChar32 U_EXPORT2
00609 u_fungetc(UChar32 c,
00610 UFILE *f);
00611
00622 U_CAPI int32_t U_EXPORT2
00623 u_file_read(UChar *chars,
00624 int32_t count,
00625 UFILE *f);
00626
00627 #if !UCONFIG_NO_TRANSLITERATION
00628
00646 U_CAPI UTransliterator* U_EXPORT2
00647 u_fsettransliterator(UFILE *file, UFileDirection direction,
00648 UTransliterator *adopt, UErrorCode *status);
00649
00650 #endif
00651
00652
00653
00654 #if !UCONFIG_NO_FORMATTING
00655
00656
00667 U_CAPI int32_t U_EXPORT2
00668 u_sprintf(UChar *buffer,
00669 const char *patternSpecification,
00670 ... );
00671
00688 U_CAPI int32_t U_EXPORT2
00689 u_snprintf(UChar *buffer,
00690 int32_t count,
00691 const char *patternSpecification,
00692 ... );
00693
00707 U_CAPI int32_t U_EXPORT2
00708 u_vsprintf(UChar *buffer,
00709 const char *patternSpecification,
00710 va_list ap);
00711
00731 U_CAPI int32_t U_EXPORT2
00732 u_vsnprintf(UChar *buffer,
00733 int32_t count,
00734 const char *patternSpecification,
00735 va_list ap);
00736
00746 U_CAPI int32_t U_EXPORT2
00747 u_sprintf_u(UChar *buffer,
00748 const UChar *patternSpecification,
00749 ... );
00750
00766 U_CAPI int32_t U_EXPORT2
00767 u_snprintf_u(UChar *buffer,
00768 int32_t count,
00769 const UChar *patternSpecification,
00770 ... );
00771
00785 U_CAPI int32_t U_EXPORT2
00786 u_vsprintf_u(UChar *buffer,
00787 const UChar *patternSpecification,
00788 va_list ap);
00789
00809 U_CAPI int32_t U_EXPORT2
00810 u_vsnprintf_u(UChar *buffer,
00811 int32_t count,
00812 const UChar *patternSpecification,
00813 va_list ap);
00814
00815
00816
00827 U_CAPI int32_t U_EXPORT2
00828 u_sscanf(const UChar *buffer,
00829 const char *patternSpecification,
00830 ... );
00831
00846 U_CAPI int32_t U_EXPORT2
00847 u_vsscanf(const UChar *buffer,
00848 const char *patternSpecification,
00849 va_list ap);
00850
00861 U_CAPI int32_t U_EXPORT2
00862 u_sscanf_u(const UChar *buffer,
00863 const UChar *patternSpecification,
00864 ... );
00865
00880 U_CAPI int32_t U_EXPORT2
00881 u_vsscanf_u(const UChar *buffer,
00882 const UChar *patternSpecification,
00883 va_list ap);
00884
00885 #endif
00886 #endif
00887
00888