anchor.diff:      end do
   
       ! Analyze task and error state to see how to return
  -    if (error_code_c == 0) then
  +    if (error_code_c == LBFGSB_OK) then
          ! Objective and gradient evaluations were OK but L-BFGS-B may not
          ! be.  Regardless, take what we can from the outputs.
          min_x_c = point
  
positive.code:           ! Call objective function
            error_code_c = func_pointer(dim_c, point, func_value, &
                 callback_data, error_message_length_c, error_message_c)
            if (error_code_c /= 0) exit
  
            ! Call objective function gradient
            error_code_c = grad_pointer(dim_c, point, grad_value, &
                 callback_data, error_message_length_c, error_message_c)
            if (error_code_c /= 0) exit
         end if
  
         ! Nothing to do for other tasks (NEW_X just means a step was
  
negative.code:      !   Arbitrary data to be used by the callback
       !
       ! error_code:
       !   Returned error code as defined in enumeration above
       function objective_function_c(dim, point, objective_function_value, &
            callback_data, error_message_length, error_message) &
            result(error_code) bind(c)
  