intl/icu/source/tools/toolutil/filestrm.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial