summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/FreeImageIO.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-18 07:31:16 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-18 07:31:16 +0000
commit76b86227951fdb5096572c36a256f07aee76def3 (patch)
tree713dcf30179d88b685605bdc8a03a5068832e4ff /plugins/AdvaImg/src/FreeImageIO.h
parent4b289716d4cdd6b3ea29aec8d50e0b69afdc8384 (diff)
git-svn-id: http://svn.miranda-ng.org/main/trunk@13671 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AdvaImg/src/FreeImageIO.h')
-rw-r--r--plugins/AdvaImg/src/FreeImageIO.h31
1 files changed, 23 insertions, 8 deletions
diff --git a/plugins/AdvaImg/src/FreeImageIO.h b/plugins/AdvaImg/src/FreeImageIO.h
index b251d474f6..c846b5bf0a 100644
--- a/plugins/AdvaImg/src/FreeImageIO.h
+++ b/plugins/AdvaImg/src/FreeImageIO.h
@@ -29,16 +29,31 @@
// ----------------------------------------------------------
FI_STRUCT (FIMEMORYHEADER) {
- /// remember to delete the buffer
+ /**
+ Flag used to remember to delete the 'data' buffer.
+ When the buffer is a wrapped buffer, it is read-only, no need to delete it.
+ When the buffer is a read/write buffer, it is allocated dynamically and must be deleted when no longer needed.
+ */
BOOL delete_me;
- /// file length
- long filelen;
- /// buffer size
- long datalen;
- /// current position
- long curpos;
- /// start buffer address
+ /**
+ file_length is equal to the input buffer size when the buffer is a wrapped buffer, i.e. file_length == data_length.
+ file_length is the amount of the written bytes when the buffer is a read/write buffer.
+ */
+ long file_length;
+ /**
+ When using read-only input buffers, data_length is equal to the input buffer size, i.e. the file_length.
+ When using read/write buffers, data_length is the size of the allocated buffer,
+ whose size is greater than or equal to file_length.
+ */
+ long data_length;
+ /**
+ start buffer address
+ */
void *data;
+ /**
+ Current position into the memory stream
+ */
+ long current_position;
};
void SetDefaultIO(FreeImageIO *io);