/*
 * Return a human-readable string-representation of a Fam::Event object.
 *
 * Examples:
 *   puts 'event: ' << ev.to_s
 *
 */
static VALUE fam_ev_to_s(VALUE self)
{
  FAMEvent *ev;
  char str[1024];
  static char *ev_code_list[] = {
    "Unknown",
    "Changed",
    "Deleted",
    "StartExecuting",
    "StopExecuting",
    "Created",
    "Moved",
    "Acknowledge",
    "Exists",
    "EndExists",
  };

  Data_Get_Struct(self, FAMEvent, ev);
  snprintf(str, 1024, "%s \"%s\" (%d)",
           ev_code_list[ev->code],
           ev->filename,
           FAMREQUEST_GETREQNUM(&(ev->fr)));

  return rb_str_new2(str);
}