mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[cookie] cast
This commit is contained in:
parent
f359d8e97b
commit
ca3baad6f9
@ -76,7 +76,7 @@ void
|
|||||||
accept_cookie_dialog(struct session *ses, void *data)
|
accept_cookie_dialog(struct session *ses, void *data)
|
||||||
{
|
{
|
||||||
/* [gettext_accelerator_context(accept_cookie_dialog)] */
|
/* [gettext_accelerator_context(accept_cookie_dialog)] */
|
||||||
struct cookie *cookie = cookie_queries.next;
|
struct cookie *cookie = (struct cookie *)cookie_queries.next;
|
||||||
struct string string;
|
struct string string;
|
||||||
|
|
||||||
assert(ses);
|
assert(ses);
|
||||||
@ -143,12 +143,12 @@ get_cookie_text(struct listbox_item *item, struct terminal *term)
|
|||||||
{
|
{
|
||||||
/* Are we dealing with a folder? */
|
/* Are we dealing with a folder? */
|
||||||
if (item->type == BI_FOLDER) {
|
if (item->type == BI_FOLDER) {
|
||||||
struct cookie_server *server = item->udata;
|
struct cookie_server *server = (struct cookie_server *)item->udata;
|
||||||
|
|
||||||
return stracpy(server->host);
|
return stracpy(server->host);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
struct cookie *cookie = item->udata;
|
struct cookie *cookie = (struct cookie *)item->udata;
|
||||||
|
|
||||||
return stracpy(cookie->name);
|
return stracpy(cookie->name);
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ get_cookie_text(struct listbox_item *item, struct terminal *term)
|
|||||||
static char *
|
static char *
|
||||||
get_cookie_info(struct listbox_item *item, struct terminal *term)
|
get_cookie_info(struct listbox_item *item, struct terminal *term)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = item->udata;
|
struct cookie *cookie = (struct cookie *)item->udata;
|
||||||
struct cookie_server *server;
|
struct cookie_server *server;
|
||||||
struct string string;
|
struct string string;
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ get_cookie_root(struct listbox_item *item)
|
|||||||
if (item->type == BI_FOLDER) {
|
if (item->type == BI_FOLDER) {
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
struct cookie *cookie = item->udata;
|
struct cookie *cookie = (struct cookie *)item->udata;
|
||||||
|
|
||||||
return cookie->server->box_item;
|
return cookie->server->box_item;
|
||||||
}
|
}
|
||||||
@ -196,7 +196,7 @@ can_delete_cookie(struct listbox_item *item)
|
|||||||
static void
|
static void
|
||||||
delete_cookie_item(struct listbox_item *item, int last)
|
delete_cookie_item(struct listbox_item *item, int last)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = item->udata;
|
struct cookie *cookie = (struct cookie *)item->udata;
|
||||||
|
|
||||||
if (item->type == BI_FOLDER) {
|
if (item->type == BI_FOLDER) {
|
||||||
struct listbox_item *next, *root = item;
|
struct listbox_item *next, *root = item;
|
||||||
@ -258,7 +258,7 @@ static const struct listbox_ops cookies_listbox_ops = {
|
|||||||
static widget_handler_status_T
|
static widget_handler_status_T
|
||||||
set_cookie_name(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
set_cookie_name(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = dlg_data->dlg->udata;
|
struct cookie *cookie = (struct cookie *)dlg_data->dlg->udata;
|
||||||
char *value = widget_data->cdata;
|
char *value = widget_data->cdata;
|
||||||
|
|
||||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||||
@ -270,7 +270,7 @@ set_cookie_name(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
|||||||
static widget_handler_status_T
|
static widget_handler_status_T
|
||||||
set_cookie_value(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
set_cookie_value(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = dlg_data->dlg->udata;
|
struct cookie *cookie = (struct cookie *)dlg_data->dlg->udata;
|
||||||
char *value = widget_data->cdata;
|
char *value = widget_data->cdata;
|
||||||
|
|
||||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||||
@ -282,7 +282,7 @@ set_cookie_value(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
|||||||
static widget_handler_status_T
|
static widget_handler_status_T
|
||||||
set_cookie_domain(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
set_cookie_domain(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = dlg_data->dlg->udata;
|
struct cookie *cookie = (struct cookie *)dlg_data->dlg->udata;
|
||||||
char *value = widget_data->cdata;
|
char *value = widget_data->cdata;
|
||||||
|
|
||||||
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
if (!value || !cookie) return EVENT_NOT_PROCESSED;
|
||||||
@ -294,7 +294,7 @@ set_cookie_domain(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
|||||||
static widget_handler_status_T
|
static widget_handler_status_T
|
||||||
set_cookie_expires(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
set_cookie_expires(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = dlg_data->dlg->udata;
|
struct cookie *cookie = (struct cookie *)dlg_data->dlg->udata;
|
||||||
char *value = widget_data->cdata;
|
char *value = widget_data->cdata;
|
||||||
char *end;
|
char *end;
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ set_cookie_expires(struct dialog_data *dlg_data, struct widget_data *widget_data
|
|||||||
static widget_handler_status_T
|
static widget_handler_status_T
|
||||||
set_cookie_secure(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
set_cookie_secure(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = dlg_data->dlg->udata;
|
struct cookie *cookie = (struct cookie *)dlg_data->dlg->udata;
|
||||||
char *value = widget_data->cdata;
|
char *value = widget_data->cdata;
|
||||||
char *end;
|
char *end;
|
||||||
long number;
|
long number;
|
||||||
@ -342,7 +342,7 @@ set_cookie_secure(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
|||||||
static widget_handler_status_T
|
static widget_handler_status_T
|
||||||
set_cookie_httponly(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
set_cookie_httponly(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||||
{
|
{
|
||||||
struct cookie *cookie = dlg_data->dlg->udata;
|
struct cookie *cookie = (struct cookie *)dlg_data->dlg->udata;
|
||||||
char *value = widget_data->cdata;
|
char *value = widget_data->cdata;
|
||||||
char *end;
|
char *end;
|
||||||
long number;
|
long number;
|
||||||
@ -438,7 +438,7 @@ push_edit_button(struct dialog_data *dlg_data, struct widget_data *button)
|
|||||||
|
|
||||||
if (!box->sel) return EVENT_PROCESSED;
|
if (!box->sel) return EVENT_PROCESSED;
|
||||||
if (box->sel->type == BI_FOLDER) return EVENT_PROCESSED;
|
if (box->sel->type == BI_FOLDER) return EVENT_PROCESSED;
|
||||||
cookie = box->sel->udata;
|
cookie = (struct cookie *)box->sel->udata;
|
||||||
if (!cookie) return EVENT_PROCESSED;
|
if (!cookie) return EVENT_PROCESSED;
|
||||||
build_edit_dialog(term, cookie);
|
build_edit_dialog(term, cookie);
|
||||||
return EVENT_PROCESSED;
|
return EVENT_PROCESSED;
|
||||||
@ -456,9 +456,9 @@ push_add_button(struct dialog_data *dlg_data, struct widget_data *button)
|
|||||||
|
|
||||||
if (box->sel->type == BI_FOLDER) {
|
if (box->sel->type == BI_FOLDER) {
|
||||||
assert(box->sel->depth == 0);
|
assert(box->sel->depth == 0);
|
||||||
server = box->sel->udata;
|
server = (struct cookie_server *)box->sel->udata;
|
||||||
} else {
|
} else {
|
||||||
struct cookie *cookie = box->sel->udata;
|
struct cookie *cookie = (struct cookie *)box->sel->udata;
|
||||||
|
|
||||||
server = cookie->server;
|
server = cookie->server;
|
||||||
}
|
}
|
||||||
@ -483,7 +483,7 @@ push_add_button(struct dialog_data *dlg_data, struct widget_data *button)
|
|||||||
static void
|
static void
|
||||||
add_server_do(void *data)
|
add_server_do(void *data)
|
||||||
{
|
{
|
||||||
char *value = data;
|
char *value = (char *)data;
|
||||||
struct cookie *dummy_cookie;
|
struct cookie *dummy_cookie;
|
||||||
|
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user