MCPcopy Create free account
hub / github.com/DFHack/dfhack / LodePNGText_copy

Function LodePNGText_copy

depends/lodepng/lodepng.cpp:2894–2903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2892}
2893
2894static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source) {
2895 size_t i = 0;
2896 dest->text_keys = NULL;
2897 dest->text_strings = NULL;
2898 dest->text_num = 0;
2899 for(i = 0; i != source->text_num; ++i) {
2900 CERROR_TRY_RETURN(lodepng_add_text(dest, source->text_keys[i], source->text_strings[i]));
2901 }
2902 return 0;
2903}
2904
2905static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t size) {
2906 char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));

Callers 1

lodepng_info_copyFunction · 0.85

Calls 1

lodepng_add_textFunction · 0.85

Tested by

no test coverage detected