1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-13 05:43:37 -04:00

[align] enum format_align -> format_align_T

This commit is contained in:
Witold Filipczyk 2022-01-28 16:05:35 +01:00
parent 28a263eac7
commit 349a27238f
18 changed files with 27 additions and 25 deletions

View File

@ -117,7 +117,7 @@ buttons_width(struct widget_data *widget_data, int n,
void
dlg_format_buttons(struct dialog_data *dlg_data,
struct widget_data *widget_data, int n,
int x, int *y, int w, int *rw, enum format_align align, int format_only)
int x, int *y, int w, int *rw, format_align_T align, int format_only)
{
#ifdef CONFIG_UTF8
struct terminal *term = dlg_data->win->term;

View File

@ -94,7 +94,7 @@ void add_dlg_button_do(struct dialog *dlg, char *text, int flags, widget_handler
#endif
extern const struct widget_ops button_ops;
void dlg_format_buttons(struct dialog_data *, struct widget_data *, int, int, int *, int, int *, enum format_align, int);
void dlg_format_buttons(struct dialog_data *, struct widget_data *, int, int, int *, int, int *, format_align_T, int);
#ifdef __cplusplus
}

View File

@ -39,7 +39,7 @@ void
dlg_format_checkbox(struct dialog_data *dlg_data,
struct widget_data *widget_data,
int x, int *y, int w, int *rw,
enum format_align align, int format_only)
format_align_T align, int format_only)
{
struct terminal *term = dlg_data->win->term;
char *text = widget_data->widget->text;

View File

@ -38,7 +38,7 @@ void
dlg_format_checkbox(struct dialog_data *dlg_data,
struct widget_data *widget_data,
int x, int *y, int w, int *rw,
enum format_align align, int format_only);
format_align_T align, int format_only);
#define widget_has_group(widget_data) ((widget_data)->widget->type == WIDGET_CHECKBOX \
? (widget_data)->widget->info.checkbox.gid : -1)

View File

