be more specific about what we assign to what in var_name_to_ptr
authorRobert Manea <gotmor@gmail.com>
Tue, 19 May 2009 12:51:15 +0000 (14:51 +0200)
committerRobert Manea <gotmor@gmail.com>
Tue, 19 May 2009 12:51:15 +0000 (14:51 +0200)
uzbl.c

diff --git a/uzbl.c b/uzbl.c
index 52a2980..0a6b137 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -69,35 +69,35 @@ const struct {
     //void **ptr;
     uzbl_cmdprop cp;
 } var_name_to_ptr[] = {
-    { "uri",                {(void *)&uzbl.state.uri,                   1}},
-    { "status_message",     {(void *)&uzbl.gui.sbar.msg,                1}},
-    { "show_status",        {(void *)&uzbl.behave.show_status,          0}},
-    { "status_top",         {(void *)&uzbl.behave.status_top,           0}},
-    { "status_format",      {(void *)&uzbl.behave.status_format,        1}},
-    { "status_background",  {(void *)&uzbl.behave.status_background,    1}},
-    { "title_format_long",  {(void *)&uzbl.behave.title_format_long,    1}},
-    { "title_format_short", {(void *)&uzbl.behave.title_format_short,   1}},
-    { "insert_mode",        {(void *)&uzbl.behave.insert_mode,          0}},
-    { "always_insert_mode", {(void *)&uzbl.behave.always_insert_mode,   0}},
-    { "reset_command_mode", {(void *)&uzbl.behave.reset_command_mode,   0}},
-    { "modkey"     ,        {(void *)&uzbl.behave.modkey,               0}},
-    { "load_finish_handler",{(void *)&uzbl.behave.load_finish_handler,  1}},
-    { "load_start_handler", {(void *)&uzbl.behave.load_start_handler,   1 }},
-    { "load_commit_handler",{(void *)&uzbl.behave.load_commit_handler,  1}},
-    { "history_handler",    {(void *)&uzbl.behave.history_handler,      1}},
-    { "download_handler",   {(void *)&uzbl.behave.download_handler,     1}},
-    { "cookie_handler",     {(void *)&uzbl.behave.cookie_handler,       1}},
-    { "fifo_dir",           {(void *)&uzbl.behave.fifo_dir,             1}},
-    { "socket_dir",         {(void *)&uzbl.behave.socket_dir,           1}},
-    { "http_debug",         {(void *)&uzbl.behave.http_debug,           0}},
-    { "default_font_size",  {(void *)&uzbl.behave.default_font_size,    0}},
-    { "minimum_font_size",  {(void *)&uzbl.behave.minimum_font_size,    0}},
-    { "shell_cmd",          {(void *)&uzbl.behave.shell_cmd,            1}},
-    { "proxy_url",          {(void *)&uzbl.net.proxy_url,               1}},
-    { "max_conns",          {(void *)&uzbl.net.max_conns,               1}},
-    { "max_conns_host",     {(void *)&uzbl.net.max_conns_host,          0}},
-    { "useragent",          {(void *)&uzbl.net.useragent,               1}},
-    { NULL,                 {NULL,                                      0}}
+    { "uri",                {.ptr = (void *)&uzbl.state.uri,                   .is_string = 1}},
+    { "status_message",     {.ptr = (void *)&uzbl.gui.sbar.msg,                .is_string = 1}},
+    { "show_status",        {.ptr = (void *)&uzbl.behave.show_status,          .is_string = 0}},
+    { "status_top",         {.ptr = (void *)&uzbl.behave.status_top,           .is_string = 0}},
+    { "status_format",      {.ptr = (void *)&uzbl.behave.status_format,        .is_string = 1}},
+    { "status_background",  {.ptr = (void *)&uzbl.behave.status_background,    .is_string = 1}},
+    { "title_format_long",  {.ptr = (void *)&uzbl.behave.title_format_long,    .is_string = 1}},
+    { "title_format_short", {.ptr = (void *)&uzbl.behave.title_format_short,   .is_string = 1}},
+    { "insert_mode",        {.ptr = (void *)&uzbl.behave.insert_mode,          .is_string = 0}},
+    { "always_insert_mode", {.ptr = (void *)&uzbl.behave.always_insert_mode,   .is_string = 0}},
+    { "reset_command_mode", {.ptr = (void *)&uzbl.behave.reset_command_mode,   .is_string = 0}},
+    { "modkey"     ,        {.ptr = (void *)&uzbl.behave.modkey,               .is_string = 0}},
+    { "load_finish_handler",{.ptr = (void *)&uzbl.behave.load_finish_handler,  .is_string = 1}},
+    { "load_start_handler", {.ptr = (void *)&uzbl.behave.load_start_handler,   .is_string = 1}},
+    { "load_commit_handler",{.ptr = (void *)&uzbl.behave.load_commit_handler,  .is_string = 1}},
+    { "history_handler",    {.ptr = (void *)&uzbl.behave.history_handler,      .is_string = 1}},
+    { "download_handler",   {.ptr = (void *)&uzbl.behave.download_handler,     .is_string = 1}},
+    { "cookie_handler",     {.ptr = (void *)&uzbl.behave.cookie_handler,       .is_string = 1}},
+    { "fifo_dir",           {.ptr = (void *)&uzbl.behave.fifo_dir,             .is_string = 1}},
+    { "socket_dir",         {.ptr = (void *)&uzbl.behave.socket_dir,           .is_string = 1}},
+    { "http_debug",         {.ptr = (void *)&uzbl.behave.http_debug,           .is_string = 0}},
+    { "default_font_size",  {.ptr = (void *)&uzbl.behave.default_font_size,    .is_string = 0}},
+    { "minimum_font_size",  {.ptr = (void *)&uzbl.behave.minimum_font_size,    .is_string = 0}},
+    { "shell_cmd",          {.ptr = (void *)&uzbl.behave.shell_cmd,            .is_string = 1}},
+    { "proxy_url",          {.ptr = (void *)&uzbl.net.proxy_url,               .is_string = 1}},
+    { "max_conns",          {.ptr = (void *)&uzbl.net.max_conns,               .is_string = 1}},
+    { "max_conns_host",     {.ptr = (void *)&uzbl.net.max_conns_host,          .is_string = 0}},
+    { "useragent",          {.ptr = (void *)&uzbl.net.useragent,               .is_string = 1}},
+    { NULL,                 {.ptr = NULL,                                      .is_string = 0}}
 }, *n2v_p = var_name_to_ptr;
 
 const struct {