pidgin/pidgin

Make PurplePluginProtocolInfo definitions consistent
release-2.x.y
2020-05-20, David Woodhouse
159344ba2a49
Make PurplePluginProtocolInfo definitions consistent

Since we can't use C99 structure initialisers, we have to manually add
new NULL fields to all protocols whenever we extend the structure.

Make it slightly easier to script that, by making the current last
field (get_cb_alias) consistent in all cases. In particular, there's
no reason *not* to have the trailing comma, as most already do.

Now I can add a new field to the PRPL by doing something like this...

PROTOFILES=`grep -rl '[A-Za-z_][A-Za-z0-9_]*,[[:space:]]*/\* get_cb_alias \*/' libpurple/protocols/ `
sed '/\/\* get_cb_alias \*\//{p;s/[A-Za-z_][A-Za-
#error "This is file is not a valid C code"
/* This file contains some of the macros from other header files as
function declarations. This does not make sense in C, but it
provides type information for the dbus-analyze-functions.py
program, which makes these macros callable by DBUS. */
/* blist.h */
gboolean PURPLE_BLIST_NODE_IS_CHAT(PurpleBlistNode *node);
gboolean PURPLE_BLIST_NODE_IS_BUDDY(PurpleBlistNode *node);
gboolean PURPLE_BLIST_NODE_IS_CONTACT(PurpleBlistNode *node);
gboolean PURPLE_BLIST_NODE_IS_GROUP(PurpleBlistNode *node);
gboolean PURPLE_BUDDY_IS_ONLINE(PurpleBuddy *buddy);
gboolean PURPLE_BLIST_NODE_HAS_FLAG(PurpleBlistNode *node, int flags);
gboolean PURPLE_BLIST_NODE_SHOULD_SAVE(PurpleBlistNode *node);
/* connection.h */
gboolean PURPLE_CONNECTION_IS_CONNECTED(PurpleConnection *connection);
gboolean PURPLE_CONNECTION_IS_VALID(PurpleConnection *connection);
/* conversation.h */
PurpleConvIm *PURPLE_CONV_IM(const PurpleConversation *conversation);
PurpleConvIm *PURPLE_CONV_CHAT(const PurpleConversation *conversation);