clang-tidy: readability-isolate-declaration
authorColin Clark <colin.clark@cclark.uk>
Wed, 7 Feb 2024 16:50:33 +0000 (16:50 +0000)
committerColin Clark <colin.clark@cclark.uk>
Wed, 7 Feb 2024 16:50:33 +0000 (16:50 +0000)
- Fix warnings identified by this flag
- Remove the exclude from .clang-tidy file

79 files changed:
.clang-tidy
src/advanced-exif.cc
src/bar-comment.cc
src/bar-exif.cc
src/bar-gps.cc
src/bar-keywords.cc
src/bar-sort.cc
src/bar.cc
src/cache.cc
src/cellrenderericon.cc
src/collect-io.cc
src/collect-table.cc
src/collect.cc
src/color-man.cc
src/debug.cc
src/desktop-file.cc
src/dnd.cc
src/dupe.cc
src/editors.cc
src/exif-common.cc
src/filedata.cc
src/filefilter.cc
src/histogram.cc
src/image-load-cr3.cc
src/image-load-djvu.cc
src/image-load-heif.cc
src/image-load-j2k.cc
src/image-load-jpeg.cc
src/image-load-pdf.cc
src/image-load-tiff.cc
src/image-load-webp.cc
src/image-load-zxscr.cc
src/image-load.cc
src/image-overlay.cc
src/image.cc
src/img-view.cc
src/layout-config.cc
src/layout-image.cc
src/layout-util.cc
src/layout.cc
src/logwindow.cc
src/main.cc
src/metadata.cc
src/misc.cc
src/osd.cc
src/pan-view/pan-calendar.cc
src/pan-view/pan-folder.cc
src/pan-view/pan-grid.cc
src/pan-view/pan-item.cc
src/pan-view/pan-timeline.cc
src/pan-view/pan-view.cc
src/pixbuf-renderer.cc
src/pixbuf-util.cc
src/preferences.cc
src/print.cc
src/rcfile.cc
src/remote.cc
src/renderer-tiles.cc
src/search-and-run.cc
src/search.cc
src/similar.cc
src/thumb-standard.cc
src/thumb.cc
src/toolbar.cc
src/ui-bookmark.cc
src/ui-fileops.cc
src/ui-help.cc
src/ui-menu.cc
src/ui-misc.cc
src/ui-pathsel.cc
src/ui-tree-edit.cc
src/ui-utildlg.cc
src/utilops.cc
src/view-dir-tree.cc
src/view-dir.cc
src/view-file/view-file-icon.cc
src/view-file/view-file-list.cc
src/whereami.cc
src/zonedetect.cc

index e214ffa..a50ef4c 100644 (file)
@@ -40,7 +40,6 @@ Checks: >
   -misc-non-private-member-variables-in-classes,
   -misc-use-anonymous-namespace,
   -modernize-avoid-c-arrays,
-  -modernize-macro-to-enum,
   -modernize-raw-string-literal,
   -modernize-use-trailing-return-type,
   -performance-no-int-to-ptr,
@@ -48,7 +47,6 @@ Checks: >
   -readability-function-cognitive-complexity,
   -readability-identifier-length,
   -readability-implicit-bool-conversion,
-  -readability-isolate-declaration,
   -readability-magic-numbers,
   -readability-named-parameter,
   -readability-qualified-auto,
