/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *			(C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#include <terminaldisplay.h>
#include <terminalformatter.h>
#include <qcolor.h>
#include <qregexp.h>

#include <porttoolsformatter.h>

PortToolsFormatter::PortToolsFormatter(TerminalDisplay *d, const char *name)
	:	TerminalFormatter(d, name)
{
}

QColor PortToolsFormatter::format(const QString &str) {
	static QRegExp systemMsg("((=|-)+>|\\*+| +(!|\\*)|\\[).*");

	if(systemMsg.exactMatch(str))
		return QColor(0, 0, 0);

	return QColor(0x4C, 0x4C, 0x4C);
}
