Convert scr_LogPrint() to scr_log_print()
Add a #define for compatibility.
Same for scr_Write{Incoming,Outgoing}Message() functions.
--- a/mcabber/mcabber/hooks.c Sun Mar 14 12:30:59 2010 +0100
+++ b/mcabber/mcabber/hooks.c Sun Mar 14 12:48:21 2010 +0100
@@ -203,9 +203,9 @@
}
// Note: the hlog_write should not be called first, because in some
- // cases scr_WriteIncomingMessage() will load the history and we'd
+ // cases scr_write_incoming_message() will load the history and we'd
// have the message twice...
- scr_WriteIncomingMessage(bjid, wmsg, timestamp, message_flags, mucnicklen);
+ scr_write_incoming_message(bjid, wmsg, timestamp, message_flags, mucnicklen);
// We don't log the modified message, but the original one
if (wmsg == mmsg)
@@ -336,13 +336,13 @@
}
// Note: the hlog_write should not be called first, because in some
- // cases scr_WriteOutgoingMessage() will load the history and we'd
+ // cases scr_write_outgoing_message() will load the history and we'd
// have the message twice...
if (encrypted == ENCRYPTED_PGP)
cryptflag = HBB_PREFIX_PGPCRYPT;
else if (encrypted == ENCRYPTED_OTR)
cryptflag = HBB_PREFIX_OTRCRYPT;
- scr_WriteOutgoingMessage(bjid, wmsg, cryptflag, xep184);
+ scr_write_outgoing_message(bjid, wmsg, cryptflag, xep184);
// We don't log private messages
if (!nick)
@@ -427,8 +427,8 @@
bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s",
imstatus2char[oldstat], imstatus2char[status],
((status_msg) ? status_msg : ""));
- scr_WriteIncomingMessage(bjid, bn, timestamp,
- HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
+ scr_write_incoming_message(bjid, bn, timestamp,
+ HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
g_free(bn);
}
}
--- a/mcabber/mcabber/logprint.h Sun Mar 14 12:30:59 2010 +0100
+++ b/mcabber/mcabber/logprint.h Sun Mar 14 12:48:21 2010 +0100
@@ -13,9 +13,11 @@
#define LPRINT_LOGNORM (LPRINT_NORMAL|LPRINT_LOG)
void scr_print_logwindow(const char *string);
-void scr_LogPrint(unsigned int flag, const char *fmt, ...) G_GNUC_PRINTF (2, 3);
+void scr_log_print(unsigned int flag, const char *fmt, ...) G_GNUC_PRINTF (2, 3);
+void scr_do_update(void);
-void scr_do_update(void);
+// For backward compatibility:
+#define scr_LogPrint scr_log_print
#endif /* __MCABBER_LOGPRINT_H__ */
--- a/mcabber/mcabber/screen.c Sun Mar 14 12:30:59 2010 +0100
+++ b/mcabber/mcabber/screen.c Sun Mar 14 12:48:21 2010 +0100
@@ -877,11 +877,11 @@
}
}
-// scr_LogPrint(...)
+// scr_log_print(...)
// Display a message in the log window and in the status buffer.
// Add the message to the tracelog file if the log flag is set.
// This function will convert from UTF-8 unless the LPRINT_NOTUTF8 flag is set.
-void scr_LogPrint(unsigned int flag, const char *fmt, ...)
+void scr_log_print(unsigned int flag, const char *fmt, ...)
{
time_t timestamp;
char strtimestamp[64];
@@ -2092,8 +2092,9 @@
}
// If prefix is NULL, HBB_PREFIX_IN is supposed.
-void scr_WriteIncomingMessage(const char *jidfrom, const char *text,
- time_t timestamp, guint prefix, unsigned mucnicklen)
+void scr_write_incoming_message(const char *jidfrom, const char *text,
+ time_t timestamp,
+ guint prefix, unsigned mucnicklen)
{
if (!(prefix &
~HBB_PREFIX_NOFLAG & ~HBB_PREFIX_HLIGHT & ~HBB_PREFIX_HLIGHT_OUT &
@@ -2107,8 +2108,8 @@
scr_write_message(jidfrom, text, timestamp, prefix, mucnicklen, NULL);
}
-void scr_WriteOutgoingMessage(const char *jidto, const char *text, guint prefix,
- gpointer xep184)
+void scr_write_outgoing_message(const char *jidto, const char *text,
+ guint prefix, gpointer xep184)
{
GSList *roster_elt;
roster_elt = roster_find(jidto, jidsearch,
--- a/mcabber/mcabber/screen.h Sun Mar 14 12:30:59 2010 +0100
+++ b/mcabber/mcabber/screen.h Sun Mar 14 12:48:21 2010 +0100
@@ -88,11 +88,11 @@
} muccoltype;
-void scr_WriteIncomingMessage(const char *jidfrom, const char *text,
- time_t timestamp, guint prefix,
- unsigned mucnicklen);
-void scr_WriteOutgoingMessage(const char *jidto, const char *text,
- guint prefix, gpointer xep184);
+void scr_write_incoming_message(const char *jidfrom, const char *text,
+ time_t timestamp, guint prefix,
+ unsigned mucnicklen);
+void scr_write_outgoing_message(const char *jidto, const char *text,
+ guint prefix, gpointer xep184);
void scr_getch(keycode *kcode);
void scr_process_key(keycode kcode);
@@ -184,6 +184,12 @@
void readline_forward_kill_iline(void);
void readline_send_multiline(void);
+
+// For backward compatibility:
+
+#define scr_WriteIncomingMessage scr_write_incoming_message
+#define scr_WriteOutgoingMessage scr_write_outgoing_message
+
#endif
/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */