tree-wide: auto-replace of (struct server *)

#!/bin/bash
    read -r -d '' EXPRS << EOF
    s/xwayland->server/xwayland->svr/g;

    s/\t*struct server \*server;\n//g;
    s/\t*struct server \*server =.*?;\n//gs;
    s/\t*.* = ([a-z_]*->)*server[;,]\n//g;
    s/\{\n\n/\{\n/g;
    s/\n\n+/\n\n/g;

    s/\(\s*struct server \*server\)/(void)/g;
    s/\(\s*struct server \*server,\s*/(/g;
    s/,\s*struct server \*server\)/)/g;
    s/,\s*struct server \*server,\s*/, /g;

    s/\(\s*([a-z_]*->)*server\)/()/g;
    s/\(\s*([a-z_]*->)*server,\s*/(/g;
    s/,\s*([a-z_]*->)*server\)/)/g;
    s/,\s*([a-z_]*->)*server,\s*/, /g;

    s/([a-z_]*->)*server->/g_server./g;

    s/xwayland->svr/xwayland->server/g;
    EOF

    find src include \( -name \*.c -o -name \*.h \) -exec \
        perl -0777 -i -pe "$EXPRS" \{\} \;
This commit is contained in:
John Lindgren 2026-02-23 11:56:39 -05:00 committed by Johan Malm
parent 60ac8f07bb
commit cb49bddf63
81 changed files with 1522 additions and 1682 deletions

View file

@ -529,7 +529,7 @@ parse_justification(const char *str)
* theme_builtin() applies a theme that is similar to vanilla GTK
*/
static void
theme_builtin(struct theme *theme, struct server *server)
theme_builtin(struct theme *theme)
{
theme->border_width = 1;
theme->window_titlebar_padding_height = 0;
@ -634,7 +634,7 @@ theme_builtin(struct theme *theme, struct server *server)
theme->osd_border_color[0] = FLT_MIN;
theme->osd_label_text_color[0] = FLT_MIN;
if (wlr_renderer_is_pixman(server->renderer)) {
if (wlr_renderer_is_pixman(g_server.renderer)) {
/* Draw only outlined overlay by default to save CPU resource */
theme->snapping_overlay_region.bg_enabled = false;
theme->snapping_overlay_edge.bg_enabled = false;
@ -1815,13 +1815,13 @@ post_processing(struct theme *theme)
}
void
theme_init(struct theme *theme, struct server *server, const char *theme_name)
theme_init(struct theme *theme, const char *theme_name)
{
/*
* Set some default values. This is particularly important on
* reconfigure as not all themes set all options
*/
theme_builtin(theme, server);
theme_builtin(theme);
struct wl_list paths;