Table of Contents

Name

MAGcomment - returns pointer to MAG comment

Synopsis


#include <maglo.h>
char * MAGcomment(MagImage *mag);

Description

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.

Return Values

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.

See Also

MAGcommentSize(3) , libmaglo(7)

Bugs

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