ulong perform_action (pchar -w out, int len, pchar in, ulong rq_flags)  
{
  ulong result = do_something (out, len, in, rq_flags);

  if (result == NO_ERROR)
  {
    print_string ("All done." "\n");
  }
  else 
  {
    handle_error (result);
  }

  return result;
}