Skip to content
Start free evaluation

pdcomm_gem_formatted_program_selection_snapshot_model_copy

Function

Copies the MDLN of the selected program.

PdcommStatus pdcomm_gem_formatted_program_selection_snapshot_model_copy(const PdcommGemFormattedProgramSelectionSnapshot *snapshot, char *output, size_t capacity, size_t *required)

Declared in: #include <pdcomm_gem_formatted_program_selections.h>

Unlike most copy functions, this one checks the snapshot before required: when the snapshot is NULL or empty, *required is not written.

Parameters

NameDescription
snapshotLive snapshot that contains a program.
outputDestination for the ASCII bytes. May be NULL only when capacity is 0.
capacitySize of output in bytes.
requiredReceives the text length.

Returns

#PDCOMM_OK when the text was copied; #PDCOMM_BUFFER_TOO_SMALL when capacity is smaller than *required (output untouched); #PDCOMM_INVALID_ARGUMENT when snapshot or required is NULL, or output is NULL with a nonzero capacity; #PDCOMM_INVALID_STATE when the snapshot has no selected program; #PDCOMM_INTERNAL_ERROR when a panic was contained.