home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / common / filestrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-19  |  3.0 KB  |  110 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1997                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1997-1999                    *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.                  *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure             *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                              *
  10. *                                                                                       *
  11. *****************************************************************************************
  12. *
  13. * File FILESTRM.H
  14. *
  15. * Contains FileStream interface
  16. *
  17. * @author       Glenn Marcy
  18. *
  19. * Modification History:
  20. *
  21. *   Date        Name        Description
  22. *   5/8/98      gm          Created.
  23. *  03/02/99     stephen     Reordered params in ungetc to match stdio
  24. *                           Added wopen
  25. *
  26. *****************************************************************************************
  27. */
  28.  
  29. #ifndef FILESTRM_H
  30. #define FILESTRM_H
  31.  
  32. #ifndef _UTYPES
  33. #include "utypes.h"
  34. #endif
  35.  
  36. #include <wchar.h>
  37.  
  38. typedef struct _FileStream FileStream;
  39.  
  40. U_CAPI FileStream* U_EXPORT2
  41. T_FileStream_open(const char* filename, const char* mode);
  42.  
  43. U_CAPI FileStream* U_EXPORT2
  44. T_FileStream_wopen(const wchar_t* filename, const wchar_t* mode);
  45.  
  46. U_CAPI void U_EXPORT2
  47. T_FileStream_close(FileStream* fileStream);
  48.  
  49. U_CAPI bool_t U_EXPORT2
  50. T_FileStream_file_exists(const char* filename);
  51.  
  52.  
  53. U_CAPI FileStream* U_EXPORT2
  54. T_FileStream_tmpfile(void);
  55.  
  56. U_CAPI int32_t U_EXPORT2
  57. T_FileStream_read(FileStream* fileStream, void* addr, int32_t len);
  58.  
  59. U_CAPI int32_t U_EXPORT2
  60. T_FileStream_write(FileStream* fileStream, const void* addr, int32_t len);
  61.  
  62. U_CAPI void U_EXPORT2
  63. T_FileStream_rewind(FileStream* fileStream);
  64.  
  65. /*Added by Bertrand A. D. */
  66. U_CAPI char * U_EXPORT2
  67. T_FileStream_readLine(FileStream* fileStream, char* buffer, int32_t length);
  68.  
  69. U_CAPI int32_t U_EXPORT2
  70. T_FileStream_writeLine(FileStream* fileStream, const char* buffer);
  71.  
  72. U_CAPI int32_t U_EXPORT2
  73. T_FileStream_putc(FileStream* fileStream, int32_t ch);
  74.  
  75. U_CAPI int U_EXPORT2
  76. T_FileStream_getc(FileStream* fileStream);
  77.  
  78. U_CAPI int32_t U_EXPORT2
  79. T_FileStream_ungetc(int32_t ch, FileStream *fileStream);
  80.  
  81. U_CAPI int32_t U_EXPORT2
  82. T_FileStream_peek(FileStream* fileStream);
  83.  
  84. U_CAPI int32_t U_EXPORT2
  85. T_FileStream_size(FileStream* fileStream);
  86.  
  87. U_CAPI int U_EXPORT2
  88. T_FileStream_eof(FileStream* fileStream);
  89.  
  90. U_CAPI int U_EXPORT2
  91. T_FileStream_error(FileStream* fileStream);
  92.  
  93. U_CAPI void U_EXPORT2
  94. T_FileStream_setError(FileStream* fileStream);
  95.  
  96. U_CAPI FileStream* U_EXPORT2
  97. T_FileStream_stdin(void);
  98.  
  99. U_CAPI FileStream* U_EXPORT2
  100. T_FileStream_stdout(void);
  101.  
  102. U_CAPI FileStream* U_EXPORT2
  103. T_FileStream_stderr(void);
  104.  
  105. #endif /* _FILESTRM*/
  106.  
  107.  
  108.  
  109.  
  110.