Add debug info to tests.
[bertos.git] / bertos / kern / kfile.h
index 609c8d635030edc777a12160ff9e364c66fe6f09..b959b9596153d256de1712172c2011d54bf7594f 100644 (file)
 struct KFile;
 
 typedef int32_t kfile_off_t;     ///< KFile offset type, used by kfile_seek().
-typedef uint32_t kfile_size_t;   ///< KFile size type, used in struct KFile.
 
 /**
  * Costants for repositioning read/write file offset.
@@ -178,7 +177,9 @@ typedef void (*ClearErrFunc_t) (struct KFile *fd);
 /**
  * Context data for callback functions which operate on
  * pseudo files.
- * \note If you change interface, remember to add corresponding access function.
+ *
+ * \note Remember to add the corresponding accessor functions
+ *       when extending this interface.
  */
 typedef struct KFile
 {
@@ -190,11 +191,11 @@ typedef struct KFile
        FlushFunc_t    flush;
        ErrorFunc_t    error;
        ClearErrFunc_t clearerr;
-       DB(id_t _type); ///< Used to keep trace, at runtime, of obj type.
+       DB(id_t _type); ///< Used to keep track, at runtime, of the class type.
 
        /* NOTE: these must _NOT_ be size_t on 16bit CPUs! */
-       kfile_off_t  seek_pos;
-       kfile_size_t size;
+       kfile_off_t    seek_pos;
+       kfile_off_t    size;
 } KFile;
 
 /**
@@ -207,6 +208,8 @@ kfile_off_t kfile_genericSeek(struct KFile *fd, kfile_off_t offset, KSeekMode wh
  */
 struct KFile * kfile_genericReopen(struct KFile *fd);
 
+int kfile_genericClose(struct KFile *fd);
+
 int kfile_putc(int c, struct KFile *fd); ///< Generic putc implementation using kfile_write.
 int kfile_getc(struct KFile *fd);  ///< Generic getc implementation using kfile_read.
 int kfile_printf(struct KFile *fd, const char *format, ...);