/* Copyright (C) 1996,1997 Robert H”hne, see COPYING.RH for details */
/* This file is part of RHIDE. */
#define Uses_tvutilFunctions
#include <libtvuti.h>

#define Uses_TMsgCollection
#include <libide.h>

msg_rec::msg_rec(const char * fname,const char * m,msgType atype,int line) 
  : type(atype),lineno(line)
{
  if (!fname || !*fname) filename = NULL;
  else string_dup(filename,fname);
  if (!m || !*m) msg = NULL;
  else string_dup(msg,m);
}

msg_rec::~msg_rec()
{
  string_free(filename);
  string_free(msg);
}

void TMsgCollection::freeItem(void *item)
{
  delete((msg_rec *)item);
}

