void transform (p_p_list_item -w target, p_list_item list)
         where (target :: *)      
{
  void set_amount_pointer (p_list_item _)                
  {
    amount_ptr = list_item->containers[0]->amount; 
  }

  pint amount_ptr = .; set_amount_pointer (list);

  ...

  if (...)
  {
    *amount_ptr ++;
  }

  ...

}