Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package zathura-plugin-cb for
openSUSE:Factory checked in at 2024-08-13 13:23:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zathura-plugin-cb (Old)
and /work/SRC/openSUSE:Factory/.zathura-plugin-cb.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zathura-plugin-cb"
Tue Aug 13 13:23:43 2024 rev:7 rq:1193343 version:0.1.11
Changes:
--------
--- /work/SRC/openSUSE:Factory/zathura-plugin-cb/zathura-plugin-cb.changes
2022-09-20 19:23:45.894505232 +0200
+++
/work/SRC/openSUSE:Factory/.zathura-plugin-cb.new.7232/zathura-plugin-cb.changes
2024-08-13 13:24:04.952342617 +0200
@@ -1,0 +2,7 @@
+Sun Aug 11 09:58:36 UTC 2024 - Jakob Lorenz <[email protected]>
+
+- Update to 0.1.11
+ * Fix ordering of filenames
+ * Various bug fixes and improvements
+
+-------------------------------------------------------------------
Old:
----
zathura-cb-0.1.10.tar.xz
New:
----
zathura-cb-0.1.11.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zathura-plugin-cb.spec ++++++
--- /var/tmp/diff_new_pack.Gypw1H/_old 2024-08-13 13:24:05.456363618 +0200
+++ /var/tmp/diff_new_pack.Gypw1H/_new 2024-08-13 13:24:05.456363618 +0200
@@ -1,7 +1,7 @@
#
# spec file for package zathura-plugin-cb
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,18 +18,18 @@
%define realname zathura-cb
Name: zathura-plugin-cb
-Version: 0.1.10
+Version: 0.1.11
Release: 0
Summary: Comic book support for zathura
License: Zlib
Group: Productivity/Office/Other
URL: http://pwmt.org/projects/zathura/plugins/zathura-cb/
Source:
https://pwmt.org/projects/zathura-cb/download/%{realname}-%{version}.tar.xz
-BuildRequires: meson > 0.43
+BuildRequires: meson >= 0.61
BuildRequires: pkgconfig
BuildRequires: pkgconfig(girara-gtk3)
BuildRequires: pkgconfig(libarchive)
-BuildRequires: pkgconfig(zathura)
+BuildRequires: pkgconfig(zathura) >= 0.3.8
Requires: zathura
Provides: zathura-cb-plugin
@@ -41,7 +41,7 @@
%build
export CFLAGS="%{optflags}"
-%meson
+%meson -Dtests=disabled
%meson_build
%install
++++++ zathura-cb-0.1.10.tar.xz -> zathura-cb-0.1.11.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/.clang-format
new/zathura-cb-0.1.11/.clang-format
--- old/zathura-cb-0.1.10/.clang-format 1970-01-01 01:00:00.000000000 +0100
+++ new/zathura-cb-0.1.11/.clang-format 2024-08-04 10:28:38.000000000 +0200
@@ -0,0 +1,15 @@
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AlignConsecutiveAssignments: true
+AllowShortFunctionsOnASingleLine: Empty
+AllowShortIfStatementsOnASingleLine: false
+AlwaysBreakTemplateDeclarations: true
+BreakBeforeBraces: Attach
+ConstructorInitializerIndentWidth: 2
+NamespaceIndentation: All
+PointerAlignment: Left
+TabWidth: 2
+ColumnLimit: 120
+SortIncludes: false
+...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/README.md
new/zathura-cb-0.1.11/README.md
--- old/zathura-cb-0.1.10/README.md 2022-05-07 18:47:47.000000000 +0200
+++ new/zathura-cb-0.1.11/README.md 2024-08-04 10:28:38.000000000 +0200
@@ -27,4 +27,4 @@
Bugs
----
-Please report bugs at http://git.pwmt.org/pwmt/zathura-cb.
+Please report bugs at https://github.com/pwmt/zathura-cb.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/data/meson.build
new/zathura-cb-0.1.11/data/meson.build
--- old/zathura-cb-0.1.10/data/meson.build 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/data/meson.build 2024-08-04 10:28:38.000000000
+0200
@@ -1,2 +1,18 @@
install_data('org.pwmt.zathura-cb.metainfo.xml', install_dir: metainfodir)
install_data('org.pwmt.zathura-cb.desktop', install_dir: desktopdir)
+
+desktop_file_validate = find_program('desktop-file-validate', required:
get_option('tests'), native: true)
+if desktop_file_validate.found()
+ test('validate-desktop',
+ desktop_file_validate,
+ args: [join_paths(meson.current_source_dir(),
'org.pwmt.zathura-cb.desktop')]
+ )
+endif
+
+appstream_util = find_program('appstream-util', required: get_option('tests'),
native: true)
+if appstream_util.found()
+ test('validate-appdata',
+ appstream_util,
+ args: ['validate-relax', '--nonet', join_paths(meson.current_source_dir(),
'org.pwmt.zathura-cb.metainfo.xml')]
+ )
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/data/org.pwmt.zathura-cb.desktop
new/zathura-cb-0.1.11/data/org.pwmt.zathura-cb.desktop
--- old/zathura-cb-0.1.10/data/org.pwmt.zathura-cb.desktop 2022-05-07
18:47:47.000000000 +0200
+++ new/zathura-cb-0.1.11/data/org.pwmt.zathura-cb.desktop 2024-08-04
10:28:38.000000000 +0200
@@ -4,6 +4,7 @@
Name=Zathura
Comment=A minimalistic document viewer
Exec=zathura %U
+Icon=org.pwmt.zathura
Terminal=false
NoDisplay=true
Categories=Office;Viewer;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/meson.build
new/zathura-cb-0.1.11/meson.build
--- old/zathura-cb-0.1.10/meson.build 2022-05-07 18:47:47.000000000 +0200
+++ new/zathura-cb-0.1.11/meson.build 2024-08-04 10:28:38.000000000 +0200
@@ -1,7 +1,7 @@
project('zathura-cb', 'c',
- version: '0.1.10',
- meson_version: '>=0.43',
- default_options: 'c_std=c11'
+ version: '0.1.11',
+ meson_version: '>=0.61',
+ default_options: ['c_std=c17', 'warning_level=3']
)
version = meson.project_version()
@@ -23,7 +23,7 @@
build_dependencies = [zathura, girara, glib, cairo, libarchive]
if get_option('plugindir') == ''
- plugindir = zathura.get_pkgconfig_variable('plugindir')
+ plugindir = zathura.get_variable(pkgconfig: 'plugindir')
else
plugindir = get_option('plugindir')
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/meson_options.txt
new/zathura-cb-0.1.11/meson_options.txt
--- old/zathura-cb-0.1.10/meson_options.txt 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/meson_options.txt 2024-08-04 10:28:38.000000000
+0200
@@ -3,3 +3,8 @@
value: '',
description: 'Install to a different location than Zathura\'s plugin
directory'
)
+option('tests',
+ type: 'feature',
+ value: 'auto',
+ description: 'run tests'
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/document.c
new/zathura-cb-0.1.11/zathura-cb/document.c
--- old/zathura-cb-0.1.10/zathura-cb/document.c 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/document.c 2024-08-04 10:28:38.000000000
+0200
@@ -20,9 +20,7 @@
static void cb_document_page_meta_free(cb_document_page_meta_t* meta);
static bool read_dir(cb_document_t* cb_document, const char* directory,
girara_list_t* supported_extensions);
-zathura_error_t
-cb_document_open(zathura_document_t* document)
-{
+zathura_error_t cb_document_open(zathura_document_t* document) {
if (document == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
@@ -38,9 +36,9 @@
}
GSList* formats = gdk_pixbuf_get_formats();
- for (GSList* list = formats; list != NULL; list = list->next) {
- GdkPixbufFormat* format = (GdkPixbufFormat*) list->data;
- char** extensions = gdk_pixbuf_format_get_extensions(format);
+ for (GSList* list = formats; list != NULL; list = list->next) {
+ GdkPixbufFormat* format = (GdkPixbufFormat*)list->data;
+ char** extensions = gdk_pixbuf_format_get_extensions(format);
for (unsigned int i = 0; extensions[i] != NULL; i++) {
girara_list_append(supported_extensions, g_strdup(extensions[i]));
@@ -51,8 +49,8 @@
g_slist_free(formats);
/* create list of supported files (pages) */
- cb_document->pages = girara_sorted_list_new2((girara_compare_function_t)
- compare_pages, (girara_free_function_t) cb_document_page_meta_free);
+ cb_document->pages =
girara_sorted_list_new2((girara_compare_function_t)compare_pages,
+
(girara_free_function_t)cb_document_page_meta_free);
if (cb_document->pages == NULL) {
goto error_free;
}
@@ -84,9 +82,7 @@
return ZATHURA_ERROR_UNKNOWN;
}
-zathura_error_t
-cb_document_free(zathura_document_t* UNUSED(document), void* data)
-{
+zathura_error_t cb_document_free(zathura_document_t* UNUSED(document), void*
data) {
cb_document_t* cb_document = data;
if (cb_document == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
@@ -102,9 +98,7 @@
return ZATHURA_ERROR_OK;
}
-static void
-cb_document_page_meta_free(cb_document_page_meta_t* meta)
-{
+static void cb_document_page_meta_free(cb_document_page_meta_t* meta) {
if (meta == NULL) {
return;
}
@@ -115,20 +109,16 @@
g_free(meta);
}
-static void
-get_pixbuf_size(GdkPixbufLoader* loader, int width, int height, gpointer data)
-{
+static void get_pixbuf_size(GdkPixbufLoader* loader, int width, int height,
gpointer data) {
cb_document_page_meta_t* meta = (cb_document_page_meta_t*)data;
- meta->width = width;
+ meta->width = width;
meta->height = height;
gdk_pixbuf_loader_set_size(loader, 0, 0);
}
-static bool
-read_archive(cb_document_t* cb_document, const char* archive, girara_list_t*
supported_extensions)
-{
+static bool read_archive(cb_document_t* cb_document, const char* archive,
girara_list_t* supported_extensions) {
struct archive* a = archive_read_new();
if (a == NULL) {
return false;
@@ -136,13 +126,13 @@
archive_read_support_filter_all(a);
archive_read_support_format_all(a);
- int r = archive_read_open_filename(a, archive, (size_t)
LIBARCHIVE_BUFFER_SIZE);
+ int r = archive_read_open_filename(a, archive,
(size_t)LIBARCHIVE_BUFFER_SIZE);
if (r != ARCHIVE_OK) {
archive_read_free(a);
return false;
}
- struct archive_entry *entry = NULL;
+ struct archive_entry* entry = NULL;
while ((r = archive_read_next_header(a, &entry)) != ARCHIVE_EOF) {
if (r < ARCHIVE_WARN) {
// let's ignore warnings ... they are non-fatal errors
@@ -157,22 +147,23 @@
}
const char* path = archive_entry_pathname(entry);
- char* extension = get_extension(path);
+ char* extension = get_extension(path);
if (extension == NULL) {
continue;
}
- GIRARA_LIST_FOREACH(supported_extensions, char*, iter, ext)
+ for (size_t index = 0; index < girara_list_size(supported_extensions);
++index) {
+ const char* ext = girara_list_nth(supported_extensions, index);
if (g_strcmp0(extension, ext) == 0) {
cb_document_page_meta_t* meta =
g_malloc0(sizeof(cb_document_page_meta_t));
- meta->file = g_strdup(path);
+ meta->file = g_strdup(path);
GdkPixbufLoader* loader = gdk_pixbuf_loader_new();
g_signal_connect(loader, "size-prepared", G_CALLBACK(get_pixbuf_size),
meta);
- size_t size = 0;
- const void* buf = NULL;
+ size_t size = 0;
+ const void* buf = NULL;
__LA_INT64_T offset = 0;
while ((r = archive_read_data_block(a, &buf, &size, &offset)) !=
ARCHIVE_EOF) {
if (r < ARCHIVE_WARN) {
@@ -203,7 +194,7 @@
break;
}
- GIRARA_LIST_FOREACH_END(supported_extensions, char*, iter, ext);
+ }
g_free(extension);
}
@@ -213,26 +204,25 @@
return true;
}
-static bool
-read_dir(cb_document_t* cb_document, const char* directory, girara_list_t*
supported_extensions)
-{
- GDir* dir = g_dir_open(directory, 0, NULL);
+static bool read_dir(cb_document_t* cb_document, const char* directory,
girara_list_t* supported_extensions) {
+ GDir* dir = g_dir_open(directory, 0, NULL);
const char* entrypath = NULL;
while ((entrypath = g_dir_read_name(dir))) {
- char* fullpath = g_strdup_printf("%s/%s", directory, entrypath);
+ char* fullpath = g_strdup_printf("%s/%s", directory, entrypath);
char* extension = get_extension(fullpath);
if (extension == NULL) {
- continue;
+ continue;
}
- GIRARA_LIST_FOREACH(supported_extensions, char*, iter, ext)
+ for (size_t index = 0; index < girara_list_size(supported_extensions);
++index) {
+ const char* ext = girara_list_nth(supported_extensions, index);
if (g_strcmp0(ext, extension) == 0) {
cb_document_page_meta_t* meta =
g_malloc(sizeof(cb_document_page_meta_t));
- meta->file = g_strdup(fullpath);
+ meta->file = g_strdup(fullpath);
g_free(fullpath);
GdkPixbuf* data = gdk_pixbuf_new_from_file(meta->file, NULL);
- meta->width = gdk_pixbuf_get_width(data);
- meta->height = gdk_pixbuf_get_height(data);
+ meta->width = gdk_pixbuf_get_width(data);
+ meta->height = gdk_pixbuf_get_height(data);
if (meta->width > 0 && meta->height > 0) {
girara_list_append(cb_document->pages, meta);
@@ -242,7 +232,7 @@
break;
}
- GIRARA_LIST_FOREACH_END(supported_extensions, char*, iter, ext);
+ }
g_free(extension);
}
@@ -250,15 +240,11 @@
return true;
}
-static int
-compare_pages(const cb_document_page_meta_t* page1, const
cb_document_page_meta_t* page2)
-{
+static int compare_pages(const cb_document_page_meta_t* page1, const
cb_document_page_meta_t* page2) {
return compare_path(page1->file, page2->file);
}
-static char*
-get_extension(const char* path)
-{
+static char* get_extension(const char* path) {
if (path == NULL) {
return NULL;
}
@@ -270,4 +256,3 @@
return g_ascii_strdown(res + 1, -1);
}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/index.c
new/zathura-cb-0.1.11/zathura-cb/index.c
--- old/zathura-cb-0.1.10/zathura-cb/index.c 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/index.c 2024-08-04 10:28:38.000000000
+0200
@@ -4,10 +4,7 @@
#include "internal.h"
#include <glib.h>
-girara_tree_node_t*
-cb_document_index_generate(zathura_document_t* document,
- void* data, zathura_error_t* error)
-{
+girara_tree_node_t* cb_document_index_generate(zathura_document_t* document,
void* data, zathura_error_t* error) {
cb_document_t* cb_document = data;
if (document == NULL || cb_document == NULL) {
if (error != NULL) {
@@ -17,25 +14,20 @@
}
girara_tree_node_t* root =
girara_node_new(zathura_index_element_new("ROOT"));
- unsigned int page_number = 0;
- GIRARA_LIST_FOREACH(cb_document->pages, cb_document_page_meta_t*, iter, page)
- {
- gchar* markup = g_markup_escape_text(page->file, -1);
+ for (unsigned int page_number = 0; page_number <
girara_list_size(cb_document->pages); ++page_number) {
+ cb_document_page_meta_t* page =
girara_list_nth(cb_document->pages, page_number);
+ gchar* markup = g_markup_escape_text(page->file,
-1);
zathura_index_element_t* index_element = zathura_index_element_new(markup);
g_free(markup);
if (index_element != NULL) {
- zathura_rectangle_t rect = { 0, 0, 0, 0 };
- zathura_link_target_t target = { ZATHURA_LINK_DESTINATION_XYZ, NULL,
- page_number, -1, -1, -1, -1, 0 };
+ zathura_rectangle_t rect = {0, 0, 0, 0};
+ zathura_link_target_t target = {ZATHURA_LINK_DESTINATION_XYZ, NULL,
page_number, -1, -1, -1, -1, 0};
- index_element->link = zathura_link_new(ZATHURA_LINK_GOTO_DEST, rect,
- target);
+ index_element->link = zathura_link_new(ZATHURA_LINK_GOTO_DEST, rect,
target);
girara_node_append_data(root, index_element);
}
- ++page_number;
}
- GIRARA_LIST_FOREACH_END(cb_document->pages, cb_document_page_meta_t*, iter,
page);
return root;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/internal.h
new/zathura-cb-0.1.11/zathura-cb/internal.h
--- old/zathura-cb-0.1.10/zathura-cb/internal.h 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/internal.h 2024-08-04 10:28:38.000000000
+0200
@@ -3,7 +3,7 @@
#ifndef INTERNAL_H
#define INTERNAL_H
-#define LIBARCHIVE_BUFFER_SIZE 8192
+#define LIBARCHIVE_BUFFER_SIZE 8192
struct cb_document_s {
girara_list_t* pages; /**< List of metadata structs */
@@ -17,7 +17,7 @@
*/
typedef struct cb_document_page_meta_s {
char* file; /**< Image file */
- int width; /**< Image width */
+ int width; /**< Image width */
int height; /**< Image height */
} cb_document_page_meta_t;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/page.c
new/zathura-cb-0.1.11/zathura-cb/page.c
--- old/zathura-cb-0.1.10/zathura-cb/page.c 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/page.c 2024-08-04 10:28:38.000000000
+0200
@@ -6,9 +6,7 @@
#include "plugin.h"
#include "internal.h"
-zathura_error_t
-cb_page_init(zathura_page_t* page)
-{
+zathura_error_t cb_page_init(zathura_page_t* page) {
if (page == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
@@ -38,9 +36,7 @@
return ZATHURA_ERROR_OK;
}
-zathura_error_t
-cb_page_clear(zathura_page_t* UNUSED(page), void* data)
-{
+zathura_error_t cb_page_clear(zathura_page_t* UNUSED(page), void* data) {
cb_page_t* cb_page = data;
if (cb_page == NULL) {
return ZATHURA_ERROR_OK;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/plugin.c
new/zathura-cb-0.1.11/zathura-cb/plugin.c
--- old/zathura-cb-0.1.10/zathura-cb/plugin.c 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/plugin.c 2024-08-04 10:28:38.000000000
+0200
@@ -2,26 +2,23 @@
#include "plugin.h"
-ZATHURA_PLUGIN_REGISTER_WITH_FUNCTIONS(
- "cb",
- VERSION_MAJOR, VERSION_MINOR, VERSION_REV,
- ZATHURA_PLUGIN_FUNCTIONS({
- .document_open = cb_document_open,
- .document_free = cb_document_free,
- .document_index_generate = cb_document_index_generate,
- .page_init = cb_page_init,
- .page_clear = cb_page_clear,
- .page_render_cairo = cb_page_render_cairo
- }),
- ZATHURA_PLUGIN_MIMETYPES({
- "application/x-cbr",
- "application/x-rar",
- "application/x-cbz",
- "application/zip",
- "application/x-cb7",
- "application/x-7z-compressed",
- "application/x-cbt",
- "application/x-tar",
- "inode/directory"
- })
-)
+ZATHURA_PLUGIN_REGISTER_WITH_FUNCTIONS("cb", VERSION_MAJOR, VERSION_MINOR,
VERSION_REV,
+ ZATHURA_PLUGIN_FUNCTIONS({
+ .document_open =
cb_document_open,
+ .document_free =
cb_document_free,
+ .document_index_generate =
cb_document_index_generate,
+ .page_init =
cb_page_init,
+ .page_clear =
cb_page_clear,
+ .page_render_cairo =
cb_page_render_cairo,
+ }),
+ ZATHURA_PLUGIN_MIMETYPES({
+ "application/x-cbr",
+ "application/x-rar",
+ "application/x-cbz",
+ "application/zip",
+ "application/x-cb7",
+ "application/x-7z-compressed",
+ "application/x-cbt",
+ "application/x-tar",
+ "inode/directory",
+ }))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/plugin.h
new/zathura-cb-0.1.11/zathura-cb/plugin.h
--- old/zathura-cb-0.1.10/zathura-cb/plugin.h 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/plugin.h 2024-08-04 10:28:38.000000000
+0200
@@ -39,8 +39,8 @@
* @return Tree node object or NULL if an error occurred (e.g.: the document
has
* no index)
*/
-GIRARA_HIDDEN girara_tree_node_t*
cb_document_index_generate(zathura_document_t* document,
- void* cb_document, zathura_error_t* error);
+GIRARA_HIDDEN girara_tree_node_t*
cb_document_index_generate(zathura_document_t* document, void* cb_document,
+ zathura_error_t*
error);
/**
* Initializes a page
@@ -68,7 +68,6 @@
* @param printing Render for printing
* @return ZATHURA_ERROR_OK if no error occurred
*/
-GIRARA_HIDDEN zathura_error_t cb_page_render_cairo(zathura_page_t* page, void*
cb_page,
- cairo_t* cairo, bool printing);
+GIRARA_HIDDEN zathura_error_t cb_page_render_cairo(zathura_page_t* page, void*
cb_page, cairo_t* cairo, bool printing);
#endif // CB_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/render.c
new/zathura-cb-0.1.11/zathura-cb/render.c
--- old/zathura-cb-0.1.10/zathura-cb/render.c 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/render.c 2024-08-04 10:28:38.000000000
+0200
@@ -12,10 +12,7 @@
static GdkPixbuf* load_pixbuf_from_archive(const char* archive, const char*
file);
-zathura_error_t
-cb_page_render_cairo(zathura_page_t* page, void* data,
- cairo_t* cairo, bool UNUSED(printing))
-{
+zathura_error_t cb_page_render_cairo(zathura_page_t* page, void* data,
cairo_t* cairo, bool UNUSED(printing)) {
cb_page_t* cb_page = data;
if (page == NULL || cb_page == NULL || cairo == NULL) {
return ZATHURA_ERROR_INVALID_ARGUMENTS;
@@ -38,9 +35,7 @@
return ZATHURA_ERROR_OK;
}
-static GdkPixbuf*
-load_pixbuf_from_archive(const char* archive, const char* file)
-{
+static GdkPixbuf* load_pixbuf_from_archive(const char* archive, const char*
file) {
if (archive == NULL || file == NULL) {
return NULL;
}
@@ -81,8 +76,8 @@
}
GMemoryInputStream* mis = G_MEMORY_INPUT_STREAM(is);
- size_t size = 0;
- const void* buf = NULL;
+ size_t size = 0;
+ const void* buf = NULL;
__LA_INT64_T offset = 0;
while ((r = archive_read_data_block(a, &buf, &size, &offset)) !=
ARCHIVE_EOF) {
if (r < ARCHIVE_WARN) {
@@ -127,4 +122,3 @@
}
return NULL;
}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/utils.c
new/zathura-cb-0.1.11/zathura-cb/utils.c
--- old/zathura-cb-0.1.10/zathura-cb/utils.c 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/utils.c 2024-08-04 10:28:38.000000000
+0200
@@ -1,18 +1,21 @@
/* SPDX-License-Identifier: Zlib */
#include <glib.h>
-#include <dirent.h>
#include "utils.h"
-int
-compare_path(const char* str1, const char* str2)
-{
+int compare_path(const char* str1, const char* str2) {
char* ustr1 = g_utf8_casefold(str1, -1);
char* ustr2 = g_utf8_casefold(str2, -1);
- int result = g_utf8_collate(ustr1, ustr2);
- g_free(ustr1);
+
+ char* ustr3 = g_utf8_collate_key_for_filename(ustr1, -1);
+ char* ustr4 = g_utf8_collate_key_for_filename(ustr2, -1);
g_free(ustr2);
+ g_free(ustr1);
+
+ int result = g_strcmp0(ustr3, ustr4);
+ g_free(ustr4);
+ g_free(ustr3);
return result;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zathura-cb-0.1.10/zathura-cb/utils.h
new/zathura-cb-0.1.11/zathura-cb/utils.h
--- old/zathura-cb-0.1.10/zathura-cb/utils.h 2022-05-07 18:47:47.000000000
+0200
+++ new/zathura-cb-0.1.11/zathura-cb/utils.h 2024-08-04 10:28:38.000000000
+0200
@@ -11,7 +11,7 @@
* @param str1 First path
* @param str2 Second path
*
- * @return
+ * @return
*/
GIRARA_HIDDEN int compare_path(const char* str1, const char* str2);