FACT++  1.0
Item* fillItem ( float *  floatLocation,
char *  itemName,
float  defDeadband 
)

Definition at line 3488 of file feeserver.c.

References createItem(), Memory::free(), and Memory::malloc().

Referenced by fillFloatItem().

3488  {
3489  Item* item = 0;
3490 
3491  item = createItem();
3492  if (item == 0) {
3493  //no memory available!
3494 # ifdef __DEBUG
3495  printf("no memory available!\n");
3496 # endif
3497  return 0;
3498  }
3499  item->location = floatLocation;
3500  item->name = (char*) malloc(strlen(itemName) + 1);
3501  if (item->name == 0) {
3502  //no memory available!
3503 # ifdef __DEBUG
3504  printf("no memory available!\n");
3505 # endif
3506  free(item);
3507  return 0;
3508  }
3509  strcpy(item->name, itemName);
3510  item->defaultDeadband = defDeadband;
3511  return item;
3512 }
Definition: did.h:42
void * malloc()
Definition: EventBuilder.cc:99
void free(void *mem)
Item * createItem()
Definition: feeserver.c:3454

+ Here is the call graph for this function:

+ Here is the caller graph for this function: