Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code: rename functions with two underscores #815

Merged
merged 1 commit into from Jan 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions fvwm/add_window.c
Expand Up @@ -1408,7 +1408,7 @@ static void setup_key_and_button_grabs(FvwmWindow *fw)
return;
}

static void __add_window_handle_x_resources(FvwmWindow *fw)
static void _add_window_handle_x_resources(FvwmWindow *fw)
{
int client_argc = 0;
char **client_argv = NULL;
Expand Down Expand Up @@ -2161,7 +2161,7 @@ FvwmWindow *AddWindow(
setup_class_and_resource(fw);

/****** style setup ******/
__add_window_handle_x_resources(fw);
_add_window_handle_x_resources(fw);
/* get merged styles */
lookup_style(fw, &style);
sflags = SGET_FLAGS_POINTER(style);
Expand Down
4 changes: 2 additions & 2 deletions fvwm/bindings.c
Expand Up @@ -213,7 +213,7 @@ static int bind_get_bound_button_contexts(
return bcontext;
}

static void __rebind_global_key(Binding **pblist, int Button_Key)
static void _rebind_global_key(Binding **pblist, int Button_Key)
{
Binding *b;

Expand Down Expand Up @@ -464,7 +464,7 @@ static int ParseBinding(
}
if (ret)
{
__rebind_global_key(
_rebind_global_key(
pblist, rmlist->Button_Key);
}
}
Expand Down
20 changes: 10 additions & 10 deletions fvwm/builtins.c
Expand Up @@ -507,7 +507,7 @@ static char *ReadTitleButton(
}

/* Remove the given decor from all windows */
static void __remove_window_decors(F_CMD_ARGS, FvwmDecor *d)
static void _remove_window_decors(F_CMD_ARGS, FvwmDecor *d)
{
const exec_context_t *exc2;
exec_context_changes_t ecc;
Expand Down Expand Up @@ -1287,7 +1287,7 @@ void update_decors_colorset(int cset)
}
}

static Bool __parse_vector_line_one_coord(
static Bool _parse_vector_line_one_coord(
char **ret_action, int *pcoord, int *poff, char *action)
{
int offset;
Expand Down Expand Up @@ -1327,7 +1327,7 @@ static Bool __parse_vector_line_one_coord(
return True;
}

static Bool __parse_vector_line(
static Bool _parse_vector_line(
char **ret_action, int *px, int *py, int *pxoff, int *pyoff, int *pc,
char *action)
{
Expand All @@ -1336,7 +1336,7 @@ static Bool __parse_vector_line(
int n;

*ret_action = action;
if (__parse_vector_line_one_coord(&action, px, pxoff, action) == False)
if (_parse_vector_line_one_coord(&action, px, pxoff, action) == False)
{
return False;
}
Expand All @@ -1345,7 +1345,7 @@ static Bool __parse_vector_line(
return False;
}
action++;
if (__parse_vector_line_one_coord(&action, py, pyoff, action) == False)
if (_parse_vector_line_one_coord(&action, py, pyoff, action) == False)
{
return False;
}
Expand Down Expand Up @@ -1692,7 +1692,7 @@ Bool ReadDecorFace(char *s, DecorFace *df, int button, int verbose)
int yoff = 0;
int c;

if (__parse_vector_line(
if (_parse_vector_line(
&s, &x, &y, &xoff, &yoff, &c, s) ==
False)
{
Expand Down Expand Up @@ -3201,7 +3201,7 @@ void CMD_DestroyDecor(F_CMD_ARGS)
{
if (!do_recreate)
{
__remove_window_decors(F_PASS_ARGS, found);
_remove_window_decors(F_PASS_ARGS, found);
}
DestroyFvwmDecor(found);
if (do_recreate)
Expand Down Expand Up @@ -3753,7 +3753,7 @@ static Bool FKeysymToKeycode (Display *disp, KeySym keysym,
return False;
}

static void __fake_event(F_CMD_ARGS, FakeEventType type)
static void _fake_event(F_CMD_ARGS, FakeEventType type)
{
char *token;
char *optlist[] = {
Expand Down Expand Up @@ -4026,14 +4026,14 @@ static void __fake_event(F_CMD_ARGS, FakeEventType type)

void CMD_FakeClick(F_CMD_ARGS)
{
__fake_event(F_PASS_ARGS, FakeMouseEvent);
_fake_event(F_PASS_ARGS, FakeMouseEvent);

return;
}

void CMD_FakeKeypress(F_CMD_ARGS)
{
__fake_event(F_PASS_ARGS, FakeKeyEvent);
_fake_event(F_PASS_ARGS, FakeKeyEvent);

return;
}
Expand Down
4 changes: 2 additions & 2 deletions fvwm/conditional.c
Expand Up @@ -1427,7 +1427,7 @@ static void direction_cmd(F_CMD_ARGS, Bool is_scan)
return;
}

static int __rc_matches_rcstring_consume(
static int _rc_matches_rcstring_consume(
char **ret_rest, cond_rc_t *cond_rc, char *action)
{
cond_rc_enum match_rc;
Expand Down Expand Up @@ -1861,7 +1861,7 @@ void CMD_TestRc(F_CMD_ARGS)
/* useless if no return code to compare to is given */
return;
}
if (__rc_matches_rcstring_consume(&rest, cond_rc, action) &&
if (_rc_matches_rcstring_consume(&rest, cond_rc, action) &&
rest != NULL)
{
/* execute the command in root window context; overwrite the
Expand Down
6 changes: 3 additions & 3 deletions fvwm/decorations.c
Expand Up @@ -607,7 +607,7 @@ void SelectDecor(FvwmWindow *t, window_style *pstyle, short *buttons)
return;
}

static Bool __is_resize_allowed(
static Bool _is_resize_allowed(
const FvwmWindow *t, int functions, request_origin_t request_origin)
{
if (!HAS_OVERRIDE_SIZE_HINTS(t) &&
Expand Down Expand Up @@ -766,7 +766,7 @@ Bool is_function_allowed(
}
break;
case F_RESIZE:
if(!__is_resize_allowed(t, functions, request_origin))
if(!_is_resize_allowed(t, functions, request_origin))
{
return False;
}
Expand All @@ -780,7 +780,7 @@ Bool is_function_allowed(
break;
case F_MAXIMIZE:
if (IS_MAXIMIZE_FIXED_SIZE_DISALLOWED(t) &&
!__is_resize_allowed(t, functions, request_origin))
!_is_resize_allowed(t, functions, request_origin))
{
return False;
}
Expand Down