about summary refs log tree commit diff stats
path: root/settings.c
diff options
context:
space:
mode:
authorJosh Rickmar <jrick@devio.us>2012-03-28 16:15:05 -0400
committerJosh Rickmar <jrick@devio.us>2012-05-04 20:41:22 -0400
commitf976f776e5a00150a0b572bb5125c206c1b731e8 (patch)
tree32ffe50e8d5e49b30b1b7807b9bc2123f29b02dd /settings.c
parent8cf3ed194beb51595cc575c2fd7f8067d35c5dc7 (diff)
downloadxombrero-f976f776e5a00150a0b572bb5125c206c1b731e8.tar.gz
Make marco happy. NULLs now completely fill the struct initialization
so as to leave no doubt that values are being uninitialized.
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c120
1 files changed, 60 insertions, 60 deletions
diff --git a/settings.c b/settings.c
index d16f364..ab3378a 100644
--- a/settings.c
+++ b/settings.c
@@ -293,64 +293,64 @@ struct special		s_referer = {
 };
 
 struct settings		rs[] = {
-	{ "allow_volatile_cookies",	XT_S_INT, 0,		&allow_volatile_cookies, NULL, NULL },
-	{ "append_next",		XT_S_INT, 0,		&append_next, NULL, NULL },
-	{ "autofocus_onload",		XT_S_INT, 0,		&autofocus_onload, NULL, NULL },
-	{ "browser_mode",		XT_S_INT, 0, NULL, NULL,&s_browser_mode },
-	{ "gui_mode",			XT_S_INT, 0, NULL, NULL,&s_gui_mode },
-	{ "color_visited_uris",		XT_S_INT, 0,		&color_visited_uris, NULL, NULL },
+	{ "allow_volatile_cookies",	XT_S_INT, 0,		&allow_volatile_cookies, NULL, NULL, NULL, NULL},
+	{ "append_next",		XT_S_INT, 0,		&append_next, NULL, NULL, NULL, NULL },
+	{ "autofocus_onload",		XT_S_INT, 0,		&autofocus_onload, NULL, NULL, NULL, NULL},
+	{ "browser_mode",		XT_S_INT, 0, NULL, NULL,&s_browser_mode, NULL, NULL },
+	{ "gui_mode",			XT_S_INT, 0, NULL, NULL,&s_gui_mode, NULL, NULL },
+	{ "color_visited_uris",		XT_S_INT, 0,		&color_visited_uris , NULL, NULL, NULL, NULL },
 	{ "cookie_policy",		XT_S_INT, 0, NULL, NULL,&s_cookie },
 	{ "cookies_enabled",		XT_S_INT, 0,		&cookies_enabled, NULL, NULL },
-	{ "ctrl_click_focus",		XT_S_INT, 0,		&ctrl_click_focus, NULL, NULL },
-	{ "default_zoom_level",		XT_S_FLOAT, 0,		NULL, NULL, NULL, &default_zoom_level },
-	{ "default_script",		XT_S_STR, 0, NULL, NULL,&s_default_script },
-	{ "download_dir",		XT_S_STR, 0, NULL, NULL,&s_download_dir },
+	{ "ctrl_click_focus",		XT_S_INT, 0,		&ctrl_click_focus, NULL, NULL, NULL, NULL },
+	{ "default_zoom_level",		XT_S_FLOAT, 0,		NULL, NULL, NULL, &default_zoom_level, NULL },
+	{ "default_script",		XT_S_STR, 0, NULL, NULL,&s_default_script, NULL, NULL },
+	{ "download_dir",		XT_S_STR, 0, NULL, NULL,&s_download_dir, NULL, NULL },
 	{ "download_mode",		XT_S_STR, 0, NULL, NULL,&s_download_mode, NULL, set_download_mode_rt },
-	{ "edit_mode",			XT_S_STR, 0, NULL, NULL,&s_edit_mode },
-	{ "enable_cookie_whitelist",	XT_S_INT, 0,		&enable_cookie_whitelist, NULL, NULL },
-	{ "enable_js_whitelist",	XT_S_INT, 0,		&enable_js_whitelist, NULL, NULL },
-	{ "enable_plugin_whitelist",	XT_S_INT, 0,		&enable_plugin_whitelist, NULL, NULL },
-	{ "enable_localstorage",	XT_S_INT, 0,		&enable_localstorage, NULL, NULL },
-	{ "enable_plugins",		XT_S_INT, 0,		&enable_plugins, NULL, NULL },
-	{ "enable_scripts",		XT_S_INT, 0,		&enable_scripts, NULL, NULL },
-	{ "enable_socket",		XT_S_INT, XT_SF_RESTART,&enable_socket, NULL, NULL },
-	{ "enable_spell_checking",	XT_S_INT, 0,		&enable_spell_checking, NULL, NULL },
-	{ "encoding",			XT_S_STR, 0, NULL,	&encoding, NULL },
+	{ "edit_mode",			XT_S_STR, 0, NULL, NULL,&s_edit_mode, NULL, NULL},
+	{ "enable_cookie_whitelist",	XT_S_INT, 0,		&enable_cookie_whitelist, NULL, NULL, NULL, NULL },
+	{ "enable_js_whitelist",	XT_S_INT, 0,		&enable_js_whitelist, NULL, NULL, NULL, NULL },
+	{ "enable_plugin_whitelist",	XT_S_INT, 0,		&enable_plugin_whitelist, NULL, NULL, NULL, NULL },
+	{ "enable_localstorage",	XT_S_INT, 0,		&enable_localstorage, NULL, NULL, NULL, NULL},
+	{ "enable_plugins",		XT_S_INT, 0,		&enable_plugins, NULL, NULL, NULL, NULL },
+	{ "enable_scripts",		XT_S_INT, 0,		&enable_scripts, NULL, NULL, NULL, NULL },
+	{ "enable_socket",		XT_S_INT, XT_SF_RESTART,&enable_socket, NULL, NULL, NULL, NULL },
+	{ "enable_spell_checking",	XT_S_INT, 0,		&enable_spell_checking, NULL, NULL, NULL, NULL },
+	{ "encoding",			XT_S_STR, 0, NULL,	&encoding, NULL, NULL, NULL },
 	{ "external_editor",		XT_S_STR,0, NULL,	&external_editor, NULL, NULL, set_external_editor },
-	{ "fancy_bar",			XT_S_INT, XT_SF_RESTART,&fancy_bar, NULL, NULL },
-	{ "guess_search",		XT_S_INT, 0,		&guess_search, NULL, NULL },
-	{ "history_autosave",		XT_S_INT, 0,		&history_autosave, NULL, NULL },
-	{ "home",			XT_S_STR, 0, NULL,	&home, NULL },
+	{ "fancy_bar",			XT_S_INT, XT_SF_RESTART,&fancy_bar, NULL, NULL, NULL, NULL },
+	{ "guess_search",		XT_S_INT, 0,		&guess_search, NULL, NULL, NULL, NULL },
+	{ "history_autosave"an class="cpf"><stdlib.h>
#include <string.h>

#include <stabber.h>
#include <expect.h>

#include "proftest.h"

void
does_not_send_receipt_request_to_barejid(void **state)
{
    prof_input("/receipts request on");

    prof_connect();

    prof_input("/msg somejid@someserver.com Hi there");

    assert_true(stbbr_received(
        "<message id='*' type='chat' to='somejid@someserver.com'>"
            "<body>Hi there</body>"
        "</message>"
    ));
}

void
send_receipt_request(void **state)
{
    prof_input("/receipts request on");

    prof_connect();

    stbbr_for_id("prof_caps_4",
        "<iq from='buddy1@localhost/laptop' to='stabber@localhost' id='prof_caps_4' type='result'>"
            "<query xmlns='http://jabber.org/protocol/disco#info' node='http://profanity-im.github.io#hAkb1xZdJV9BQpgGNw8zG5Xsals='>"
                "<identity category='client' name='Profanity 0.5.0' type='console'/>"
                "<feature var='urn:xmpp:receipts'/>"
            "</query>"
        "</iq>"
    );

    stbbr_send(
        "<presence to='stabber@localhost' from='buddy1@localhost/laptop'>"
            "<priority>15</priority>"
            "<status>My status</status>"
            "<c hash='sha-256' xmlns='http://jabber.org/protocol/caps' node='http://profanity-im.github.io' ver='hAkb1xZdJV9BQpgGNw8zG5Xsals='/>"
        "</presence>"
    );

    prof_output_exact("Buddy1 is online, \"My status\"");

    prof_input("/msg Buddy1");
    prof_input("/resource set laptop");
    prof_input("Hi there, where is my receipt?");

    assert_true(stbbr_received(
        "<message id='*' type='chat' to='buddy1@localhost/laptop'>"
            "<body>Hi there, where is my receipt?</body>"
            "<request xmlns='urn:xmpp:receipts'/>"
        "</message>"
    ));
}

void
send_receipt_on_request(void **state)
{
    prof_input("/receipts send on");

    prof_connect();

    stbbr_send(
        "<message id='msg12213' type='chat' to='stabber@localhost/profanity' from='someuser@server.org/profanity'>"
            "<body>Wants a receipt</body>"
            "<request xmlns='urn:xmpp:receipts'/>"
        "</message>"
    );

    assert_true(stbbr_received(
        "<message id='*' to='someuser@server.org/profanity'>"
            "<received id='msg12213' xmlns='urn:xmpp:receipts'/>"
        "</message>"
    ));
}
p;s_kb }, - { "mime_type", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_mime }, - { "pl_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_pl }, - { "user_agent", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_ua }, + { "alias", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_alias, NULL, NULL }, + { "cookie_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_cookie_wl, NULL, NULL }, + { "js_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_js, NULL, NULL }, + { "keybinding", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_kb, NULL, NULL }, + { "mime_type", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_mime, NULL, NULL }, + { "pl_wl", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_pl, NULL, NULL }, + { "user_agent", XT_S_STR, XT_SF_RUNTIME, NULL, NULL, &s_ua, NULL, NULL }, }; size_t