Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | /* |
michael@0 | 2 | ****************************************************************************** |
michael@0 | 3 | * |
michael@0 | 4 | * Copyright (C) 1997-2005, International Business Machines |
michael@0 | 5 | * Corporation and others. All Rights Reserved. |
michael@0 | 6 | * |
michael@0 | 7 | ****************************************************************************** |
michael@0 | 8 | * |
michael@0 | 9 | * File FILESTRM.H |
michael@0 | 10 | * |
michael@0 | 11 | * Contains FileStream interface |
michael@0 | 12 | * |
michael@0 | 13 | * @author Glenn Marcy |
michael@0 | 14 | * |
michael@0 | 15 | * Modification History: |
michael@0 | 16 | * |
michael@0 | 17 | * Date Name Description |
michael@0 | 18 | * 5/8/98 gm Created. |
michael@0 | 19 | * 03/02/99 stephen Reordered params in ungetc to match stdio |
michael@0 | 20 | * Added wopen |
michael@0 | 21 | * |
michael@0 | 22 | ****************************************************************************** |
michael@0 | 23 | */ |
michael@0 | 24 | |
michael@0 | 25 | #ifndef FILESTRM_H |
michael@0 | 26 | #define FILESTRM_H |
michael@0 | 27 | |
michael@0 | 28 | #include "unicode/utypes.h" |
michael@0 | 29 | |
michael@0 | 30 | typedef struct _FileStream FileStream; |
michael@0 | 31 | |
michael@0 | 32 | U_CAPI FileStream* U_EXPORT2 |
michael@0 | 33 | T_FileStream_open(const char* filename, const char* mode); |
michael@0 | 34 | |
michael@0 | 35 | /* |
michael@0 | 36 | U_CAPI FileStream* U_EXPORT2 |
michael@0 | 37 | T_FileStream_wopen(const wchar_t* filename, const wchar_t* mode); |
michael@0 | 38 | */ |
michael@0 | 39 | U_CAPI void U_EXPORT2 |
michael@0 | 40 | T_FileStream_close(FileStream* fileStream); |
michael@0 | 41 | |
michael@0 | 42 | U_CAPI UBool U_EXPORT2 |
michael@0 | 43 | T_FileStream_file_exists(const char* filename); |
michael@0 | 44 | |
michael@0 | 45 | /* |
michael@0 | 46 | U_CAPI FileStream* U_EXPORT2 |
michael@0 | 47 | T_FileStream_tmpfile(void); |
michael@0 | 48 | */ |
michael@0 | 49 | |
michael@0 | 50 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 51 | T_FileStream_read(FileStream* fileStream, void* addr, int32_t len); |
michael@0 | 52 | |
michael@0 | 53 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 54 | T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len); |
michael@0 | 55 | |
michael@0 | 56 | U_CAPI void U_EXPORT2 |
michael@0 | 57 | T_FileStream_rewind(FileStream* fileStream); |
michael@0 | 58 | |
michael@0 | 59 | /*Added by Bertrand A. D. */ |
michael@0 | 60 | U_CAPI char * U_EXPORT2 |
michael@0 | 61 | T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length); |
michael@0 | 62 | |
michael@0 | 63 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 64 | T_FileStream_writeLine(FileStream* fileStream, const char* buffer); |
michael@0 | 65 | |
michael@0 | 66 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 67 | T_FileStream_putc(FileStream* fileStream, int32_t ch); |
michael@0 | 68 | |
michael@0 | 69 | U_CAPI int U_EXPORT2 |
michael@0 | 70 | T_FileStream_getc(FileStream* fileStream); |
michael@0 | 71 | |
michael@0 | 72 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 73 | T_FileStream_ungetc(int32_t ch, FileStream *fileStream); |
michael@0 | 74 | |
michael@0 | 75 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 76 | T_FileStream_peek(FileStream* fileStream); |
michael@0 | 77 | |
michael@0 | 78 | U_CAPI int32_t U_EXPORT2 |
michael@0 | 79 | T_FileStream_size(FileStream* fileStream); |
michael@0 | 80 | |
michael@0 | 81 | U_CAPI int U_EXPORT2 |
michael@0 | 82 | T_FileStream_eof(FileStream* fileStream); |
michael@0 | 83 | |
michael@0 | 84 | U_CAPI int U_EXPORT2 |
michael@0 | 85 | T_FileStream_error(FileStream* fileStream); |
michael@0 | 86 | |
michael@0 | 87 | /* |
michael@0 | 88 | U_CAPI void U_EXPORT2 |
michael@0 | 89 | T_FileStream_setError(FileStream* fileStream); |
michael@0 | 90 | */ |
michael@0 | 91 | |
michael@0 | 92 | U_CAPI FileStream* U_EXPORT2 |
michael@0 | 93 | T_FileStream_stdin(void); |
michael@0 | 94 | |
michael@0 | 95 | U_CAPI FileStream* U_EXPORT2 |
michael@0 | 96 | T_FileStream_stdout(void); |
michael@0 | 97 | |
michael@0 | 98 | U_CAPI FileStream* U_EXPORT2 |
michael@0 | 99 | T_FileStream_stderr(void); |
michael@0 | 100 | |
michael@0 | 101 | U_CAPI UBool U_EXPORT2 |
michael@0 | 102 | T_FileStream_remove(const char* fileName); |
michael@0 | 103 | |
michael@0 | 104 | #endif /* _FILESTRM*/ |