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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/icu/source/tools/toolutil/filestrm.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,104 @@
     1.4 +/*
     1.5 +******************************************************************************
     1.6 +*
     1.7 +*   Copyright (C) 1997-2005, International Business Machines
     1.8 +*   Corporation and others.  All Rights Reserved.
     1.9 +*
    1.10 +******************************************************************************
    1.11 +*
    1.12 +* File FILESTRM.H
    1.13 +*
    1.14 +* Contains FileStream interface
    1.15 +*
    1.16 +* @author       Glenn Marcy
    1.17 +*
    1.18 +* Modification History:
    1.19 +*
    1.20 +*   Date        Name        Description
    1.21 +*   5/8/98      gm          Created.
    1.22 +*  03/02/99     stephen     Reordered params in ungetc to match stdio
    1.23 +*                           Added wopen
    1.24 +*
    1.25 +******************************************************************************
    1.26 +*/
    1.27 +
    1.28 +#ifndef FILESTRM_H
    1.29 +#define FILESTRM_H
    1.30 +
    1.31 +#include "unicode/utypes.h"
    1.32 +
    1.33 +typedef struct _FileStream FileStream;
    1.34 +
    1.35 +U_CAPI FileStream* U_EXPORT2
    1.36 +T_FileStream_open(const char* filename, const char* mode);
    1.37 +
    1.38 +/*
    1.39 +U_CAPI FileStream* U_EXPORT2
    1.40 +T_FileStream_wopen(const wchar_t* filename, const wchar_t* mode);
    1.41 +*/
    1.42 +U_CAPI void U_EXPORT2
    1.43 +T_FileStream_close(FileStream* fileStream);
    1.44 +
    1.45 +U_CAPI UBool U_EXPORT2
    1.46 +T_FileStream_file_exists(const char* filename);
    1.47 +
    1.48 +/*
    1.49 +U_CAPI FileStream* U_EXPORT2
    1.50 +T_FileStream_tmpfile(void);
    1.51 +*/
    1.52 +
    1.53 +U_CAPI int32_t U_EXPORT2
    1.54 +T_FileStream_read(FileStream* fileStream, void* addr, int32_t len);
    1.55 +
    1.56 +U_CAPI int32_t U_EXPORT2
    1.57 +T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len);
    1.58 +
    1.59 +U_CAPI void U_EXPORT2
    1.60 +T_FileStream_rewind(FileStream* fileStream);
    1.61 +
    1.62 +/*Added by Bertrand A. D. */
    1.63 +U_CAPI char * U_EXPORT2
    1.64 +T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length);
    1.65 +
    1.66 +U_CAPI int32_t U_EXPORT2
    1.67 +T_FileStream_writeLine(FileStream* fileStream, const char* buffer);
    1.68 +
    1.69 +U_CAPI int32_t U_EXPORT2
    1.70 +T_FileStream_putc(FileStream* fileStream, int32_t ch);
    1.71 +
    1.72 +U_CAPI int U_EXPORT2
    1.73 +T_FileStream_getc(FileStream* fileStream);
    1.74 +
    1.75 +U_CAPI int32_t U_EXPORT2
    1.76 +T_FileStream_ungetc(int32_t ch, FileStream *fileStream);
    1.77 +
    1.78 +U_CAPI int32_t U_EXPORT2
    1.79 +T_FileStream_peek(FileStream* fileStream);
    1.80 +
    1.81 +U_CAPI int32_t U_EXPORT2
    1.82 +T_FileStream_size(FileStream* fileStream);
    1.83 +
    1.84 +U_CAPI int U_EXPORT2
    1.85 +T_FileStream_eof(FileStream* fileStream);
    1.86 +
    1.87 +U_CAPI int U_EXPORT2
    1.88 +T_FileStream_error(FileStream* fileStream);
    1.89 +
    1.90 +/*
    1.91 +U_CAPI void U_EXPORT2
    1.92 +T_FileStream_setError(FileStream* fileStream);
    1.93 +*/
    1.94 +
    1.95 +U_CAPI FileStream* U_EXPORT2
    1.96 +T_FileStream_stdin(void);
    1.97 +
    1.98 +U_CAPI FileStream* U_EXPORT2
    1.99 +T_FileStream_stdout(void);
   1.100 +
   1.101 +U_CAPI FileStream* U_EXPORT2
   1.102 +T_FileStream_stderr(void);
   1.103 +
   1.104 +U_CAPI UBool U_EXPORT2
   1.105 +T_FileStream_remove(const char* fileName);
   1.106 +
   1.107 +#endif /* _FILESTRM*/

mercurial