Implement a parser for ircv3 and add unit tests to it.
This change got pretty big so I didn't implement unescapping tags yet. I did
however put the unit tests in for escaped tags, but they are currently #if 0'd
out.
The unit tests are based on the msg-split test cases from https://github.com/ircdocs/parser-tests/blob/master/tests/msg-split.yaml
Testing Done:
Ran the unit tests.
Bugs closed: PIDGIN-17585
Reviewed at https://reviews.imfreedom.org/r/1874/
/* pidgin
*
* Pidgin is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* 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 2 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*
*/
#ifdef HAVE_CONFIG_H
#include<config.h>
#endif
#include<glib/gi18n-lib.h>
#include<glib/gstdio.h>
#include<gplugin.h>
#define BUF_LONG (4096)
#include<gdk/gdkkeysyms.h>
#include<talkatu.h>
#include<purple.h>
#include<math.h>
#include"gtkblist.h"
#include"gtkconv.h"
#include"gtkdialogs.h"
#include"gtkprivacy.h"
#include"gtkutils.h"
#include"pidginavatar.h"
#include"pidgincolor.h"
#include"pidgincore.h"
#include"pidgindisplaywindow.h"
#include"pidgininfopane.h"
#include"pidgininvitedialog.h"
#include"pidginmessage.h"
#include"pidginpresenceicon.h"
#define ADD_MESSAGE_HISTORY_AT_ONCE 100
typedefenum
{
PIDGIN_CONV_SET_TITLE=1<<0,
PIDGIN_CONV_BUDDY_ICON=1<<1,
PIDGIN_CONV_MENU=1<<2,
PIDGIN_CONV_TAB_ICON=1<<3,
PIDGIN_CONV_TOPIC=1<<4,
PIDGIN_CONV_COLORIZE_TITLE=1<<6,
}PidginConvFields;
#define PIDGIN_CONV_ALL ((1 << 7) - 1)
#define BUDDYICON_SIZE_MIN 32
#define BUDDYICON_SIZE_MAX 96
/* Prototypes. <-- because Paco-Paco hates this comment. */