//
// aegis - project change supervisor
// Copyright (C) 2004-2006, 2008, 2012 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
#include
replay_line::~replay_line()
{
}
replay_line::replay_line()
{
}
replay_line::replay_line(const replay_line &arg) :
url1(arg.url1),
version(arg.version),
url2(arg.url2),
uuid(arg.uuid),
description(arg.description)
{
}
replay_line &
replay_line::operator=(const replay_line &arg)
{
if (this != &arg)
{
url1 = arg.url1;
version = arg.version;
url2 = arg.url2;
uuid = arg.uuid;
description = arg.description;
}
return *this;
}
static const char *
get_next_form(const char *cp, nstring &result)
{
// C locale
while (*cp && isspace((unsigned char)*cp))
++cp;
if (*cp == '\0')
{
result = "";
return cp;
}
if (*cp != '<')
{
const char *ep = strchr(cp, '<');
if (!ep)
ep = cp + strlen(cp);
result = nstring(cp, ep - cp);
return ep;
}
const char *ep = strchr(cp, '>');
if (!ep)
return 0;
result = nstring(cp, ep - cp);
return (ep + 1);
}
static bool
extract_url(const nstring &form, nstring &url)
{
//
// The string should be of the form
// "]*>"
// "([^<]+) | "
// "([^<]+) | "
// "([^<]+) | "
// ""
//
// But we match it manually, because then we can work on systems
// without GNU Regex extensions.
//
const char *cp = line.c_str();
nstring form;
cp = get_next_form(cp, form);
if (!cp || !form.downcase().starts_with("
) just in case more columns are added in the future.
//
trace(("return true;\n"));
trace(("}\n"));
return true;
}
// vim: set ts=8 sw=4 et :