Changeset 24777 for trunk/psModules/src/concepts/pmConcepts.c
- Timestamp:
- Jul 12, 2009, 3:20:10 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/concepts/pmConcepts.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/concepts/pmConcepts.c
r23832 r24777 485 485 concept[length - 1] = '\0'; 486 486 487 // special variants: 488 if (!strcmp(concept, "FPA.DATE")) { 489 psTime *fpaTime = psMetadataLookupPtr(NULL, fpa->concepts, "FPA.TIME"); 490 if (!fpaTime) { 491 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Missing concept FPA.TIME needed for FPA.DATE"); 492 psFree(string); 493 return NULL; 494 } 495 psString dateTimeString = psTimeToISO(fpaTime); // String representation 496 psList *dateTime = psStringSplit(dateTimeString, "T", true); 497 psFree(dateTimeString); 498 psString dateString = psMemIncrRefCounter(psListGet(dateTime, PS_LIST_HEAD)); // The date string 499 psFree (dateTime); 500 501 if (!psStringSubstitute(&string, dateString, "{FPA.DATE}")) { 502 psError(PS_ERR_UNKNOWN, false, "Unable to replace concept %s", concept); 503 psFree(string); 504 psFree(dateString); 505 return NULL; 506 } 507 psFree (dateString); 508 continue; 509 } 510 487 511 psTrace("psModules.concepts", 7, "Interpolating concept %s", concept); 488 512
Note:
See TracChangeset
for help on using the changeset viewer.
