- if (mng_putchunk_text(mng, sizeof(MNG_TEXT_TITLE), MNG_TEXT_TITLE, get_canvas()->get_name().length(), const_cast<char *>(get_canvas()->get_name().c_str())) != 0) goto cleanup_on_error;
- if (mng_putchunk_text(mng, sizeof(MNG_TEXT_DESCRIPTION), MNG_TEXT_DESCRIPTION, get_canvas()->get_description().length(), const_cast<char *>(get_canvas()->get_description().c_str())) != 0) goto cleanup_on_error;
- if (mng_putchunk_text(mng, sizeof(MNG_TEXT_SOFTWARE), MNG_TEXT_SOFTWARE, sizeof("SYNFIG"), "SYNFIG") != 0) goto cleanup_on_error;
- if (mng_putchunk_gama(mng, MNG_FALSE, (int)(1.0/gamma().get_gamma()*100000)) != 0) goto cleanup_on_error;
+ {
+ char title[] = MNG_TEXT_TITLE;
+ if (mng_putchunk_text(mng, sizeof(title), title,
+ get_canvas()->get_name().length(), const_cast<char *>(get_canvas()->get_name().c_str())) != 0)
+ goto cleanup_on_error;
+
+ char description[] = MNG_TEXT_DESCRIPTION;
+ if (mng_putchunk_text(mng, sizeof(description), description,
+ get_canvas()->get_description().length(), const_cast<char *>(get_canvas()->get_description().c_str())) != 0)
+ goto cleanup_on_error;
+
+ char software[] = MNG_TEXT_SOFTWARE; char synfig[] = "SYNFIG";
+ if (mng_putchunk_text(mng, sizeof(software), software,
+ sizeof(synfig), synfig) != 0)
+ goto cleanup_on_error;
+ }
+ if (mng_putchunk_gama(mng, MNG_FALSE, (int)(gamma().get_gamma()*100000)) != 0) goto cleanup_on_error;