@ -105,7 +105,7 @@ check_nonempty(struct dialog_data *dlg_data, struct widget_data *widget_data)
void
dlg_format_field(struct dialog_data *dlg_data,
struct widget_data *widget_data,
int x, int *y, int w, int *rw, enum format_align align, int format_only)
int x, int *y, int w, int *rw, format_align_T align, int format_only)
{
struct terminal *term = dlg_data->win->term;
static int max_label_width;

View File

@ -65,7 +65,7 @@ extern const struct widget_ops field_pass_ops;
widget_handler_status_T check_number(struct dialog_data *, struct widget_data *);
widget_handler_status_T check_nonempty(struct dialog_data *, struct widget_data *);
void dlg_format_field(struct dialog_data *, struct widget_data *, int, int *, int, int *, enum format_align, int format_only);
void dlg_format_field(struct dialog_data *, struct widget_data *, int, int *, int, int *, format_align_T, int format_only);
void input_field(struct terminal *, struct memory_list *, int, char *,
char *, char *, char *, void *,

View File

@ -44,7 +44,7 @@ void
dlg_format_listbox(struct dialog_data *dlg_data,
struct widget_data *widget_data,
int x, int *y, int w, int max_height, int *rw,
enum format_align align, int format_only)
format_align_T align, int format_only)
{
int min, optimal_h, height;

View File

@ -137,7 +137,7 @@ struct listbox_item {
extern const struct widget_ops listbox_ops;
void dlg_format_listbox(struct dialog_data *, struct widget_data *, int, int *, int, int, int *, enum format_align, int format_only);
void dlg_format_listbox(struct dialog_data *, struct widget_data *, int, int *, int, int, int *, format_align_T, int format_only);
struct listbox_item *traverse_listbox_items_list(struct listbox_item *, struct listbox_data *, int, int, int (*)(struct listbox_item *, void *, int *), void *);

View File

@ -23,7 +23,7 @@
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *ml, /*enum msgbox_flags*/ unsigned int flags,
char *title, enum format_align align,
char *title, format_align_T align,
char *text, void *udata, int buttons, ...)
{
struct dialog *dlg;
@ -156,7 +156,7 @@ refresh_msg_box(struct dialog_data *dlg_data, void *data)
void
refreshed_msg_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
char *title, enum format_align align,
char *title, format_align_T align,
char *(get_info)(struct terminal *, void *),
void *data)
{
@ -183,7 +183,7 @@ refreshed_msg_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flag
struct dialog_data *
info_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
char *title, enum format_align align,
char *title, format_align_T align,
char *text)
{
/* [gettext_accelerator_context(info_box)] */

View File

@ -94,7 +94,7 @@ enum msgbox_flags {
* ...no matter that it could fit on one line in case of a tiny message box. */
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *mem_list,
/*enum msgbox_flags*/ unsigned int flags, char *title, enum format_align align,
/*enum msgbox_flags*/ unsigned int flags, char *title, format_align_T align,
char *text, void *udata, int buttons, ...);
/* Cast @value to @type and warn if the conversion is suspicious.
@ -128,13 +128,13 @@ char *msg_text(struct terminal *term, const char *format, ...);
* NULL the message box is closed. */
void
refreshed_msg_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
char *title, enum format_align align,
char *title, format_align_T align,
char *(get_info)(struct terminal *, void *),
void *data);
struct dialog_data *
info_box(struct terminal *term, /*enum msgbox_flags*/ unsigned int flags,
char *title, enum format_align align,
char *title, format_align_T align,
char *text);
#ifdef __cplusplus

View File

@ -24,7 +24,7 @@
void
add_dlg_text(struct dialog *dlg, char *text,
enum format_align align, int bottom_pad)
format_align_T align, int bottom_pad)
{
struct widget *widget = &dlg->widgets[dlg->number_of_widgets++];
@ -214,7 +214,7 @@ void
dlg_format_text_do(struct dialog_data *dlg_data,
char *text,
int x, int *y, int width, int *real_width,
struct color_pair *color, enum format_align align,
struct color_pair *color, format_align_T align,
int format_only)
{
#ifdef CONFIG_UTF8

View File

@ -12,7 +12,7 @@ struct dialog_data;
struct terminal;
struct widget_info_text {
enum format_align align;
format_align_T align;
unsigned int is_label:1;
unsigned int is_scrollable:1;
};
@ -47,12 +47,12 @@ struct widget_data_info_text {
};
void add_dlg_text(struct dialog *dlg, char *text,
enum format_align align, int bottom_pad);
format_align_T align, int bottom_pad);
extern const struct widget_ops text_ops;
void dlg_format_text_do(struct dialog_data *dlg_data,
char *text, int x, int *y, int w, int *rw,
struct color_pair *scolor, enum format_align align, int format_only);
struct color_pair *scolor, format_align_T align, int format_only);
void
dlg_format_text(struct dialog_data *dlg_data, struct widget_data *widget_data,

View File

@ -76,7 +76,7 @@ union css_property_value {
struct {
text_style_format_T add, rem;
} font_attribute;
enum format_align text_align;
format_align_T text_align;
enum css_list_style list_style;
/* TODO:
* Generic numbers

View File

@ -98,7 +98,7 @@ enum format_list_flag {
typedef unsigned char format_list_flag_T;
struct par_attrib {
enum format_align align;
format_align_T align;
int leftmargin;
int rightmargin;
int width;

View File

@ -550,7 +550,7 @@ html_blockquote_close(struct html_context *html_context, char *a,
void
html_h(int h, char *a,
enum format_align default_align, struct html_context *html_context,
format_align_T default_align, struct html_context *html_context,
char *html, char *eof, char **end)
{
if (!par_elformat.align) par_elformat.align = default_align;

View File

@ -263,7 +263,7 @@ html_apply_canvas_bgcolor(struct source_renderer *rendererer)
static void tags_html_linebrk(struct source_renderer *renderer, unsigned char *al);
static void tags_html_h(int h, void *node, unsigned char *a,
enum format_align default_align, struct source_renderer *renderer,
format_align_T default_align, struct source_renderer *renderer,
unsigned char *html, unsigned char *eof, unsigned char **end);
@ -4176,7 +4176,7 @@ tags_html_linebrk(struct source_renderer *renderer, unsigned char *al)
static void
tags_html_h(int h, void *node, unsigned char *a,
enum format_align default_align, struct source_renderer *renderer,
format_align_T default_align, struct source_renderer *renderer,
unsigned char *html, unsigned char *eof, unsigned char **end)
{
struct html_context *html_context = renderer->html_context;

View File

@ -104,7 +104,7 @@ msg_text(struct terminal *term, char *format, ...)
/* declared in "bfu/msgbox.h" */
struct dialog_data *
msg_box(struct terminal *term, struct memory_list *mem_list,
enum msgbox_flags flags, char *title, enum format_align align,
enum msgbox_flags flags, char *title, format_align_T align,
char *text, void *udata, int buttons, ...)
{
/* mem_list should be freed here but because this is just a

View File

@ -8,4 +8,6 @@ enum format_align {
ALIGN_JUSTIFY,
};
typedef unsigned char format_align_T;
#endif