Example #1
0
/// Finds the pointer for a window number
///
/// @param window the window number
/// @param[out] err Details of an error that may have occurred
/// @return the window pointer
win_T * find_window(Window window, Error *err)
{
  win_T *rv = handle_get_window(window);

  if (!rv) {
    set_api_error("Invalid window id", err);
  }

  return rv;
}
Example #2
0
win_T * find_window_by_handle(Window window, Error *err)
{
  win_T *rv = handle_get_window(window);

  if (!rv) {
    api_set_error(err, Validation, _("Invalid window id"));
  }

  return rv;
}