index dba400d..5db7e3a 100644 (file)
@@ -305,7 +305,8 @@ static gint advanced_exif_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIt
                case EXIF_ADVCOL_FORMAT:
                case EXIF_ADVCOL_ELEMENTS:
                        {
-                       gchar *s1, *s2;
+                       gchar *s1;
+                       gchar *s2;
 
                        gtk_tree_model_get(model, a, n, &s1, -1);
                        gtk_tree_model_get(model, b, n, &s2, -1);
index b94dcfb..c1d6367 100644 (file)
@@ -178,7 +178,8 @@ static gint bar_pane_comment_event(GtkWidget *bar, GdkEvent *event)
 static void bar_pane_comment_write_config(GtkWidget *pane, GString *outstr, gint indent)
 {
        PaneCommentData *pcd;
-       gint w, h;
+       gint w;
+       gint h;
 
        pcd = static_cast<PaneCommentData *>(g_object_get_data(G_OBJECT(pane), "pane_data"));
        if (!pcd) return;
index 82b7b79..1c46bd2 100644 (file)
@@ -268,7 +268,8 @@ static void bar_pane_exif_update_entry(PaneExifData *ped, GtkWidget *entry, gboo
 
 static void bar_pane_exif_update(PaneExifData *ped)
 {
-       GList *list, *work;
+       GList *list;
+       GList *work;
 
        ped->all_hidden = TRUE;
 
@@ -303,7 +304,8 @@ static gint bar_pane_exif_event(GtkWidget *bar, GdkEvent *event)
 {
        PaneExifData *ped;
        gboolean ret = FALSE;
-       GList *list, *work;
+       GList *list;
+       GList *work;
 
        ped = static_cast<PaneExifData *>(g_object_get_data(G_OBJECT(bar), "pane_data"));
        if (!ped) return FALSE;
@@ -379,7 +381,8 @@ static void bar_pane_exif_dnd_receive(GtkWidget *pane, GdkDragContext *,
                                          guint, gpointer)
 {
        PaneExifData *ped;
-       GList *work, *list;
+       GList *work;
+       GList *list;
        gint pos;
        GtkWidget *new_entry = nullptr;
 
@@ -405,7 +408,8 @@ static void bar_pane_exif_dnd_receive(GtkWidget *pane, GdkDragContext *,
        pos = 0;
        while (work)
                {
-               gint nx, ny;
+               gint nx;
+               gint ny;
                auto entry = static_cast<GtkWidget *>(work->data);
                GtkAllocation allocation;
                work = work->next;
@@ -718,7 +722,8 @@ static void bar_pane_exif_entry_write_config(GtkWidget *entry, GString *outstr,
 static void bar_pane_exif_write_config(GtkWidget *pane, GString *outstr, gint indent)
 {
        PaneExifData *ped;
-       GList *work, *list;
+       GList *work;
+       GList *list;
 
        ped = static_cast<PaneExifData *>(g_object_get_data(G_OBJECT(pane), "pane_data"));
        if (!ped) return;
index 6fd170c..a09d79e 100644 (file)
@@ -132,10 +132,14 @@ static void bar_pane_gps_close_save_cb(GenericDialog *, gpointer data)
 {
        PaneGPSData *pgd;
        GenericDialog *gd;
-       FileData *fd, *fd_found;
-       GList *work, *list;
-       gint count, geocoded_count;
-       gdouble latitude, longitude;
+       FileData *fd;
+       FileData *fd_found;
+       GList *work;
+       GList *list;
+       gint count;
+       gint geocoded_count;
+       gdouble latitude;
+       gdouble longitude;
        GString *message;
        gchar *location;
        gchar **latlong;
@@ -289,15 +293,18 @@ static void bar_pane_gps_thumb_error_cb(ThumbLoader *tl, gpointer)
 static gboolean bar_pane_gps_marker_keypress_cb(GtkWidget *widget, ClutterButtonEvent *bevent, gpointer)
 {
        FileData *fd;
-       ClutterActor *label_marker, *parent_marker;
+       ClutterActor *label_marker;
+       ClutterActor *parent_marker;
        ClutterColor marker_colour = { MARKER_COLOUR };
        ClutterColor text_colour = { TEXT_COLOUR };
        ClutterColor thumb_colour = { THUMB_COLOUR };
        gchar *current_text;
-       ClutterActor *actor, *direction;
+       ClutterActor *actor;
+       ClutterActor *direction;
        ClutterActor *current_image;
        GString *text;
-       gint height, width;
+       gint height;
+       gint width;
        GdkPixbufRotation rotate;
        gchar *altitude = nullptr;
        ThumbLoader *tl;
@@ -425,7 +432,8 @@ static gboolean bar_pane_gps_create_markers_cb(gpointer data)
        gdouble longitude;
        gdouble compass;
        FileData *fd;
-       ClutterActor *parent_marker, *label_marker;
+       ClutterActor *parent_marker;
+       ClutterActor *label_marker;
        ClutterActor *direction;
        ClutterColor marker_colour = { MARKER_COLOUR };
        ClutterColor thumb_colour = { THUMB_COLOUR };
@@ -664,7 +672,8 @@ static void bar_pane_gps_write_config(GtkWidget *pane, GString *outstr, gint ind
        const gchar *map_id;
        gdouble position;
        gint int_position;
-       gint w, h;
+       gint w;
+       gint h;
 
        pgd = static_cast<PaneGPSData *>(g_object_get_data(G_OBJECT(pane), "pane_data"));
        if (!pgd) return;
@@ -922,9 +931,13 @@ GtkWidget *bar_pane_gps_new(const gchar *id, const gchar *title, const gchar *ma
                                        gboolean expanded, gint height)
 {
        PaneGPSData *pgd;
-       GtkWidget *vbox, *frame;
+       GtkWidget *vbox;
+       GtkWidget *frame;
        GtkWidget *gpswidget;
-       GtkWidget *status, *state, *progress, *slider;
+       GtkWidget *status;
+       GtkWidget *state;
+       GtkWidget *progress;
+       GtkWidget *slider;
        ChamplainMarkerLayer *layer;
        ChamplainView *view;
        const gchar *slider_list[] = {GQ_ICON_ZOOM_IN, GQ_ICON_ZOOM_OUT, nullptr};
@@ -1077,8 +1090,10 @@ void bar_pane_gps_update_from_config(GtkWidget *pane, const gchar **attribute_na
 {
        PaneGPSData *pgd;
        gint zoom;
-       gint int_longitude, int_latitude;
-       gdouble longitude, latitude;
+       gint int_longitude;
+       gint int_latitude;
+       gdouble longitude;
+       gdouble latitude;
 
        pgd = static_cast<PaneGPSData *>(g_object_get_data(G_OBJECT(pane), "pane_data"));
        if (!pgd)
index 793e091..b48d0f4 100644 (file)
@@ -79,7 +79,8 @@ static GList *keyword_list_pull_selected(GtkWidget *text_widget)
 static void keyword_list_push(GtkWidget *textview, GList *list)
 {
        GtkTextBuffer *buffer;
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
 
        buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
        gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -221,7 +222,8 @@ static void bar_pane_keywords_update(PaneKeywordsData *pkd)
 {
        GList *keywords = nullptr;
        GList *orig_keywords = nullptr;
-       GList *work1, *work2;
+       GList *work1;
+       GList *work2;
        GtkTextBuffer *keyword_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pkd->keyword_view));
 
        keywords = metadata_read_list(pkd->fd, KEYWORD_KEY, METADATA_PLAIN);
@@ -295,7 +297,8 @@ static void bar_pane_keywords_write_config(GtkWidget *pane, GString *outstr, gin
 {
        PaneKeywordsData *pkd;
        GList *path_expanded = nullptr;
-       gint w, h;
+       gint w;
+       gint h;
 
        pkd = static_cast<PaneKeywordsData *>(g_object_get_data(G_OBJECT(pane), "pane_data"));
        if (!pkd) return;
@@ -1236,7 +1239,8 @@ static void bar_pane_keywords_add_to_selected_cb(GtkWidget *, gpointer data)
        GtkTreeIter child_iter;
        GtkTreeModel *model;
        GtkTreeModel *keyword_tree;
-       GList *list, *work;
+       GList *list;
+       GList *work;
        GList *keywords = nullptr;
 
        GtkTextBuffer *keyword_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(pkd->keyword_view));
@@ -1451,7 +1455,8 @@ static void bar_pane_keywords_destroy(GtkWidget *, gpointer data)
 static GtkWidget *bar_pane_keywords_new(const gchar *id, const gchar *title, const gchar *key, gboolean expanded, gint height)
 {
        PaneKeywordsData *pkd;
-       GtkWidget *hbox, *vbox;
+       GtkWidget *hbox;
+       GtkWidget *vbox;
        GtkWidget *scrolled;
        GtkTextBuffer *buffer;
        GtkTreeModel *store;
@@ -1788,7 +1793,8 @@ static gint autocomplete_sort_iter_compare_func (GtkTreeModel *model,
                                                                        gpointer)
 {
        gint ret = 0;
-       gchar *name1, *name2;
+       gchar *name1;
+       gchar *name2;
 
        gtk_tree_model_get(model, a, 0, &name1, -1);
        gtk_tree_model_get(model, b, 0, &name2, -1);
index 11c8f00..4489951 100644 (file)
@@ -637,7 +637,8 @@ static GtkWidget *bar_sort_new(LayoutWindow *lw, SortActionType action,
        GtkWidget *label;
        GtkWidget *tbar;
        GtkWidget *combo;
-       GList *editors_list, *work;
+       GList *editors_list;
+       GList *work;
        gboolean have_filter;
        GtkWidget *button;
 
index 2a1dfe7..88a2f20 100644 (file)
@@ -291,8 +291,10 @@ static void bar_expander_height_cb(GtkWidget *, gpointer data)
        GtkWidget *window;
        GtkWidget *data_box;
        GList *list;
-       gint x, y;
-       gint w, h;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
        GdkDisplay *display;
        GdkSeat *seat;
        GdkDevice *device;
@@ -518,7 +520,8 @@ void bar_notify_selection(GtkWidget *bar, gint count)
 gboolean bar_event(GtkWidget *bar, GdkEvent *event)
 {
        BarData *bd;
-       GList *list, *work;
+       GList *list;
+       GList *work;
        gboolean ret = FALSE;
 
        bd = static_cast<BarData *>(g_object_get_data(G_OBJECT(bar), "bar_data"));
@@ -547,7 +550,8 @@ gboolean bar_event(GtkWidget *bar, GdkEvent *event)
 GtkWidget *bar_find_pane_by_id(GtkWidget *bar, PaneType type, const gchar *id)
 {
        BarData *bd;
-       GList *list, *work;
+       GList *list;
+       GList *work;
        GtkWidget *ret = nullptr;
 
        if (!id || !id[0]) return nullptr;
@@ -591,7 +595,8 @@ void bar_clear(GtkWidget *bar)
 void bar_write_config(GtkWidget *bar, GString *outstr, gint indent)
 {
        BarData *bd;
-       GList *list, *work;
+       GList *list;
+       GList *work;
 
        if (!bar) return;
 
index 3d1cf22..4aa4de5 100644 (file)
@@ -115,7 +115,8 @@ static gboolean cache_sim_write_md5sum(SecureSaveInfo *ssi, CacheData *cd)
 
 static gboolean cache_sim_write_similarity(SecureSaveInfo *ssi, CacheData *cd)
 {
-       guint x, y;
+       guint x;
+       guint y;
        guint8 buf[3 * 32];
 
        if (!cd || !cd->similarity || !cd->sim || !cd->sim->filled) return FALSE;
@@ -220,7 +221,8 @@ static gboolean cache_sim_read_dimensions(FILE *f, gchar *buf, gint s, CacheData
                gchar b;
                gchar buf[1024];
                gsize p = 0;
-               gint w, h;
+               gint w;
+               gint h;
 
                b = 'X';
                while (b != '[')
@@ -342,7 +344,8 @@ static gboolean cache_sim_read_similarity(FILE *f, gchar *buf, gint s, CacheData
                gchar b;
                guint8 pixel_buf[3];
                ImageSimilarityData *sd;
-               gint x, y;
+               gint x;
+               gint y;
 
                b = 'X';
                while (b != '=')
index 75449f5..e4c31bc 100644 (file)
@@ -554,8 +554,10 @@ static void gqv_cell_renderer_icon_get_size(GtkCellRenderer    *cell,
        auto cellicon = reinterpret_cast<GQvCellRendererIcon *>(cell);
        gint calc_width;
        gint calc_height;
-       gint xpad, ypad;
-       gfloat xalign, yalign;
+       gint xpad;
+       gint ypad;
+       gfloat xalign;
+       gfloat yalign;
 
        gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
        gtk_cell_renderer_get_alignment(cell, &xalign, &yalign);
@@ -635,7 +637,8 @@ static void gqv_cell_renderer_icon_render(GtkCellRenderer *cell,
        const gchar *text;
        GdkRectangle cell_rect;
        GtkStateFlags state;
-       gint xpad, ypad;
+       gint xpad;
+       gint ypad;
 
 
        pixbuf = cellicon->pixbuf;
@@ -808,7 +811,8 @@ static gboolean gqv_cell_renderer_icon_activate(GtkCellRenderer      *cell,
                GdkRectangle rect;
                GdkRectangle cell_rect;
                gint i;
-               gint xpad, ypad;
+               gint xpad;
+               gint ypad;
 
                gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
 
index a60938a..6a0ed0a 100644 (file)
@@ -51,7 +51,10 @@ namespace
 
 gboolean scan_geometry(gchar *buffer, GdkRectangle &window)
 {
-       gint nx, ny, nw, nh;
+       gint nx;
+       gint ny;
+       gint nw;
+       gint nh;
 
        if (sscanf(buffer, "%d %d %d %d", &nx, &ny, &nw, &nh) != 4) return FALSE;
 
index 8f1af77..7c8799b 100644 (file)
@@ -129,7 +129,8 @@ static gboolean collection_table_find_position(CollectTable *ct, CollectInfo *in
 static gboolean collection_table_find_iter(CollectTable *ct, CollectInfo *info, GtkTreeIter *iter, gint *column)
 {
        GtkTreeModel *store;
-       gint row, col;
+       gint row;
+       gint col;
 
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
        if (!collection_table_find_position(ct, info, &row, &col)) return FALSE;
@@ -486,10 +487,13 @@ static void collection_table_select_util(CollectTable *ct, CollectInfo *info, gb
 
 static void collection_table_select_region_util(CollectTable *ct, CollectInfo *start, CollectInfo *end, gboolean select)
 {
-       gint row1, col1;
-       gint row2, col2;
+       gint row1;
+       gint col1;
+       gint row2;
+       gint col2;
        gint t;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!collection_table_find_position(ct, start, &row1, &col1) ||
            !collection_table_find_position(ct, end, &row2, &col2) ) return;
@@ -566,7 +570,8 @@ static GList *collection_table_get_list(CollectTable *ct)
 static void tip_show(CollectTable *ct)
 {
        GtkWidget *label;
-       gint x, y;
+       gint x;
+       gint y;
        GdkDisplay *display;
        GdkSeat *seat;
        GdkDevice *device;
@@ -653,7 +658,8 @@ static void tip_update(CollectTable *ct, CollectInfo *info)
 
        if (ct->tip_window)
                {
-               gint x, y;
+               gint x;
+               gint y;
                gdk_device_get_position(device, nullptr, &x, &y);
 
                gq_gtk_window_move(GTK_WINDOW(ct->tip_window), x + 16, y + 16);
@@ -1076,7 +1082,8 @@ static GtkWidget *collection_table_popup_menu(CollectTable *ct, gboolean over_ic
 void collection_table_set_focus(CollectTable *ct, CollectInfo *info)
 {
        GtkTreeIter iter;
-       gint row, col;
+       gint row;
+       gint col;
 
        if (g_list_find(ct->cd->list, ct->focus_info))
                {
@@ -1484,7 +1491,8 @@ static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info,
        gboolean after = FALSE;
        GdkRectangle cell;
        GdkWindow *parent;
-       gint x_parent, y_parent;
+       gint x_parent;
+       gint y_parent;
        GError *error = nullptr;
        GInputStream *in_stream;
        GdkPixbuf *pb;
@@ -1555,8 +1563,10 @@ static void collection_table_insert_marker(CollectTable *ct, CollectInfo *info,
 
        if (info)
                {
-               gint x, y;
-               gint w, h;
+               gint x;
+               gint y;
+               gint w;
+               gint h;
 
                w = gdk_window_get_width(ct->marker_window);
                h = gdk_window_get_height(ct->marker_window);
@@ -1612,8 +1622,10 @@ static gboolean collection_table_auto_scroll_idle_cb(gpointer data)
 {
        auto ct = static_cast<CollectTable *>(data);
        GdkWindow *window;
-       gint x, y;
-       gint w, h;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
        GdkSeat *seat;
        GdkDevice *device;
 
@@ -1918,7 +1930,8 @@ static void collection_table_sync(CollectTable *ct)
        GtkTreeModel *store;
        GtkTreeIter iter;
        GList *work;
-       gint r, c;
+       gint r;
+       gint c;
 
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
 
@@ -2099,7 +2112,8 @@ static void collection_table_move_by_info_list(CollectTable *ct, GList *info_lis
 void collection_table_file_update(CollectTable *ct, CollectInfo *info)
 {
        GtkTreeIter iter;
-       gint row, col;
+       gint row;
+       gint col;
        gdouble value;
 
        if (!info)
index 8a73598..0138d29 100644 (file)
@@ -197,9 +197,12 @@ GList *collection_list_sort(GList *list, SortType method)
 
 GList *collection_list_randomize(GList *list)
 {
-       guint random, length, i;
+       guint random;
+       guint length;
+       guint i;
        gpointer tmp;
-       GList *nlist, *olist;
+       GList *nlist;
+       GList *olist;
 
        length = g_list_length(list);
        if (!length) return nullptr;
index 4efd984..cdc7e87 100644 (file)
@@ -309,7 +309,8 @@ void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, g
        guchar *pix;
        gint rs;
        gint i;
-       gint pixbuf_width, pixbuf_height;
+       gint pixbuf_width;
+       gint pixbuf_height;
 
 
        pixbuf_width = gdk_pixbuf_get_width(pixbuf);
@@ -344,7 +345,8 @@ void color_man_correct_region(ColorMan *cm, GdkPixbuf *pixbuf, gint x, gint y, g
 static gboolean color_man_idle_cb_unused(gpointer data)
 {
        auto *cm = static_cast<ColorMan *>(data);
-       gint width, height;
+       gint width;
+       gint height;
        gint rh;
 
        if (!cm->pixbuf) return FALSE;
index 5654297..9a73641 100644 (file)
@@ -84,7 +84,8 @@ void log_domain_print_message(const gchar *domain, gchar *buf)
 {
        gchar *buf_nl;
        regex_t regex;
-       gint ret_comp, ret_exec;
+       gint ret_comp;
+       gint ret_exec;
 
        buf_nl = g_strconcat(buf, "\n", NULL);
 
index 6879fa3..f07a88e 100644 (file)
@@ -70,7 +70,8 @@ static gboolean editor_window_save(EditorWindow *ew)
        gchar *dir;
        gchar *path;
        gchar *text;
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
        GError *error = nullptr;
        gboolean ret = TRUE;
        const gchar *name = gq_gtk_entry_get_text(GTK_ENTRY(ew->entry));
@@ -412,7 +413,8 @@ static gint editor_list_window_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkT
 {
        gint n = GPOINTER_TO_INT(data);
        gint ret = 0;
-       gboolean bool1, bool2;
+       gboolean bool1;
+       gboolean bool2;
 
        switch (n)
                {
@@ -421,7 +423,8 @@ static gint editor_list_window_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkT
                case DESKTOP_FILE_COLUMN_PATH:
                case DESKTOP_FILE_COLUMN_HIDDEN:
                        {
-                       gchar *s1, *s2;
+                       gchar *s1;
+                       gchar *s2;
 
                        gtk_tree_model_get(model, a, n, &s1, -1);
                        gtk_tree_model_get(model, b, n, &s2, -1);
index 4f7b7a6..eedbfcb 100644 (file)
@@ -86,7 +86,8 @@ static void pixbuf_draw_rect_unused(GdkPixbuf *pixbuf, gint x, gint y, gint w, g
        gint rs;
        guchar *pix;
        guchar *p;
-       gint i, j;
+       gint i;
+       gint j;
 
        alpha = gdk_pixbuf_get_has_alpha(pixbuf);
        rs = gdk_pixbuf_get_rowstride(pixbuf);
@@ -109,10 +110,13 @@ static void pixbuf_draw_rect_unused(GdkPixbuf *pixbuf, gint x, gint y, gint w, g
 void dnd_set_drag_icon(GtkWidget *widget, GdkDragContext *context, GdkPixbuf *pixbuf, gint items)
 {
        GdkPixbuf *dest;
-       gint w, h;
-       gint sw, sh;
+       gint w;
+       gint h;
+       gint sw;
+       gint sh;
        PangoLayout *layout = nullptr;
-       gint x, y;
+       gint x;
+       gint y;
 
        x = y = 0;
 
@@ -141,7 +145,8 @@ void dnd_set_drag_icon(GtkWidget *widget, GdkDragContext *context, GdkPixbuf *pi
        if (items > 1)
                {
                gchar *buf;
-               gint lw,lh;
+               gint lw;
+               gint lh;
 
                layout = gtk_widget_create_pango_layout(widget, nullptr);
                buf = g_strdup_printf("<small> %d </small>", items);
index c67fca8..3e38179 100644 (file)
@@ -2756,7 +2756,8 @@ static gboolean dupe_files_add_queue_cb(gpointer data)
                        }
                else if (isdir(fd->path))
                        {
-                       GList *f, *d;
+                       GList *f;
+                       GList *d;
                        dw->add_files_queue = g_list_remove(dw->add_files_queue, g_list_first(dw->add_files_queue)->data);
 
                        if (filelist_read(fd, &f, &d))
@@ -2830,7 +2831,8 @@ static void dupe_files_add(DupeWindow *dw, CollectionData *, CollectInfo *info,
                        }
                else if (isdir(fd->path) && recurse)
                        {
-                       GList *f, *d;
+                       GList *f;
+                       GList *d;
                        if (filelist_read(fd, &f, &d))
                                {
                                GList *work;
@@ -2970,7 +2972,8 @@ void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse)
                work = work->next;
                if (isdir(fd->path) && !recurse)
                        {
-                       GList *f, *d;
+                       GList *f;
+                       GList *d;
 
                        if (filelist_read(fd, &f, &d))
                                {
@@ -3129,7 +3132,8 @@ static void dupe_display_stats(DupeWindow *dw, DupeItem *di)
                {
                GtkWidget *image;
                GdkPixbuf *pixbuf;
-               gint x, y;
+               gint x;
+               gint y;
                guchar *d_pix;
                guchar *dp;
                gint rs;
@@ -4460,7 +4464,8 @@ static gint column_sort_cb(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b,
 {
        auto sortable = static_cast<GtkTreeSortable *>(data);
        gint ret = 0;
-       gchar *rank_str_a, *rank_str_b;
+       gchar *rank_str_a;
+       gchar *rank_str_b;
        gint rank_int_a;
        gint rank_int_b;
        gint group_a;
index 9bf3c3c..60603bf 100644 (file)
@@ -176,7 +176,9 @@ gboolean editor_read_desktop_file(const gchar *path)
        gchar *extensions;
        gchar *type;
        const gchar *key = filename_from_path(path);
-       gchar **categories, **only_show_in, **not_show_in;
+       gchar **categories;
+       gchar **only_show_in;
+       gchar **not_show_in;
        gchar *try_exec;
        GtkTreeIter iter;
        gboolean category_geeqie = FALSE;
index 8ebc379..85b2d32 100644 (file)
@@ -99,8 +99,12 @@ static gdouble get_crop_factor(ExifData *exif)
        gdouble xres = exif_get_rational_as_double(exif, "Exif.Photo.FocalPlaneXResolution");
        gdouble yres = exif_get_rational_as_double(exif, "Exif.Photo.FocalPlaneYResolution");
        gint res_unit;
-       gint w, h;
-       gdouble xsize, ysize, size, ratio;
+       gint w;
+       gint h;
+       gdouble xsize;
+       gdouble ysize;
+       gdouble size;
+       gdouble ratio;
 
        if (xres == 0.0 || yres == 0.0) return 0.0;
 
@@ -160,7 +164,8 @@ static gchar *exif_build_formatted_Camera(ExifData *exif)
 
        if (software)
                {
-               gint i, j;
+               gint i;
+               gint j;
 
                g_strstrip(software);
 
@@ -352,7 +357,8 @@ static gchar *exif_build_formatted_FocalLength(ExifData *exif)
 static gchar *exif_build_formatted_FocalLength35mmFilm(ExifData *exif)
 {
        gint n;
-       gdouble f, c;
+       gdouble f;
+       gdouble c;
 
        if (exif_get_integer(exif, "Exif.Photo.FocalLengthIn35mmFilm", &n) && n != 0)
                {
@@ -446,7 +452,8 @@ static gchar *exif_build_formatted_Flash(ExifData *exif)
 
 static gchar *exif_build_formatted_Resolution(ExifData *exif)
 {
-       ExifRational *rx, *ry;
+       ExifRational *rx;
+       ExifRational *ry;
        gchar *units;
        gchar *text;
 
@@ -531,8 +538,10 @@ static gchar *exif_build_formatted_GPSPosition(ExifData *exif)
        ExifRational *value;
        ExifItem *item;
        guint i;
-       gdouble p, p3;
-       gulong p1, p2;
+       gdouble p;
+       gdouble p3;
+       gulong p1;
+       gulong p2;
 
        string = g_string_new("");
 
@@ -1135,7 +1144,10 @@ gboolean exif_jpeg_parse_color(ExifData *exif, guchar *data, guint size)
 
 static gchar *mode_number(mode_t m)
 {
-       gint mb, mu, mg, mo;
+       gint mb;
+       gint mu;
+       gint mg;
+       gint mo;
        gchar pbuf[12];
 
        mb = mu = mg = mo = 0;
index 5e032c7..1cb707c 100644 (file)
@@ -60,9 +60,13 @@ static gboolean filelist_sort_case = TRUE;
 
 gchar *text_from_size(gint64 size)
 {
-       gchar *a, *b;
-       gchar *s, *d;
-       gint l, n, i;
+       gchar *a;
+       gchar *b;
+       gchar *s;
+       gchar *d;
+       gint l;
+       gint n;
+       gint i;
 
        /* what I would like to use is printf("%'d", size)
         * BUT: not supported on every libc :(
@@ -508,7 +512,12 @@ void read_exif_time_data(FileData *file)
                if (tmp)
                        {
                        struct tm time_str;
-                       uint year, month, day, hour, min, sec;
+                       uint year;
+                       uint month;
+                       uint day;
+                       uint hour;
+                       uint min;
+                       uint sec;
 
                        sscanf(tmp, "%4u:%2u:%2u %2u:%2u:%2u", &year, &month, &day, &hour, &min, &sec);
                        time_str.tm_year  = year - 1900;
@@ -546,7 +555,12 @@ void read_exif_time_digitized_data(FileData *file)
                if (tmp)
                        {
                        struct tm time_str;
-                       uint year, month, day, hour, min, sec;
+                       uint year;
+                       uint month;
+                       uint day;
+                       uint hour;
+                       uint min;
+                       uint sec;
 
                        sscanf(tmp, "%4u:%2u:%2u %2u:%2u:%2u", &year, &month, &day, &hour, &min, &sec);
                        time_str.tm_year  = year - 1900;
@@ -942,7 +956,8 @@ static void file_data_check_sidecars(const GList *basename_list)
        /* all files in the list have ref count > 0 */
 
        const GList *work;
-       GList *s_work, *new_sidecars;
+       GList *s_work;
+       GList *new_sidecars;
        FileData *parent_fd;
 
        if (!basename_list) return;
index 648aea7..3641ce4 100644 (file)
@@ -194,7 +194,8 @@ void filter_add_defaults()
        filter_add_if_missing("apng", "Animated Portable Network Graphic", ".apng", FORMAT_CLASS_IMAGE, FALSE, FALSE, TRUE);
 
        /* formats supported by gdk-pixbuf */
-       GSList *list, *work;
+       GSList *list;
+       GSList *work;
 
        list = gdk_pixbuf_get_formats();
        work = list;
index 019de2d..3885bcc 100644 (file)
@@ -154,7 +154,14 @@ void histmap_free(HistMap *histmap)
 
 static gboolean histmap_read(HistMap *histmap, gboolean whole)
 {
-       gint w, h, i, j, srs, has_alpha, step, end_line;
+       gint w;
+       gint h;
+       gint i;
+       gint j;
+       gint srs;
+       gint has_alpha;
+       gint step;
+       gint end_line;
        guchar *s_pix;
        GdkPixbuf *imgpixbuf = histmap->pixbuf;
 
index b68b829..7d5e4d0 100644 (file)
@@ -64,7 +64,8 @@ static void
 explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
                       guchar **lines)
 {
-       gint i, j;
+       gint i;
+       gint j;
        guint w;
 
        g_return_if_fail (cinfo != nullptr);
@@ -76,7 +77,8 @@ explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
         */
        w = cinfo->output_width;
        for (i = cinfo->rec_outbuf_height - 1; i >= 0; i--) {
-               guchar *from, *to;
+               guchar *from;
+               guchar *to;
 
                from = lines[i] + w - 1;
                to = lines[i] + (w - 1) * 3;
@@ -107,7 +109,10 @@ convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
 
                p = lines[i];
                for (j = 0; j < cinfo->output_width; j++) {
-                       int c, m, y, k;
+                       int c;
+                       int m;
+                       int y;
+                       int k;
                        c = p[0];
                        m = p[1];
                        y = p[2];
@@ -258,7 +263,8 @@ static gboolean image_loader_cr3_load (gpointer loader, const guchar *buf, gsize
        auto lj = static_cast<ImageLoaderJpeg *>(loader);
        struct jpeg_decompress_struct cinfo;
        struct jpeg_decompress_struct cinfo2;
-       guchar *dptr, *dptr2;
+       guchar *dptr;
+       guchar *dptr2;
        guint rowstride;
        guchar *stereo_buf2 = nullptr;
        guint stereo_length = 0;
@@ -314,7 +320,8 @@ static gboolean image_loader_cr3_load (gpointer loader, const guchar *buf, gsize
        if (mpo && mpo->num_images > 1)
                {
                guint i;
-               gint idx1 = -1, idx2 = -1;
+               gint idx1 = -1;
+               gint idx2 = -1;
                guint num2 = 1;
 
                for (i = 0; i < mpo->num_images; i++)
index b6cabdc..d9c2c21 100644 (file)
@@ -55,7 +55,8 @@ static gboolean image_loader_djvu_load(gpointer loader, const guchar *buf, gsize
        ddjvu_rect_t rrect;
        ddjvu_rect_t prect;
        ddjvu_format_t *fmt;
-       gint width, height;
+       gint width;
+       gint height;
        gint stride;
        gboolean alpha = FALSE;
        cairo_surface_t *surface;
index 5abc3c5..10cdbfc 100644 (file)
@@ -52,7 +52,8 @@ static gboolean image_loader_heif_load(gpointer loader, const guchar *buf, gsize
        struct heif_error error_code;
        struct heif_image_handle* handle;
        guint8* data;
-       gint width, height;
+       gint width;
+       gint height;
        gint stride;
        gboolean alpha;
        gint page_total;
index 9bdebbc..cbdbfe6 100644 (file)
@@ -79,7 +79,8 @@ static OPJ_SIZE_T opj_write_to_buffer (void* p_buffer, OPJ_SIZE_T p_nb_bytes,
     if (0 == len)
         len = 1;
 
-    OPJ_SIZE_T dist = static_cast<guchar *>(pcur) - static_cast<guchar *>(pbuf), n = len - dist;
+    OPJ_SIZE_T dist = static_cast<guchar *>(pcur) - static_cast<guchar *>(pbuf);
+    OPJ_SIZE_T n = len - dist;
     g_assert (dist <= len);
 
     while (n < p_nb_bytes) {
@@ -176,7 +177,9 @@ static gboolean image_loader_j2k_load(gpointer loader, const guchar *buf, gsize
        gint width;
        gint height;
        gint num_components;
-       gint i, j, k;
+       gint i;
+       gint j;
+       gint k;
        guchar *pixels;
        gint  bytes_per_pixel;
        opj_buffer_info_t *decode_buffer;
index 68ca556..f606854 100644 (file)
@@ -67,7 +67,8 @@ static void
 explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
                       guchar **lines)
 {
-       gint i, j;
+       gint i;
+       gint j;
        guint w;
 
        g_return_if_fail (cinfo != nullptr);
@@ -79,7 +80,8 @@ explode_gray_into_buf (struct jpeg_decompress_struct *cinfo,
         */
        w = cinfo->output_width;
        for (i = cinfo->rec_outbuf_height - 1; i >= 0; i--) {
-               guchar *from, *to;
+               guchar *from;
+               guchar *to;
 
                from = lines[i] + w - 1;
                to = lines[i] + (w - 1) * 3;
@@ -110,7 +112,10 @@ convert_cmyk_to_rgb (struct jpeg_decompress_struct *cinfo,
 
                p = lines[i];
                for (j = 0; j < cinfo->output_width; j++) {
-                       int c, m, y, k;
+                       int c;
+                       int m;
+                       int y;
+                       int k;
                        c = p[0];
                        m = p[1];
                        y = p[2];
@@ -261,7 +266,8 @@ static gboolean image_loader_jpeg_load (gpointer loader, const guchar *buf, gsiz
        auto lj = static_cast<ImageLoaderJpeg *>(loader);
        struct jpeg_decompress_struct cinfo;
        struct jpeg_decompress_struct cinfo2;
-       guchar *dptr, *dptr2;
+       guchar *dptr;
+       guchar *dptr2;
        guint rowstride;
        guchar *stereo_buf2 = nullptr;
        guint stereo_length = 0;
@@ -274,7 +280,8 @@ static gboolean image_loader_jpeg_load (gpointer loader, const guchar *buf, gsiz
        if (mpo && mpo->num_images > 1)
                {
                guint i;
-               gint idx1 = -1, idx2 = -1;
+               gint idx1 = -1;
+               gint idx2 = -1;
                guint num2 = 1;
 
                for (i = 0; i < mpo->num_images; i++)
index 30a1450..27f93f9 100644 (file)
@@ -45,7 +45,8 @@ static gboolean image_loader_pdf_load(gpointer loader, const guchar *buf, gsize
        GError *poppler_error = nullptr;
        PopplerPage *page;
        PopplerDocument *document;
-       gdouble width, height;
+       gdouble width;
+       gdouble height;
        cairo_surface_t *surface;
        cairo_t *cr;
        gboolean ret = FALSE;
index 2195fb3..353074a 100644 (file)
@@ -142,7 +142,9 @@ static gboolean image_loader_tiff_load (gpointer loader, const guchar *buf, gsiz
 
        TIFF *tiff;
        guchar *pixels = nullptr;
-       gint width, height, rowstride;
+       gint width;
+       gint height;
+       gint rowstride;
        size_t bytes;
        guint32 rowsperstrip;
        gint dircount = 0;
@@ -249,7 +251,8 @@ static gboolean image_loader_tiff_load (gpointer loader, const guchar *buf, gsiz
 
                for (row = 0; row < height; row += rowsperstrip)
                        {
-                       int rows_to_write, i_row;
+                       int rows_to_write;
+                       int i_row;
 
                        if (lt->abort) {
                                break;
@@ -274,7 +277,8 @@ static gboolean image_loader_tiff_load (gpointer loader, const guchar *buf, gsiz
                         */
                        for (i_row = 0; i_row < rows_to_write / 2; i_row++)
                                {
-                               guchar *top_line, *bottom_line;
+                               guchar *top_line;
+                               guchar *bottom_line;
 
                                top_line = pixels + (row + i_row) * rowstride;
                                bottom_line = pixels + (row + rows_to_write - i_row - 1) * rowstride;
index 3756f12..d95609a 100644 (file)
@@ -47,7 +47,8 @@ static gboolean image_loader_webp_load(gpointer loader, const guchar *buf, gsize
 {
        auto *ld = (ImageLoaderWEBP *) loader;
        guint8* data;
-       gint width, height;
+       gint width;
+       gint height;
        gboolean res_info;
        WebPBitstreamFeatures features;
        VP8StatusCode status_code;
index 1dc9182..e1ffdec 100644 (file)
@@ -65,9 +65,17 @@ static gboolean image_loader_zxscr_load(gpointer loader, const guchar *buf, gsiz
 {
        auto ld = static_cast<ImageLoaderZXSCR *>(loader);
        guint8 *pixels;
-       gint width, height;
-       gint row, col, mrow, pxs, i;
-       guint8 attr, bright, ink, paper;
+       gint width;
+       gint height;
+       gint row;
+       gint col;
+       gint mrow;
+       gint pxs;
+       gint i;
+       guint8 attr;
+       guint8 bright;
+       guint8 ink;
+       guint8 paper;
        guint8 *ptr;
 
        if (count != 6144 && count != 6912)
index 22bca7e..646d87f 100644 (file)
@@ -298,7 +298,10 @@ static gboolean image_loader_emit_area_ready_cb(gpointer data)
 {
        auto par = static_cast<ImageLoaderAreaParam *>(data);
        ImageLoader *il = par->il;
-       guint x, y, w, h;
+       guint x;
+       guint y;
+       guint w;
+       guint h;
        g_mutex_lock(il->data_mutex);
        il->area_param_list = g_list_remove(il->area_param_list, par);
        x = par->x;
@@ -336,7 +339,8 @@ static gboolean image_loader_emit_percent_cb(gpointer data)
 
 static gboolean image_loader_emit_size_cb(gpointer data)
 {
-       gint width, height;
+       gint width;
+       gint height;
        auto il = static_cast<ImageLoader *>(data);
        g_mutex_lock(il->data_mutex);
        width = il->actual_width;
@@ -518,7 +522,8 @@ static void image_loader_area_prepared_cb(gpointer loader, gpointer data)
        auto il = static_cast<ImageLoader *>(data);
        GdkPixbuf *pb;
        guchar *pix;
-       size_t h, rs;
+       size_t h;
+       size_t rs;
 
        /* a workaround for
           https://bugzilla.gnome.org/show_bug.cgi?id=547669
@@ -584,7 +589,8 @@ static void image_loader_size_cb(gpointer loader,
 
        g_mutex_lock(il->data_mutex);
 
-       gint nw, nh;
+       gint nw;
+       gint nh;
        if (width > il->requested_width || height > il->requested_height)
                {
 
@@ -1156,7 +1162,8 @@ void image_loader_delay_area_ready(ImageLoader *il, gboolean enable)
        if (!enable)
                {
                /* send delayed */
-               GList *list, *work;
+               GList *list;
+               GList *work;
                list = g_list_reverse(il->area_param_delayed_list);
                il->area_param_delayed_list = nullptr;
                g_mutex_unlock(il->data_mutex);
index abe1381..3525aea 100644 (file)
@@ -228,7 +228,8 @@ void image_osd_toggle(ImageWindow *imd)
 static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
 {
        GdkPixbuf *pixbuf = nullptr;
-       gint width, height;
+       gint width;
+       gint height;
        PangoLayout *layout;
        const gchar *name;
        gchar *text;
@@ -243,7 +244,8 @@ static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
        name = image_get_name(imd);
        if (name)
                {
-               gint n, t;
+               gint n;
+               gint t;
                CollectionData *cd;
                CollectInfo *info;
                GHashTable *vars;
@@ -310,7 +312,8 @@ static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
 
                if (!imd->unknown)
                        {
-                       gint w, h;
+                       gint w;
+                       gint h;
                        GdkPixbuf *load_pixbuf = image_loader_get_pixbuf(imd->il);
 
                        if (imd->delay_flip &&
@@ -868,7 +871,8 @@ Histogram *image_osd_get_histogram(ImageWindow *imd)
 
 void image_osd_copy_status(ImageWindow *src, ImageWindow *dest)
 {
-       Histogram *h_src, *h_dest;
+       Histogram *h_src;
+       Histogram *h_dest;
        image_osd_set(dest, image_osd_get(src));
 
        h_src = image_osd_get_histogram(src);
index e668261..ea4f8f6 100644 (file)
@@ -141,7 +141,8 @@ static void image_press_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer d
 {
        auto imd = static_cast<ImageWindow *>(data);
        LayoutWindow *lw;
-       gint x_pixel, y_pixel;
+       gint x_pixel;
+       gint y_pixel;
 
        if(options->draw_rectangle)
                {
@@ -204,12 +205,15 @@ static void image_release_cb(PixbufRenderer *, GdkEventButton *event, gpointer d
 static void image_drag_cb(PixbufRenderer *pr, GdkEventMotion *event, gpointer data)
 {
        auto imd = static_cast<ImageWindow *>(data);
-       gint width, height;
+       gint width;
+       gint height;
        gint rect_width;
        gint rect_height;
        GdkPixbuf *rect_pixbuf;
-       gint x_pixel, y_pixel;
-       gint image_x_pixel, image_y_pixel;
+       gint x_pixel;
+       gint y_pixel;
+       gint image_x_pixel;
+       gint image_y_pixel;
 
        if (options->draw_rectangle)
                {
@@ -1692,7 +1696,8 @@ void image_zoom_set_fill_geometry(ImageWindow *imd, gboolean vertical)
 {
        PixbufRenderer *pr;
        gdouble zoom;
-       gint width, height;
+       gint width;
+       gint height;
 
        pr = reinterpret_cast<PixbufRenderer *>(imd->pr);
 
index c50a0e8..d53d49c 100644 (file)
@@ -902,7 +902,8 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat
        ViewWindow *vw;
        GtkAllocation req_size;
        GdkGeometry geometry;
-       gint w, h;
+       gint w;
+       gint h;
 
        if (!fd && !list && (!cd || !info)) return nullptr;
 
index 51a56bd..ab6b651 100644 (file)
@@ -104,7 +104,9 @@ static void layout_config_from_data(gint style, gint oa, gint ob, gint oc,
 void layout_config_parse(gint style, const gchar *order,
                         LayoutLocation *a, LayoutLocation *b, LayoutLocation *c)
 {
-       gint na, nb, nc;
+       gint na;
+       gint nb;
+       gint nc;
 
        layout_config_order_from_text(order, &na, &nb, &nc);
        layout_config_from_data(style, na, nb, nc, a, b, c);
@@ -161,7 +163,9 @@ void layout_config_set(GtkWidget *widget, gint style, const gchar *order)
 {
        LayoutConfig *lc;
        GtkWidget *button;
-       gint a, b, c;
+       gint a;
+       gint b;
+       gint c;
 
        lc = static_cast<LayoutConfig *>(g_object_get_data(G_OBJECT(widget), "layout_config"));
 
@@ -211,8 +215,10 @@ static void layout_config_table_button(GtkWidget *table, LayoutLocation l, const
 {
        GtkWidget *button;
 
-       gint x1, y1;
-       gint x2, y2;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
 
        x1 = 0;
        y1 = 0;
index 0c98ab5..1b8eb34 100644 (file)
@@ -2011,7 +2011,8 @@ static void layout_image_drag_cb(ImageWindow *imd, GdkEventMotion *event, gdoubl
 {
        gint i;
        auto lw = static_cast<LayoutWindow *>(data);
-       gdouble sx, sy;
+       gdouble sx;
+       gdouble sy;
 
        if (lw->full_screen && lw->image != lw->full_screen->imd &&
            imd != lw->full_screen->imd)
@@ -2121,8 +2122,10 @@ static gint num_length(gint num)
 void layout_status_update_pixel_cb(PixbufRenderer *pr, gpointer data)
 {
        auto lw = static_cast<LayoutWindow *>(data);
-       gint x_pixel, y_pixel;
-       gint width, height;
+       gint x_pixel;
+       gint y_pixel;
+       gint width;
+       gint height;
        gchar *text;
        PangoAttrList *attrs;
 
@@ -2136,7 +2139,9 @@ void layout_status_update_pixel_cb(PixbufRenderer *pr, gpointer data)
 
        if(x_pixel >= 0 && y_pixel >= 0)
                {
-               gint r_mouse, g_mouse, b_mouse;
+               gint r_mouse;
+               gint g_mouse;
+               gint b_mouse;
 
                pixbuf_renderer_get_pixel_colors(pr, x_pixel, y_pixel,
                                                 &r_mouse, &g_mouse, &b_mouse);
@@ -2307,7 +2312,8 @@ static void layout_image_setup_split_common(LayoutWindow *lw, gint n)
 
                        if (img_fd)
                                {
-                               gdouble sx, sy;
+                               gdouble sx;
+                               gdouble sy;
                                image_change_fd(lw->split_images[i], img_fd, zoom);
                                image_get_scroll_center(lw->image, &sx, &sy);
                                image_set_scroll_center(lw->split_images[i], sx, sy);
index 1ebbb2e..36a6ecf 100644 (file)
@@ -1359,10 +1359,14 @@ static void layout_menu_foreach_func(
                                        GdkModifierType accel_mods,
                                        gboolean)
 {
-       gchar *path, *name;
-       gchar *key_name, *menu_name;
-       gchar **subset_lt_arr, **subset_gt_arr;
-       gchar *subset_lt, *converted_name;
+       gchar *path;
+       gchar *name;
+       gchar *key_name;
+       gchar *menu_name;
+       gchar **subset_lt_arr;
+       gchar **subset_gt_arr;
+       gchar *subset_lt;
+       gchar *converted_name;
        auto array = static_cast<GPtrArray *>(data);
 
        path = g_strescape(accel_path, nullptr);
@@ -1400,7 +1404,8 @@ static void layout_menu_kbd_map_cb(GtkAction *, gpointer)
        char * tmp_file;
        GError *error = nullptr;
        GIOChannel *channel;
-       char **pre_key, **post_key;
+       char **pre_key;
+       char **post_key;
        const char *key_name;
        char *converted_line;
        int keymap_index;
@@ -2243,7 +2248,8 @@ static void layout_menu_new_window_update(LayoutWindow *lw)
        GtkWidget *menu;
        GtkWidget *sub_menu;
        GtkWidget *item;
-       GList *children, *iter;
+       GList *children;
+       GList *iter;
        gint n;
        GList *list = nullptr;
        gint i = 0;
@@ -2395,7 +2401,8 @@ static void layout_menu_windows_menu_cb(GtkWidget *, gpointer data)
        GtkWidget *menu;
        GtkWidget *sub_menu;
        gchar *menu_label;
-       GList *children, *iter;
+       GList *children;
+       GList *iter;
        gint i;
 
        menu = gtk_ui_manager_get_widget(lw->ui_manager, options->hamburger_menu ? "/MainMenu/OpenMenu/WindowsMenu/" : "/MainMenu/WindowsMenu/");
@@ -2426,7 +2433,8 @@ static void layout_menu_view_menu_cb(GtkWidget *, gpointer data)
        GtkWidget *menu;
        GtkWidget *sub_menu;
        gchar *menu_label;
-       GList *children, *iter;
+       GList *children;
+       GList *iter;
        gint i;
        FileData *fd;
 
@@ -2980,7 +2988,9 @@ static GList *layout_actions_editor_menu_path(EditorDescription *editor)
 
 static void layout_actions_editor_add(GString *desc, GList *path, GList *old_path)
 {
-       gint to_open, to_close, i;
+       gint to_open;
+       gint to_close;
+       gint i;
        while (path && old_path && strcmp(static_cast<gchar *>(path->data), static_cast<gchar *>(old_path->data)) == 0)
                {
                path = path->next;
index a911a67..b56167d 100644 (file)
@@ -789,7 +789,8 @@ void layout_status_update_image(LayoutWindow *lw)
                        }
                else
                        {
-                       gint width, height;
+                       gint width;
+                       gint height;
                        fd = image_get_fd(lw->image);
                        page_total = fd->page_total;
                        page_num = fd->page_num + 1;
@@ -1624,7 +1625,8 @@ static gboolean layout_tools_delete_cb(GtkWidget *, GdkEventAny *, gpointer data
 static void layout_tools_setup(LayoutWindow *lw, GtkWidget *tools, GtkWidget *files)
 {
        GtkWidget *vbox;
-       GtkWidget *w1, *w2;
+       GtkWidget *w1;
+       GtkWidget *w2;
        gboolean vertical;
        gboolean new_window = FALSE;
 
@@ -1815,7 +1817,9 @@ static void layout_grid_setup(LayoutWindow *lw)
        gint priority_location;
        GtkWidget *h;
        GtkWidget *v;
-       GtkWidget *w1, *w2, *w3;
+       GtkWidget *w1;
+       GtkWidget *w2;
+       GtkWidget *w3;
 
        GtkWidget *image_sb; /* image together with sidebars in utility box */
        GtkWidget *tools;
@@ -1946,7 +1950,9 @@ void layout_style_set(LayoutWindow *lw, gint style, const gchar *order)
 
        if (style != -1)
                {
-               LayoutLocation d, f, i;
+               LayoutLocation d;
+               LayoutLocation f;
+               LayoutLocation i;
 
                layout_config_parse(style, order, &d,  &f, &i);
 
index da957b3..b2a2bb7 100644 (file)
@@ -634,7 +634,8 @@ void log_window_append(const gchar *str, LogType type)
 
        if (options->log_window_lines > 0 && logwindow->lines >= options->log_window_lines)
                {
-               GtkTextIter start, end;
+               GtkTextIter start;
+               GtkTextIter end;
 
                gtk_text_buffer_get_start_iter(buffer, &start);
                end = start;
index 9553a61..85bc458 100644 (file)
@@ -889,7 +889,8 @@ static void gq_accel_map_print(
 {
        GString *gstring = g_string_new(changed ? nullptr : "; ");
        auto ssi = static_cast<SecureSaveInfo *>(data);
-       gchar *tmp, *name;
+       gchar *tmp;
+       gchar *name;
 
        g_string_append(gstring, "(gtk_accel_path \"");
 
index 06f1793..1a6dd1c 100644 (file)
@@ -773,7 +773,9 @@ gdouble metadata_read_GPS_coord(FileData *fd, const gchar *key, gdouble fallback
 {
        gdouble coord;
        gchar *endptr;
-       gdouble deg, min, sec;
+       gdouble deg;
+       gdouble min;
+       gdouble sec;
        gboolean ok = FALSE;
        gchar *string = metadata_read_string(fd, key, METADATA_PLAIN);
        if (!string) return fallback;
@@ -861,7 +863,8 @@ gboolean metadata_write_GPS_coord(FileData *fd, const gchar *key, gdouble value)
        char *coordinate;
        const char *ref;
        gboolean ok = TRUE;
-       char *old_locale, *saved_locale;
+       char *old_locale;
+       char *saved_locale;
 
        param = value;
        if (param < 0)
@@ -1263,7 +1266,9 @@ gboolean keyword_exists(GtkTreeModel *keyword_tree, GtkTreeIter *parent_ptr, Gtk
 void keyword_copy(GtkTreeStore *keyword_tree, GtkTreeIter *to, GtkTreeIter *from)
 {
 
-       gchar *mark, *name, *casefold;
+       gchar *mark;
+       gchar *name;
+       gchar *casefold;
        gboolean is_keyword;
 
        /* do not copy KEYWORD_COLUMN_HIDE_IN, it fully shows the new subtree */
@@ -1722,7 +1727,8 @@ static GtkTreeIter keyword_tree_default_append(GtkTreeStore *keyword_tree, GtkTr
 
 void keyword_tree_new_default()
 {
-       GtkTreeIter i1, i2;
+       GtkTreeIter i1;
+       GtkTreeIter i2;
 
        if (!keyword_tree) keyword_tree_new();
 
index ceba42e..815ee46 100644 (file)
@@ -49,8 +49,10 @@ gchar *utf8_validate_or_convert(const gchar *text)
 
 gint utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive)
 {
-       gchar *s1_key, *s2_key;
-       gchar *s1_t, *s2_t;
+       gchar *s1_key;
+       gchar *s2_key;
+       gchar *s1_t;
+       gchar *s2_t;
        gint ret;
 
        g_assert(g_utf8_validate(s1, -1, nullptr));
index aa70bf1..001249b 100644 (file)
@@ -236,11 +236,16 @@ static gchar *keywords_to_string(FileData *fd)
 
 gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars)
 {
-       gchar delim = '%', imp = '|', sep[] = " - ";
-       gchar *start, *end;
-       guint pos, prev;
+       gchar delim = '%';
+       gchar imp = '|';
+       gchar sep[] = " - ";
+       gchar *start;
+       gchar *end;
+       guint pos;
+       guint prev;
        gboolean want_separator = FALSE;
-       gchar *name, *data;
+       gchar *name;
+       gchar *data;
        GString *osd_info;
        gchar *ret;
 
index 668d91f..4fcb845 100644 (file)
@@ -81,8 +81,16 @@ void pan_calendar_update(PanWindow *pw, PanItem *pi_day)
        PanItem *pi;
        GList *list;
        GList *work;
-       gint x1, y1, x2, y2, x3, y3;
-       gint x, y, w, h;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
+       gint x3;
+       gint y3;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
        gint grid;
        gint column;
 
@@ -203,7 +211,8 @@ void pan_calendar_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *he
 {
        GList *list;
        GList *work;
-       gint x, y;
+       gint x;
+       gint y;
        time_t tc;
        gint count;
        gint day_max;
@@ -335,7 +344,8 @@ void pan_calendar_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *he
                        {
                        FileData *fd;
                        PanItem *pi_day;
-                       gint dx, dy;
+                       gint dx;
+                       gint dy;
                        gint n = 0;
                        gchar fake_path[20];
 
index c61adcf..7c4e740 100644 (file)
 static void pan_flower_size(PanWindow *pw, gint *width, gint *height)
 {
        GList *work;
-       gint x1, y1, x2, y2;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
 
        x1 = 0;
        y1 = 0;
@@ -123,7 +126,8 @@ static void pan_flower_move(FlowerGroup *group, gint x, gint y)
 static void pan_flower_position(FlowerGroup *group, FlowerGroup *parent,
                                                             gint *result_x, gint *result_y)
 {
-       gint x, y;
+       gint x;
+       gint y;
        gint radius;
        gdouble a;
 
@@ -153,7 +157,8 @@ static void pan_flower_position(FlowerGroup *group, FlowerGroup *parent,
 static void pan_flower_build(PanWindow *pw, FlowerGroup *group, FlowerGroup *parent)
 {
        GList *work;
-       gint x, y;
+       gint x;
+       gint y;
 
        if (!group) return;
 
@@ -172,8 +177,14 @@ static void pan_flower_build(PanWindow *pw, FlowerGroup *group, FlowerGroup *par
        if (parent)
                {
                PanItem *pi;
-               gint px, py, gx, gy;
-               gint x1, y1, x2, y2;
+               gint px;
+               gint py;
+               gint gx;
+               gint gy;
+               gint x1;
+               gint y1;
+               gint x2;
+               gint y2;
 
                px = parent->x + parent->width / 2;
                py = parent->y + parent->height / 2;
@@ -454,9 +465,11 @@ static void pan_folder_tree_path(PanWindow *pw, FileData *dir_fd,
 
 void pan_folder_tree_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height)
 {
-       gint x, y;
+       gint x;
+       gint y;
        gint level;
-       gint w, h;
+       gint w;
+       gint h;
 
        level = 0;
        x = PAN_BOX_BORDER;
index 2b27fd6..2839a5d 100644 (file)
@@ -31,7 +31,8 @@ void pan_grid_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height
 {
        GList *list;
        GList *work;
-       gint x, y;
+       gint x;
+       gint y;
        gint grid_size;
        gint next_y;
 
index f25f170..a303b13 100644 (file)
@@ -159,9 +159,13 @@ void pan_item_box_shadow(PanItem *pi, gint offset, gint fade)
 gint pan_item_box_draw(PanWindow *, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *,
                       gint x, gint y, gint width, gint height)
 {
-       gint bw, bh;
+       gint bw;
+       gint bh;
        gint *shadow;
-       gint rx, ry, rw, rh;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
 
        bw = pi->width;
        bh = pi->height;
@@ -301,7 +305,10 @@ void pan_item_tri_border(PanItem *pi, gint borders,
 
 gint pan_item_tri_draw(PanWindow *, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *, gint x, gint y, gint width, gint height)
 {
-       gint rx, ry, rw, rh;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
 
        if (util_clip_region(x, y, width, height,
                             pi->x, pi->y, pi->width, pi->height,
@@ -473,8 +480,14 @@ PanItem *pan_item_thumb_new(PanWindow *pw, FileData *fd, gint x, gint y)
 
 gint pan_item_thumb_draw(PanWindow *pw, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *, gint x, gint y, gint width, gint height)
 {
-       gint tx, ty, tw, th;
-       gint rx, ry, rw, rh;
+       gint tx;
+       gint ty;
+       gint tw;
+       gint th;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
 
        if (pi->pixbuf)
                {
@@ -657,7 +670,10 @@ PanItem *pan_item_image_new(PanWindow *pw, FileData *fd, gint x, gint y, gint w,
 
 gint pan_item_image_draw(PanWindow *, PanItem *pi, GdkPixbuf *pixbuf, PixbufRenderer *, gint x, gint y, gint width, gint height)
 {
-       gint rx, ry, rw, rh;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
 
        if (util_clip_region(x, y, width, height,
                             pi->x, pi->y, pi->width, pi->height,
@@ -904,8 +920,10 @@ PanItem *pan_text_alignment_add(PanTextAlignment *ta, const gchar *label, const
 
 void pan_text_alignment_calc(PanTextAlignment *ta, PanItem *box)
 {
-       gint cw1, cw2;
-       gint x, y;
+       gint cw1;
+       gint cw2;
+       gint x;
+       gint y;
        GList *work1;
        GList *work2;
 
index 29f04c0..2d87e90 100644 (file)
@@ -30,7 +30,8 @@ void pan_timeline_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *he
 {
        GList *list;
        GList *work;
-       gint x, y;
+       gint x;
+       gint y;
        time_t group_start_date;
        gint total;
        gint count;
index d067aee..fa17852 100644 (file)
@@ -340,7 +340,10 @@ static gboolean pan_window_request_tile_cb(PixbufRenderer *pr, gint x, gint y,
 
        for (i = (x / PAN_GRID_SIZE) * PAN_GRID_SIZE; i < x + width; i += PAN_GRID_SIZE)
                {
-               gint rx, ry, rw, rh;
+               gint rx;
+               gint ry;
+               gint rw;
+               gint rh;
 
                if (util_clip_region(x, y, width, height,
                                     i, y, 1, height,
@@ -353,7 +356,10 @@ static gboolean pan_window_request_tile_cb(PixbufRenderer *pr, gint x, gint y,
                }
        for (i = (y / PAN_GRID_SIZE) * PAN_GRID_SIZE; i < y + height; i += PAN_GRID_SIZE)
                {
-               gint rx, ry, rw, rh;
+               gint rx;
+               gint ry;
+               gint rw;
+               gint rh;
 
                if (util_clip_region(x, y, width, height,
                                     x, i, width, 1,
@@ -724,10 +730,13 @@ static void pan_grid_clear(PanWindow *pw)
 static void pan_grid_build(PanWindow *pw, gint width, gint height, gint grid_size)
 {
        GList *work;
-       gint col, row;
-       gint cw, ch;
+       gint col;
+       gint row;
+       gint cw;
+       gint ch;
        gint l;
-       gint i, j;
+       gint i;
+       gint j;
 
        pan_grid_clear(pw);
 
@@ -781,7 +790,10 @@ static void pan_grid_build(PanWindow *pw, gint width, gint height, gint grid_siz
                while (grid)
                        {
                        PanGrid *pg;
-                       gint rx, ry, rw, rh;
+                       gint rx;
+                       gint ry;
+                       gint rw;
+                       gint rh;
 
                        pg = static_cast<PanGrid *>(grid->data);
                        grid = grid->next;
@@ -935,7 +947,10 @@ static GList *pan_layout_intersect_l(GList *list, GList *item_list,
        while (work)
                {
                PanItem *pi;
-               gint rx, ry, rw, rh;
+               gint rx;
+               gint ry;
+               gint rw;
+               gint rh;
 
                pi = static_cast<PanItem *>(work->data);
                work = work->next;
@@ -1393,8 +1408,16 @@ void pan_info_update(PanWindow *pw, PanItem *pi)
        PanItem *pbox;
        PanItem *p;
        gchar *buf;
-       gint x1, y1, x2, y2, x3, y3;
-       gint x, y, w, h;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
+       gint x3;
+       gint y3;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
 
        if (pw->click_pi == pi) return;
        if (pi && !pi->fd) pi = nullptr;
@@ -1464,7 +1487,8 @@ void pan_info_update(PanWindow *pw, PanItem *pi)
 
        if (pw->info_image_size > PAN_IMAGE_SIZE_THUMB_NONE)
                {
-               gint iw, ih;
+               gint iw;
+               gint ih;
                if (image_load_dimensions(pi->fd, &iw, &ih))
                        {
                        gint scale = 25;
@@ -1522,7 +1546,8 @@ static void button_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
        auto pw = static_cast<PanWindow *>(data);
        PanItem *pi = nullptr;
        GtkWidget *menu;
-       gint rx, ry;
+       gint rx;
+       gint ry;
 
        rx = ry = 0;
        if (pr->scale)
@@ -1566,7 +1591,8 @@ static void button_cb(PixbufRenderer *pr, GdkEventButton *event, gpointer data)
 
 static void scroll_cb(PixbufRenderer *pr, GdkEventScroll *event, gpointer)
 {
-       gint w, h;
+       gint w;
+       gint h;
 
        w = pr->vis_width;
        h = pr->vis_height;
@@ -1665,7 +1691,8 @@ static void pan_window_image_scroll_notify_cb(PixbufRenderer *pr, gpointer data)
        auto pw = static_cast<PanWindow *>(data);
        GtkAdjustment *adj;
        GdkRectangle rect;
-       gint width, height;
+       gint width;
+       gint height;
 
        if (pr->scale == 0.0) return;
 
@@ -2309,7 +2336,8 @@ static GtkWidget *pan_popup_menu(PanWindow *pw)
        GtkWidget *menu;
        GtkWidget *submenu;
        GtkWidget *item;
-       gboolean active, video;
+       gboolean active;
+       gboolean video;
        GList *editmenu_fd_list;
        GtkAccelGroup *accel_group;
 
index 7e5d58e..fe262be 100644 (file)
@@ -688,7 +688,8 @@ static gboolean pr_parent_window_resize(PixbufRenderer *pr, gint w, gint h)
 {
        GtkWidget *widget;
        GtkWidget *parent;
-       gint ww, wh;
+       gint ww;
+       gint wh;
        GtkAllocation widget_allocation;
        GtkAllocation parent_allocation;
 
@@ -783,8 +784,10 @@ void pixbuf_renderer_overlay_remove(PixbufRenderer *pr, gint id)
 static gboolean pr_scroller_update_cb(gpointer data)
 {
        auto pr = static_cast<PixbufRenderer *>(data);
-       gint x, y;
-       gint xinc, yinc;
+       gint x;
+       gint y;
+       gint xinc;
+       gint yinc;
 
        /* this was a simple scroll by difference between scroller and mouse position,
         * but all this math results in a smoother result and accounts for a dead zone.
@@ -887,7 +890,8 @@ static void pr_scroller_start(PixbufRenderer *pr, gint x, gint y)
        if (pr->scroller_overlay == -1)
                {
                GdkPixbuf *pixbuf;
-               gint w, h;
+               gint w;
+               gint h;
 
 #ifdef GQ_BUILD
                pixbuf = gdk_pixbuf_new_from_resource(GQ_RESOURCE_PATH_ICONS "/" PIXBUF_INLINE_SCROLLER ".png", nullptr);
@@ -975,7 +979,10 @@ static void pr_source_tile_unset(PixbufRenderer *pr)
 
 static gboolean pr_source_tile_visible(PixbufRenderer *pr, SourceTile *st)
 {
-       gint x1, y1, x2, y2;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
 
        if (!st) return FALSE;
 
@@ -1102,9 +1109,11 @@ static SourceTile *pr_source_tile_find(PixbufRenderer *pr, gint x, gint y)
 
 GList *pr_source_tile_compute_region(PixbufRenderer *pr, gint x, gint y, gint w, gint h, gboolean request)
 {
-       gint x1, y1;
+       gint x1;
+       gint y1;
        GList *list = nullptr;
-       gint sx, sy;
+       gint sx;
+       gint sy;
 
        if (x < 0) x = 0;
        if (y < 0) y = 0;
@@ -1140,7 +1149,10 @@ static void pr_source_tile_changed(PixbufRenderer *pr, gint x, gint y, gint widt
        while (work)
                {
                SourceTile *st;
-               gint rx, ry, rw, rh;
+               gint rx;
+               gint ry;
+               gint rw;
+               gint rh;
 
                st = static_cast<SourceTile *>(work->data);
                work = work->next;
@@ -1545,7 +1557,8 @@ void pr_coords_map_orientation_reverse(gint orientation,
 
 static void pixbuf_renderer_sync_scroll_center(PixbufRenderer *pr)
 {
-       gint src_x, src_y;
+       gint src_x;
+       gint src_y;
        if (!pr->width || !pr->height) return;
 
        /*
@@ -1609,7 +1622,8 @@ static gboolean pr_scroll_clamp(PixbufRenderer *pr)
 
 static gboolean pr_size_clamp(PixbufRenderer *pr)
 {
-       gint old_vw, old_vh;
+       gint old_vw;
+       gint old_vh;
 
        old_vw = pr->vis_width;
        old_vh = pr->vis_height;
@@ -1644,7 +1658,8 @@ static gboolean pr_size_clamp(PixbufRenderer *pr)
 static gboolean pr_zoom_clamp(PixbufRenderer *pr, gdouble zoom,
                              PrZoomFlags flags)
 {
-       gint w, h;
+       gint w;
+       gint h;
        gdouble scale;
        gboolean force = !!(flags & PR_ZOOM_FORCE);
        gboolean new_z = !!(flags & PR_ZOOM_NEW);
@@ -1754,7 +1769,8 @@ static void pr_zoom_sync(PixbufRenderer *pr, gdouble zoom,
                         PrZoomFlags flags, gint px, gint py)
 {
        gdouble old_scale;
-       gint old_cx, old_cy;
+       gint old_cx;
+       gint old_cy;
        gboolean center_point = !!(flags & PR_ZOOM_CENTER);
        gboolean force = !!(flags & PR_ZOOM_FORCE);
        gboolean new_z = !!(flags & PR_ZOOM_NEW);
@@ -1907,7 +1923,8 @@ static void pr_size_sync(PixbufRenderer *pr, gint new_width, gint new_height)
 
                        if (pixbuf_renderer_overlay_get(pr, pr->scroller_overlay, &pixbuf, nullptr, nullptr))
                                {
-                               gint w, h;
+                               gint w;
+                               gint h;
 
                                w = gdk_pixbuf_get_width(pixbuf);
                                h = gdk_pixbuf_get_height(pixbuf);
@@ -1937,8 +1954,10 @@ static void pr_size_cb(GtkWidget *, GtkAllocation *allocation, gpointer data)
 
 void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y)
 {
-       gint old_x, old_y;
-       gint x_off, y_off;
+       gint old_x;
+       gint old_y;
+       gint x_off;
+       gint y_off;
 
        g_return_if_fail(IS_PIXBUF_RENDERER(pr));
 
@@ -1968,8 +1987,10 @@ void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y)
 void pixbuf_renderer_scroll_to_point(PixbufRenderer *pr, gint x, gint y,
                                     gdouble x_align, gdouble y_align)
 {
-       gint px, py;
-       gint ax, ay;
+       gint px;
+       gint py;
+       gint ax;
+       gint ay;
 
        x_align = CLAMP(x_align, 0.0, 1.0);
        y_align = CLAMP(y_align, 0.0, 1.0);
@@ -1993,7 +2014,8 @@ void pixbuf_renderer_get_scroll_center(PixbufRenderer *pr, gdouble *x, gdouble *
 
 void pixbuf_renderer_set_scroll_center(PixbufRenderer *pr, gdouble x, gdouble y)
 {
-       gdouble dst_x, dst_y;
+       gdouble dst_x;
+       gdouble dst_y;
 
        dst_x = x * pr->width  - pr->vis_width  / 2.0 - pr->x_scroll + CLAMP(pr->subpixel_x_scroll, -1.0, 1.0);
        dst_y = y * pr->height - pr->vis_height / 2.0 - pr->y_scroll + CLAMP(pr->subpixel_y_scroll, -1.0, 1.0);
@@ -2019,7 +2041,8 @@ static gboolean pr_mouse_motion_cb(GtkWidget *widget, GdkEventMotion *event, gpo
 
        /* This is a hack, but work far the best, at least for single pointer systems.
         * See https://bugzilla.gnome.org/show_bug.cgi?id=587714 for more. */
-       gint x, y;
+       gint x;
+       gint y;
        seat = gdk_display_get_default_seat(gdk_window_get_display(event->window));
        device = gdk_seat_get_pointer(seat);
 
@@ -2230,11 +2253,16 @@ enum {
 
 static void pr_create_anaglyph_color(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x, gint y, gint w, gint h, guint mode)
 {
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *spi, *dpi;
-       gint i, j;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *spi;
+       guchar *dpi;
+       gint i;
+       gint j;
 
        srs = gdk_pixbuf_get_rowstride(right);
        s_pix = gdk_pixbuf_get_pixels(right);
@@ -2271,11 +2299,16 @@ static void pr_create_anaglyph_color(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x
 
 static void pr_create_anaglyph_gray(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x, gint y, gint w, gint h, guint mode)
 {
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *spi, *dpi;
-       gint i, j;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *spi;
+       guchar *dpi;
+       gint i;
+       gint j;
        const double gc[3] = {0.299, 0.587, 0.114};
 
        srs = gdk_pixbuf_get_rowstride(right);
@@ -2320,11 +2353,17 @@ static void pr_create_anaglyph_gray(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x,
 
 static void pr_create_anaglyph_dubois(GdkPixbuf *pixbuf, GdkPixbuf *right, gint x, gint y, gint w, gint h, guint mode)
 {
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *spi, *dpi;
-       gint i, j, k;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *spi;
+       guchar *dpi;
+       gint i;
+       gint j;
+       gint k;
        double pr_dubois_matrix[3][6];
        static const double pr_dubois_matrix_RC[3][6] = {
                { 0.456,  0.500,  0.176, -0.043, -0.088, -0.002},
@@ -2834,10 +2873,16 @@ gboolean pixbuf_renderer_get_pixel_colors(PixbufRenderer *pr, gint x_pixel, gint
                                           gint *r_mouse, gint *g_mouse, gint *b_mouse)
 {
        GdkPixbuf *pb = pr->pixbuf;
-       gint p_alpha, prs;
-       guchar *p_pix, *pp;
-       gint map_x, map_y, map_w, map_h;
-       size_t xoff, yoff;
+       gint p_alpha;
+       gint prs;
+       guchar *p_pix;
+       guchar *pp;
+       gint map_x;
+       gint map_y;
+       gint map_w;
+       gint map_h;
+       size_t xoff;
+       size_t yoff;
 
        g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
        g_return_val_if_fail(r_mouse != nullptr && g_mouse != nullptr && b_mouse != nullptr, FALSE);
@@ -2880,7 +2925,10 @@ gboolean pixbuf_renderer_get_pixel_colors(PixbufRenderer *pr, gint x_pixel, gint
 
 gboolean pixbuf_renderer_get_mouse_position(PixbufRenderer *pr, gint *x_pixel_return, gint *y_pixel_return)
 {
-       gint x_pixel, y_pixel, x_pixel_clamped, y_pixel_clamped;
+       gint x_pixel;
+       gint y_pixel;
+       gint x_pixel_clamped;
+       gint y_pixel_clamped;
 
        g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), FALSE);
        g_return_val_if_fail(x_pixel_return != nullptr && y_pixel_return != nullptr, FALSE);
index 4a140c5..997b31c 100644 (file)
@@ -357,7 +357,8 @@ GdkPixbuf *pixbuf_fallback(FileData *fd, gint requested_width, gint requested_he
 
                if (w > requested_width || h > requested_height)
                        {
-                       gint nw, nh;
+                       gint nw;
+                       gint nh;
 
                        if (pixbuf_scale_aspect(requested_width, requested_height,
                                                          w, h, &nw, &nh))
@@ -411,7 +412,8 @@ static void pixbuf_copy_block_rotate(guchar *src, gint src_row_stride, gint x, g
                                     guchar *dest, gint dest_row_stride, gint w, gint h,
                                     gint bytes_per_pixel, gboolean counter_clockwise)
 {
-       gint i, j;
+       gint i;
+       gint j;
        guchar *sp;
        guchar *dp;
 
@@ -465,16 +467,22 @@ GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gboolean counter_clockwise)
 {
        GdkPixbuf *dest;
        gboolean has_alpha;
-       gint sw, sh, srs;
-       gint dw, dh, drs;
+       gint sw;
+       gint sh;
+       gint srs;
+       gint dw;
+       gint dh;
+       gint drs;
        guchar *s_pix;
        guchar *d_pix;
-       gint i, j;
+       gint i;
+       gint j;
        gint a;
        GdkPixbuf *buffer;
        guchar *b_pix;
        gint brs;
-       gint w, h;
+       gint w;
+       gint h;
 
        if (!src) return nullptr;
 
@@ -502,7 +510,8 @@ GdkPixbuf *pixbuf_copy_rotate_90(GdkPixbuf *src, gboolean counter_clockwise)
                w = MIN(ROTATE_BUFFER_WIDTH, (sh - i));
                for (j = 0; j < sw; j += ROTATE_BUFFER_HEIGHT)
                        {
-                       gint x, y;
+                       gint x;
+                       gint y;
 
                        h = MIN(ROTATE_BUFFER_HEIGHT, (sw - j));
                        pixbuf_copy_block_rotate(s_pix, srs, j, i,
@@ -563,13 +572,16 @@ GdkPixbuf *pixbuf_copy_mirror(GdkPixbuf *src, gboolean mirror, gboolean flip)
 {
        GdkPixbuf *dest;
        gboolean has_alpha;
-       gint w, h, srs;
+       gint w;
+       gint h;
+       gint srs;
        gint drs;
        guchar *s_pix;
        guchar *d_pix;
        guchar *sp;
        guchar *dp;
-       gint i, j;
+       gint i;
+       gint j;
        gint a;
 
        if (!src) return nullptr;
@@ -688,10 +700,13 @@ void pixbuf_draw_rect_fill(GdkPixbuf *pb,
                           gint r, gint g, gint b, gint a)
 {
        gboolean has_alpha;
-       gint pw, ph, prs;
+       gint pw;
+       gint ph;
+       gint prs;
        guchar *p_pix;
        guchar *pp;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!pb) return;
 
@@ -744,10 +759,13 @@ void pixbuf_set_rect_fill(GdkPixbuf *pb,
                          gint r, gint g, gint b, gint a)
 {
        gboolean has_alpha;
-       gint pw, ph, prs;
+       gint pw;
+       gint ph;
+       gint prs;
        guchar *p_pix;
        guchar *pp;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!pb) return;
 
@@ -822,18 +840,23 @@ static void pixbuf_copy_font(GdkPixbuf *src, gint sx, gint sy,
                             gint w, gint h,
                             guint8 r, guint8 g, guint8 b, guint8 a)
 {
-       gint sw, sh, srs;
+       gint sw;
+       gint sh;
+       gint srs;
        gboolean s_alpha;
        gint s_step;
        guchar *s_pix;
-       gint dw, dh, drs;
+       gint dw;
+       gint dh;
+       gint drs;
        gboolean d_alpha;
        gint d_step;
        guchar *d_pix;
 
        guchar *sp;
        guchar *dp;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!src || !dest) return;
 
@@ -900,9 +923,12 @@ void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *,
                        guint8 r, guint8 g, guint8 b, guint8 a)
 {
        GdkPixbuf *buffer;
-       gint w, h;
-       gint sx, sy;
-       gint dw, dh;
+       gint w;
+       gint h;
+       gint sx;
+       gint sy;
+       gint dw;
+       gint dh;
        cairo_surface_t *source;
        cairo_t *cr;
 
@@ -968,7 +994,10 @@ void pixbuf_draw_layout(GdkPixbuf *pixbuf, PangoLayout *layout, GtkWidget *,
 void util_clip_triangle(gint x1, gint y1, gint x2, gint y2, gint x3, gint y3,
                        gint *rx, gint *ry, gint *rw, gint *rh)
 {
-       gint tx, ty, tw, th;
+       gint tx;
+       gint ty;
+       gint tw;
+       gint th;
 
        tx = MIN(x1, x2);
        tx = MIN(tx, x3);
@@ -991,17 +1020,30 @@ void pixbuf_draw_triangle(GdkPixbuf *pb,
                          guint8 r, guint8 g, guint8 b, guint8 a)
 {
        gboolean has_alpha;
-       gint pw, ph, prs;
-       gint rx, ry, rw, rh;
-       gint tx, ty, tw, th;
-       gint fx1, fy1;
-       gint fx2, fy2;
-       gint fw, fh;
+       gint pw;
+       gint ph;
+       gint prs;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
+       gint tx;
+       gint ty;
+       gint tw;
+       gint th;
+       gint fx1;
+       gint fy1;
+       gint fx2;
+       gint fy2;
+       gint fw;
+       gint fh;
        guchar *p_pix;
        guchar *pp;
        gint p_step;
-       gdouble slope1, slope2;
-       gint slope1_x, slope1_y;
+       gdouble slope1;
+       gdouble slope2;
+       gint slope1_x;
+       gint slope1_y;
        gint y;
        gint t;
        gboolean middle = FALSE;
@@ -1055,7 +1097,8 @@ void pixbuf_draw_triangle(GdkPixbuf *pb,
 
        for (y = fy1; y < fy2; y++)
                {
-               gint xa, xb;
+               gint xa;
+               gint xb;
 
                if (!middle && y > y2)
                        {
@@ -1203,16 +1246,29 @@ void pixbuf_draw_line(GdkPixbuf *pb,
                      guint8 r, guint8 g, guint8 b, guint8 a)
 {
        gboolean has_alpha;
-       gint pw, ph, prs;
-       gint rx, ry, rw, rh;
-       gdouble rx1, ry1, rx2, ry2;
+       gint pw;
+       gint ph;
+       gint prs;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
+       gdouble rx1;
+       gdouble ry1;
+       gdouble rx2;
+       gdouble ry2;
        guchar *p_pix;
        guchar *pp;
        gint p_step;
        gdouble slope;
-       gdouble x, y;
-       gint px, py;
-       gint cx1, cy1, cx2, cy2;
+       gdouble x;
+       gdouble y;
+       gint px;
+       gint py;
+       gint cx1;
+       gint cy1;
+       gint cx2;
+       gint cy2;
 
        if (!pb) return;
 
@@ -1307,7 +1363,8 @@ static void pixbuf_draw_fade_linear(guchar *p_pix, gint prs, gboolean has_alpha,
        guchar *pp;
        gint p_step;
        guint8 n = a;
-       gint i, j;
+       gint i;
+       gint j;
 
        p_step = (has_alpha) ? 4 : 3;
        for (j = y1; j < y2; j++)
@@ -1335,7 +1392,8 @@ static void pixbuf_draw_fade_radius(guchar *p_pix, gint prs, gboolean has_alpha,
 {
        guchar *pp;
        gint p_step;
-       gint i, j;
+       gint i;
+       gint j;
 
        p_step = (has_alpha) ? 4 : 3;
        for (j = y1; j < y2; j++)
@@ -1365,9 +1423,17 @@ void pixbuf_draw_shadow(GdkPixbuf *pb,
                        guint8 r, guint8 g, guint8 b, guint8 a)
 {
        gint has_alpha;
-       gint pw, ph, prs;
-       gint rx, ry, rw, rh;
-       gint fx, fy, fw, fh;
+       gint pw;
+       gint ph;
+       gint prs;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
+       gint fx;
+       gint fy;
+       gint fw;
+       gint fh;
        guchar *p_pix;
 
        if (!pb) return;
@@ -1477,10 +1543,13 @@ void pixbuf_desaturate_rect(GdkPixbuf *pb,
                            gint x, gint y, gint w, gint h)
 {
        gboolean has_alpha;
-       gint pw, ph, prs;
+       gint pw;
+       gint ph;
+       gint prs;
        guchar *p_pix;
        guchar *pp;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!pb) return;
 
@@ -1520,10 +1589,13 @@ void pixbuf_desaturate_rect(GdkPixbuf *pb,
 void pixbuf_highlight_overunderexposed(GdkPixbuf *pb, gint x, gint y, gint w, gint h)
 {
        gboolean has_alpha;
-       gint pw, ph, prs;
+       gint pw;
+       gint ph;
+       gint prs;
        guchar *p_pix;
        guchar *pp;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!pb) return;
 
@@ -1570,10 +1642,13 @@ void pixbuf_ignore_alpha_rect(GdkPixbuf *pb,
                  gint x, gint y, gint w, gint h)
 {
    gboolean has_alpha;
-   gint pw, ph, prs;
+   gint pw;
+   gint ph;
+   gint prs;
    guchar *p_pix;
    guchar *pp;
-   gint i, j;
+   gint i;
+   gint j;
 
    if (!pb) return;
 
index d7225ca..c3ec586 100644 (file)
@@ -175,7 +175,8 @@ static void zoom_increment_cb(GtkWidget *spin, gpointer)
 
 static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer)
 {
-       gint mins_secs_tenths, delay;
+       gint mins_secs_tenths;
+       gint delay;
 
        mins_secs_tenths = c_options->slideshow.delay %
                                                (3600 * SLIDESHOW_SUBSECOND_PRECISION);
@@ -190,7 +191,9 @@ static void slideshow_delay_hours_cb(GtkWidget *spin, gpointer)
 
 static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer)
 {
-       gint hours, secs_tenths, delay;
+       gint hours;
+       gint secs_tenths;
+       gint delay;
 
        hours = c_options->slideshow.delay / (3600 * SLIDESHOW_SUBSECOND_PRECISION);
        secs_tenths = c_options->slideshow.delay % (60 * SLIDESHOW_SUBSECOND_PRECISION);
@@ -205,7 +208,8 @@ static void slideshow_delay_minutes_cb(GtkWidget *spin, gpointer)
 
 static void slideshow_delay_seconds_cb(GtkWidget *spin, gpointer)
 {
-       gint hours_mins, delay;
+       gint hours_mins;
+       gint delay;
 
        hours_mins = c_options->slideshow.delay / (60 * SLIDESHOW_SUBSECOND_PRECISION);
 
@@ -242,7 +246,8 @@ void config_entry_to_option(GtkWidget *entry, gchar **option, gchar *(*func)(con
 
 static gboolean accel_apply_cb(GtkTreeModel *model, GtkTreePath *, GtkTreeIter *iter, gpointer)
 {
-       gchar *accel_path, *accel;
+       gchar *accel_path;
+       gchar *accel;
 
        gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, AE_KEY, &accel, -1);
 
@@ -884,7 +889,8 @@ static void add_thumb_size_menu(GtkWidget *table, gint column, gint row, gchar *
        current = -1;
        for (i = 0; static_cast<guint>(i) < sizeof(thumb_size_list) / sizeof(ThumbSize); i++)
                {
-               gint w, h;
+               gint w;
+               gint h;
                gchar *buf;
 
                w = thumb_size_list[i].w;
@@ -1600,7 +1606,8 @@ static void image_overlay_set_background_color_cb(GtkWidget *widget, gpointer)
 static void accel_store_populate()
 {
        LayoutWindow *lw;
-       GList *groups, *actions;
+       GList *groups;
+       GList *actions;
        GtkAction *action;
        const gchar *accel_path;
        GtkAccelKey key;
@@ -1622,7 +1629,10 @@ static void accel_store_populate()
                        accel_path = gtk_action_get_accel_path(action);
                        if (accel_path && gtk_accel_map_lookup_entry(accel_path, &key))
                                {
-                               gchar *label, *label2, *tooltip, *accel;
+                               gchar *label;
+                               gchar *label2;
+                               gchar *tooltip;
+                               gchar *accel;
                                g_object_get(action,
                                             "tooltip", &tooltip,
                                             "label", &label,
@@ -1693,7 +1703,8 @@ static void accel_store_edited_cb(GtkCellRendererAccel *, gchar *path_string, gu
        GtkTreeIter iter;
        gchar *acc;
        gchar *accel_path;
-       GtkAccelKey old_key, key;
+       GtkAccelKey old_key;
+       GtkAccelKey key;
        GtkTreePath *path = gtk_tree_path_new_from_string(path_string);
 
        gtk_tree_model_get_iter(model, &iter, path);
@@ -1751,7 +1762,8 @@ void accel_clear_selection(GtkTreeModel *, GtkTreePath *, GtkTreeIter *iter, gpo
 void accel_reset_selection(GtkTreeModel *model, GtkTreePath *, GtkTreeIter *iter, gpointer)
 {
        GtkAccelKey key;
-       gchar *accel_path, *accel;
+       gchar *accel_path;
+       gchar *accel;
 
        gtk_tree_model_get(model, iter, AE_ACCEL, &accel_path, -1);
        gtk_accel_map_lookup_entry(accel_path, &key);
@@ -1960,7 +1972,9 @@ static void config_tab_general(GtkWidget *notebook)
        GtkWidget *ct_button;
        GtkWidget *table;
        GtkWidget *spin;
-       gint hours, minutes, remainder;
+       gint hours;
+       gint minutes;
+       gint remainder;
        gdouble seconds;
        GtkWidget *star_rating_entry;
        GString *str;
@@ -3226,7 +3240,8 @@ static void keywords_find_cb(GtkWidget *widget, gpointer)
 
 static void config_tab_keywords_save()
 {
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
        GtkTextBuffer *buffer;
        GList *kw_list = nullptr;
        GList *work;
index 33ffa73..3069241 100644 (file)
@@ -531,7 +531,8 @@ gchar *form_image_text(const gchar *template_string, FileData *fd, PrintWindow *
 
        if (fd->pixbuf)
                {
-               gint w, h;
+               gint w;
+               gint h;
                w = gdk_pixbuf_get_width(fd->pixbuf);
                h = gdk_pixbuf_get_height(fd->pixbuf);
 
@@ -559,8 +560,10 @@ static void draw_page(GtkPrintOperation *, GtkPrintContext *context, gint page_n
        auto pw = static_cast<PrintWindow *>(data);
        FileData *fd;
        cairo_t *cr;
-       gdouble context_width, context_height;
-       gdouble pixbuf_image_width, pixbuf_image_height;
+       gdouble context_width;
+       gdouble context_height;
+       gdouble pixbuf_image_width;
+       gdouble pixbuf_image_height;
        gdouble width_offset;
        gdouble height_offset;
        GdkPixbuf *pixbuf;
@@ -570,15 +573,22 @@ static void draw_page(GtkPrintOperation *, GtkPrintContext *context, gint page_n
        PangoFontDescription *desc;
        GString *image_text = g_string_new(nullptr);
        GString *page_text = g_string_new(nullptr);
-       PangoRectangle ink_rect, logical_rect;
-       gdouble w, h, scale;
-       gdouble image_text_width, image_text_height, page_text_width, page_text_height;
+       PangoRectangle ink_rect;
+       PangoRectangle logical_rect;
+       gdouble w;
+       gdouble h;
+       gdouble scale;
+       gdouble image_text_width;
+       gdouble image_text_height;
+       gdouble page_text_width;
+       gdouble page_text_height;
        gint image_y;
        gint incr_y;
        gdouble pango_height;
        gdouble pango_image_height;
        gdouble pango_page_height;
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
        gchar *tmp;
        gint total;
 
@@ -787,7 +797,8 @@ GObject *option_tab_cb(GtkPrintOperation *, gpointer user_data)
 static void print_pref_store(PrintWindow *pw)
 {
        gchar *tmp;
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
 
        gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(pw->page_text), &start, &end);
        tmp = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(pw->page_text), &start, &end, FALSE);
index 6771a5f..748053d 100644 (file)
@@ -250,7 +250,8 @@ gboolean read_int_option_clamp(const gchar *option, const gchar *label, const gc
 
 void write_int_unit_option(GString *str, gint, const gchar *label, gint n, gint subunits)
 {
-       gint l, r;
+       gint l;
+       gint r;
 
        if (subunits > 0)
                {
@@ -268,8 +269,10 @@ void write_int_unit_option(GString *str, gint, const gchar *label, gint n, gint
 
 gboolean read_int_unit_option(const gchar *option, const gchar *label, const gchar *value, gint *n, gint subunits)
 {
-       gint l, r;
-       gchar *ptr, *buf;
+       gint l;
+       gint r;
+       gchar *ptr;
+       gchar *buf;
 
        if (g_ascii_strcasecmp(option, label) != 0) return FALSE;
        if (!n) return FALSE;
index e13be4b..bfd4072 100644 (file)
@@ -349,7 +349,8 @@ static void sighandler_sigpipe(gint)
 
 static gboolean remote_client_send(RemoteConnection *rc, const gchar *text)
 {
-       struct sigaction new_action, old_action;
+       struct sigaction new_action;
+       struct sigaction old_action;
        gboolean ret = FALSE;
        GError *error = nullptr;
        GIOChannel *channel;
@@ -618,7 +619,10 @@ static void gr_slideshow_stop(const gchar *, GIOChannel *, gpointer)
 
 static void gr_slideshow_delay(const gchar *text, GIOChannel *, gpointer)
 {
-       gdouble t1, t2, t3, n;
+       gdouble t1;
+       gdouble t2;
+       gdouble t3;
+       gdouble n;
        gint res;
 
        res = sscanf(text, "%lf:%lf:%lf", &t1, &t2, &t3);
@@ -745,9 +749,13 @@ static void gr_file_load(const gchar *text, GIOChannel *channel, gpointer data)
 static void gr_pixel_info(const gchar *, GIOChannel *channel, gpointer)
 {
        gchar *pixel_info;
-       gint x_pixel, y_pixel;
-       gint width, height;
-       gint r_mouse, g_mouse, b_mouse;
+       gint x_pixel;
+       gint y_pixel;
+       gint width;
+       gint height;
+       gint r_mouse;
+       gint g_mouse;
+       gint b_mouse;
        PixbufRenderer *pr;
 
        if (!layout_valid(&lw_id)) return;
@@ -790,7 +798,10 @@ static void gr_rectangle(const gchar *, GIOChannel *channel, gpointer)
 {
        gchar *rectangle_info;
        PixbufRenderer *pr;
-       gint x1, y1, x2, y2;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
 
        if (!options->draw_rectangle) return;
        if (!layout_valid(&lw_id)) return;
index e92e7c9..cd8257b 100644 (file)
@@ -187,7 +187,10 @@ static void rt_border_draw(RendererTiles *rt, gint x, gint y, gint w, gint h)
        PixbufRenderer *pr = rt->pr;
        GtkWidget *box;
        GdkWindow *window;
-       gint rx, ry, rw, rh;
+       gint rx;
+       gint ry;
+       gint rw;
+       gint rh;
        cairo_t *cr;
 
        box = GTK_WIDGET(pr);
@@ -408,8 +411,10 @@ static void rt_tile_invalidate_all(RendererTiles *rt)
 
 static void rt_tile_invalidate_region(RendererTiles *rt, gint x, gint y, gint w, gint h)
 {
-       gint x1, x2;
-       gint y1, y2;
+       gint x1;
+       gint x2;
+       gint y1;
+       gint y2;
        GList *work;
 
        x1 = ROUND_DOWN(x, rt->tile_width);
@@ -524,7 +529,10 @@ static void rt_overlay_get_position(RendererTiles *rt, OverlayData *od,
                                    gint *x, gint *y, gint *w, gint *h)
 {
        PixbufRenderer *pr = rt->pr;
-       gint px, py, pw, ph;
+       gint px;
+       gint py;
+       gint pw;
+       gint ph;
 
        pw = gdk_pixbuf_get_width(od->pixbuf);
        ph = gdk_pixbuf_get_height(od->pixbuf);
@@ -546,7 +554,10 @@ static void rt_overlay_get_position(RendererTiles *rt, OverlayData *od,
 static void rt_overlay_init_window(RendererTiles *rt, OverlayData *od)
 {
        PixbufRenderer *pr = rt->pr;
-       gint px, py, pw, ph;
+       gint px;
+       gint py;
+       gint pw;
+       gint ph;
        GdkWindowAttr attributes;
        gint attributes_mask;
 
@@ -575,8 +586,14 @@ static void rt_overlay_draw(RendererTiles *rt, gint x, gint y, gint w, gint h,
        while (work)
                {
                OverlayData *od;
-               gint px, py, pw, ph;
-               gint rx, ry, rw, rh;
+               gint px;
+               gint py;
+               gint pw;
+               gint ph;
+               gint rx;
+               gint ry;
+               gint rw;
+               gint rh;
 
                od = static_cast<OverlayData *>(work->data);
                work = work->next;
@@ -615,12 +632,14 @@ static void rt_overlay_draw(RendererTiles *rt, gint x, gint y, gint w, gint h,
                        else
                                {
                                /* no ImageTile means region may be larger than our scratch buffer */
-                               gint sx, sy;
+                               gint sx;
+                               gint sy;
 
                                for (sx = rx; sx < rx + rw; sx += rt->tile_width)
                                    for (sy = ry; sy < ry + rh; sy += rt->tile_height)
                                        {
-                                       gint sw, sh;
+                                       gint sw;
+                                       gint sh;
                                        cairo_t *cr;
 
                                        sw = MIN(rx + rw - sx, rt->tile_width);
@@ -649,7 +668,10 @@ static void rt_overlay_draw(RendererTiles *rt, gint x, gint y, gint w, gint h,
 static void rt_overlay_queue_draw(RendererTiles *rt, OverlayData *od, gint x1, gint y1, gint x2, gint y2)
 {
        PixbufRenderer *pr = rt->pr;
-       gint x, y, w, h;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
 
        rt_overlay_get_position(rt, od, &x, &y, &w, &h);
 
@@ -695,7 +717,10 @@ static void rt_overlay_update_sizes(RendererTiles *rt)
 
                if (od->flags & OVL_RELATIVE)
                        {
-                       gint x, y, w, h;
+                       gint x;
+                       gint y;
+                       gint w;
+                       gint h;
 
                        rt_overlay_get_position(rt, od, &x, &y, &w, &h);
                        gdk_window_move_resize(od->window, x + rt->stereo_off_x, y + rt->stereo_off_y, w, h);
@@ -860,11 +885,17 @@ static void rt_tile_rotate_90_clockwise(RendererTiles *rt, GdkPixbuf **tile, gin
 {
        GdkPixbuf *src = *tile;
        GdkPixbuf *dest;
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *ip, *spi, *dpi;
-       gint i, j;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *ip;
+       guchar *spi;
+       guchar *dpi;
+       gint i;
+       gint j;
        gint tw = rt->tile_width * rt->hidpi_scale;
 
        srs = gdk_pixbuf_get_rowstride(src);
@@ -896,11 +927,17 @@ static void rt_tile_rotate_90_counter_clockwise(RendererTiles *rt, GdkPixbuf **t
 {
        GdkPixbuf *src = *tile;
        GdkPixbuf *dest;
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *ip, *spi, *dpi;
-       gint i, j;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *ip;
+       guchar *spi;
+       guchar *dpi;
+       gint i;
+       gint j;
        gint th = rt->tile_height * rt->hidpi_scale;
 
        srs = gdk_pixbuf_get_rowstride(src);
@@ -932,11 +969,16 @@ static void rt_tile_mirror_only(RendererTiles *rt, GdkPixbuf **tile, gint x, gin
 {
        GdkPixbuf *src = *tile;
        GdkPixbuf *dest;
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *spi, *dpi;
-       gint i, j;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *spi;
+       guchar *dpi;
+       gint i;
+       gint j;
 
        gint tw = rt->tile_width * rt->hidpi_scale;
 
@@ -969,11 +1011,15 @@ static void rt_tile_mirror_and_flip(RendererTiles *rt, GdkPixbuf **tile, gint x,
 {
        GdkPixbuf *src = *tile;
        GdkPixbuf *dest;
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
        guchar *dpi;
-       gint i, j;
+       gint i;
+       gint j;
        gint tw = rt->tile_width * rt->hidpi_scale;
        gint th = rt->tile_height * rt->hidpi_scale;
 
@@ -1005,10 +1051,14 @@ static void rt_tile_flip_only(RendererTiles *rt, GdkPixbuf **tile, gint x, gint
 {
        GdkPixbuf *src = *tile;
        GdkPixbuf *dest;
-       gint srs, drs;
-       guchar *s_pix, *d_pix;
-       guchar *sp, *dp;
-       guchar *spi, *dpi;
+       gint srs;
+       gint drs;
+       guchar *s_pix;
+       guchar *d_pix;
+       guchar *sp;
+       guchar *dp;
+       guchar *spi;
+       guchar *dpi;
        gint i;
        gint th = rt->tile_height * rt->hidpi_scale;
 
@@ -1103,7 +1153,10 @@ static gboolean rt_source_tile_render(RendererTiles *rt, ImageTile *it,
                while (work)
                        {
                        SourceTile *st;
-                       gint rx, ry, rw, rh;
+                       gint rx;
+                       gint ry;
+                       gint rw;
+                       gint rh;
 
                        st = static_cast<SourceTile *>(work->data);
                        work = work->next;
@@ -1131,8 +1184,12 @@ static gboolean rt_source_tile_render(RendererTiles *rt, ImageTile *it,
                }
        else
                {
-               gdouble scale_x, scale_y;
-               gint sx, sy, sw, sh;
+               gdouble scale_x;
+               gdouble scale_y;
+               gint sx;
+               gint sy;
+               gint sw;
+               gint sh;
 
                if (pr->image_width == 0 || pr->image_height == 0) return FALSE;
                scale_x = static_cast<gdouble>(pr->width) / pr->image_width;
@@ -1155,8 +1212,14 @@ static gboolean rt_source_tile_render(RendererTiles *rt, ImageTile *it,
                while (work)
                        {
                        SourceTile *st;
-                       gint rx, ry, rw, rh;
-                       gint stx, sty, stw, sth;
+                       gint rx;
+                       gint ry;
+                       gint rw;
+                       gint rh;
+                       gint stx;
+                       gint sty;
+                       gint stw;
+                       gint sth;
 
                        st = static_cast<SourceTile *>(work->data);
                        work = work->next;
@@ -1403,10 +1466,14 @@ static void rt_tile_render(RendererTiles *rt, ImageTile *it,
                }
        else
                {
-               gdouble scale_x, scale_y;
-               gdouble src_x, src_y;
-               gint pb_x, pb_y;
-               gint pb_w, pb_h;
+               gdouble scale_x;
+               gdouble scale_y;
+               gdouble src_x;
+               gdouble src_y;
+               gint pb_x;
+               gint pb_y;
+               gint pb_w;
+               gint pb_h;
 
                if (pr->image_width == 0 || pr->image_height == 0) return;
 
@@ -1771,10 +1838,14 @@ static void rt_queue_merge(QueueData *parent, QueueData *qd)
 static gboolean rt_clamp_to_visible(RendererTiles *rt, gint *x, gint *y, gint *w, gint *h)
 {
        PixbufRenderer *pr = rt->pr;
-       gint nx, ny;
-       gint nw, nh;
-       gint vx, vy;
-       gint vw, vh;
+       gint nx;
+       gint ny;
+       gint nw;
+       gint nh;
+       gint vx;
+       gint vy;
+       gint vw;
+       gint vh;
 
        vw = pr->vis_width;
        vh = pr->vis_height;
@@ -1804,9 +1875,12 @@ static gboolean rt_queue_to_tiles(RendererTiles *rt, gint x, gint y, gint w, gin
                                  gboolean new_data, gboolean only_existing)
 {
        PixbufRenderer *pr = rt->pr;
-       gint i, j;
-       gint x1, x2;
-       gint y1, y2;
+       gint i;
+       gint j;
+       gint x1;
+       gint x2;
+       gint y1;
+       gint y2;
 
        if (clamp && !rt_clamp_to_visible(rt, &x, &y, &w, &h)) return FALSE;
 
@@ -1888,7 +1962,8 @@ static void rt_queue(RendererTiles *rt, gint x, gint y, gint w, gint h,
                     gboolean new_data, gboolean only_existing)
 {
        PixbufRenderer *pr = rt->pr;
-       gint nx, ny;
+       gint nx;
+       gint ny;
 
        rt_sync_scroll(rt);
 
@@ -1931,8 +2006,10 @@ static void rt_scroll(void *renderer, gint x_off, gint y_off)
                return;
                }
 
-               gint x1, y1;
-               gint x2, y2;
+               gint x1;
+               gint y1;
+               gint x2;
+               gint y2;
                cairo_t *cr;
                cairo_surface_t *surface;
 
@@ -1998,7 +2075,14 @@ static void renderer_area_changed(void *renderer, gint src_x, gint src_y, gint s
 {
        auto rt = static_cast<RendererTiles *>(renderer);
        PixbufRenderer *pr = rt->pr;
-       gint x, y, width, height,  x1, y1, x2, y2;
+       gint x;
+       gint y;
+       gint width;
+       gint height;
+       gint x1;
+       gint y1;
+       gint x2;
+       gint y2;
 
        gint orientation = rt_get_orientation(rt);
        pr_coords_map_orientation_reverse(orientation,
@@ -2208,7 +2292,10 @@ static gboolean rt_draw_cb(GtkWidget *, cairo_t *cr, gpointer data)
        while (work)
                {
                od = static_cast<OverlayData *>(work->data);
-               gint px, py, pw, ph;
+               gint px;
+               gint py;
+               gint pw;
+               gint ph;
                pw = gdk_pixbuf_get_width(od->pixbuf);
                ph = gdk_pixbuf_get_height(od->pixbuf);
                px = od->x;
index ad3ae9b..029bca1 100644 (file)
@@ -44,7 +44,8 @@ struct SarData
 static gint sort_iter_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer)
 {
        gint ret = 0;
-       gchar *label1, *label2;
+       gchar *label1;
+       gchar *label2;
 
        gtk_tree_model_get(model, a, SAR_LABEL, &label1, -1);
        gtk_tree_model_get(model, b, SAR_LABEL, &label2, -1);
@@ -73,14 +74,17 @@ static gint sort_iter_compare_func (GtkTreeModel *model, GtkTreeIter *a, GtkTree
 
 static void command_store_populate(SarData* sar)
 {
-       GList *groups, *actions;
+       GList *groups;
+       GList *actions;
        GtkAction *action;
        const gchar *accel_path;
        GtkAccelKey key;
        GtkTreeIter iter;
        GtkTreeSortable *sortable;
-       gchar *label, *tooltip;
-       gchar *label2, *tooltip2;
+       gchar *label;
+       gchar *tooltip;
+       gchar *label2;
+       gchar *tooltip2;
        GString *new_command;
        gchar *existing_command;
        gboolean iter_found;
index 08400f9..6cc8b97 100644 (file)
@@ -1551,7 +1551,8 @@ static void search_gps_dnd_received_cb(GtkWidget *, GdkDragContext *,
 {
        auto sd = static_cast<SearchData *>(data);
        GList *list;
-       gdouble latitude, longitude;
+       gdouble latitude;
+       gdouble longitude;
        FileData *fd;
 
        if (info == TARGET_URI_LIST)
@@ -2355,7 +2356,10 @@ static gboolean search_file_next(SearchData *sd)
                #define MILES_EARTH_RADIUS 3959
                #define NAUTICAL_MILES_EARTH_RADIUS 3440
 
-               gdouble latitude, longitude, range, conversion;
+               gdouble latitude;
+               gdouble longitude;
+               gdouble range;
+               gdouble conversion;
 
                if (g_strcmp0(gtk_combo_box_text_get_active_text(
                                                GTK_COMBO_BOX_TEXT(sd->units_gps)), _("km")) == 0)
index 62a39ae..b174c43 100644 (file)
@@ -104,7 +104,9 @@ static void image_sim_channel_equal(guint8 *pix, gint len)
 
 static void image_sim_channel_norm(guint8 *pix, gint len)
 {
-       guint8 l, h, delta;
+       guint8 l;
+       guint8 h;
+       guint8 delta;
        gint i;
        gdouble scale;
 
@@ -167,7 +169,8 @@ gint mround(gdouble x)
 
 void image_sim_fill_data(ImageSimilarityData *sd, GdkPixbuf *pixbuf)
 {
-       gint w, h;
+       gint w;
+       gint h;
        gint rs;
        guchar *pix;
        gboolean has_alpha;
@@ -176,9 +179,13 @@ void image_sim_fill_data(ImageSimilarityData *sd, GdkPixbuf *pixbuf)
        guchar *p;
        gint i;
        gint j;
-       gint x_inc, y_inc, xy_inc;
-       gint xs, ys;
-       gint w_left, h_left;
+       gint x_inc;
+       gint y_inc;
+       gint xy_inc;
+       gint xs;
+       gint ys;
+       gint w_left;
+       gint h_left;
 
        gboolean x_small = FALSE;       /* if less than 32 w or h, set TRUE */
        gboolean y_small = FALSE;
@@ -219,8 +226,11 @@ void image_sim_fill_data(ImageSimilarityData *sd, GdkPixbuf *pixbuf)
                w_left = w;
                for (xs = 0; xs < 32; xs++)
                        {
-                       gint x, y;
-                       gint r, g, b;
+                       gint x;
+                       gint y;
+                       gint r;
+                       gint g;
+                       gint b;
                        gint t;
                        guchar *xpos;
 
@@ -289,7 +299,9 @@ static gdouble alternate_image_sim_compare_fast(ImageSimilarityData *a, ImageSim
                {
                for (i = j; i < j + 32; i++)
                        {
-                       gint cr, cg, cb;
+                       gint cr;
+                       gint cg;
+                       gint cb;
                        gint cd;
 
                        cr = abs(a->avg_r[i] - b->avg_r[i]);
@@ -310,8 +322,12 @@ static gdouble alternate_image_sim_compare_fast(ImageSimilarityData *a, ImageSim
 gdouble image_sim_compare_transfo(ImageSimilarityData *a, ImageSimilarityData *b, gchar transfo)
 {
        gint sim;
-       gint i1, i2, *i;
-       gint j1, j2, *j;
+       gint i1;
+       gint i2;
+       gint *i;
+       gint j1;
+       gint j2;
+       gint *j;
 
        if (!a || !b || !a->filled || !b->filled) return 0.0;
 
@@ -338,7 +354,8 @@ gdouble image_sim_compare(ImageSimilarityData *a, ImageSimilarityData *b)
        gint max_t = (options->rot_invariant_sim ? 8 : 1);
 
        gint t;
-       gdouble score, max_score = 0;
+       gdouble score;
+       gdouble max_score = 0;
 
        for(t = 0; t < max_t; t++)
        {
@@ -358,8 +375,12 @@ generate all possible isometric transformations
 gdouble image_sim_compare_fast_transfo(ImageSimilarityData *a, ImageSimilarityData *b, gdouble min, gchar transfo)
 {
        gint sim;
-       gint i1, i2, *i;
-       gint j1, j2, *j;
+       gint i1;
+       gint i2;
+       gint *i;
+       gint j1;
+       gint j2;
+       gint *j;
 
        if (options->alternate_similarity_algorithm.enabled)
                {
@@ -397,7 +418,8 @@ gdouble image_sim_compare_fast(ImageSimilarityData *a, ImageSimilarityData *b, g
        gint max_t = (options->rot_invariant_sim ? 8 : 1);
 
        gint t;
-       gdouble score, max_score = 0;
+       gdouble score;
+       gdouble max_score = 0;
 
        for(t = 0; t < max_t; t++)
        {
index a78212e..e9f9c2c 100644 (file)
@@ -167,7 +167,8 @@ static gchar *thumb_std_cache_path(const gchar *path, const gchar *uri, gboolean
 static gchar *thumb_loader_std_cache_path(ThumbLoaderStd *tl, gboolean local, GdkPixbuf *pixbuf, gboolean fail)
 {
        const gchar *folder;
-       gint w, h;
+       gint w;
+       gint h;
 
        if (!tl->fd || !tl->thumb_uri) return nullptr;
 
@@ -251,7 +252,8 @@ static gboolean thumb_loader_std_validate(ThumbLoaderStd *tl, GdkPixbuf *pixbuf)
        const gchar *uri;
        const gchar *mtime_str;
        time_t mtime;
-       gint w, h;
+       gint w;
+       gint h;
 
        if (!pixbuf) return FALSE;
 
@@ -391,7 +393,8 @@ void thumb_loader_std_calibrate_pixbuf(FileData *fd, GdkPixbuf *pixbuf) {
        const gchar *input_file = nullptr;
        guchar *profile = nullptr;
        guint profile_len;
-       gint sw, sh;
+       gint sw;
+       gint sh;
 
        if (!options->thumbnails.use_color_management)
                {
@@ -493,7 +496,8 @@ static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf,
        GdkPixbuf *pixbuf_thumb = nullptr;
        GdkPixbuf *result;
        GdkPixbuf *rotated = nullptr;
-       gint sw, sh;
+       gint sw;
+       gint sh;
 
 
        if (!tl->cache_hit && options->image.exif_rotate_enable)
@@ -524,7 +528,8 @@ static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf,
                {
                if (!tl->cache_hit)
                        {
-                       gint cache_w, cache_h;
+                       gint cache_w;
+                       gint cache_h;
 
                        if (tl->requested_width > THUMB_SIZE_NORMAL || tl->requested_height > THUMB_SIZE_NORMAL)
                                {
@@ -537,7 +542,8 @@ static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf,
 
                        if (sw > cache_w || sh > cache_h || shrunk)
                                {
-                               gint thumb_w, thumb_h;
+                               gint thumb_w;
+                               gint thumb_h;
                                struct stat st;
 
                                if (pixbuf_scale_aspect(cache_w, cache_h, sw, sh,
@@ -586,7 +592,8 @@ static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf,
                }
        else
                {
-               gint thumb_w, thumb_h;
+               gint thumb_w;
+               gint thumb_h;
 
                if (pixbuf_thumb)
                        {
index 061d492..7afca82 100644 (file)
@@ -131,7 +131,8 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
 {
        auto tl = static_cast<ThumbLoader *>(data);
        GdkPixbuf *pixbuf;
-       gint pw, ph;
+       gint pw;
+       gint ph;
        gint save;
        GdkPixbuf *rotated = nullptr;
 
@@ -200,7 +201,8 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data)
 
        if (pw > tl->max_w || ph > tl->max_h)
                {
-               gint w, h;
+               gint w;
+               gint h;
 
                if ((static_cast<gdouble>(tl->max_w) / pw) < (static_cast<gdouble>(tl->max_h) / ph))
                        {
@@ -538,7 +540,9 @@ static guchar *load_xv_thumbnail(gchar *filename, gint *widthp, gint *heightp)
        if (fgets(buffer, XV_BUFFER, file) != nullptr
            && strncmp(buffer, "P7 332", 6) == 0)
                {
-               gint width, height, depth;
+               gint width;
+               gint height;
+               gint depth;
 
                while (fgets(buffer, XV_BUFFER, file) && buffer[0] == '#') /* do_nothing() */;
 
@@ -567,7 +571,8 @@ static void free_rgb_buffer(guchar *pixels, gpointer)
 
 static GdkPixbuf *get_xv_thumbnail(gchar *thumb_filename, gint max_w, gint max_h)
 {
-       gint width, height;
+       gint width;
+       gint height;
        gchar *thumb_name;
        gchar *path;
        gchar *directory;
index 386c96f..16f26ab 100644 (file)
@@ -234,7 +234,8 @@ static void toolbarlist_add_button(const gchar *name, const gchar *label,
                if (pixbuf)
                        {
                        GdkPixbuf *scaled;
-                       gint w, h;
+                       gint w;
+                       gint h;
 
                        w = h = 16;
                        gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &w, &h);
index 1a89354..8e394bb 100644 (file)
@@ -484,7 +484,8 @@ static void bookmark_drag_begin(GtkWidget *button, GdkDragContext *context, gpoi
 {
        GdkPixbuf *pixbuf;
        GdkModifierType mask;
-       gint x, y;
+       gint x;
+       gint y;
        GtkAllocation allocation;
        GdkSeat *seat;
        GdkDevice *device;
@@ -634,7 +635,8 @@ static void bookmark_populate(BookMarkData *bm)
                                        }
                                else
                                        {
-                                       gint w, h;
+                                       gint w;
+                                       gint h;
 
                                        w = h = 16;
                                        gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &w, &h);
@@ -646,7 +648,8 @@ static void bookmark_populate(BookMarkData *bm)
                                if (pixbuf)
                                        {
                                        GdkPixbuf *scaled;
-                                       gint w, h;
+                                       gint w;
+                                       gint h;
 
                                        w = h = 16;
                                        gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &w, &h);
@@ -808,7 +811,8 @@ GtkWidget *bookmark_list_new(const gchar *key,
        scrolled = gq_gtk_scrolled_window_new(nullptr, nullptr);
 
        PangoLayout *layout;
-       gint width, height;
+       gint width;
+       gint height;
 
        layout = gtk_widget_create_pango_layout(GTK_WIDGET(scrolled), "reasonable width");
        pango_layout_get_pixel_size(layout, &width, &height);
index a22b860..7d0fca9 100644 (file)
@@ -484,7 +484,8 @@ gboolean rmdir_utf8(const gchar *s)
 gboolean copy_file_attributes(const gchar *s, const gchar *t, gint perms, gint mtime)
 {
        struct stat st;
-       gchar *sl, *tl;
+       gchar *sl;
+       gchar *tl;
        gboolean ret = FALSE;
 
        if (!s || !t) return FALSE;
@@ -669,7 +670,8 @@ gboolean copy_file(const gchar *s, const gchar *t)
 
 gboolean move_file(const gchar *s, const gchar *t)
 {
-       gchar *sl, *tl;
+       gchar *sl;
+       gchar *tl;
        gboolean ret = TRUE;
 
        if (!s || !t) return FALSE;
@@ -701,7 +703,8 @@ gboolean move_file(const gchar *s, const gchar *t)
 
 gboolean rename_file(const gchar *s, const gchar *t)
 {
-       gchar *sl, *tl;
+       gchar *sl;
+       gchar *tl;
        gboolean ret;
 
        if (!s || !t) return FALSE;
@@ -868,7 +871,8 @@ gchar *remove_extension_from_path(const gchar *path)
 
 void parse_out_relatives(gchar *path)
 {
-       gint s, t;
+       gint s;
+       gint t;
 
        if (!path) return;
 
@@ -912,7 +916,8 @@ gboolean file_in_path(const gchar *name)
 {
        gchar *path;
        gchar *namel;
-       gint p, l;
+       gint p;
+       gint l;
        gboolean ret = FALSE;
 
        if (!name) return FALSE;
index 065264c..f7d16d6 100644 (file)
@@ -49,7 +49,8 @@ static void help_window_scroll(GtkWidget *text, const gchar *key)
        gchar *needle;
        GtkTextBuffer *buffer;
        GtkTextIter iter;
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
 
        if (!text || !key) return;
 
@@ -93,7 +94,8 @@ static void help_window_load_text(GtkWidget *text, const gchar *path)
        gchar s_buf[1024];
        GtkTextBuffer *buffer;
        GtkTextIter iter;
-       GtkTextIter start, end;
+       GtkTextIter start;
+       GtkTextIter end;
 
        if (!text || !path) return;
 
index 18983e8..cf76167 100644 (file)
@@ -429,8 +429,10 @@ GtkWidget *popup_menu_short_lived()
 gboolean popup_menu_position_clamp(GtkMenu *menu, gint *x, gint *y, gint height)
 {
        gboolean adjusted = FALSE;
-       gint w, h;
-       gint xw, xh;
+       gint w;
+       gint h;
+       gint xw;
+       gint xh;
        GtkRequisition requisition;
 
        gtk_widget_get_requisition(GTK_WIDGET(menu), &requisition);
index 5c9bb1c..413115d 100644 (file)
@@ -824,9 +824,12 @@ static gboolean date_selection_popup_release_cb(GtkWidget *, GdkEventButton *, g
 static gboolean date_selection_popup_press_cb(GtkWidget *, GdkEventButton *event, gpointer data)
 {
        auto ds = static_cast<DateSelection *>(data);
-       gint x, y;
-       gint w, h;
-       gint xr, yr;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
+       gint xr;
+       gint yr;
        GdkWindow *window;
 
        xr = static_cast<gint>(event->x_root);
@@ -908,8 +911,10 @@ static void date_selection_doubleclick_cb(GtkWidget *, gpointer data)
 static void date_selection_popup(DateSelection *ds)
 {
        GDateTime *date;
-       gint wx, wy;
-       gint x, y;
+       gint wx;
+       gint wy;
+       gint x;
+       gint y;
        GtkAllocation button_allocation;
        GtkAllocation window_allocation;
 
@@ -1381,7 +1386,8 @@ gchar *text_widget_text_pull(GtkWidget *text_widget)
        if (GTK_IS_TEXT_VIEW(text_widget))
                {
                GtkTextBuffer *buffer;
-               GtkTextIter start, end;
+               GtkTextIter start;
+               GtkTextIter end;
 
                buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_widget));
                gtk_text_buffer_get_bounds(buffer, &start, &end);
@@ -1404,7 +1410,8 @@ gchar *text_widget_text_pull_selected(GtkWidget *text_widget)
        if (GTK_IS_TEXT_VIEW(text_widget))
                {
                GtkTextBuffer *buffer;
-               GtkTextIter start, end;
+               GtkTextIter start;
+               GtkTextIter end;
 
                buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_widget));
                gtk_text_buffer_get_bounds(buffer, &start, &end);
index 79dfde4..5ed56fe 100644 (file)
@@ -644,7 +644,8 @@ static gboolean dest_press_cb(GtkWidget *view, GdkEventButton *event, gpointer d
        auto dd = static_cast<Dest_Data *>(data);
        GtkTreePath *tpath;
        GtkTreeViewColumn *column;
-       gint cell_x, cell_y;
+       gint cell_x;
+       gint cell_y;
        GtkTreeModel *model;
        GtkTreeIter iter;
        GtkTreeSelection *selection;
index c63dcd4..5aac808 100644 (file)
@@ -78,10 +78,13 @@ static gboolean tree_edit_click_cb(GtkWidget *, GdkEventButton *event, gpointer
        auto ted = static_cast<TreeEditData *>(data);
        GdkWindow *window = gtk_widget_get_window(ted->window);
 
-       gint x, y;
-       gint w, h;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
 
-       gint xr, yr;
+       gint xr;
+       gint yr;
 
        xr = static_cast<gint>(event->x_root);
        yr = static_cast<gint>(event->y_root);
@@ -134,9 +137,14 @@ static gboolean tree_edit_by_path_idle_cb(gpointer data)
 {
        auto ted = static_cast<TreeEditData *>(data);
        GdkRectangle rect;
-       gint x, y, w, h;        /* geometry of cell within tree */
-       gint wx, wy;            /* geometry of tree from root window */
-       gint sx, sw;
+       gint x;
+       gint y;
+       gint w;
+       gint h; /* geometry of cell within tree */
+       gint wx;
+       gint wy;                /* geometry of tree from root window */
+       gint sx;
+       gint sw;
 
        gtk_tree_view_get_cell_area(ted->tree, ted->path, ted->column, &rect);
 
@@ -256,8 +264,10 @@ gboolean tree_edit_by_path(GtkTreeView *tree, GtkTreePath *tpath, gint column, c
 gboolean tree_view_get_cell_origin(GtkTreeView *widget, GtkTreePath *tpath, gint column, gboolean text_cell_only,
                                   gint *x, gint *y, gint *width, gint *height)
 {
-       gint x_origin, y_origin;
-       gint x_offset, y_offset;
+       gint x_origin;
+       gint y_origin;
+       gint x_offset;
+       gint y_offset;
        gint header_size;
        GtkTreeViewColumn *tv_column;
        GdkRectangle rect;
@@ -324,7 +334,10 @@ gboolean tree_view_get_cell_origin(GtkTreeView *widget, GtkTreePath *tpath, gint
 void tree_view_get_cell_clamped(GtkTreeView *widget, GtkTreePath *tpath, gint column, gboolean text_cell_only,
                                gint *x, gint *y, gint *width, gint *height)
 {
-       gint wx, wy, ww, wh;
+       gint wx;
+       gint wy;
+       gint ww;
+       gint wh;
        GdkWindow *window;
 
        window = gtk_widget_get_window(GTK_WIDGET(widget));
@@ -352,7 +365,9 @@ void tree_view_get_cell_clamped(GtkTreeView *widget, GtkTreePath *tpath, gint co
 gint tree_view_row_get_visibility(GtkTreeView *widget, GtkTreeIter *iter, gboolean fully_visible)
 {
        GtkTreeModel *store;
-       GtkTreePath *tpath, *start_path, *end_path;
+       GtkTreePath *tpath;
+       GtkTreePath *start_path;
+       GtkTreePath *end_path;
        gint ret = 0;
 
        if (!gtk_tree_view_get_visible_range(widget, &start_path, &end_path)) return -1; /* we will most probably scroll down, needed for tree_view_row_make_visible */
@@ -552,8 +567,10 @@ static gboolean widget_auto_scroll_cb(gpointer data)
 {
        auto sd = static_cast<AutoScrollData *>(data);
        GdkWindow *window;
-       gint x, y;
-       gint w, h;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
        gint amt = 0;
        GdkSeat *seat;
        GdkDevice *device;
index cac1969..b274859 100644 (file)
@@ -108,7 +108,10 @@ void generic_dialog_close(GenericDialog *gd)
        gchar *ident_string;
        gchar *full_title;
        gchar *actual_title;
-       gint x, y, h, w;
+       gint x;
+       gint y;
+       gint h;
+       gint w;
 
        gdk_window_get_root_origin(gtk_widget_get_window (gd->dialog), &x, &y);
        w = gdk_window_get_width(gtk_widget_get_window (gd->dialog));
@@ -384,7 +387,10 @@ static void generic_dialog_setup(GenericDialog *gd,
                                 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data)
 {
        GtkWidget *vbox;
-       gint x, y, w, h;
+       gint x;
+       gint y;
+       gint w;
+       gint h;
        GtkWidget *scrolled;
 
        gd->auto_close = auto_close;
@@ -598,7 +604,9 @@ void appimage_notification_func(gpointer data, gpointer)
        GSocketConnectable *geeqie_github;
        struct tm current_version_date;
        int64_t file_github_date;
-       unsigned int year, month, day;
+       unsigned int year;
+       unsigned int month;
+       unsigned int day;
 
        /* If this is a release version, do not check for updates */
        if (g_strrstr(VERSION, "git"))
index 19a51b6..9e5a910 100644 (file)
@@ -1326,8 +1326,10 @@ static void file_util_rename_preview_update(UtilityData *ud)
 {
        GtkTreeModel *store;
        GtkTreeSelection *selection;
-       GtkTreeIter iter, iter_selected;
-       GtkTreePath *path_iter, *path_selected;
+       GtkTreeIter iter;
+       GtkTreeIter iter_selected;
+       GtkTreePath *path_iter;
+       GtkTreePath *path_selected;
        const gchar *front;
        const gchar *end;
        const gchar *format;
index d30db2b..3695960 100644 (file)
@@ -228,7 +228,8 @@ static void vdtree_dnd_drop_expand(ViewDir *vd)
 static GList *parts_list(const gchar *path)
 {
        GList *list = nullptr;
-       const gchar *strb, *strp;
+       const gchar *strb;
+       const gchar *strp;
        gint l;
 
        strp = path;
@@ -737,7 +738,8 @@ gboolean vdtree_set_fd(ViewDir *vd, FileData *dir_fd)
        if (vd_find_row(vd, fd, &iter))
                {
                GtkTreeModel *store;
-               GtkTreePath *tpath, *old_tpath;
+               GtkTreePath *tpath;
+               GtkTreePath *old_tpath;
                GtkTreeSelection *selection;
 
                store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view));
index 5a7cb13..99fd70e 100644 (file)
@@ -1042,8 +1042,10 @@ static gboolean vd_auto_scroll_idle_cb(gpointer data)
        if (vd->drop_fd)
                {
                GdkWindow *window;
-               gint x, y;
-               gint w, h;
+               gint x;
+               gint y;
+               gint w;
+               gint h;
 
                window = gtk_widget_get_window(vd->view);
                seat = gdk_display_get_default_seat(gdk_window_get_display(window));
@@ -1145,7 +1147,8 @@ void vd_menu_position_cb_unused(GtkMenu *menu, gint *x, gint *y, gboolean *, gpo
        GtkTreeModel *store;
        GtkTreeIter iter;
        GtkTreePath *tpath;
-       gint cw, ch;
+       gint cw;
+       gint ch;
 
        if (!vd_find_row(vd, vd->click_fd, &iter)) return;
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(vd->view));
index d376740..24aae76 100644 (file)
@@ -238,7 +238,8 @@ static gboolean vficon_find_position(ViewFile *vf, FileData *fd, gint *row, gint
 static gboolean vficon_find_iter(ViewFile *vf, FileData *fd, GtkTreeIter *iter, gint *column)
 {
        GtkTreeModel *store;
-       gint row, col;
+       gint row;
+       gint col;
 
        store = gtk_tree_view_get_model(GTK_TREE_VIEW(vf->listview));
        if (!vficon_find_position(vf, fd, &row, &col)) return FALSE;
@@ -337,7 +338,8 @@ static void vficon_mark_toggled_cb(GtkCellRendererToggle *cell, gchar *path_str,
 static void tip_show(ViewFile *vf)
 {
        GtkWidget *label;
-       gint x, y;
+       gint x;
+       gint y;
        GdkDisplay *display;
        GdkSeat *seat;
        GdkDevice *device;
@@ -432,7 +434,8 @@ static void tip_update(ViewFile *vf, FileData *fd)
 
        if (VFICON(vf)->tip_window)
                {
-               gint x, y;
+               gint x;
+               gint y;
 
                gdk_device_get_position(device, nullptr, &x, &y);
 
@@ -749,10 +752,13 @@ static void vficon_select_util(ViewFile *vf, FileData *fd, gboolean select)
 
 static void vficon_select_region_util(ViewFile *vf, FileData *start, FileData *end, gboolean select)
 {
-       gint row1, col1;
-       gint row2, col2;
+       gint row1;
+       gint col1;
+       gint row2;
+       gint col2;
        gint t;
-       gint i, j;
+       gint i;
+       gint j;
 
        if (!vficon_find_position(vf, start, &row1, &col1) ||
            !vficon_find_position(vf, end, &row2, &col2) ) return;
@@ -921,7 +927,8 @@ void vficon_mark_to_selection(ViewFile *vf, gint mark, MarkToSelectionMode mode)
        while (work)
                {
                auto fd = static_cast<FileData *>(work->data);
-               gboolean mark_val, selected;
+               gboolean mark_val;
+               gboolean selected;
 
                g_assert(fd->magick == FD_MAGICK);
 
@@ -1094,7 +1101,8 @@ static void vficon_move_focus(ViewFile *vf, gint row, gint col, gboolean relativ
 static void vficon_set_focus(ViewFile *vf, FileData *fd)
 {
        GtkTreeIter iter;
-       gint row, col;
+       gint row;
+       gint col;
 
        if (g_list_find(vf->list, VFICON(vf)->focus_fd))
                {
@@ -1504,7 +1512,8 @@ static void vficon_populate(ViewFile *vf, gboolean resize, gboolean keep_positio
        GtkTreePath *tpath;
        GList *work;
        FileData *visible_fd = nullptr;
-       gint r, c;
+       gint r;
+       gint c;
        gboolean valid;
        GtkTreeIter iter;
 
@@ -1892,7 +1901,8 @@ gint vficon_index_by_fd(ViewFile *vf, FileData *in_fd)
 static gboolean vficon_refresh_real(ViewFile *vf, gboolean keep_position)
 {
        gboolean ret = TRUE;
-       GList *work, *new_work;
+       GList *work;
+       GList *new_work;
        FileData *first_selected = nullptr;
        GList *new_filelist = nullptr;
        GList *new_fd_list = nullptr;
index f41a4b3..1acb59b 100644 (file)
@@ -419,7 +419,8 @@ void vflist_pop_menu_thumbs_cb(GtkWidget *, gpointer data)
 
 void vflist_star_rating_set(ViewFile *vf, gboolean enable)
 {
-       GList *columns, *work;
+       GList *columns;
+       GList *work;
 
        columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(vf->listview));
 
@@ -1355,7 +1356,8 @@ FileData *vflist_star_next_fd(ViewFile *vf)
 gint vflist_index_by_fd(ViewFile *vf, FileData *fd)
 {
        gint p = 0;
-       GList *work, *work2;
+       GList *work;
+       GList *work2;
 
        work = vf->list;
        while (work)
@@ -1693,7 +1695,8 @@ void vflist_mark_to_selection(ViewFile *vf, gint mark, MarkToSelectionMode mode)
        while (valid)
                {
                FileData *fd;
-               gboolean mark_val, selected;
+               gboolean mark_val;
+               gboolean selected;
                gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, FILE_COLUMN_POINTER, &fd, -1);
 
                mark_val = file_data_get_mark(fd, n);
@@ -2227,7 +2230,8 @@ void vflist_thumb_set(ViewFile *vf, gboolean enable)
 
 void vflist_marks_set(ViewFile *vf, gboolean enable)
 {
-       GList *columns, *work;
+       GList *columns;
+       GList *work;
 
        columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(vf->listview));
 
index 188c2e2..5dfa031 100644 (file)
@@ -263,10 +263,12 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
     for (;;)
     {
       char buffer[PATH_MAX < 1024 ? 1024 : PATH_MAX];
-      uint64_t low, high;
+      uint64_t low;
+      uint64_t high;
       char perms[5];
       uint64_t offset;
-      uint32_t major, minor;
+      uint32_t major;
+      uint32_t minor;
       char path[PATH_MAX];
       uint32_t inode;
 
index ba64b80..51bed5c 100644 (file)
@@ -382,7 +382,8 @@ static void ZDReaderInit(struct Reader *reader, const ZoneDetect *library, uint3
 
 static int ZDReaderGetPoint(struct Reader *reader, int32_t *pointLat, int32_t *pointLon)
 {
-    int32_t diffLat = 0, diffLon = 0;
+    int32_t diffLat = 0;
+    int32_t diffLon = 0;
 
     while(true) {
         if(reader->done > 1) {
@@ -506,7 +507,8 @@ static int ZDFindPolygon(const ZoneDetect *library, uint32_t wantedId, uint32_t*
     uint32_t polygonId = 0;
     uint32_t bboxIndex = library->bboxOffset;
 
-    uint32_t metadataIndex = 0, polygonIndex = 0;
+    uint32_t metadataIndex = 0;
+    uint32_t polygonIndex = 0;
 
     while(bboxIndex < library->metadataOffset) {
         uint64_t polygonIndexDelta;
@@ -550,7 +552,8 @@ static std::vector<int32_t> ZDPolygonToListInternal(const ZoneDetect *library, u
     list.reserve(listLength);
 
     while(true) {
-        int32_t pointLat, pointLon;
+        int32_t pointLat;
+        int32_t pointLon;
         int result = ZDReaderGetPoint(&reader, &pointLat, &pointLon);
         if(result < 0) {
             return {};
@@ -606,8 +609,12 @@ float* ZDPolygonToList(const ZoneDetect *library, uint32_t polygonId, size_t* le
 
 static ZDLookupResult ZDPointInPolygon(const ZoneDetect *library, uint32_t polygonIndex, int32_t latFixedPoint, int32_t lonFixedPoint, uint64_t *distanceSqrMin)
 {
-    int32_t pointLat, pointLon, prevLat = 0, prevLon = 0;
-    int prevQuadrant = 0, winding = 0;
+    int32_t pointLat;
+    int32_t pointLon;
+    int32_t prevLat = 0;
+    int32_t prevLon = 0;
+    int prevQuadrant = 0;
+    int winding = 0;
 
     uint8_t first = 1;
 
@@ -645,8 +652,10 @@ static ZDLookupResult ZDPointInPolygon(const ZoneDetect *library, uint32_t polyg
         }
 
         if(!first) {
-            int windingNeedCompare = 0, lineIsStraight = 0;
-            float a = 0, b = 0;
+            int windingNeedCompare = 0;
+            int lineIsStraight = 0;
+            float a = 0;
+            float b = 0;
 
             /* Calculate winding number */
             if(quadrant == prevQuadrant) {
@@ -696,7 +705,8 @@ static ZDLookupResult ZDPointInPolygon(const ZoneDetect *library, uint32_t polyg
 
             /* Calculate closest point on line (if needed) */
             if(distanceSqrMin) {
-                float closestLon, closestLat;
+                float closestLon;
+                float closestLat;
                 if(!lineIsStraight) {
                     closestLon = (static_cast<float>(lonFixedPoint) + a * static_cast<float>(latFixedPoint) - a * b) / (a * a + 1);
                     closestLat = (a * (static_cast<float>(lonFixedPoint) + a * static_cast<float>(latFixedPoint)) + b) / (a * a + 1);
@@ -712,7 +722,8 @@ static ZDLookupResult ZDPointInPolygon(const ZoneDetect *library, uint32_t polyg
 
                 const int closestInBox = ZDPointInBox(pointLon, static_cast<int32_t>(closestLon), prevLon, pointLat, static_cast<int32_t>(closestLat), prevLat);
 
-                int64_t diffLat, diffLon;
+                int64_t diffLat;
+                int64_t diffLon;
                 if(closestInBox) {
                     /* Calculate squared distance to segment. */
                     diffLat = static_cast<int64_t>(closestLat - static_cast<float>(latFixedPoint));
@@ -901,7 +912,11 @@ ZoneDetectResult *ZDLookup(const ZoneDetect *library, float lat, float lon, floa
     uint32_t polygonId = 0;
 
     while(bboxIndex < library->metadataOffset) {
-        int32_t minLat, minLon, maxLat, maxLon, metadataIndexDelta;
+        int32_t minLat;
+        int32_t minLon;
+        int32_t maxLat;
+        int32_t maxLon;
+        int32_t metadataIndexDelta;
         uint64_t polygonIndexDelta;
         if(!ZDDecodeVariableLengthSigned(library, &bboxIndex, &minLat)) break;
         if(!ZDDecodeVariableLengthSigned(library, &bboxIndex, &minLon)) break;