1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

Removed #AX_PREFIX_CONFIG_H

This commit is contained in:
James Booth 2016-03-31 21:05:02 +01:00
parent c91ce78a04
commit 9b177a9e01
50 changed files with 246 additions and 239 deletions

View File

@ -7,7 +7,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([src/config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AX_PREFIX_CONFIG_H([src/prof_config.h], [PROF], [src/config.h])
#AX_PREFIX_CONFIG_H([src/prof_config.h], [PROF], [src/config.h])
### Checks for programs.
AC_PROG_CC

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <assert.h>
#include <errno.h>
@ -59,10 +59,10 @@
#include "log.h"
#include "muc.h"
#include "plugins/plugins.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
#include "pgp/gpg.h"
#endif
#include "profanity.h"
@ -2778,7 +2778,7 @@ cmd_reset_autocomplete(ProfWin *window)
tlscerts_reset_ac();
prefs_reset_boolean_choice();
presence_reset_sub_request_search();
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
p_gpg_autocomplete_key_reset();
#endif
autocomplete_reset(help_ac);
@ -3678,7 +3678,7 @@ _pgp_autocomplete(ProfWin *window, const char *const input)
return found;
}
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
gboolean result;
gchar **args = parse_args(input, 2, 3, &result);
if ((strncmp(input, "/pgp", 4) == 0) && (result == TRUE)) {
@ -4599,7 +4599,7 @@ _account_autocomplete(ProfWin *window, const char *const input)
if (found) {
return found;
}
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
} else if ((g_strv_length(args) > 3) && (g_strcmp0(args[2], "pgpkeyid")) == 0) {
g_string_append(beginning, " ");
g_string_append(beginning, args[2]);

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
@ -61,10 +61,10 @@
#include "jid.h"
#include "log.h"
#include "muc.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
#include "pgp/gpg.h"
#endif
#include "profanity.h"
@ -180,7 +180,7 @@ gboolean
cmd_tls(ProfWin *window, const char *const command, gchar **args)
{
if (g_strcmp0(args[0], "certpath") == 0) {
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
if (g_strcmp0(args[1], "set") == 0) {
if (args[2] == NULL) {
cons_bad_cmd_usage(command);
@ -216,7 +216,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args)
return TRUE;
#endif
} else if (g_strcmp0(args[0], "trust") == 0) {
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
jabber_conn_status_t conn_status = jabber_get_connection_status();
if (conn_status != JABBER_CONNECTED) {
cons_show("You are not currently connected.");
@ -245,7 +245,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args)
return TRUE;
#endif
} else if (g_strcmp0(args[0], "trusted") == 0) {
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
GList *certs = tlscerts_list();
GList *curr = certs;
@ -268,7 +268,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args)
return TRUE;
#endif
} else if (g_strcmp0(args[0], "revoke") == 0) {
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
if (args[1] == NULL) {
cons_bad_cmd_usage(command);
} else {
@ -287,7 +287,7 @@ cmd_tls(ProfWin *window, const char *const command, gchar **args)
} else if (g_strcmp0(args[0], "show") == 0) {
return _cmd_set_boolean_preference(args[1], command, "TLS titlebar indicator", PREF_TLS_SHOW);
} else if (g_strcmp0(args[0], "cert") == 0) {
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
if (args[1]) {
TLSCertificate *cert = tlscerts_get_trusted(args[1]);
if (!cert) {
@ -667,7 +667,7 @@ cmd_account(ProfWin *window, const char *const command, gchar **args)
}
cons_show("");
} else if (strcmp(property, "pgpkeyid") == 0) {
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
char *err_str = NULL;
if (!p_gpg_valid_key(value, &err_str)) {
cons_show("Invalid PGP key ID specified: %s, see /pgp keys", err_str);
@ -1926,7 +1926,7 @@ cmd_msg(ProfWin *window, const char *const command, gchar **args)
if (msg) {
cl_ev_send_msg(chatwin, msg);
} else {
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
if (otr_is_secure(barejid)) {
chatwin_otr_secured(chatwin, otr_is_trusted(barejid));
}
@ -2814,7 +2814,7 @@ cmd_resource(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
if (otr_is_secure(chatwin->barejid)) {
cons_show("Cannot choose resource during an OTR session.");
return TRUE;
@ -5666,7 +5666,7 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args)
gboolean
cmd_pgp(ProfWin *window, const char *const command, gchar **args)
{
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
if (args[0] == NULL) {
cons_bad_cmd_usage(command);
return TRUE;
@ -5903,7 +5903,7 @@ cmd_pgp(ProfWin *window, const char *const command, gchar **args)
gboolean
cmd_otr(ProfWin *window, const char *const command, gchar **args)
{
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
if (args[0] == NULL) {
cons_bad_cmd_usage(command);
return TRUE;

View File

@ -31,7 +31,7 @@
* source files in the program, then also delete it here.
*
*/
#include "prof_config.h"
#include "config.h"
#include <sys/select.h>
#include <assert.h>
@ -46,9 +46,9 @@
#include <curl/easy.h>
#include <glib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
@ -347,7 +347,7 @@ release_is_new(char *found_version)
{
int curr_maj, curr_min, curr_patch, found_maj, found_min, found_patch;
int parse_curr = sscanf(PROF_PACKAGE_VERSION, "%d.%d.%d", &curr_maj, &curr_min,
int parse_curr = sscanf(PACKAGE_VERSION, "%d.%d.%d", &curr_maj, &curr_min,
&curr_patch);
int parse_found = sscanf(found_version, "%d.%d.%d", &found_maj, &found_min,
&found_patch);
@ -657,13 +657,13 @@ is_notify_enabled(void)
{
gboolean notify_enabled = FALSE;
#ifdef PROF_HAVE_OSXNOTIFY
#ifdef HAVE_OSXNOTIFY
notify_enabled = TRUE;
#endif
#ifdef PROF_HAVE_LIBNOTIFY
#ifdef HAVE_LIBNOTIFY
notify_enabled = TRUE;
#endif
#ifdef PROF_PLATFORM_CYGWIN
#ifdef PLATFORM_CYGWIN
notify_enabled = TRUE;
#endif

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <stdio.h>

View File

@ -35,7 +35,7 @@
#ifndef PREFERENCES_H
#define PREFERENCES_H
#include "prof_config.h"
#include "config.h"
#include <glib.h>

View File

@ -32,15 +32,15 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -35,7 +35,7 @@
#ifndef THEME_H
#define THEME_H
#include "prof_config.h"
#include "config.h"
#include <glib.h>

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <glib.h>
@ -44,10 +44,10 @@
#include "roster_list.h"
#include "chat_session.h"
#include "plugins/plugins.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
#include "pgp/gpg.h"
#endif
@ -81,7 +81,7 @@ cl_ev_disconnect(void)
muc_invites_clear();
chat_sessions_clear();
tlscerts_clear_current();
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
p_gpg_on_disconnect();
#endif
}
@ -91,7 +91,7 @@ cl_ev_presence_send(const resource_presence_t presence_type, const char *const m
{
char *signed_status = NULL;
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
char *account_name = jabber_get_account_name();
ProfAccount *account = accounts_get_account(account_name);
if (account->pgp_keyid) {
@ -112,8 +112,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
char *plugin_msg = plugins_pre_chat_message_send(chatwin->barejid, msg);
// OTR suported, PGP supported
#ifdef PROF_HAVE_LIBOTR
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBOTR
#ifdef HAVE_LIBGPGME
if (chatwin->pgp_send) {
char *id = message_send_chat_pgp(chatwin->barejid, plugin_msg);
chat_log_pgp_msg_out(chatwin->barejid, plugin_msg);
@ -136,8 +136,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
#endif
// OTR supported, PGP unsupported
#ifdef PROF_HAVE_LIBOTR
#ifndef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBOTR
#ifndef HAVE_LIBGPGME
gboolean handled = otr_on_message_send(chatwin, plugin_msg);
if (!handled) {
char *id = message_send_chat(chatwin->barejid, plugin_msg);
@ -153,8 +153,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
#endif
// OTR unsupported, PGP supported
#ifndef PROF_HAVE_LIBOTR
#ifdef PROF_HAVE_LIBGPGME
#ifndef HAVE_LIBOTR
#ifdef HAVE_LIBGPGME
if (chatwin->pgp_send) {
char *id = message_send_chat_pgp(chatwin->barejid, plugin_msg);
chat_log_pgp_msg_out(chatwin->barejid, plugin_msg);
@ -174,8 +174,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
#endif
// OTR unsupported, PGP unsupported
#ifndef PROF_HAVE_LIBOTR
#ifndef PROF_HAVE_LIBGPGME
#ifndef HAVE_LIBOTR
#ifndef HAVE_LIBGPGME
char *id = message_send_chat(chatwin->barejid, plugin_msg);
chat_log_msg_out(chatwin->barejid, plugin_msg);
chatwin_outgoing_msg(chatwin, plugin_msg, id, PROF_MSG_PLAIN);

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
@ -51,10 +51,10 @@
#include "profanity.h"
#include "event/client_events.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
#include "pgp/gpg.h"
#endif
@ -67,11 +67,11 @@ sv_ev_login_account_success(char *account_name, int secured)
roster_create();
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
otr_on_connect(account);
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
p_gpg_on_connect(account->jid);
#endif
@ -107,7 +107,7 @@ sv_ev_roster_received(void)
char *account_name = jabber_get_account_name();
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
// check pgp key valid if specified
ProfAccount *account = accounts_get_account(account_name);
if (account && account->pgp_keyid) {
@ -157,7 +157,7 @@ sv_ev_lost_connection(void)
{
cons_show_error("Lost connection.");
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
GSList *recipients = wins_get_chat_recipients();
GSList *curr = recipients;
while (curr) {
@ -178,7 +178,7 @@ sv_ev_lost_connection(void)
chat_sessions_clear();
ui_disconnected();
roster_destroy();
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
p_gpg_on_disconnect();
#endif
}
@ -358,7 +358,7 @@ sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message)
chat_state_active(chatwin->state);
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
if (pgp_message) {
char *decrypted = p_gpg_decrypt(pgp_message);
if (decrypted) {
@ -374,7 +374,7 @@ sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message)
#endif
}
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
static void
_sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, char *pgp_message, GDateTime *timestamp)
{
@ -392,7 +392,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char
}
#endif
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
static void
_sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, GDateTime *timestamp)
{
@ -432,8 +432,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
}
// OTR suported, PGP supported
#ifdef PROF_HAVE_LIBOTR
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBOTR
#ifdef HAVE_LIBGPGME
if (pgp_message) {
if (chatwin->is_otr) {
win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session.");
@ -449,8 +449,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
#endif
// OTR supported, PGP unsupported
#ifdef PROF_HAVE_LIBOTR
#ifndef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBOTR
#ifndef HAVE_LIBGPGME
_sv_ev_incoming_otr(chatwin, new_win, barejid, resource, message, timestamp);
rosterwin_roster();
return;
@ -458,8 +458,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
#endif
// OTR unsupported, PGP supported
#ifndef PROF_HAVE_LIBOTR
#ifdef PROF_HAVE_LIBGPGME
#ifndef HAVE_LIBOTR
#ifdef HAVE_LIBGPGME
if (pgp_message) {
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message, timestamp);
} else {
@ -471,8 +471,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
#endif
// OTR unsupported, PGP unsupported
#ifndef PROF_HAVE_LIBOTR
#ifndef PROF_HAVE_LIBGPGME
#ifndef HAVE_LIBOTR
#ifndef HAVE_LIBGPGME
_sv_ev_incoming_plain(chatwin, new_win, barejid, resource, message, timestamp);
rosterwin_roster();
return;
@ -491,7 +491,7 @@ sv_ev_incoming_carbon(char *barejid, char *resource, char *message, char *pgp_me
new_win = TRUE;
}
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
if (pgp_message) {
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message, NULL);
} else {
@ -608,7 +608,7 @@ sv_ev_contact_offline(char *barejid, char *resource, char *status)
ui_contact_offline(barejid, resource, status);
}
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
ProfChatWin *chatwin = wins_get_chat(barejid);
if (chatwin && otr_is_secure(barejid)) {
chatwin_otr_unsecured(chatwin);
@ -631,7 +631,7 @@ sv_ev_contact_online(char *barejid, Resource *resource, GDateTime *last_activity
ui_contact_online(barejid, resource, last_activity);
}
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
if (pgpsig) {
p_gpg_verify(barejid, pgpsig);
}

View File

@ -32,12 +32,12 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <string.h>
#include <glib.h>
#ifdef PROF_HAVE_GIT_VERSION
#ifdef HAVE_GIT_VERSION
#include "gitversion.h"
#endif
@ -52,7 +52,7 @@ static char *account_name = NULL;
int
main(int argc, char **argv)
{
if (argc == 2 && g_strcmp0(argv[1], "docgen") == 0 && g_strcmp0(PROF_PACKAGE_STATUS, "development") == 0) {
if (argc == 2 && g_strcmp0(argv[1], "docgen") == 0 && g_strcmp0(PACKAGE_STATUS, "development") == 0) {
command_docgen();
return 0;
}
@ -80,17 +80,17 @@ main(int argc, char **argv)
g_option_context_free(context);
if (version == TRUE) {
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
#ifdef PROF_HAVE_GIT_VERSION
g_print("Profanity, version %sdev.%s.%s\n", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_print("Profanity, version %sdev.%s.%s\n", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
g_print("Profanity, version %sdev\n", PROF_PACKAGE_VERSION);
g_print("Profanity, version %sdev\n", PACKAGE_VERSION);
#endif
} else {
g_print("Profanity, version %s\n", PROF_PACKAGE_VERSION);
g_print("Profanity, version %s\n", PACKAGE_VERSION);
}
g_print("Copyright (C) 2012 - 2016 James Booth <%s>.\n", PROF_PACKAGE_BUGREPORT);
g_print("Copyright (C) 2012 - 2016 James Booth <%s>.\n", PACKAGE_BUGREPORT);
g_print("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
g_print("\n");
g_print("This is free software; you are free to change and redistribute it.\n");
@ -99,10 +99,10 @@ main(int argc, char **argv)
g_print("Build information:\n");
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
g_print("XMPP library: libmesode\n");
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
g_print("XMPP library: libstrophe\n");
#endif
@ -112,25 +112,25 @@ main(int argc, char **argv)
g_print("Desktop notification support: Disabled\n");
}
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
g_print("OTR support: Enabled\n");
#else
g_print("OTR support: Disabled\n");
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
g_print("PGP support: Enabled\n");
#else
g_print("PGP support: Disabled\n");
#endif
#ifdef PROF_HAVE_C
#ifdef HAVE_C
g_print("C plugins: Enabled\n");
#else
g_print("C plugins: Disabled\n");
#endif
#ifdef PROF_HAVE_PYTHON
#ifdef HAVE_PYTHON
g_print("Python plugins: Enabled\n");
#else
g_print("Python plugins: Disabled\n");

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <locale.h>
#include <string.h>

View File

@ -35,7 +35,7 @@
#include <string.h>
#include <stdlib.h>
#include "prof_config.h"
#include "config.h"
#include "common.h"
#include "config/preferences.h"
#include "log.h"
@ -46,12 +46,12 @@
#include "plugins/themes.h"
#include "plugins/settings.h"
#ifdef PROF_HAVE_PYTHON
#ifdef HAVE_PYTHON
#include "plugins/python_plugins.h"
#include "plugins/python_api.h"
#endif
#ifdef PROF_HAVE_C
#ifdef HAVE_C
#include "plugins/c_plugins.h"
#include "plugins/c_api.h"
#endif
@ -67,10 +67,10 @@ plugins_init(void)
callbacks_init();
autocompleters_init();
#ifdef PROF_HAVE_PYTHON
#ifdef HAVE_PYTHON
python_env_init();
#endif
#ifdef PROF_HAVE_C
#ifdef HAVE_C
c_env_init();
#endif
@ -85,7 +85,7 @@ plugins_init(void)
{
gboolean loaded = FALSE;
gchar *filename = plugins_load[i];
#ifdef PROF_HAVE_PYTHON
#ifdef HAVE_PYTHON
if (g_str_has_suffix(filename, ".py")) {
ProfPlugin *plugin = python_plugin_create(filename);
if (plugin) {
@ -94,7 +94,7 @@ plugins_init(void)
}
}
#endif
#ifdef PROF_HAVE_C
#ifdef HAVE_C
if (g_str_has_suffix(filename, ".so")) {
ProfPlugin *plugin = c_plugin_create(filename);
if (plugin) {
@ -112,7 +112,7 @@ plugins_init(void)
GSList *curr = plugins;
while (curr) {
ProfPlugin *plugin = curr->data;
plugin->init_func(plugin, PROF_PACKAGE_VERSION, PROF_PACKAGE_STATUS);
plugin->init_func(plugin, PACKAGE_VERSION, PACKAGE_STATUS);
curr = g_slist_next(curr);
}
}
@ -554,12 +554,12 @@ plugins_shutdown(void)
GSList *curr = plugins;
while (curr) {
#ifdef PROF_HAVE_PYTHON
#ifdef HAVE_PYTHON
if (((ProfPlugin *)curr->data)->lang == LANG_PYTHON) {
python_plugin_destroy(curr->data);
}
#endif
#ifdef PROF_HAVE_C
#ifdef HAVE_C
if (((ProfPlugin *)curr->data)->lang == LANG_C) {
c_plugin_destroy(curr->data);
}
@ -567,10 +567,10 @@ plugins_shutdown(void)
curr = g_slist_next(curr);
}
#ifdef PROF_HAVE_PYTHON
#ifdef HAVE_PYTHON
python_shutdown();
#endif
#ifdef PROF_HAVE_C
#ifdef HAVE_C
c_shutdown();
#endif

View File

@ -31,9 +31,9 @@
* source files in the program, then also delete it here.
*
*/
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_GIT_VERSION
#ifdef HAVE_GIT_VERSION
#include "gitversion.h"
#endif
@ -60,10 +60,10 @@
#include "log.h"
#include "muc.h"
#include "plugins/plugins.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
#include "pgp/gpg.h"
#endif
#include "resource.h"
@ -122,7 +122,7 @@ prof_run(char *log_level, char *account_name)
cont = TRUE;
}
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
otr_poll();
#endif
plugins_run_timed();
@ -322,14 +322,14 @@ _init(char *log_level)
prefs_load();
log_init(prof_log_level);
log_stderr_init(PROF_LEVEL_ERROR);
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
#ifdef PROF_HAVE_GIT_VERSION
log_info("Starting Profanity (%sdev.%s.%s)...", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
log_info("Starting Profanity (%sdev.%s.%s)...", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
log_info("Starting Profanity (%sdev)...", PROF_PACKAGE_VERSION);
log_info("Starting Profanity (%sdev)...", PACKAGE_VERSION);
#endif
} else {
log_info("Starting Profanity (%s)...", PROF_PACKAGE_VERSION);
log_info("Starting Profanity (%s)...", PACKAGE_VERSION);
}
chat_log_init();
groupchat_log_init();
@ -344,10 +344,10 @@ _init(char *log_level)
muc_init();
tlscerts_init();
scripts_init();
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
otr_init();
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
p_gpg_init();
#endif
atexit(_shutdown);
@ -376,10 +376,10 @@ _shutdown(void)
muc_close();
caps_close();
ui_close();
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
otr_shutdown();
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
p_gpg_close();
#endif
chat_log_close();

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
@ -40,9 +40,9 @@
#include <stdlib.h>
#include <glib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -35,7 +35,7 @@
#ifndef UI_BUFFER_H
#define UI_BUFFER_H
#include "prof_config.h"
#include "config.h"
#include "config/theme.h"
#include <glib.h>

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
@ -47,7 +47,7 @@
#include "ui/window.h"
#include "ui/titlebar.h"
#include "plugins/plugins.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
@ -85,7 +85,7 @@ chatwin_receipt_received(ProfChatWin *chatwin, const char *const id)
win_mark_received(win, id);
}
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
void
chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted)
{

View File

@ -37,9 +37,9 @@
#include <stdlib.h>
#include <assert.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
@ -57,7 +57,7 @@
#include "xmpp/xmpp.h"
#include "xmpp/bookmark.h"
#ifdef PROF_HAVE_GIT_VERSION
#ifdef HAVE_GIT_VERSION
#include "gitversion.h"
#endif
@ -82,7 +82,7 @@ void
cons_debug(const char *const msg, ...)
{
ProfWin *console = wins_get_console();
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
if (strcmp(PACKAGE_STATUS, "development") == 0) {
va_list arg;
va_start(arg, msg);
GString *fmt_msg = g_string_new(NULL);
@ -416,18 +416,18 @@ cons_about(void)
_cons_splash_logo();
} else {
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
#ifdef PROF_HAVE_GIT_VERSION
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev.%s.%s", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev", PROF_PACKAGE_VERSION);
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev", PACKAGE_VERSION);
#endif
} else {
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %s", PROF_PACKAGE_VERSION);
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %s", PACKAGE_VERSION);
}
}
win_vprint(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2016 James Booth <%s>.", PROF_PACKAGE_BUGREPORT);
win_vprint(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2016 James Booth <%s>.", PACKAGE_BUGREPORT);
win_println(console, 0, "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>");
win_println(console, 0, "");
win_println(console, 0, "This is free software; you are free to change and redistribute it.");
@ -2305,14 +2305,14 @@ _cons_splash_logo(void)
win_print(console, '-', 0, NULL, 0, THEME_SPLASH, "", "|_| (____/ ");
win_print(console, '-', 0, NULL, 0, THEME_SPLASH, "", "");
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
#ifdef PROF_HAVE_GIT_VERSION
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev.%s.%s", PROF_PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
#else
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev", PROF_PACKAGE_VERSION);
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev", PACKAGE_VERSION);
#endif
} else {
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %s", PROF_PACKAGE_VERSION);
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %s", PACKAGE_VERSION);
}
}

View File

@ -32,9 +32,9 @@
*
*/
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_GIT_VERSION
#ifdef HAVE_GIT_VERSION
#include "gitversion.h"
#endif
@ -44,13 +44,13 @@
#include <sys/ioctl.h>
#include <unistd.h>
#ifdef PROF_HAVE_LIBXSS
#ifdef HAVE_LIBXSS
#include <X11/extensions/scrnsaver.h>
#endif
#include <glib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif
@ -64,7 +64,7 @@
#include "jid.h"
#include "log.h"
#include "muc.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
#include "ui/ui.h"
@ -81,7 +81,7 @@ static int inp_size;
static gboolean perform_resize = FALSE;
static GTimer *ui_idle_time;
#ifdef PROF_HAVE_LIBXSS
#ifdef HAVE_LIBXSS
static Display *display;
#endif
@ -105,7 +105,7 @@ ui_init(void)
wins_init();
notifier_initialise();
cons_about();
#ifdef PROF_HAVE_LIBXSS
#ifdef HAVE_LIBXSS
display = XOpenDisplay(0);
#endif
ui_idle_time = g_timer_new();
@ -150,7 +150,7 @@ unsigned long
ui_get_idle_time(void)
{
// if compiled with libxss, get the x sessions idle time
#ifdef PROF_HAVE_LIBXSS
#ifdef HAVE_LIBXSS
XScreenSaverInfo *info = XScreenSaverAllocInfo();
if (info && display) {
XScreenSaverQueryInfo(display, DefaultRootWindow(display), info);
@ -497,7 +497,7 @@ ui_close_connected_win(int index)
} else if (window->type == WIN_CHAT) {
ProfChatWin *chatwin = (ProfChatWin*) window;
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
if (chatwin->is_otr) {
otr_end_session(chatwin->barejid);
}

View File

@ -33,7 +33,7 @@
*/
#define _XOPEN_SOURCE_EXTENDED
#include "prof_config.h"
#include "config.h"
#include <sys/select.h>
#include <stdlib.h>
@ -46,9 +46,9 @@
#include <readline/readline.h>
#include <readline/history.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -31,17 +31,17 @@
* source files in the program, then also delete it here.
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <glib.h>
#ifdef PROF_HAVE_LIBNOTIFY
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
#endif
#ifdef PROF_PLATFORM_CYGWIN
#ifdef PLATFORM_CYGWIN
#include <windows.h>
#endif
@ -62,7 +62,7 @@ notifier_initialise(void)
void
notifier_uninit(void)
{
#ifdef PROF_HAVE_LIBNOTIFY
#ifdef HAVE_LIBNOTIFY
if (notify_is_initted()) {
notify_uninit();
}
@ -196,7 +196,7 @@ notify_remind(void)
void
notify(const char *const message, int timeout, const char *const category)
{
#ifdef PROF_HAVE_LIBNOTIFY
#ifdef HAVE_LIBNOTIFY
log_debug("Attempting notification: %s", message);
if (notify_is_initted()) {
log_debug("Reinitialising libnotify");
@ -227,7 +227,7 @@ notify(const char *const message, int timeout, const char *const category)
log_error("Libnotify not initialised.");
}
#endif
#ifdef PROF_PLATFORM_CYGWIN
#ifdef PLATFORM_CYGWIN
NOTIFYICONDATA nid;
nid.cbSize = sizeof(NOTIFYICONDATA);
//nid.hWnd = hWnd;
@ -248,7 +248,7 @@ notify(const char *const message, int timeout, const char *const category)
Shell_NotifyIcon(NIM_MODIFY, &nid);
#endif
#ifdef PROF_HAVE_OSXNOTIFY
#ifdef HAVE_OSXNOTIFY
GString *notify_command = g_string_new("terminal-notifier -title \"Profanity\" -message '");
char *escaped_single = str_replace(message, "'", "'\\''");

View File

@ -32,15 +32,15 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -36,7 +36,7 @@
#include <string.h>
#include <assert.h>
#include "prof_config.h"
#include "config.h"
#include "common.h"
#include "config/theme.h"

View File

@ -35,12 +35,12 @@
#ifndef UI_UI_H
#define UI_UI_H
#include "prof_config.h"
#include "config.h"
#include "command/commands.h"
#include "ui/win_types.h"
#include "muc.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
@ -135,7 +135,7 @@ void chatwin_outgoing_carbon(ProfChatWin *chatwin, const char *const message, pr
void chatwin_contact_online(ProfChatWin *chatwin, Resource *resource, GDateTime *last_activity);
void chatwin_contact_offline(ProfChatWin *chatwin, char *resource, char *status);
char* chatwin_get_string(ProfChatWin *chatwin);
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted);
void chatwin_otr_unsecured(ProfChatWin *chatwin);
void chatwin_otr_trust(ProfChatWin *chatwin);

View File

@ -35,13 +35,13 @@
#ifndef UI_WIN_TYPES_H
#define UI_WIN_TYPES_H
#include "prof_config.h"
#include "config.h"
#include <wchar.h>
#include <glib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
@ -41,9 +41,9 @@
#include <wchar.h>
#include <glib.h>
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -35,7 +35,7 @@
#ifndef UI_WINDOW_H
#define UI_WINDOW_H
#include "prof_config.h"
#include "config.h"
#include <wchar.h>
@ -46,9 +46,9 @@
#include "xmpp/xmpp.h"
#include "chat_state.h"
#ifdef PROF_HAVE_NCURSESW_NCURSES_H
#ifdef HAVE_NCURSESW_NCURSES_H
#include <ncursesw/ncurses.h>
#elif PROF_HAVE_NCURSES_H
#elif HAVE_NCURSES_H
#include <ncurses.h>
#endif

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <string.h>
#include <assert.h>

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <assert.h>
#include <stdio.h>
@ -40,10 +40,10 @@
#include <string.h>
#include <glib.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -32,9 +32,9 @@
*
*/
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_GIT_VERSION
#ifdef HAVE_GIT_VERSION
#include "gitversion.h"
#endif
@ -44,10 +44,10 @@
#include <glib.h>
#include <glib/gstdio.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif
@ -565,9 +565,9 @@ caps_create_query_response_stanza(xmpp_ctx_t *const ctx)
xmpp_stanza_set_attribute(identity, "type", "console");
GString *name_str = g_string_new("Profanity ");
g_string_append(name_str, PROF_PACKAGE_VERSION);
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
#ifdef PROF_HAVE_GIT_VERSION
g_string_append(name_str, PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_string_append(name_str, "dev.");
g_string_append(name_str, PROF_GIT_BRANCH);
g_string_append(name_str, ".");

View File

@ -35,12 +35,12 @@
#ifndef XMPP_CAPABILITIES_H
#define XMPP_CAPABILITIES_H
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -32,16 +32,16 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif
@ -425,7 +425,7 @@ _connection_free_session_data(void)
presence_clear_sub_requests();
}
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
static int
_connection_certfail_cb(xmpp_tlscert_t *xmpptlscert, const char *const errormsg)
{
@ -544,7 +544,7 @@ _jabber_connect(const char *const fulljid, const char *const passwd, const char
xmpp_conn_set_flags(jabber_conn.conn, XMPP_CONN_FLAG_DISABLE_TLS);
}
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
char *cert_path = prefs_get_string(PREF_TLS_CERTPATH);
if (cert_path) {
xmpp_conn_tlscert_path(jabber_conn.conn, cert_path);
@ -552,7 +552,7 @@ _jabber_connect(const char *const fulljid, const char *const passwd, const char
prefs_free_string(cert_path);
#endif
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
int connect_status = xmpp_connect_client(
jabber_conn.conn,
altdomain,

View File

@ -35,12 +35,12 @@
#ifndef XMPP_CONNECTION_H
#define XMPP_CONNECTION_H
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -32,15 +32,15 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <string.h>
#include <stdlib.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -37,6 +37,13 @@
#include "xmpp/xmpp.h"
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif
DataForm* form_create(xmpp_stanza_t *const stanza);
xmpp_stanza_t* form_create_submission(DataForm *form);

View File

@ -32,9 +32,9 @@
*
*/
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_GIT_VERSION
#ifdef HAVE_GIT_VERSION
#include "gitversion.h"
#endif
@ -43,10 +43,10 @@
#include <stdio.h>
#include <glib.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif
@ -1131,9 +1131,9 @@ _version_get_handler(xmpp_stanza_t *const stanza)
xmpp_stanza_t *version = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(version, "version");
xmpp_stanza_t *version_txt = xmpp_stanza_new(ctx);
GString *version_str = g_string_new(PROF_PACKAGE_VERSION);
if (strcmp(PROF_PACKAGE_STATUS, "development") == 0) {
#ifdef PROF_HAVE_GIT_VERSION
GString *version_str = g_string_new(PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_string_append(version_str, "dev.");
g_string_append(version_str, PROF_GIT_BRANCH);
g_string_append(version_str, ".");

View File

@ -32,15 +32,15 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif
@ -198,7 +198,7 @@ message_send_chat_pgp(const char *const barejid, const char *const msg)
char *id = create_unique_id("msg");
xmpp_stanza_t *message = NULL;
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
char *account_name = jabber_get_account_name();
ProfAccount *account = accounts_get_account(account_name);
if (account->pgp_keyid) {

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <assert.h>
#include <stdlib.h>
@ -41,10 +41,10 @@
#include <glib.h>
#include <glib/gprintf.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -32,7 +32,7 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <assert.h>
#include <stdlib.h>
@ -40,10 +40,10 @@
#include <glib.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -32,17 +32,17 @@
*
*/
#include "prof_config.h"
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -35,12 +35,12 @@
#ifndef XMPP_STANZA_H
#define XMPP_STANZA_H
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif

View File

@ -35,12 +35,12 @@
#ifndef XMPP_XMPP_H
#define XMPP_XMPP_H
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
#include <mesode.h>
#endif
#ifdef PROF_HAVE_LIBSTROPHE
#ifdef HAVE_LIBSTROPHE
#include <strophe.h>
#endif
@ -155,7 +155,7 @@ char* jabber_get_account_name(void);
GList* jabber_get_available_resources(void);
char* jabber_create_uuid(void);
void jabber_free_uuid(char *uuid);
#ifdef PROF_HAVE_LIBMESODE
#ifdef HAVE_LIBMESODE
TLSCertificate* jabber_get_tls_peer_cert(void);
#endif
gboolean jabber_conn_is_secured(void);

View File

@ -7,7 +7,7 @@
#include <cmocka.h>
#include <sys/stat.h>
#include "prof_config.h"
#include "config.h"
#include "proftest.h"
#include "test_connect.h"

View File

@ -798,7 +798,7 @@ void cmd_account_set_priority_updates_presence_when_account_connected_with_prese
will_return(jabber_get_account_name, "a_account");
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
ProfAccount *account = account_new("a_account", "a_jid", NULL, NULL, TRUE, NULL, 5222, "a_resource",
NULL, NULL, 10, 10, 10, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

View File

@ -6,9 +6,9 @@
#include <string.h>
#include <glib.h>
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include <libotr/proto.h>
#include "otr/otr.h"
#endif
@ -24,7 +24,7 @@
#define CMD_OTR "/otr"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
void cmd_otr_shows_usage_when_no_args(void **state)
{
gchar *args[] = { NULL };

View File

@ -1,6 +1,6 @@
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
void cmd_otr_shows_usage_when_no_args(void **state);
void cmd_otr_shows_usage_when_invalid_subcommand(void **state);
void cmd_otr_log_shows_usage_when_no_args(void **state);

View File

@ -6,7 +6,7 @@
#include <string.h>
#include <glib.h>
#include "prof_config.h"
#include "config.h"
#include "command/commands.h"
@ -14,7 +14,7 @@
#define CMD_PGP "/pgp"
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
void cmd_pgp_shows_usage_when_no_args(void **state)
{
gchar *args[] = { NULL };

View File

@ -1,6 +1,6 @@
#include "prof_config.h"
#include "config.h"
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
void cmd_pgp_shows_usage_when_no_args(void **state);
void cmd_pgp_start_shows_message_when_disconnected(void **state);
void cmd_pgp_start_shows_message_when_disconnecting(void **state);

View File

@ -1,4 +1,4 @@
#include "prof_config.h"
#include "config.h"
#include <glib.h>
#include <wchar.h>
@ -8,7 +8,7 @@
#include "ui/window.h"
#include "ui/ui.h"
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
#include "otr/otr.h"
#endif
@ -67,7 +67,7 @@ void ui_resize(void) {}
void ui_focus_win(ProfWin *win) {}
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
void chatwin_otr_secured(ProfChatWin *chatwin, gboolean trusted) {}
void chatwin_otr_unsecured(ProfChatWin *chatwin) {}
void chatwin_otr_trust(ProfChatWin *chatwin) {}

View File

@ -7,7 +7,7 @@
#include <cmocka.h>
#include <sys/stat.h>
#include "prof_config.h"
#include "config.h"
#include "chat_session.h"
#include "helpers.h"
#include "test_autocomplete.h"
@ -355,7 +355,7 @@ int main(int argc, char* argv[]) {
unit_test(cmd_account_set_eval_password_when_password_set),
unit_test(cmd_account_set_muc_sets_muc),
unit_test(cmd_account_set_nick_sets_nick),
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
unit_test(cmd_account_show_message_for_missing_otr_policy),
unit_test(cmd_account_show_message_for_invalid_otr_policy),
unit_test(cmd_account_set_otr_sets_otr),
@ -504,7 +504,7 @@ int main(int argc, char* argv[]) {
unit_test(cmd_bookmark_remove_removes_bookmark),
unit_test(cmd_bookmark_remove_shows_message_when_no_bookmark),
#ifdef PROF_HAVE_LIBOTR
#ifdef HAVE_LIBOTR
unit_test(cmd_otr_shows_usage_when_no_args),
unit_test(cmd_otr_shows_usage_when_invalid_subcommand),
unit_test(cmd_otr_log_shows_usage_when_no_args),
@ -556,7 +556,7 @@ int main(int argc, char* argv[]) {
unit_test(cmd_otr_shows_message_when_otr_unsupported),
#endif
#ifdef PROF_HAVE_LIBGPGME
#ifdef HAVE_LIBGPGME
unit_test(cmd_pgp_shows_usage_when_no_args),
unit_test(cmd_pgp_start_shows_message_when_disconnected),
unit_test(cmd_pgp_start_shows_message_when_disconnecting),