Skip to content

Commit

Permalink
remove uint8_t from _print
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Mar 15, 2023
1 parent c474099 commit 10f8a54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
7 changes: 0 additions & 7 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

- need to be able to set a stop-at function on filehandles

- rename DcmDataSet as DcmDataset


# bot support

Expand Down Expand Up @@ -32,11 +30,6 @@

no, it's unsigned int

- dcm_dataset_print() should not use uint8_t


instead, the caller should free on error ... how easy would this be to change?


# asserts

Expand Down
4 changes: 2 additions & 2 deletions include/dicom/dicom.h
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ bool dcm_element_set_value_sequence(DcmError **error,
* :param indentation: Number of white spaces before text
*/
DCM_EXTERN
void dcm_element_print(const DcmElement *element, uint8_t indentation);
void dcm_element_print(const DcmElement *element, int indentation);

/**
* Destroy a Data Element.
Expand Down Expand Up @@ -1026,7 +1026,7 @@ bool dcm_dataset_is_locked(const DcmDataSet *dataset);
* :param indentation: Number of white spaces before text
*/
DCM_EXTERN
void dcm_dataset_print(const DcmDataSet *dataset, uint8_t indentation);
void dcm_dataset_print(const DcmDataSet *dataset, int indentation);

/**
* Destroy a Data Set.
Expand Down
12 changes: 6 additions & 6 deletions src/dicom-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ DcmElement *dcm_element_create(DcmError **error, uint32_t tag, DcmVR vr)
if (!dcm_is_valid_vr_for_tag(vr, tag)) {
dcm_error_set(error, DCM_ERROR_CODE_INVALID,
"Incorrect tag",
"Element tag %08X does not allow VR %s",
element->tag,
"Tag %08X does not allow VR %s",
tag,
dcm_dict_str_from_vr(vr));
return NULL;
}
Expand Down Expand Up @@ -1122,11 +1122,11 @@ static void element_print_string(const DcmElement *element,
}


void dcm_element_print(const DcmElement *element, uint8_t indentation)
void dcm_element_print(const DcmElement *element, int indentation)
{
DcmVRClass klass = dcm_dict_vr_class(element->vr);
const uint8_t num_indent = indentation * 2;
const uint8_t num_indent_next = (indentation + 1) * 2;
const int num_indent = indentation * 2;
const int num_indent_next = (indentation + 1) * 2;

uint32_t i;

Expand Down Expand Up @@ -1383,7 +1383,7 @@ void dcm_dataset_copy_tags(const DcmDataSet *dataset,
}


void dcm_dataset_print(const DcmDataSet *dataset, uint8_t indentation)
void dcm_dataset_print(const DcmDataSet *dataset, int indentation)
{
uint32_t i;
DcmElement *element;
Expand Down

0 comments on commit 10f8a54

Please sign in to comment.