| 155 | // ------------- |
| 156 | |
| 157 | static XMP_Status |
| 158 | DumpStringMap ( const XMP_StringMap & map, XMP_StringPtr label, XMP_TextOutputProc outProc, void * refCon ) |
| 159 | { |
| 160 | XMP_Status status; |
| 161 | XMP_cStringMapPos currPos; |
| 162 | XMP_cStringMapPos endPos = map.end(); |
| 163 | |
| 164 | size_t maxLen = 0; |
| 165 | for ( currPos = map.begin(); currPos != endPos; ++currPos ) { |
| 166 | size_t currLen = currPos->first.size(); |
| 167 | if ( currLen > maxLen ) maxLen = currLen; |
| 168 | } |
| 169 | |
| 170 | OutProcNewline(); |
| 171 | OutProcLiteral ( label ); |
| 172 | OutProcNewline(); |
| 173 | |
| 174 | for ( currPos = map.begin(); currPos != endPos; ++currPos ) { |
| 175 | OutProcNChars ( " ", 2 ); |
| 176 | DumpClearString ( currPos->first, outProc, refCon ); |
| 177 | OutProcPadding ( maxLen - currPos->first.size() ); |
| 178 | OutProcNChars ( " => ", 4 ); |
| 179 | DumpClearString ( currPos->second, outProc, refCon ); |
| 180 | OutProcNewline(); |
| 181 | } |
| 182 | |
| 183 | EXIT: |
| 184 | return status; |
| 185 | |
| 186 | } // DumpStringMap |
| 187 | |
| 188 | |
| 189 | // ------------------------------------------------------------------------------------------------- |
no test coverage detected