1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

form_control -> el_form_control

This commit is contained in:
Witold Filipczyk 2018-09-09 19:18:53 +02:00
parent d8be2c505e
commit 6dfdd36398
12 changed files with 112 additions and 112 deletions

View File

@ -12,7 +12,7 @@
struct cache_entry;
struct document_refresh;
struct form_control;
struct el_form_control;
struct frame_desc;
struct frameset_desc;
struct module;
@ -116,7 +116,7 @@ struct link {
union {
unsigned char *name;
struct form_control *form_control;
struct el_form_control *form_control;
} data;
};

View File

@ -86,7 +86,7 @@ init_form(void)
void
done_form(struct form *form)
{
struct form_control *fc;
struct el_form_control *fc;
if (form->next)
del_from_list(form);
@ -107,7 +107,7 @@ done_form(struct form *form)
int
has_form_submit(struct form *form)
{
struct form_control *fc;
struct el_form_control *fc;
assert(form);
if_assert_failed return 0;
@ -125,7 +125,7 @@ has_form_submit(struct form *form)
int
get_form_control_link(struct document *document, struct form_control *fc)
get_form_control_link(struct document *document, struct el_form_control *fc)
{
int link;
@ -145,7 +145,7 @@ get_form_control_link(struct document *document, struct form_control *fc)
}
void
done_form_control(struct form_control *fc)
done_form_control(struct el_form_control *fc)
{
int i;

View File

@ -37,7 +37,7 @@ struct form {
unsigned char *target;
enum form_method method;
LIST_OF(struct form_control) items;
LIST_OF(struct el_form_control) items;
};
@ -71,8 +71,8 @@ enum form_wrap {
FORM_WRAP_HARD,
};
struct form_control {
LIST_HEAD(struct form_control);
struct el_form_control {
LIST_HEAD(struct el_form_control);
struct form *form;
int g_ctrl_num;
@ -116,7 +116,7 @@ struct form *init_form(void);
void done_form(struct form *form);
int has_form_submit(struct form *form);
int get_form_control_link(struct document *document, struct form_control *fc);
void done_form_control(struct form_control *fc);
int get_form_control_link(struct document *document, struct el_form_control *fc);
void done_form_control(struct el_form_control *fc);
#endif

View File

@ -11,7 +11,7 @@
#include "util/lists.h"
struct document_options;
struct form_control;
struct el_form_control;
struct frameset_desc;
struct html_context;
struct memory_list;
@ -44,7 +44,7 @@ struct text_attrib {
/* Any entities in the title have already been decoded. */
unsigned char *title;
struct form_control *form;
struct el_form_control *form;
struct text_attrib_color color;

View File

@ -123,11 +123,11 @@ get_form_mode(struct html_context *html_context, unsigned char *attr)
return FORM_MODE_NORMAL;
}
static struct form_control *
static struct el_form_control *
init_form_control(enum form_type type, unsigned char *attr,
struct html_context *html_context)
{
struct form_control *fc;
struct el_form_control *fc;
fc = mem_calloc(1, sizeof(*fc));
if (!fc) return NULL;
@ -144,7 +144,7 @@ html_button(struct html_context *html_context, unsigned char *a,
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
{
unsigned char *al;
struct form_control *fc;
struct el_form_control *fc;
enum form_type type = FC_SUBMIT;
int cp = html_context->doc_cp;
@ -189,7 +189,7 @@ no_type_attr:
static void
html_input_format(struct html_context *html_context, unsigned char *a,
struct form_control *fc)
struct el_form_control *fc)
{
put_chrs(html_context, " ", 1);
html_stack_dup(html_context, ELEMENT_KILLABLE);
@ -270,7 +270,7 @@ html_input(struct html_context *html_context, unsigned char *a,
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
{
unsigned char *al;
struct form_control *fc;
struct el_form_control *fc;
int cp = html_context->doc_cp;
fc = init_form_control(FC_TEXT, a, html_context);
@ -340,7 +340,7 @@ do_html_select(unsigned char *attr, unsigned char *html,
struct html_context *html_context)
{
struct conv_table *ct = html_context->special_f(html_context, SP_TABLE, NULL);
struct form_control *fc;
struct el_form_control *fc;
struct string lbl = NULL_STRING, orig_lbl = NULL_STRING;
unsigned char **values = NULL;
unsigned char **labels;
@ -551,7 +551,7 @@ void
html_option(struct html_context *html_context, unsigned char *a,
unsigned char *xxx3, unsigned char *xxx4, unsigned char **xxx5)
{
struct form_control *fc;
struct el_form_control *fc;
unsigned char *val;
if (!format.select) return;
@ -629,7 +629,7 @@ void
html_textarea(struct html_context *html_context, unsigned char *attr,
unsigned char *html, unsigned char *eof, unsigned char **end)
{
struct form_control *fc;
struct el_form_control *fc;
unsigned char *p, *t_name, *wrap_attr;
int t_namelen;
int cols, rows;

View File

@ -66,7 +66,7 @@ struct link_state_info {
unsigned char *link;
unsigned char *target;
unsigned char *image;
struct form_control *form;
struct el_form_control *form;
};
struct table_cache_entry_key {
@ -1463,7 +1463,7 @@ new_link(struct html_context *html_context, unsigned char *name, int namelen)
}
} else {
struct form_control *fc = format.form;
struct el_form_control *fc = format.form;
struct form *form;
switch (fc->type) {
@ -1608,7 +1608,7 @@ put_link_number(struct html_context *html_context)
unsigned char *ft = format.target;
unsigned char *fi = format.image;
struct text_style old_style = format.style;
struct form_control *ff = format.form;
struct el_form_control *ff = format.form;
int slen = 0;
int base = strlen(symkey);
@ -1646,7 +1646,7 @@ put_link_number(struct html_context *html_context)
static inline void
init_link_state_info(unsigned char *link, unsigned char *target,
unsigned char *image, struct form_control *form)
unsigned char *image, struct el_form_control *form)
{
assert_link_variable(renderer_context.link_state_info.image, image);
assert_link_variable(renderer_context.link_state_info.target, target);
@ -2060,7 +2060,7 @@ html_special_form(struct part *part, struct form *form)
}
static void
html_special_form_control(struct part *part, struct form_control *fc)
html_special_form_control(struct part *part, struct el_form_control *fc)
{
struct form *form;
@ -2139,9 +2139,9 @@ void
check_html_form_hierarchy(struct part *part)
{
struct document *document = part->document;
INIT_LIST_OF(struct form_control, form_controls);
INIT_LIST_OF(struct el_form_control, form_controls);
struct form *form;
struct form_control *fc, *next;
struct el_form_control *fc, *next;
if (list_empty(document->forms))
return;
@ -2246,7 +2246,7 @@ html_special(struct html_context *html_context, enum html_special_type c, ...)
}
case SP_CONTROL:
{
struct form_control *fc = va_arg(l, struct form_control *);
struct el_form_control *fc = va_arg(l, struct el_form_control *);
html_special_form_control(part, fc);
break;
@ -2614,7 +2614,7 @@ render_html_document(struct cache_entry *cached, struct document *document,
#if 0 /* debug purpose */
{
FILE *f = fopen("forms", "ab");
struct form_control *form;
struct el_form_control *form;
unsigned char *qq;
fprintf(f,"FORM:\n");
foreach (form, document->forms) {

View File

@ -159,7 +159,7 @@ input_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
struct document_view *doc_view;
struct document *document;
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
int linknum;
struct link *link = NULL;
@ -310,7 +310,7 @@ input_set_property(JSContext *ctx, JSObject *obj, jsid id, JSBool strict, jsval
struct document_view *doc_view;
struct document *document;
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
int linknum;
struct link *link = NULL;
unicode_val_T accesskey;
@ -444,7 +444,7 @@ input_click(JSContext *ctx, uintN argc, jsval *rval)
struct document *document;
struct session *ses;
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
int linknum;
if (!JS_InstanceOf(ctx, obj, (JSClass *) &input_class, argv)) return JS_FALSE;
@ -502,7 +502,7 @@ input_focus(JSContext *ctx, uintN argc, jsval *rval)
struct document *document;
struct session *ses;
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
int linknum;
if (!JS_InstanceOf(ctx, obj, (JSClass *) &input_class, argv)) return JS_FALSE;
@ -791,7 +791,7 @@ form_elements_item2(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsva
struct document *document;
struct form_view *form_view;
struct form *form;
struct form_control *fc;
struct el_form_control *fc;
int counter = -1;
int index;
@ -863,7 +863,7 @@ form_elements_namedItem2(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv,
struct document *document;
struct form_view *form_view;
struct form *form;
struct form_control *fc;
struct el_form_control *fc;
unsigned char *string;
if (!JS_InstanceOf(ctx, obj, (JSClass *) &form_elements_class, argv)) return JS_FALSE;
@ -1010,7 +1010,7 @@ form_get_property(JSContext *ctx, JSObject *obj, jsid id, jsval *vp)
assert(form);
if (JSID_IS_STRING(id)) {
struct form_control *fc;
struct el_form_control *fc;
unsigned char *string;
string = jsid_to_string(ctx, &id);

View File

@ -75,7 +75,7 @@ struct files_offset {
struct submitted_value *
init_submitted_value(unsigned char *name, unsigned char *value, enum form_type type,
struct form_control *fc, int position)
struct el_form_control *fc, int position)
{
struct submitted_value *sv;
@ -106,7 +106,7 @@ done_submitted_value(struct submitted_value *sv)
}
static void
fixup_select_state(struct form_control *fc, struct form_state *fs)
fixup_select_state(struct el_form_control *fc, struct form_state *fs)
{
int i;
@ -140,7 +140,7 @@ selected_item(struct terminal *term, void *item_, void *ses_)
struct document_view *doc_view;
struct link *link;
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
assert(term && ses);
if_assert_failed return;
@ -167,7 +167,7 @@ selected_item(struct terminal *term, void *item_, void *ses_)
static void
init_form_state(struct document_view *doc_view,
struct form_control *fc, struct form_state *fs)
struct el_form_control *fc, struct form_state *fs)
{
struct terminal *term;
int doc_cp, viewer_cp;
@ -238,7 +238,7 @@ init_form_state(struct document_view *doc_view,
struct form_state *
find_form_state(struct document_view *doc_view, struct form_control *fc)
find_form_state(struct document_view *doc_view, struct el_form_control *fc)
{
struct view_state *vs;
struct form_state *fs;
@ -296,11 +296,11 @@ find_form_state(struct document_view *doc_view, struct form_control *fc)
return fs;
}
struct form_control *
struct el_form_control *
find_form_control(struct document *document, struct form_state *fs)
{
struct form *form = find_form_by_form_view(document, fs->form_view);
struct form_control *fc;
struct el_form_control *fc;
foreach (fc, form->items) {
if (fs->g_ctrl_num == fc->g_ctrl_num
@ -398,7 +398,7 @@ draw_form_entry(struct terminal *term, struct document_view *doc_view,
struct link *link)
{
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
struct view_state *vs;
struct el_box *box;
int dx, dy;
@ -676,7 +676,7 @@ draw_forms(struct terminal *term, struct document_view *doc_view)
return;
}
do {
struct form_control *fc = get_link_form_control(l1);
struct el_form_control *fc = get_link_form_control(l1);
if (!fc) continue;
draw_form_entry(term, doc_view, l1);
@ -703,7 +703,7 @@ done_submitted_value_list(LIST_OF(struct submitted_value) *list)
}
static void
add_submitted_value_to_list(struct form_control *fc,
add_submitted_value_to_list(struct el_form_control *fc,
struct form_state *fs,
LIST_OF(struct submitted_value) *list)
{
@ -799,10 +799,10 @@ sort_submitted_values(LIST_OF(struct submitted_value) *list)
static void
get_successful_controls(struct document_view *doc_view,
struct form_control *fc,
struct el_form_control *fc,
LIST_OF(struct submitted_value) *list)
{
struct form_control *fc2;
struct el_form_control *fc2;
assert(doc_view && fc && fc->form && list);
if_assert_failed return;
@ -1194,7 +1194,7 @@ encode_text_plain(LIST_OF(struct submitted_value) *l, struct string *data,
void
do_reset_form(struct document_view *doc_view, struct form *form)
{
struct form_control *fc;
struct el_form_control *fc;
assert(doc_view && doc_view->document);
if_assert_failed return;
@ -1223,7 +1223,7 @@ reset_form(struct session *ses, struct document_view *doc_view, int a)
struct uri *
get_form_uri(struct session *ses, struct document_view *doc_view,
struct form_control *fc)
struct el_form_control *fc)
{
struct boundary_info boundary;
INIT_LIST_OF(struct submitted_value, submit);
@ -1408,7 +1408,7 @@ submit_given_form(struct session *ses, struct document_view *doc_view,
int link;
for (link = 0; link < document->nlinks; link++) {
struct form_control *fc = get_link_form_control(&document->links[link]);
struct el_form_control *fc = get_link_form_control(&document->links[link]);
if (fc && fc->form == form) {
doc_view->vs->current_link = link;
@ -1418,7 +1418,7 @@ submit_given_form(struct session *ses, struct document_view *doc_view,
}
#endif
if (!list_empty(form->items)) {
struct form_control *fc = (struct form_control *)form->items.next;
struct el_form_control *fc = (struct el_form_control *)form->items.next;
struct uri *uri;
enum cache_mode mode = do_reload ? CACHE_MODE_FORCE_RELOAD : CACHE_MODE_NORMAL;
@ -1487,7 +1487,7 @@ enum frame_event_status
field_op(struct session *ses, struct document_view *doc_view,
struct link *link, struct term_event *ev)
{
struct form_control *fc;
struct el_form_control *fc;
struct form_state *fs;
enum edit_action action_id;
unsigned char *text;
@ -1907,7 +1907,7 @@ field_op(struct session *ses, struct document_view *doc_view,
}
static unsigned char *
get_form_label(struct form_control *fc)
get_form_label(struct el_form_control *fc)
{
assert(fc->form);
switch (fc->type) {
@ -1960,7 +1960,7 @@ get_form_info(struct session *ses, struct document_view *doc_view)
{
struct terminal *term = ses->tab->term;
struct link *link = get_current_link(doc_view);
struct form_control *fc;
struct el_form_control *fc;
unsigned char *label, *key;
struct string str;
@ -2116,7 +2116,7 @@ link_form_menu(struct session *ses)
struct document_view *doc_view;
struct link *link;
struct menu_item *mi;
struct form_control *fc;
struct el_form_control *fc;
struct form *form;
assert(ses);

View File

@ -90,26 +90,26 @@ struct submitted_value {
unsigned char *name;
unsigned char *value;
struct form_control *form_control;
struct el_form_control *form_control;
enum form_type type;
int position;
};
struct submitted_value *init_submitted_value(unsigned char *name, unsigned char *value, enum form_type type, struct form_control *fc, int position);
struct submitted_value *init_submitted_value(unsigned char *name, unsigned char *value, enum form_type type, struct el_form_control *fc, int position);
void done_submitted_value(struct submitted_value *sv);
void done_submitted_value_list(LIST_OF(struct submitted_value) *list);
unsigned char *encode_crlf(struct submitted_value *sv);
struct uri *get_form_uri(struct session *ses, struct document_view *doc_view, struct form_control *fc);
struct uri *get_form_uri(struct session *ses, struct document_view *doc_view, struct el_form_control *fc);
unsigned char *get_form_info(struct session *ses, struct document_view *doc_view);
void selected_item(struct terminal *term, void *item_, void *ses_);
int get_current_state(struct session *ses);
struct form_state *find_form_state(struct document_view *doc_view, struct form_control *fc);
struct form_control *find_form_control(struct document *document, struct form_state *fs);
struct form_state *find_form_state(struct document_view *doc_view, struct el_form_control *fc);
struct el_form_control *find_form_control(struct document *document, struct form_state *fs);
struct form_view *find_form_view_in_vs(struct view_state *vs, int form_num);
struct form_view *find_form_view(struct document_view *doc_view, struct form *form);
struct form *find_form_by_form_view(struct document *document, struct form_view *fv);

View File

@ -111,7 +111,7 @@ set_link(struct document_view *doc_view)
static inline int
get_link_cursor_offset(struct document_view *doc_view, struct link *link)
{
struct form_control *fc;
struct el_form_control *fc;
struct form_state *fs;
#ifdef CONFIG_UTF8
/* The encoding of form fields depends on the terminal,
@ -907,7 +907,7 @@ get_link_uri(struct session *ses, struct document_view *doc_view,
static int
call_onsubmit_and_submit(struct session *ses, struct document_view *doc_view,
struct form_control *fc, int do_reload)
struct el_form_control *fc, int do_reload)
{
struct uri *uri = NULL;
enum cache_mode mode = do_reload ? CACHE_MODE_FORCE_RELOAD : CACHE_MODE_NORMAL;
@ -970,7 +970,7 @@ goto_link(struct session *ses, struct document_view *doc_view, struct link *link
if_assert_failed return NULL;
if (link_is_form(link)) {
struct form_control *fc = link->data.form_control;
struct el_form_control *fc = link->data.form_control;
if (fc->type != FC_BUTTON
&& !call_onsubmit_and_submit(ses, doc_view, fc, do_reload))
@ -1015,7 +1015,7 @@ static enum frame_event_status
activate_link(struct session *ses, struct document_view *doc_view,
struct link *link, int do_reload)
{
struct form_control *link_fc;
struct el_form_control *link_fc;
struct form_state *fs;
struct form *form;
@ -1053,7 +1053,7 @@ activate_link(struct session *ses, struct document_view *doc_view,
* @fs in the loop. */
fs->state = 1;
foreach (form, doc_view->document->forms) {
struct form_control *fc;
struct el_form_control *fc;
if (form != link_fc->form)
continue;
@ -1307,7 +1307,7 @@ link_menu(struct terminal *term, void *xxx, void *ses_)
struct document_view *doc_view;
struct link *link;
struct menu_item *mi;
struct form_control *fc;
struct el_form_control *fc;
assert(term && ses);
if_assert_failed return;

View File

@ -233,7 +233,7 @@ get_textarea_line_number(struct line_info *line, int cursor_position)
* @returns the logical position in the textarea view. */
#ifdef CONFIG_UTF8
int
area_cursor(struct form_control *fc, struct form_state *fs, int utf8)
area_cursor(struct el_form_control *fc, struct form_state *fs, int utf8)
{
struct line_info *line;
int x, y;
@ -285,7 +285,7 @@ area_cursor(struct form_control *fc, struct form_state *fs, int utf8)
#else
int
area_cursor(struct form_control *fc, struct form_state *fs)
area_cursor(struct el_form_control *fc, struct form_state *fs)
{
struct line_info *line;
int x, y;
@ -324,7 +324,7 @@ draw_textarea_utf8(struct terminal *term, struct form_state *fs,
struct document_view *doc_view, struct link *link)
{
struct line_info *line, *linex;
struct form_control *fc;
struct el_form_control *fc;
struct el_box *box;
int vx, vy;
int sl, ye;
@ -406,7 +406,7 @@ draw_textarea(struct terminal *term, struct form_state *fs,
struct document_view *doc_view, struct link *link)
{
struct line_info *line, *linex;
struct form_control *fc;
struct el_form_control *fc;
struct el_box *box;
int vx, vy;
int sl, ye;
@ -487,7 +487,7 @@ draw_textarea(struct terminal *term, struct form_state *fs,
unsigned char *
encode_textarea(struct submitted_value *sv)
{
struct form_control *fc;
struct el_form_control *fc;
void *blabla;
assert(sv && sv->value);
@ -717,7 +717,7 @@ menu_textarea_edit(struct terminal *term, void *xxx, void *ses_)
struct document_view *doc_view;
struct link *link;
struct form_state *fs;
struct form_control *fc;
struct el_form_control *fc;
assert(term && ses);
if_assert_failed return;
@ -742,7 +742,7 @@ menu_textarea_edit(struct terminal *term, void *xxx, void *ses_)
#ifdef CONFIG_UTF8
static enum frame_event_status
textarea_op(struct form_state *fs, struct form_control *fc, int utf8,
textarea_op(struct form_state *fs, struct el_form_control *fc, int utf8,
int (*do_op)(struct form_state *, struct line_info *, int, int))
{
struct line_info *line;
@ -774,7 +774,7 @@ textarea_op(struct form_state *fs, struct form_control *fc, int utf8,
#else
static enum frame_event_status
textarea_op(struct form_state *fs, struct form_control *fc,
textarea_op(struct form_state *fs, struct el_form_control *fc,
int (*do_op)(struct form_state *, struct line_info *, int))
{
struct line_info *line;
@ -1030,13 +1030,13 @@ do_op_eob(struct form_state *fs, struct line_info *line, int current)
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_home(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_home(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_home);
}
#else
enum frame_event_status
textarea_op_home(struct form_state *fs, struct form_control *fc)
textarea_op_home(struct form_state *fs, struct el_form_control *fc)
{
return textarea_op(fs, fc, do_op_home);
}
@ -1044,13 +1044,13 @@ textarea_op_home(struct form_state *fs, struct form_control *fc)
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_up(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_up(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_up);
}
#else
enum frame_event_status
textarea_op_up(struct form_state *fs, struct form_control *fc)
textarea_op_up(struct form_state *fs, struct el_form_control *fc)
{
return textarea_op(fs, fc, do_op_up);
}
@ -1058,13 +1058,13 @@ textarea_op_up(struct form_state *fs, struct form_control *fc)
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_down(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_down(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_down);
}
#else
enum frame_event_status
textarea_op_down(struct form_state *fs, struct form_control *fc)
textarea_op_down(struct form_state *fs, struct el_form_control *fc)
{
return textarea_op(fs, fc, do_op_down);
}
@ -1072,13 +1072,13 @@ textarea_op_down(struct form_state *fs, struct form_control *fc)
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_end(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_end(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_end);
}
#else
enum frame_event_status
textarea_op_end(struct form_state *fs, struct form_control *fc)
textarea_op_end(struct form_state *fs, struct el_form_control *fc)
{
return textarea_op(fs, fc, do_op_end);
}
@ -1088,13 +1088,13 @@ textarea_op_end(struct form_state *fs, struct form_control *fc)
* Preserve the column if possible. */
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_bob(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_bob(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_bob);
}
#else
enum frame_event_status
textarea_op_bob(struct form_state *fs, struct form_control *fc)
textarea_op_bob(struct form_state *fs, struct el_form_control *fc)
{
return textarea_op(fs, fc, do_op_bob);
}
@ -1106,13 +1106,13 @@ textarea_op_bob(struct form_state *fs, struct form_control *fc)
* the whole thing to the end of the last line. */
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_eob(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_eob(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_eob);
}
#else
enum frame_event_status
textarea_op_eob(struct form_state *fs, struct form_control *fc)
textarea_op_eob(struct form_state *fs, struct el_form_control *fc)
{
return textarea_op(fs, fc, do_op_eob);
}
@ -1120,9 +1120,9 @@ textarea_op_eob(struct form_state *fs, struct form_control *fc)
enum frame_event_status
#ifdef CONFIG_UTF8
textarea_op_enter(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_enter(struct form_state *fs, struct el_form_control *fc, int utf8)
#else
textarea_op_enter(struct form_state *fs, struct form_control *fc)
textarea_op_enter(struct form_state *fs, struct el_form_control *fc)
#endif /* CONFIG_UTF8 */
{
assert(fs && fs->value && fc);
@ -1205,13 +1205,13 @@ do_op_right(struct form_state *fs, struct line_info *line, int current, int utf8
#ifdef CONFIG_UTF8
enum frame_event_status
textarea_op_left(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_left(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_left);
}
enum frame_event_status
textarea_op_right(struct form_state *fs, struct form_control *fc, int utf8)
textarea_op_right(struct form_state *fs, struct el_form_control *fc, int utf8)
{
return textarea_op(fs, fc, utf8, do_op_right);
}
@ -1220,7 +1220,7 @@ textarea_op_right(struct form_state *fs, struct form_control *fc, int utf8)
void
set_textarea(struct document_view *doc_view, int direction)
{
struct form_control *fc;
struct el_form_control *fc;
struct form_state *fs;
struct link *link;
#ifdef CONFIG_UTF8

View File

@ -8,15 +8,15 @@
#include "viewer/text/form.h"
struct document_view;
struct form_control;
struct el_form_control;
struct link;
struct session;
struct terminal;
#ifdef CONFIG_UTF8
int area_cursor(struct form_control *fc, struct form_state *fs, int utf8);
int area_cursor(struct el_form_control *fc, struct form_state *fs, int utf8);
#else
int area_cursor(struct form_control *fc, struct form_state *fs);
int area_cursor(struct el_form_control *fc, struct form_state *fs);
#endif /* CONFIG_UTF8 */
void draw_textarea(struct terminal *term, struct form_state *fs, struct document_view *doc_view, struct link *link);
unsigned char *encode_textarea(struct submitted_value *sv);
@ -26,23 +26,23 @@ void textarea_edit(int, struct terminal *, struct form_state *, struct document_
void menu_textarea_edit(struct terminal *term, void *xxx, void *ses_);
#ifdef CONFIG_UTF8
enum frame_event_status textarea_op_home(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_up(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_down(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_end(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_bob(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_eob(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_enter(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_left(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_right(struct form_state *fs, struct form_control *fc, int utf8);
enum frame_event_status textarea_op_home(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_up(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_down(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_end(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_bob(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_eob(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_enter(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_left(struct form_state *fs, struct el_form_control *fc, int utf8);
enum frame_event_status textarea_op_right(struct form_state *fs, struct el_form_control *fc, int utf8);
#else
enum frame_event_status textarea_op_home(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_up(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_down(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_end(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_bob(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_eob(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_enter(struct form_state *fs, struct form_control *fc);
enum frame_event_status textarea_op_home(struct form_state *fs, struct el_form_control *fc);
enum frame_event_status textarea_op_up(struct form_state *fs, struct el_form_control *fc);
enum frame_event_status textarea_op_down(struct form_state *fs, struct el_form_control *fc);
enum frame_event_status textarea_op_end(struct form_state *fs, struct el_form_control *fc);
enum frame_event_status textarea_op_bob(struct form_state *fs, struct el_form_control *fc);
enum frame_event_status textarea_op_eob(struct form_state *fs, struct el_form_control *fc);
enum frame_event_status textarea_op_enter(struct form_state *fs, struct el_form_control *fc);
#endif /* CONFIG_UTF8 */
void set_textarea(struct document_view *doc_view, int direction);