#include <maglo.h> char * MAGcomment(MagImage *mag);
The MAGcomment() function returns the pointer to MAG comment of MAG file to which mag is associated.
MAG comment is terminated with 0x1A, and does not have NULL termination like standard C strings.
The MAG comment is often stored using Shift-JIS encoding.
MAGcomment() returns the pointer to MAG comment of mag. The storage is unique for each mag, but not for MAGcomment() function call.
If the mag is invalid, the behavior is undefined.
The MAG specification does not limit the length of comment. This is insecure and difficult to handle (since the library may fall into infinite loop looking for the comment termination), so libmaglo sets artificial limit of file size to 16MB.
Table of Contents