//
// aegis - project change supervisor
// Copyright (C) 1999, 2001-2008, 2012, 2014 Peter Miller
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see
// .
//
#include
#include
#include
#include
#include
cstate_history_ty *
change::history_new(const user_ty::pointer &up)
{
trace(("%s\n{\n", __PRETTY_FUNCTION__));
cstate_ty *csdp;
cstate_history_ty *history_data;
cstate_history_ty **history_data_p;
meta_type *type_p = 0;
trace(("this = %p)\n", this));
csdp = cstate_get();
assert(csdp->history);
history_data_p =
(cstate_history_ty **)
cstate_history_list_type.list_parse(csdp->history, &type_p);
assert(type_p == &cstate_history_type);
history_data = (cstate_history_ty *)cstate_history_type.alloc();
*history_data_p = history_data;
history_data->when = now();
history_data->who = up->name().get_ref_copy();
trace(("return %p;\n", history_data));
trace(("}\n"));
return history_data;
}
// vim: set ts=8 sw=4 et :