Changeset 15289
- Timestamp:
- Oct 11, 2007, 2:12:17 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfigCamera.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfigCamera.c
r15150 r15289 637 637 psMetadata *contents = psMetadataAlloc(); // List of contents, with chipName:chipType 638 638 639 // XXX this is using the fpaItem->name not the chipName639 // XXX this is using the fpaItem->name not the chipName 640 640 psMetadataIterator *fpaIter = psMetadataIteratorAlloc(fpa, PS_LIST_HEAD, NULL); // Iteratr 641 641 psMetadataItem *fpaItem; // Item from iteration … … 690 690 while ((contentItem = psMetadataGetAndIncrement(contentIter))) { 691 691 assert (contentItem->type == PS_DATA_STRING); 692 char *ptr = strchr (contentItem->data.str, ':');693 assert (ptr);692 char *ptr = strchr (contentItem->data.str, ':'); 693 assert (ptr); 694 694 psString content = psStringNCopy (contentItem->data.str, ptr - contentItem->data.str); 695 695 psStringAppend(&content, ":_mosaicChip "); 696 psFree (contentItem->data.str);697 contentItem->data.str = content; 696 psFree (contentItem->data.str); 697 contentItem->data.str = content; 698 698 } 699 699 psFree(contentIter); 700 700 701 # if (0)701 # if (0) 702 702 while (psListLength(contents->list) > 0) { 703 703 psMetadataRemoveIndex(contents, PS_LIST_TAIL); … … 715 715 } 716 716 psFree(fpaIter); 717 # endif717 # endif 718 718 719 719 psMetadata *chips = psMetadataAlloc(); // List of chip types, with cellName:cellType … … 763 763 removeCellConceptsSources(defaults); 764 764 765 psMetadata *conceptFormats = psMetadataLookupMetadata(&mdok, format, "FORMATS"); // Concepts formats 766 765 767 // Add in the positioning concepts 766 768 psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.XPARITY", 0, NULL, 1); … … 768 770 psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.X0", 0, NULL, 0); 769 771 psMetadataAddS32(defaults, PS_LIST_TAIL, "CELL.Y0", 0, NULL, 0); 770 if ( formats) {771 if (psMetadataLookup( formats, "CELL.X0")) {772 psMetadataRemoveKey( formats, "CELL.X0");773 } 774 if (psMetadataLookup( formats, "CELL.Y0")) {775 psMetadataRemoveKey( formats, "CELL.Y0");772 if (conceptFormats) { 773 if (psMetadataLookup(conceptFormats, "CELL.X0")) { 774 psMetadataRemoveKey(conceptFormats, "CELL.X0"); 775 } 776 if (psMetadataLookup(conceptFormats, "CELL.Y0")) { 777 psMetadataRemoveKey(conceptFormats, "CELL.Y0"); 776 778 } 777 779 } … … 785 787 psMetadataAddS32(defaults, PS_LIST_TAIL, "CHIP.X0", 0, NULL, 0); 786 788 psMetadataAddS32(defaults, PS_LIST_TAIL, "CHIP.Y0", 0, NULL, 0); 787 if ( formats) {788 if (psMetadataLookup( formats, "CHIP.X0")) {789 psMetadataRemoveKey( formats, "CHIP.X0");789 if (conceptFormats) { 790 if (psMetadataLookup(conceptFormats, "CHIP.X0")) { 791 psMetadataRemoveKey(conceptFormats, "CHIP.X0"); 790 792 } 791 if (psMetadataLookup( formats, "CHIP.Y0")) {792 psMetadataRemoveKey( formats, "CHIP.Y0");793 if (psMetadataLookup(conceptFormats, "CHIP.Y0")) { 794 psMetadataRemoveKey(conceptFormats, "CHIP.Y0"); 793 795 } 794 796 }
Note:
See TracChangeset
for help on using the changeset viewer.
