Commit 3891a71c authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge branch 'release/0.2.9'

parents bf4d92ec 6f9da285
project('zathura-djvu', 'c',
version: '0.2.8',
version: '0.2.9',
meson_version: '>=0.43',
default_options: 'c_std=c11'
)
......@@ -22,12 +22,19 @@ djvu = dependency('ddjvuapi')
build_dependencies = [zathura, girara, glib, cairo, djvu]
if get_option('plugindir') == ''
plugindir = zathura.get_pkgconfig_variable('plugindir')
else
plugindir = get_option('plugindir')
endif
# defines
defines = [
'-DVERSION_MAJOR=@0@'.format(version_array[0]),
'-DVERSION_MINOR=@0@'.format(version_array[1]),
'-DVERSION_REV=@0@'.format(version_array[2]),
'-D_DEFAULT_SOURCE',
'-D_GNU_SOURCE',
]
# compile flags
......@@ -51,7 +58,7 @@ djvu = shared_module('djvu',
dependencies: build_dependencies,
c_args: defines + flags,
install: true,
install_dir: zathura.get_pkgconfig_variable('plugindir')
install_dir: plugindir
)
subdir('data')
option('plugindir',
type: 'string',
value: '',
description: 'Install to a different location than Zathura\'s plugin directory'
)
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <stdlib.h>
#include <ctype.h>
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef DJVU_H
#define DJVU_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef DJVU_INTERNAL_H
#define DJVU_INTERNAL_H
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <libdjvu/miniexp.h>
#include <string.h>
......@@ -146,7 +146,7 @@ djvu_page_text_search(djvu_page_text_t* page_text, const char* text)
int search_length = strlen(text);
char* tmp = page_text->content;
while ((tmp = strstr(tmp, text)) != NULL) {
while ((tmp = strcasestr(tmp, text)) != NULL) {
int start_pointer = tmp - page_text->content;
int end_pointer = start_pointer + search_length - 1;
......@@ -204,6 +204,7 @@ error_free:
if (page_text->text_positions != NULL) {
girara_list_free(page_text->text_positions);
page_text->text_positions = NULL;
}
if (page_text->content != NULL) {
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef DJVU_PAGE_H
#define DJVU_PAGE_H
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment