From: Étienne Mollier Date: Sat, 18 Jan 2025 10:54:16 +0000 (+0100) Subject: 0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch X-Git-Tag: archive/raspbian/3.6.9-4+rpi1^2~23^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1c2a261c79d3e7d833c350a0ca9b8360ed51783b;p=dcmtk.git 0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch Patch refreshed. --- diff --git a/debian/patches/0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch b/debian/patches/0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch index 774af83e..b7ffdcbb 100644 --- a/debian/patches/0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch +++ b/debian/patches/0001-Fixed-unchecked-typecasts-of-DcmItem-search-results.patch @@ -54,16 +54,8 @@ value representation. mode change 100755 => 100644 dcmdata/apps/stl2dcm.cc mode change 100755 => 100644 dcmdata/include/dcmtk/dcmdata/dcencdoc.h -diff --git a/dcmdata/apps/cda2dcm.cc b/dcmdata/apps/cda2dcm.cc -old mode 100755 -new mode 100644 -diff --git a/dcmdata/apps/stl2dcm.cc b/dcmdata/apps/stl2dcm.cc -old mode 100755 -new mode 100644 -diff --git a/dcmdata/include/dcmtk/dcmdata/dcelem.h b/dcmdata/include/dcmtk/dcmdata/dcelem.h -index b6ffeb7eb0..2978e96180 100644 ---- a/dcmdata/include/dcmtk/dcmdata/dcelem.h -+++ b/dcmdata/include/dcmtk/dcmdata/dcelem.h +--- dcmtk.orig/dcmdata/include/dcmtk/dcmdata/dcelem.h ++++ dcmtk/dcmdata/include/dcmtk/dcmdata/dcelem.h @@ -1,6 +1,6 @@ /* * @@ -72,7 +64,7 @@ index b6ffeb7eb0..2978e96180 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -144,6 +144,11 @@ class DCMTK_DCMDATA_EXPORT DcmElement +@@ -144,6 +144,11 @@ */ virtual OFBool isLeaf() const { return OFTrue; } @@ -84,13 +76,8 @@ index b6ffeb7eb0..2978e96180 100644 /** check if value of this element is loaded into main memory * @return true if value is present in memory, false if value still resides in file */ -diff --git a/dcmdata/include/dcmtk/dcmdata/dcencdoc.h b/dcmdata/include/dcmtk/dcmdata/dcencdoc.h -old mode 100755 -new mode 100644 -diff --git a/dcmdata/include/dcmtk/dcmdata/dcobject.h b/dcmdata/include/dcmtk/dcmdata/dcobject.h -index 60490f6bc8..714520bcf5 100644 ---- a/dcmdata/include/dcmtk/dcmdata/dcobject.h -+++ b/dcmdata/include/dcmtk/dcmdata/dcobject.h +--- dcmtk.orig/dcmdata/include/dcmtk/dcmdata/dcobject.h ++++ dcmtk/dcmdata/include/dcmtk/dcmdata/dcobject.h @@ -1,6 +1,6 @@ /* * @@ -99,7 +86,7 @@ index 60490f6bc8..714520bcf5 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -308,6 +308,11 @@ class DCMTK_DCMDATA_EXPORT DcmObject +@@ -308,6 +308,11 @@ */ virtual OFBool isLeaf() const = 0; @@ -111,11 +98,9 @@ index 60490f6bc8..714520bcf5 100644 /** check if this element is nested in a sequence of items, i.e.\ not a * top-level or stand-alone element * @return true if this element is nested, false otherwise -diff --git a/dcmdata/libsrc/dcddirif.cc b/dcmdata/libsrc/dcddirif.cc -index a0aec59b96..69d0993e5f 100644 ---- a/dcmdata/libsrc/dcddirif.cc -+++ b/dcmdata/libsrc/dcddirif.cc -@@ -433,7 +433,7 @@ static OFBool compareItems(DcmItem *item1, +--- dcmtk.orig/dcmdata/libsrc/dcddirif.cc ++++ dcmtk/dcmdata/libsrc/dcddirif.cc +@@ -433,7 +433,7 @@ OFBool first = OFTrue; DcmStack stack1, stack2; /* check whether attributes are equal */ @@ -124,7 +109,7 @@ index a0aec59b96..69d0993e5f 100644 { if (!compareAttributes(OFstatic_cast(DcmElement *, stack1.top()), OFstatic_cast(DcmElement *, stack2.top()), fromSequence, i++, reason)) break; -@@ -5457,7 +5457,7 @@ OFBool DicomDirInterface::warnAboutInconsistentAttributes(DcmDirectoryRecord *re +@@ -5586,7 +5586,7 @@ OFBool first = OFTrue; DcmElement *delem = NULL; /* iterate over all record elements */ @@ -133,11 +118,9 @@ index a0aec59b96..69d0993e5f 100644 { delem = OFstatic_cast(DcmElement *, stack.top()); if ((delem != NULL) && (delem->getLength() > 0)) -diff --git a/dcmdata/libsrc/dcdirrec.cc b/dcmdata/libsrc/dcdirrec.cc -index a6a2fc4858..c374c34742 100644 ---- a/dcmdata/libsrc/dcdirrec.cc -+++ b/dcmdata/libsrc/dcdirrec.cc -@@ -998,7 +998,7 @@ OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFil +--- dcmtk.orig/dcmdata/libsrc/dcdirrec.cc ++++ dcmtk/dcmdata/libsrc/dcdirrec.cc +@@ -1007,7 +1007,7 @@ DCMDATA_ERROR("Internal ERROR in DcmDirectoryRecord::fillElementsAndReadSOP()"); } uiP = new DcmUniqueIdentifier(refSOPClassTag); // (0004,1510) @@ -146,7 +129,7 @@ index a6a2fc4858..c374c34742 100644 { char *uid = NULL; OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid); -@@ -1011,7 +1011,7 @@ OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFil +@@ -1020,7 +1020,7 @@ insert(uiP, OFTrue); uiP = new DcmUniqueIdentifier(refSOPInstTag); // (0004,1511) @@ -155,7 +138,7 @@ index a6a2fc4858..c374c34742 100644 { char *uid = NULL; OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid); -@@ -1024,7 +1024,7 @@ OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFil +@@ -1033,7 +1033,7 @@ insert(uiP, OFTrue); uiP = new DcmUniqueIdentifier(refFileXferTag); // (0004,1512) @@ -164,10 +147,8 @@ index a6a2fc4858..c374c34742 100644 { char *uid = NULL; OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid); -diff --git a/dcmdata/libsrc/dcfilefo.cc b/dcmdata/libsrc/dcfilefo.cc -index 4f72dee83d..5771e604cc 100644 ---- a/dcmdata/libsrc/dcfilefo.cc -+++ b/dcmdata/libsrc/dcfilefo.cc +--- dcmtk.orig/dcmdata/libsrc/dcfilefo.cc ++++ dcmtk/dcmdata/libsrc/dcfilefo.cc @@ -1,6 +1,6 @@ /* * @@ -176,7 +157,7 @@ index 4f72dee83d..5771e604cc 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -362,7 +362,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo, +@@ -362,7 +362,7 @@ { if ((writeMode == EWM_updateMeta) || (elem->getLength() == 0)) { @@ -185,7 +166,7 @@ index 4f72dee83d..5771e604cc 100644 { char *uid = NULL; l_error = OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid); -@@ -378,7 +378,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo, +@@ -378,7 +378,7 @@ else if (DCM_dcmdataLogger.isEnabledFor(OFLogger::WARN_LOG_LEVEL)) { // check whether UID in meta-header is identical to the one in the dataset @@ -194,7 +175,7 @@ index 4f72dee83d..5771e604cc 100644 { OFString uidDataset, uidMetaHeader; OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getOFStringArray(uidDataset); -@@ -404,7 +404,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo, +@@ -404,7 +404,7 @@ { if ((writeMode == EWM_updateMeta) || (elem->getLength() == 0)) { @@ -203,7 +184,7 @@ index 4f72dee83d..5771e604cc 100644 { char* uid = NULL; l_error = OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getString(uid); -@@ -422,7 +422,7 @@ OFCondition DcmFileFormat::checkMetaHeaderValue(DcmMetaInfo *metainfo, +@@ -422,7 +422,7 @@ else if (DCM_dcmdataLogger.isEnabledFor(OFLogger::WARN_LOG_LEVEL)) { // check whether UID in meta-header is identical to the one in the dataset @@ -212,7 +193,7 @@ index 4f72dee83d..5771e604cc 100644 { OFString uidDataset, uidMetaHeader; OFstatic_cast(DcmUniqueIdentifier *, stack.top())->getOFStringArray(uidDataset); -@@ -633,7 +633,7 @@ E_TransferSyntax DcmFileFormat::lookForXfer(DcmMetaInfo *metainfo) +@@ -633,7 +633,7 @@ /* check whether meta header is present (and non-empty, i.e. contains elements) */ if (metainfo && !metainfo->isEmpty()) { @@ -221,10 +202,8 @@ index 4f72dee83d..5771e604cc 100644 { DcmUniqueIdentifier *xferUI = OFstatic_cast(DcmUniqueIdentifier *, stack.top()); if (xferUI->getTag() == DCM_TransferSyntaxUID) -diff --git a/dcmdata/libsrc/dcitem.cc b/dcmdata/libsrc/dcitem.cc -index 3960fceb45..51f95d21dd 100644 ---- a/dcmdata/libsrc/dcitem.cc -+++ b/dcmdata/libsrc/dcitem.cc +--- dcmtk.orig/dcmdata/libsrc/dcitem.cc ++++ dcmtk/dcmdata/libsrc/dcitem.cc @@ -1,6 +1,6 @@ /* * @@ -233,7 +212,7 @@ index 3960fceb45..51f95d21dd 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -2332,7 +2332,7 @@ OFBool DcmItem::tagExistsWithValue(const DcmTagKey &key, +@@ -2332,7 +2332,7 @@ DcmStack stack; OFBool result = OFFalse; @@ -242,7 +221,7 @@ index 3960fceb45..51f95d21dd 100644 { DcmElement *elem = OFstatic_cast(DcmElement *, stack.top()); if (elem != NULL) -@@ -2355,7 +2355,7 @@ OFCondition DcmItem::findAndGetElement(const DcmTagKey &tagKey, +@@ -2355,7 +2355,7 @@ DcmStack stack; /* find the element */ OFCondition status = search(tagKey, stack, ESM_fromHere, searchIntoSub); @@ -251,7 +230,7 @@ index 3960fceb45..51f95d21dd 100644 { element = OFstatic_cast(DcmElement *, stack.top()); /* should never happen but ... */ -@@ -2990,7 +2990,7 @@ OFCondition DcmItem::findAndGetSequence(const DcmTagKey &seqTagKey, +@@ -2990,7 +2990,7 @@ DcmStack stack; /* find the element */ OFCondition status = search(seqTagKey, stack, ESM_fromHere, searchIntoSub); @@ -260,7 +239,7 @@ index 3960fceb45..51f95d21dd 100644 { DcmElement *delem = OFstatic_cast(DcmElement *, stack.top()); /* should never happen but ... */ -@@ -3027,7 +3027,7 @@ OFCondition DcmItem::findAndGetSequenceItem(const DcmTagKey &seqTagKey, +@@ -3027,7 +3027,7 @@ DcmStack stack; /* find sequence */ OFCondition status = search(seqTagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); @@ -269,7 +248,7 @@ index 3960fceb45..51f95d21dd 100644 { /* get element */ DcmElement *delem = OFstatic_cast(DcmElement *, stack.top()); -@@ -3089,7 +3089,7 @@ OFCondition DcmItem::findOrCreateSequenceItem(const DcmTag& seqTag, +@@ -3089,7 +3089,7 @@ OFCondition status = search(seqTag, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); DcmSequenceOfItems *sequence = NULL; /* sequence found? */ @@ -278,7 +257,7 @@ index 3960fceb45..51f95d21dd 100644 { /* get element */ DcmElement *delem = OFstatic_cast(DcmElement *, stack.top()); -@@ -3223,7 +3223,7 @@ OFCondition DcmItem::findAndDeleteSequenceItem(const DcmTagKey &seqTagKey, +@@ -3223,7 +3223,7 @@ DcmStack stack; /* find sequence */ OFCondition status = search(seqTagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); @@ -287,7 +266,7 @@ index 3960fceb45..51f95d21dd 100644 { /* get element */ DcmElement *delem = OFstatic_cast(DcmElement *, stack.top()); -@@ -4224,7 +4224,7 @@ OFCondition DcmItem::insertSequenceItem(const DcmTag &seqTag, +@@ -4224,7 +4224,7 @@ status = search(seqTag, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); DcmSequenceOfItems *sequence = NULL; /* sequence found? */ @@ -296,11 +275,9 @@ index 3960fceb45..51f95d21dd 100644 { /* get element */ DcmElement *delem = OFstatic_cast(DcmElement *, stack.top()); -diff --git a/dcmimgle/libsrc/didocu.cc b/dcmimgle/libsrc/didocu.cc -index b63f77258a..efbbd69fbd 100644 ---- a/dcmimgle/libsrc/didocu.cc -+++ b/dcmimgle/libsrc/didocu.cc -@@ -217,7 +217,7 @@ DcmElement *DiDocument::search(const DcmTagKey &tag, +--- dcmtk.orig/dcmimgle/libsrc/didocu.cc ++++ dcmtk/dcmimgle/libsrc/didocu.cc +@@ -218,7 +218,7 @@ obj = Object; // only search on main dataset level if ((obj != NULL) && (obj->search(tag, stack, ESM_fromHere, OFFalse /* searchIntoSub */) == EC_Normal) && @@ -309,11 +286,9 @@ index b63f77258a..efbbd69fbd 100644 { return OFstatic_cast(DcmElement *, stack.top()); } -diff --git a/dcmiod/libsrc/iodutil.cc b/dcmiod/libsrc/iodutil.cc -index bd3dc87913..64c985cb50 100644 ---- a/dcmiod/libsrc/iodutil.cc -+++ b/dcmiod/libsrc/iodutil.cc -@@ -43,7 +43,7 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset( +--- dcmtk.orig/dcmiod/libsrc/iodutil.cc ++++ dcmtk/dcmiod/libsrc/iodutil.cc +@@ -43,7 +43,7 @@ DcmStack stack; const DcmTagKey tagKey = delem.getTag(); OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); @@ -322,7 +297,7 @@ index bd3dc87913..64c985cb50 100644 { /* copy object from search stack */ result = delem.copyFrom(*stack.top()); -@@ -76,7 +76,7 @@ OFCondition DcmIODUtil::getAndCheckElementFromDataset(DcmItem& dataset, +@@ -76,7 +76,7 @@ DcmStack stack; OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); @@ -331,10 +306,8 @@ index bd3dc87913..64c985cb50 100644 { /* copy object from search stack */ delem = OFstatic_cast(DcmElement*, stack.top()->clone()); -diff --git a/dcmjpeg/libsrc/djcodece.cc b/dcmjpeg/libsrc/djcodece.cc -index 4128a20402..d0371f6c2b 100644 ---- a/dcmjpeg/libsrc/djcodece.cc -+++ b/dcmjpeg/libsrc/djcodece.cc +--- dcmtk.orig/dcmjpeg/libsrc/djcodece.cc ++++ dcmtk/dcmjpeg/libsrc/djcodece.cc @@ -1,6 +1,6 @@ /* * @@ -343,7 +316,7 @@ index 4128a20402..d0371f6c2b 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -1399,17 +1399,17 @@ OFCondition DJCodecEncoder::correctVOIWindows( +@@ -1399,17 +1399,17 @@ DcmElement *explanation = NULL; DcmStack stack; @@ -364,10 +337,8 @@ index 4128a20402..d0371f6c2b 100644 { explanation = OFreinterpret_cast(DcmElement*, stack.top()); } -diff --git a/dcmnet/apps/storescu.cc b/dcmnet/apps/storescu.cc -index e2c3b29395..bd7f1cd61f 100644 ---- a/dcmnet/apps/storescu.cc -+++ b/dcmnet/apps/storescu.cc +--- dcmtk.orig/dcmnet/apps/storescu.cc ++++ dcmtk/dcmnet/apps/storescu.cc @@ -1,6 +1,6 @@ /* * @@ -376,7 +347,7 @@ index e2c3b29395..bd7f1cd61f 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -1138,6 +1138,12 @@ updateStringAttributeValue(DcmItem *dataset, const DcmTagKey &key, OFString &val +@@ -1138,6 +1138,12 @@ return OFFalse; } @@ -389,11 +360,9 @@ index e2c3b29395..bd7f1cd61f 100644 DcmElement *elem = OFstatic_cast(DcmElement *, stack.top()); DcmVR vr(elem->ident()); -diff --git a/dcmnet/libsrc/dimcmd.cc b/dcmnet/libsrc/dimcmd.cc -index ffd225f4b9..3bcfae5e4f 100644 ---- a/dcmnet/libsrc/dimcmd.cc -+++ b/dcmnet/libsrc/dimcmd.cc -@@ -191,14 +191,16 @@ addString(DcmDataset *obj, DcmTagKey t, char *s, OFBool keepPadding) +--- dcmtk.orig/dcmnet/libsrc/dimcmd.cc ++++ dcmtk/dcmnet/libsrc/dimcmd.cc +@@ -191,14 +191,16 @@ static OFCondition getString(DcmDataset *obj, DcmTagKey t, char *s, int maxlen, OFBool *spacePadded) { @@ -413,7 +382,7 @@ index ffd225f4b9..3bcfae5e4f 100644 if (elem->getLength() == 0) { s[0] = '\0'; } else if (elem->getLength() > (Uint32)maxlen) { -@@ -266,17 +268,19 @@ addUS(DcmDataset *obj, DcmTagKey t, Uint16 us) +@@ -263,17 +265,19 @@ static OFCondition getUS(DcmDataset *obj, DcmTagKey t, Uint16 *us) { @@ -437,7 +406,7 @@ index ffd225f4b9..3bcfae5e4f 100644 } static OFCondition -@@ -317,17 +321,19 @@ addUL(DcmDataset *obj, DcmTagKey t, Uint32 ul) +@@ -314,17 +318,19 @@ static OFCondition getUL(DcmDataset *obj, DcmTagKey t, Uint32 *ul) { @@ -461,7 +430,7 @@ index ffd225f4b9..3bcfae5e4f 100644 } #if 0 -@@ -378,15 +384,17 @@ addAttributeList(DcmDataset *obj, DcmTagKey t, Uint16 *lst, int listCount) +@@ -375,15 +381,17 @@ static OFCondition getAttributeList(DcmDataset *obj, DcmTagKey t, Uint16 **lst, int *listCount) { @@ -482,7 +451,7 @@ index ffd225f4b9..3bcfae5e4f 100644 nBytes = elem->getLength(); *listCount = (int)(nBytes / sizeof(Uint16)); if (*listCount > 0) { -@@ -398,7 +406,7 @@ getAttributeList(DcmDataset *obj, DcmTagKey t, Uint16 **lst, int *listCount) +@@ -395,7 +403,7 @@ } } @@ -491,11 +460,9 @@ index ffd225f4b9..3bcfae5e4f 100644 } /* -diff --git a/dcmnet/libsrc/diutil.cc b/dcmnet/libsrc/diutil.cc -index 75111ae3bb..31c9645fcd 100644 ---- a/dcmnet/libsrc/diutil.cc -+++ b/dcmnet/libsrc/diutil.cc -@@ -148,23 +148,21 @@ DU_stripLeadingAndTrailingSpaces(char *s) +--- dcmtk.orig/dcmnet/libsrc/diutil.cc ++++ dcmtk/dcmnet/libsrc/diutil.cc +@@ -159,23 +159,21 @@ OFBool DU_getStringDOElement(DcmItem *obj, DcmTagKey t, char *s, size_t bufsize) { @@ -524,7 +491,7 @@ index 75111ae3bb..31c9645fcd 100644 } OFBool -@@ -182,7 +180,7 @@ DU_putStringDOElement(DcmItem *obj, DcmTagKey t, const char *s) +@@ -193,7 +191,7 @@ ec = obj->insert(e, OFTrue); } @@ -533,7 +500,7 @@ index 75111ae3bb..31c9645fcd 100644 } OFBool -@@ -190,15 +188,15 @@ DU_getShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 *us) +@@ -201,15 +199,15 @@ { DcmElement *elem; DcmStack stack; @@ -555,7 +522,7 @@ index 75111ae3bb..31c9645fcd 100644 } OFBool -@@ -215,7 +213,7 @@ DU_putShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 us) +@@ -226,7 +224,7 @@ if (ec == EC_Normal) { ec = obj->insert(e, OFTrue); } @@ -564,11 +531,9 @@ index 75111ae3bb..31c9645fcd 100644 } OFBool -diff --git a/dcmnet/libsrc/dstorscu.cc b/dcmnet/libsrc/dstorscu.cc -index cbb3dcbe97..01024d5406 100644 ---- a/dcmnet/libsrc/dstorscu.cc -+++ b/dcmnet/libsrc/dstorscu.cc -@@ -484,7 +484,7 @@ OFCondition DcmStorageSCU::addDicomFilesFromDICOMDIR(const OFFilename &filename, +--- dcmtk.orig/dcmnet/libsrc/dstorscu.cc ++++ dcmtk/dcmnet/libsrc/dstorscu.cc +@@ -484,7 +484,7 @@ OFFilename dirName; OFStandard::getDirNameFromPath(dirName, filename, OFFalse /* assumeDirName */); // iterate over all items (directory records) where ReferencedFileID is present @@ -577,10 +542,8 @@ index cbb3dcbe97..01024d5406 100644 { // make sure that the dataset and element pointer are there if (stack.card() > 1) -diff --git a/dcmpstat/apps/dcmmklut.cc b/dcmpstat/apps/dcmmklut.cc -index 044a17b3af..6a72ed3843 100644 ---- a/dcmpstat/apps/dcmmklut.cc -+++ b/dcmpstat/apps/dcmmklut.cc +--- dcmtk.orig/dcmpstat/apps/dcmmklut.cc ++++ dcmtk/dcmpstat/apps/dcmmklut.cc @@ -1,6 +1,6 @@ /* * @@ -589,7 +552,7 @@ index 044a17b3af..6a72ed3843 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -971,7 +971,7 @@ int main(int argc, char *argv[]) +@@ -971,7 +971,7 @@ { // search existing sequence DcmStack stack; @@ -598,7 +561,7 @@ index 044a17b3af..6a72ed3843 100644 dseq=(DcmSequenceOfItems *)stack.top(); } if (dseq == NULL) -@@ -992,7 +992,7 @@ int main(int argc, char *argv[]) +@@ -992,7 +992,7 @@ { // search existing sequence DcmStack stack; @@ -607,10 +570,8 @@ index 044a17b3af..6a72ed3843 100644 dseq=(DcmSequenceOfItems *)stack.top(); } if (dseq == NULL) -diff --git a/dcmpstat/apps/dcmpschk.cc b/dcmpstat/apps/dcmpschk.cc -index ada6b164a3..12826b23f7 100644 ---- a/dcmpstat/apps/dcmpschk.cc -+++ b/dcmpstat/apps/dcmpschk.cc +--- dcmtk.orig/dcmpstat/apps/dcmpschk.cc ++++ dcmtk/dcmpstat/apps/dcmpschk.cc @@ -1,6 +1,6 @@ /* * @@ -619,7 +580,7 @@ index ada6b164a3..12826b23f7 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -652,7 +652,11 @@ static OFString printAttribute( +@@ -652,7 +652,11 @@ OFOStringStream str; ec = dset->search(key, stack, ESM_fromHere, OFFalse); @@ -632,11 +593,9 @@ index ada6b164a3..12826b23f7 100644 if (elem) elem->print(str, DCMTypes::PF_shortenLongTagValues); else -diff --git a/dcmpstat/libsrc/dviface.cc b/dcmpstat/libsrc/dviface.cc -index 259e1580e0..d3a84510df 100644 ---- a/dcmpstat/libsrc/dviface.cc -+++ b/dcmpstat/libsrc/dviface.cc -@@ -1417,14 +1417,14 @@ OFBool DVInterface::createPStateCache() +--- dcmtk.orig/dcmpstat/libsrc/dviface.cc ++++ dcmtk/dcmpstat/libsrc/dviface.cc +@@ -1425,14 +1425,14 @@ if (reference != NULL) { DcmStack stack; @@ -653,7 +612,7 @@ index 259e1580e0..d3a84510df 100644 { char *value = NULL; if ((*OFstatic_cast(DcmLongString *, stack.top())).getString(value) == EC_Normal) -@@ -2835,12 +2835,12 @@ OFCondition DVInterface::saveFileFormatToDB(DcmFileFormat &fileformat) +@@ -2843,12 +2843,12 @@ DcmDataset *dset = fileformat.getDataset(); if (dset) { @@ -668,7 +627,7 @@ index 259e1580e0..d3a84510df 100644 { OFstatic_cast(DcmElement *, stack.top())->getString(classUID); } -@@ -3756,7 +3756,7 @@ OFCondition DVInterface::addToPrintHardcopyFromDB(const char *studyUID, const ch +@@ -3764,7 +3764,7 @@ DVPSPresentationLUT presentationLUT; if (EC_Normal != presentationLUT.read(*dataset, OFFalse)) presentationLUT.setType(DVPSP_identity); result = dataset->search(sopclassuid.getTag(), stack, ESM_fromHere, OFFalse); @@ -677,10 +636,8 @@ index 259e1580e0..d3a84510df 100644 { char *sopclass = NULL; sopclassuid = *OFstatic_cast(DcmUniqueIdentifier *, stack.top()); -diff --git a/dcmpstat/libsrc/dvpsabl.cc b/dcmpstat/libsrc/dvpsabl.cc -index 62cc1d51b9..bbda18183e 100644 ---- a/dcmpstat/libsrc/dvpsabl.cc -+++ b/dcmpstat/libsrc/dvpsabl.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsabl.cc ++++ dcmtk/dcmpstat/libsrc/dvpsabl.cc @@ -1,6 +1,6 @@ /* * @@ -689,7 +646,7 @@ index 62cc1d51b9..bbda18183e 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -69,7 +69,7 @@ OFCondition DVPSAnnotationContent_PList::read(DcmItem &dset) +@@ -69,7 +69,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -698,10 +655,8 @@ index 62cc1d51b9..bbda18183e 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpscu.cc b/dcmpstat/libsrc/dvpscu.cc -index be3c81fe04..02a19452f1 100644 ---- a/dcmpstat/libsrc/dvpscu.cc -+++ b/dcmpstat/libsrc/dvpscu.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpscu.cc ++++ dcmtk/dcmpstat/libsrc/dvpscu.cc @@ -1,6 +1,6 @@ /* * @@ -710,7 +665,7 @@ index be3c81fe04..02a19452f1 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -80,14 +80,14 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group) +@@ -80,14 +80,14 @@ /* first we look for the Curve Data */ DcmTagKey key(0x5000 + group,0x3000); @@ -727,7 +682,7 @@ index be3c81fe04..02a19452f1 100644 { d_curveDimensions = (DcmElement *)(stack.top()); } else return EC_IllegalCall; -@@ -101,42 +101,42 @@ OFCondition DVPSCurve::read(DcmItem &dset, Uint8 group) +@@ -101,42 +101,42 @@ key.setElement(0x0010); // Number of Points stack.clear(); @@ -776,10 +731,8 @@ index be3c81fe04..02a19452f1 100644 { d_curveLabel = (DcmElement *)(stack.top()); } -diff --git a/dcmpstat/libsrc/dvpsdal.cc b/dcmpstat/libsrc/dvpsdal.cc -index 519aa977fd..969c182999 100644 ---- a/dcmpstat/libsrc/dvpsdal.cc -+++ b/dcmpstat/libsrc/dvpsdal.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsdal.cc ++++ dcmtk/dcmpstat/libsrc/dvpsdal.cc @@ -1,6 +1,6 @@ /* * @@ -788,7 +741,7 @@ index 519aa977fd..969c182999 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -67,7 +67,7 @@ OFCondition DVPSDisplayedArea_PList::read(DcmItem &dset) +@@ -67,7 +67,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -797,10 +750,8 @@ index 519aa977fd..969c182999 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpsfs.cc b/dcmpstat/libsrc/dvpsfs.cc -index 5a5173c155..ba311b258e 100644 ---- a/dcmpstat/libsrc/dvpsfs.cc -+++ b/dcmpstat/libsrc/dvpsfs.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsfs.cc ++++ dcmtk/dcmpstat/libsrc/dvpsfs.cc @@ -1,6 +1,6 @@ /* * @@ -809,7 +760,7 @@ index 5a5173c155..ba311b258e 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -280,7 +280,7 @@ OFBool DVPSFilmSession::printSCPCreate( +@@ -280,7 +280,7 @@ { stack.clear(); @@ -818,7 +769,7 @@ index 5a5173c155..ba311b258e 100644 { DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -480,7 +480,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -480,7 +480,7 @@ if (result) { stack.clear(); @@ -827,7 +778,7 @@ index 5a5173c155..ba311b258e 100644 { numberOfCopies = *((DcmIntegerString *)(stack.top())); Sint32 numCopies=0; -@@ -502,7 +502,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -502,7 +502,7 @@ if (result) { stack.clear(); @@ -836,7 +787,7 @@ index 5a5173c155..ba311b258e 100644 { printPriority = *((DcmCodeString *)(stack.top())); OFString aString; -@@ -523,7 +523,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -523,7 +523,7 @@ { Uint32 numMediumTypes = cfg.getTargetPrinterNumberOfMediumTypes(cfgname); stack.clear(); @@ -845,7 +796,7 @@ index 5a5173c155..ba311b258e 100644 { mediumType = *((DcmCodeString *)(stack.top())); OFString theMedium; -@@ -555,7 +555,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -555,7 +555,7 @@ { Uint32 numFilmDestination = cfg.getTargetPrinterNumberOfFilmDestinations(cfgname); stack.clear(); @@ -854,7 +805,7 @@ index 5a5173c155..ba311b258e 100644 { filmDestination = *((DcmCodeString *)(stack.top())); OFString theDestination; -@@ -586,7 +586,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -586,7 +586,7 @@ if (result) { stack.clear(); @@ -863,7 +814,7 @@ index 5a5173c155..ba311b258e 100644 { filmSessionLabel = *((DcmLongString *)(stack.top())); ADD_TO_PDATASET(DcmLongString, filmSessionLabel) -@@ -597,7 +597,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -597,7 +597,7 @@ if (result) { stack.clear(); @@ -872,7 +823,7 @@ index 5a5173c155..ba311b258e 100644 { ownerID = *((DcmShortString *)(stack.top())); ADD_TO_PDATASET(DcmShortString, ownerID) -@@ -611,7 +611,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -611,7 +611,7 @@ if (result) { stack.clear(); @@ -881,7 +832,7 @@ index 5a5173c155..ba311b258e 100644 { illumination = *((DcmUnsignedShort *)(stack.top())); // we don't check illumination set by the user (for now) -@@ -623,7 +623,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -623,7 +623,7 @@ if (result) { stack.clear(); @@ -890,7 +841,7 @@ index 5a5173c155..ba311b258e 100644 { reflectedAmbientLight = *((DcmUnsignedShort *)(stack.top())); // we don't check reflected ambient light set by the user (for now) -@@ -636,7 +636,7 @@ OFBool DVPSFilmSession::printSCPSet( +@@ -636,7 +636,7 @@ { stack.clear(); @@ -899,10 +850,8 @@ index 5a5173c155..ba311b258e 100644 { DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -diff --git a/dcmpstat/libsrc/dvpsgal.cc b/dcmpstat/libsrc/dvpsgal.cc -index 909deac9e2..89d893de83 100644 ---- a/dcmpstat/libsrc/dvpsgal.cc -+++ b/dcmpstat/libsrc/dvpsgal.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsgal.cc ++++ dcmtk/dcmpstat/libsrc/dvpsgal.cc @@ -1,6 +1,6 @@ /* * @@ -911,7 +860,7 @@ index 909deac9e2..89d893de83 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -69,7 +69,7 @@ OFCondition DVPSGraphicAnnotation_PList::read(DcmItem &dset) +@@ -69,7 +69,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -920,10 +869,8 @@ index 909deac9e2..89d893de83 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpsgll.cc b/dcmpstat/libsrc/dvpsgll.cc -index d82d208628..fbf5d97d72 100644 ---- a/dcmpstat/libsrc/dvpsgll.cc -+++ b/dcmpstat/libsrc/dvpsgll.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsgll.cc ++++ dcmtk/dcmpstat/libsrc/dvpsgll.cc @@ -1,6 +1,6 @@ /* * @@ -932,7 +879,7 @@ index d82d208628..fbf5d97d72 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -75,7 +75,7 @@ OFCondition DVPSGraphicLayer_PList::read(DcmItem &dset) +@@ -75,7 +75,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -941,10 +888,8 @@ index d82d208628..fbf5d97d72 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpsgrl.cc b/dcmpstat/libsrc/dvpsgrl.cc -index 14d0e713f9..61dd6565c3 100644 ---- a/dcmpstat/libsrc/dvpsgrl.cc -+++ b/dcmpstat/libsrc/dvpsgrl.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsgrl.cc ++++ dcmtk/dcmpstat/libsrc/dvpsgrl.cc @@ -1,6 +1,6 @@ /* * @@ -953,7 +898,7 @@ index 14d0e713f9..61dd6565c3 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -66,7 +66,7 @@ OFCondition DVPSGraphicObject_PList::read(DcmItem &dset) +@@ -66,7 +66,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -962,11 +907,9 @@ index 14d0e713f9..61dd6565c3 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpshlp.cc b/dcmpstat/libsrc/dvpshlp.cc -index 20b4429e45..fd1057a137 100644 ---- a/dcmpstat/libsrc/dvpshlp.cc -+++ b/dcmpstat/libsrc/dvpshlp.cc -@@ -163,7 +163,7 @@ OFBool DVPSHelper::haveReferencedUIDItem(DcmSequenceOfItems& seq, const char *ui +--- dcmtk.orig/dcmpstat/libsrc/dvpshlp.cc ++++ dcmtk/dcmpstat/libsrc/dvpshlp.cc +@@ -178,7 +178,7 @@ { item = seq.getItem(i); stack.clear(); @@ -975,10 +918,8 @@ index 20b4429e45..fd1057a137 100644 { aString.clear(); refuid = (DcmUniqueIdentifier *)(stack.top()); -diff --git a/dcmpstat/libsrc/dvpsib.cc b/dcmpstat/libsrc/dvpsib.cc -index 096c5b3e19..57fee5763b 100644 ---- a/dcmpstat/libsrc/dvpsib.cc -+++ b/dcmpstat/libsrc/dvpsib.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsib.cc ++++ dcmtk/dcmpstat/libsrc/dvpsib.cc @@ -1,6 +1,6 @@ /* * @@ -987,7 +928,7 @@ index 096c5b3e19..57fee5763b 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -153,7 +153,7 @@ OFCondition DVPSImageBoxContent::read(DcmItem &dset, DVPSPresentationLUT_PList& +@@ -153,7 +153,7 @@ if (result==EC_Normal) { stack.clear(); @@ -996,7 +937,7 @@ index 096c5b3e19..57fee5763b 100644 { seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -181,7 +181,7 @@ OFCondition DVPSImageBoxContent::read(DcmItem &dset, DVPSPresentationLUT_PList& +@@ -181,7 +181,7 @@ // check referenced presentation LUT sequence // if there is any reference, it must refer to one of the presentation LUTs we are managing. stack.clear(); @@ -1005,7 +946,7 @@ index 096c5b3e19..57fee5763b 100644 { seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -672,7 +672,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -672,7 +672,7 @@ if (result) { stack.clear(); @@ -1014,7 +955,7 @@ index 096c5b3e19..57fee5763b 100644 { imageBoxPosition = *((DcmUnsignedShort *)(stack.top())); // the image box position is checked elsewhere -@@ -688,7 +688,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -688,7 +688,7 @@ if (result) { stack.clear(); @@ -1023,7 +964,7 @@ index 096c5b3e19..57fee5763b 100644 { magnificationType = *((DcmCodeString *)(stack.top())); Uint32 numMagnifications = cfg.getTargetPrinterNumberOfMagnificationTypes(cfgname); -@@ -721,7 +721,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -721,7 +721,7 @@ { stack.clear(); @@ -1032,7 +973,7 @@ index 096c5b3e19..57fee5763b 100644 { smoothingType = *((DcmCodeString *)(stack.top())); Uint32 numSmoothings = cfg.getTargetPrinterNumberOfSmoothingTypes(cfgname); -@@ -761,7 +761,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -761,7 +761,7 @@ if (result) { stack.clear(); @@ -1041,7 +982,7 @@ index 096c5b3e19..57fee5763b 100644 { configurationInformation = *((DcmShortText *)(stack.top())); Uint32 numConfigurationInformation = cfg.getTargetPrinterNumberOfConfigurationSettings(cfgname); -@@ -800,7 +800,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -800,7 +800,7 @@ if (result) { stack.clear(); @@ -1050,7 +991,7 @@ index 096c5b3e19..57fee5763b 100644 { polarity = *((DcmCodeString *)(stack.top())); OFString thePolarity; -@@ -820,7 +820,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -820,7 +820,7 @@ if (result) { stack.clear(); @@ -1059,7 +1000,7 @@ index 096c5b3e19..57fee5763b 100644 { if (! cfg.getTargetPrinterSupportsRequestedImageSize(cfgname)) { -@@ -841,7 +841,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -841,7 +841,7 @@ if (result) { stack.clear(); @@ -1068,7 +1009,7 @@ index 096c5b3e19..57fee5763b 100644 { if (! cfg.getTargetPrinterSupportsDecimateCrop(cfgname)) { -@@ -871,7 +871,7 @@ OFBool DVPSImageBoxContent::printSCPSet( +@@ -871,7 +871,7 @@ if (result) { stack.clear(); @@ -1077,7 +1018,7 @@ index 096c5b3e19..57fee5763b 100644 { DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -971,7 +971,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -971,7 +971,7 @@ if (result) { stack.clear(); @@ -1086,7 +1027,7 @@ index 096c5b3e19..57fee5763b 100644 { samplesPerPixel = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -994,7 +994,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -994,7 +994,7 @@ if (result) { stack.clear(); @@ -1095,7 +1036,7 @@ index 096c5b3e19..57fee5763b 100644 { rows = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -1017,7 +1017,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1017,7 +1017,7 @@ if (result) { stack.clear(); @@ -1104,7 +1045,7 @@ index 096c5b3e19..57fee5763b 100644 { columns = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -1042,7 +1042,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1042,7 +1042,7 @@ if (result) { stack.clear(); @@ -1113,7 +1054,7 @@ index 096c5b3e19..57fee5763b 100644 { bitsStored = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -1082,7 +1082,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1082,7 +1082,7 @@ if (result) { stack.clear(); @@ -1122,7 +1063,7 @@ index 096c5b3e19..57fee5763b 100644 { bitsAllocated = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -1105,7 +1105,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1105,7 +1105,7 @@ if (result) { stack.clear(); @@ -1131,7 +1072,7 @@ index 096c5b3e19..57fee5763b 100644 { highBit = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -1128,7 +1128,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1128,7 +1128,7 @@ if (result) { stack.clear(); @@ -1140,7 +1081,7 @@ index 096c5b3e19..57fee5763b 100644 { pixelRepresentation = *((DcmUnsignedShort *)(stack.top())); val = 0; -@@ -1151,7 +1151,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1151,7 +1151,7 @@ if (result) { stack.clear(); @@ -1149,7 +1090,7 @@ index 096c5b3e19..57fee5763b 100644 { photometricInterpretation = *((DcmCodeString *)(stack.top())); OFString theColorModel; -@@ -1175,7 +1175,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1175,7 +1175,7 @@ if (result) { stack.clear(); @@ -1158,7 +1099,7 @@ index 096c5b3e19..57fee5763b 100644 { pixelAspectRatio = *((DcmIntegerString *)(stack.top())); if (pixelAspectRatio.getVM() != 2) -@@ -1193,7 +1193,7 @@ OFBool DVPSImageBoxContent::printSCPEvaluateBasicGrayscaleImageSequence( +@@ -1193,7 +1193,7 @@ if (result) { stack.clear(); @@ -1167,10 +1108,8 @@ index 096c5b3e19..57fee5763b 100644 { pixelData = new DcmPixelData(DCM_PixelData); if (pixelData) -diff --git a/dcmpstat/libsrc/dvpsibl.cc b/dcmpstat/libsrc/dvpsibl.cc -index e3768d5a0d..ef069eb845 100644 ---- a/dcmpstat/libsrc/dvpsibl.cc -+++ b/dcmpstat/libsrc/dvpsibl.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsibl.cc ++++ dcmtk/dcmpstat/libsrc/dvpsibl.cc @@ -1,6 +1,6 @@ /* * @@ -1179,7 +1118,7 @@ index e3768d5a0d..ef069eb845 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -68,7 +68,7 @@ OFCondition DVPSImageBoxContent_PList::read(DcmItem &dset, DVPSPresentationLUT_P +@@ -68,7 +68,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -1188,10 +1127,8 @@ index e3768d5a0d..ef069eb845 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpspll.cc b/dcmpstat/libsrc/dvpspll.cc -index 1b2b7a35bb..46465171c7 100644 ---- a/dcmpstat/libsrc/dvpspll.cc -+++ b/dcmpstat/libsrc/dvpspll.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpspll.cc ++++ dcmtk/dcmpstat/libsrc/dvpspll.cc @@ -1,6 +1,6 @@ /* * @@ -1200,7 +1137,7 @@ index 1b2b7a35bb..46465171c7 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -72,7 +72,7 @@ OFCondition DVPSPresentationLUT_PList::read(DcmItem &dset) +@@ -72,7 +72,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -1209,10 +1146,8 @@ index 1b2b7a35bb..46465171c7 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpsril.cc b/dcmpstat/libsrc/dvpsril.cc -index 793e69063a..9dee1f6bfd 100644 ---- a/dcmpstat/libsrc/dvpsril.cc -+++ b/dcmpstat/libsrc/dvpsril.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsril.cc ++++ dcmtk/dcmpstat/libsrc/dvpsril.cc @@ -1,6 +1,6 @@ /* * @@ -1221,7 +1156,7 @@ index 793e69063a..9dee1f6bfd 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -71,7 +71,7 @@ OFCondition DVPSReferencedImage_PList::read(DcmItem &dset) +@@ -71,7 +71,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -1230,10 +1165,8 @@ index 793e69063a..9dee1f6bfd 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpsrsl.cc b/dcmpstat/libsrc/dvpsrsl.cc -index 4b0c83aa75..d2f9dcfffd 100644 ---- a/dcmpstat/libsrc/dvpsrsl.cc -+++ b/dcmpstat/libsrc/dvpsrsl.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsrsl.cc ++++ dcmtk/dcmpstat/libsrc/dvpsrsl.cc @@ -1,6 +1,6 @@ /* * @@ -1242,7 +1175,7 @@ index 4b0c83aa75..d2f9dcfffd 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -69,7 +69,7 @@ OFCondition DVPSReferencedSeries_PList::read(DcmItem &dset) +@@ -69,7 +69,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -1251,10 +1184,8 @@ index 4b0c83aa75..d2f9dcfffd 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpssp.cc b/dcmpstat/libsrc/dvpssp.cc -index 98b1201a7f..717c814607 100644 ---- a/dcmpstat/libsrc/dvpssp.cc -+++ b/dcmpstat/libsrc/dvpssp.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpssp.cc ++++ dcmtk/dcmpstat/libsrc/dvpssp.cc @@ -1,6 +1,6 @@ /* * @@ -1263,7 +1194,7 @@ index 98b1201a7f..717c814607 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -328,7 +328,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset) +@@ -328,7 +328,7 @@ if (result==EC_Normal) { stack.clear(); @@ -1272,7 +1203,7 @@ index 98b1201a7f..717c814607 100644 { seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -362,7 +362,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset) +@@ -362,7 +362,7 @@ // check referenced presentation LUT sequence // if there is any reference, it must refer to one of the presentation LUTs we are managing. stack.clear(); @@ -1281,7 +1212,7 @@ index 98b1201a7f..717c814607 100644 { seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -445,7 +445,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset) +@@ -445,7 +445,7 @@ if (result==EC_Normal) { stack.clear(); @@ -1290,7 +1221,7 @@ index 98b1201a7f..717c814607 100644 { OFBool haveFilmBox = OFFalse; OFBool haveGrayscaleImageBox = OFFalse; -@@ -511,7 +511,7 @@ OFCondition DVPSStoredPrint::read(DcmItem &dset) +@@ -511,7 +511,7 @@ destination.clear(); printerName.clear(); stack.clear(); @@ -1299,7 +1230,7 @@ index 98b1201a7f..717c814607 100644 { seq = (DcmSequenceOfItems *)stack.top(); if (seq->card() > 0) -@@ -1536,7 +1536,7 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmBox(DVPSPrintMessageHandler& +@@ -1536,7 +1536,7 @@ { // N-CREATE was successful, now evaluate Referenced Image Box SQ stack.clear(); @@ -1308,7 +1239,7 @@ index 98b1201a7f..717c814607 100644 { seq=(DcmSequenceOfItems *)stack.top(); numItems = (size_t)seq->card(); -@@ -1559,7 +1559,7 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmBox(DVPSPrintMessageHandler& +@@ -1559,7 +1559,7 @@ // evaluate Referenced Basic Annotation Box SQ if present stack.clear(); annotationContentList.clearAnnotationSOPInstanceUIDs(); @@ -1317,7 +1248,7 @@ index 98b1201a7f..717c814607 100644 { seq=(DcmSequenceOfItems *)stack.top(); numItems = (size_t)seq->card(); -@@ -2419,7 +2419,7 @@ OFBool DVPSStoredPrint::printSCPCreate( +@@ -2419,7 +2419,7 @@ { stack.clear(); @@ -1326,7 +1257,7 @@ index 98b1201a7f..717c814607 100644 { DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -@@ -2487,7 +2487,7 @@ OFBool DVPSStoredPrint::printSCPCreate( +@@ -2487,7 +2487,7 @@ { stack.clear(); @@ -1335,7 +1266,7 @@ index 98b1201a7f..717c814607 100644 { DcmUniqueIdentifier classUID(DCM_ReferencedSOPClassUID); DcmUniqueIdentifier instanceUID(DCM_ReferencedSOPInstanceUID); -@@ -2706,7 +2706,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2706,7 +2706,7 @@ if (result) { stack.clear(); @@ -1344,7 +1275,7 @@ index 98b1201a7f..717c814607 100644 { magnificationType = *((DcmCodeString *)(stack.top())); Uint32 numMagnifications = cfg.getTargetPrinterNumberOfMagnificationTypes(cfgname); -@@ -2739,7 +2739,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2739,7 +2739,7 @@ { stack.clear(); @@ -1353,7 +1284,7 @@ index 98b1201a7f..717c814607 100644 { smoothingType = *((DcmCodeString *)(stack.top())); Uint32 numSmoothings = cfg.getTargetPrinterNumberOfSmoothingTypes(cfgname); -@@ -2781,7 +2781,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2781,7 +2781,7 @@ { stack.clear(); @@ -1362,7 +1293,7 @@ index 98b1201a7f..717c814607 100644 { borderDensity = *((DcmCodeString *)(stack.top())); Uint32 numBorderDensities = cfg.getTargetPrinterNumberOfBorderDensities(cfgname); -@@ -2832,7 +2832,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2832,7 +2832,7 @@ if (result) { stack.clear(); @@ -1371,7 +1302,7 @@ index 98b1201a7f..717c814607 100644 { emptyImageDensity = *((DcmCodeString *)(stack.top())); Uint32 numEmptyImageDensities = cfg.getTargetPrinterNumberOfEmptyImageDensities(cfgname); -@@ -2883,7 +2883,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2883,7 +2883,7 @@ if (result) { stack.clear(); @@ -1380,7 +1311,7 @@ index 98b1201a7f..717c814607 100644 { maxDensity = *((DcmUnsignedShort *)(stack.top())); // we don't check a max density set by the user (for now) -@@ -2895,7 +2895,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2895,7 +2895,7 @@ if (result) { stack.clear(); @@ -1389,7 +1320,7 @@ index 98b1201a7f..717c814607 100644 { minDensity = *((DcmUnsignedShort *)(stack.top())); Uint32 numMinDensities = cfg.getTargetPrinterNumberOfMinDensities(cfgname); -@@ -2917,7 +2917,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2917,7 +2917,7 @@ if (result) { stack.clear(); @@ -1398,7 +1329,7 @@ index 98b1201a7f..717c814607 100644 { trim = *((DcmCodeString *)(stack.top())); -@@ -2945,7 +2945,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2945,7 +2945,7 @@ if (result) { stack.clear(); @@ -1407,7 +1338,7 @@ index 98b1201a7f..717c814607 100644 { configurationInformation = *((DcmShortText *)(stack.top())); Uint32 numConfigurationInformation = cfg.getTargetPrinterNumberOfConfigurationSettings(cfgname); -@@ -2987,7 +2987,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2987,7 +2987,7 @@ if (result) { stack.clear(); @@ -1416,7 +1347,7 @@ index 98b1201a7f..717c814607 100644 { illumination = *((DcmUnsignedShort *)(stack.top())); // we don't check illumination set by the user (for now) -@@ -2999,7 +2999,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -2999,7 +2999,7 @@ if (result) { stack.clear(); @@ -1425,7 +1356,7 @@ index 98b1201a7f..717c814607 100644 { reflectedAmbientLight = *((DcmUnsignedShort *)(stack.top())); // we don't check reflected ambient light set by the user (for now) -@@ -3012,7 +3012,7 @@ OFBool DVPSStoredPrint::printSCPSet( +@@ -3012,7 +3012,7 @@ { stack.clear(); @@ -1434,10 +1365,8 @@ index 98b1201a7f..717c814607 100644 { DcmSequenceOfItems *seq=(DcmSequenceOfItems *)stack.top(); if (seq->card() ==1) -diff --git a/dcmpstat/libsrc/dvpstxl.cc b/dcmpstat/libsrc/dvpstxl.cc -index ffb6dcc10e..8e35ff7ae6 100644 ---- a/dcmpstat/libsrc/dvpstxl.cc -+++ b/dcmpstat/libsrc/dvpstxl.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpstxl.cc ++++ dcmtk/dcmpstat/libsrc/dvpstxl.cc @@ -1,6 +1,6 @@ /* * @@ -1446,7 +1375,7 @@ index ffb6dcc10e..8e35ff7ae6 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -66,7 +66,7 @@ OFCondition DVPSTextObject_PList::read(DcmItem &dset) +@@ -66,7 +66,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -1455,10 +1384,8 @@ index ffb6dcc10e..8e35ff7ae6 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmpstat/libsrc/dvpsvll.cc b/dcmpstat/libsrc/dvpsvll.cc -index 3859f4ab96..17a6277071 100644 ---- a/dcmpstat/libsrc/dvpsvll.cc -+++ b/dcmpstat/libsrc/dvpsvll.cc +--- dcmtk.orig/dcmpstat/libsrc/dvpsvll.cc ++++ dcmtk/dcmpstat/libsrc/dvpsvll.cc @@ -1,6 +1,6 @@ /* * @@ -1467,7 +1394,7 @@ index 3859f4ab96..17a6277071 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -66,7 +66,7 @@ OFCondition DVPSVOILUT_PList::read(DcmItem &dset) +@@ -66,7 +66,7 @@ DcmSequenceOfItems *dseq=NULL; DcmItem *ditem=NULL; @@ -1476,10 +1403,8 @@ index 3859f4ab96..17a6277071 100644 { dseq=(DcmSequenceOfItems *)stack.top(); if (dseq) -diff --git a/dcmrt/libsrc/drttypes.cc b/dcmrt/libsrc/drttypes.cc -index 3aee4312f2..77ff1674c6 100644 ---- a/dcmrt/libsrc/drttypes.cc -+++ b/dcmrt/libsrc/drttypes.cc +--- dcmtk.orig/dcmrt/libsrc/drttypes.cc ++++ dcmtk/dcmrt/libsrc/drttypes.cc @@ -1,14 +1,12 @@ /* * @@ -1497,7 +1422,7 @@ index 3aee4312f2..77ff1674c6 100644 * */ -@@ -212,7 +210,7 @@ OFCondition DRTTypes::getAndCheckStringValueFromDataset(DcmItem &dataset, +@@ -212,7 +210,7 @@ { DcmStack stack; OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); @@ -1506,10 +1431,8 @@ index 3aee4312f2..77ff1674c6 100644 { DcmElement *element = OFstatic_cast(DcmElement *, stack.top()); if (element != NULL) -diff --git a/dcmsign/libsrc/dcsignat.cc b/dcmsign/libsrc/dcsignat.cc -index b104ec1e81..c5b57099a4 100644 ---- a/dcmsign/libsrc/dcsignat.cc -+++ b/dcmsign/libsrc/dcsignat.cc +--- dcmtk.orig/dcmsign/libsrc/dcsignat.cc ++++ dcmtk/dcmsign/libsrc/dcsignat.cc @@ -1,6 +1,6 @@ /* * @@ -1518,7 +1441,7 @@ index b104ec1e81..c5b57099a4 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -104,7 +104,7 @@ OFCondition DcmSignature::getMACIDnumber(DcmItem &item, Uint16& macid) +@@ -104,7 +104,7 @@ macid = 0xFFFF; DcmStack stack; OFCondition result = item.search(DCM_MACIDNumber, stack, ESM_fromHere, OFFalse); @@ -1527,7 +1450,7 @@ index b104ec1e81..c5b57099a4 100644 { result = ((DcmElement *)(stack.top()))->getUint16(macid); } -@@ -734,7 +734,7 @@ OFCondition DcmSignature::verifyCurrent() +@@ -734,7 +734,7 @@ // read MAC Calculation Transfer Syntax UID if (result.good()) { @@ -1536,7 +1459,7 @@ index b104ec1e81..c5b57099a4 100644 { char *uid = NULL; if ((((DcmElement *)(stack.top()))->getString(uid)).good()) -@@ -750,7 +750,7 @@ OFCondition DcmSignature::verifyCurrent() +@@ -750,7 +750,7 @@ if (result.good()) { stack.clear(); @@ -1545,7 +1468,7 @@ index b104ec1e81..c5b57099a4 100644 { OFString macidentifier; if ((((DcmElement *)(stack.top()))->getOFString(macidentifier, 0)).good()) -@@ -783,7 +783,7 @@ OFCondition DcmSignature::verifyCurrent() +@@ -783,7 +783,7 @@ if (result.good()) { stack.clear(); @@ -1554,7 +1477,7 @@ index b104ec1e81..c5b57099a4 100644 { signature = new DcmOtherByteOtherWord(*((DcmOtherByteOtherWord *)(stack.top()))); if (signature == NULL) result = EC_MemoryExhausted; -@@ -960,7 +960,7 @@ OFCondition DcmSignature::getCurrentMacXferSyntaxName(OFString& str) +@@ -960,7 +960,7 @@ DcmStack stack; // read MAC Calculation Transfer Syntax UID @@ -1563,7 +1486,7 @@ index b104ec1e81..c5b57099a4 100644 { char *uid = NULL; if ((((DcmElement *)(stack.top()))->getString(uid)).good() && uid) -@@ -1005,7 +1005,7 @@ OFCondition DcmSignature::getCurrentMacName(OFString& str) +@@ -1005,7 +1005,7 @@ DcmStack stack; // read MAC Algorithm @@ -1572,7 +1495,7 @@ index b104ec1e81..c5b57099a4 100644 { if ((((DcmElement *)(stack.top()))->getOFString(str, 0)).good()) result = EC_Normal; } -@@ -1020,7 +1020,7 @@ OFCondition DcmSignature::getCurrentSignatureUID(OFString& str) +@@ -1020,7 +1020,7 @@ DcmStack stack; // read signature UID @@ -1581,7 +1504,7 @@ index b104ec1e81..c5b57099a4 100644 { if ((((DcmElement *)(stack.top()))->getOFString(str, 0)).good()) result = EC_Normal; } -@@ -1048,7 +1048,7 @@ OFCondition DcmSignature::getCurrentSignatureDateTime(OFString& str) +@@ -1048,7 +1048,7 @@ DcmStack stack; // read signature date/time @@ -1590,7 +1513,7 @@ index b104ec1e81..c5b57099a4 100644 { if ((((DcmElement *)(stack.top()))->getOFString(str, 0)).good()) result = EC_Normal; } -@@ -1119,7 +1119,7 @@ OFCondition DcmSignature::verifySignatureProfile(SiSecurityProfile &sprof) +@@ -1119,7 +1119,7 @@ // check MAC Calculation Transfer Syntax UID if (result.good()) { @@ -1599,7 +1522,7 @@ index b104ec1e81..c5b57099a4 100644 { char *uid = NULL; if ((((DcmElement *)(stack.top()))->getString(uid)).good()) -@@ -1142,7 +1142,7 @@ OFCondition DcmSignature::verifySignatureProfile(SiSecurityProfile &sprof) +@@ -1142,7 +1142,7 @@ { E_MACType mac = EMT_RIPEMD160; stack.clear(); @@ -1608,11 +1531,9 @@ index b104ec1e81..c5b57099a4 100644 { OFString macidentifier; if ((((DcmElement *)(stack.top()))->getOFString(macidentifier, 0)).good()) -diff --git a/dcmsign/libsrc/sicert.cc b/dcmsign/libsrc/sicert.cc -index 173bbbf2c3..0668b72c99 100644 ---- a/dcmsign/libsrc/sicert.cc -+++ b/dcmsign/libsrc/sicert.cc -@@ -135,7 +135,7 @@ OFCondition SiCertificate::read(DcmItem& item) +--- dcmtk.orig/dcmsign/libsrc/sicert.cc ++++ dcmtk/dcmsign/libsrc/sicert.cc +@@ -147,7 +147,7 @@ OFString aString; DcmStack stack; result = item.search(DCM_CertificateType, stack, ESM_fromHere, OFFalse); @@ -1621,7 +1542,7 @@ index 173bbbf2c3..0668b72c99 100644 { result = ((DcmElement *)(stack.top()))->getOFString(aString, 0); if (result.good()) -@@ -144,7 +144,7 @@ OFCondition SiCertificate::read(DcmItem& item) +@@ -156,7 +156,7 @@ { stack.clear(); result = item.search(DCM_CertificateOfSigner, stack, ESM_fromHere, OFFalse); @@ -1630,10 +1551,8 @@ index 173bbbf2c3..0668b72c99 100644 { DcmElement *cert = (DcmElement *)stack.top(); Uint8 *data = NULL; -diff --git a/dcmsr/libsrc/dsrtypes.cc b/dcmsr/libsrc/dsrtypes.cc -index 08414ad93e..a9d6218594 100644 ---- a/dcmsr/libsrc/dsrtypes.cc -+++ b/dcmsr/libsrc/dsrtypes.cc +--- dcmtk.orig/dcmsr/libsrc/dsrtypes.cc ++++ dcmtk/dcmsr/libsrc/dsrtypes.cc @@ -1,6 +1,6 @@ /* * @@ -1642,7 +1561,7 @@ index 08414ad93e..a9d6218594 100644 * All rights reserved. See COPYRIGHT file for details. * * This software and supporting documentation were developed by -@@ -1178,7 +1178,7 @@ OFCondition DSRTypes::getAndCheckElementFromDataset(DcmItem &dataset, +@@ -1178,7 +1178,7 @@ DcmStack stack; const DcmTagKey tagKey = delem.getTag(); OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/); @@ -1651,7 +1570,7 @@ index 08414ad93e..a9d6218594 100644 { /* copy object from search stack */ result = delem.copyFrom(*stack.top()); -@@ -1203,7 +1203,7 @@ OFCondition DSRTypes::getAndCheckStringValueFromDataset(DcmItem &dataset, +@@ -1203,7 +1203,7 @@ { DcmStack stack; OFCondition result = dataset.search(tagKey, stack, ESM_fromHere, OFFalse /*searchIntoSub*/);