Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
valoq
zathura
Commits
12c8cd91
Commit
12c8cd91
authored
Sep 03, 2020
by
Sebastian Ramacher
Browse files
Merge branch 'release/0.4.7' into master
parents
91ceee2b
65344f61
Changes
7
Hide whitespace changes
Inline
Side-by-side
meson.build
View file @
12c8cd91
project
(
'zathura'
,
'c'
,
version
:
'0.4.
6
'
,
version
:
'0.4.
7
'
,
meson_version
:
'>=0.47'
,
default_options
:
[
'c_std=c11'
,
'warning_level=3'
],
)
...
...
po/de.po
View file @
12c8cd91
...
...
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-0
7
-2
7 10:0
6+0200\n"
"PO-Revision-Date: 2020-07-27
10:09
+0
2
00\n"
"POT-Creation-Date: 2020-0
8
-2
4 21:3
6+0200\n"
"PO-Revision-Date: 2020-07-27
08:12
+0
0
00\n"
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
"Language-Team: German (http://www.transifex.com/pwmt/zathura/language/de/)\n"
"Language: de\n"
...
...
@@ -664,7 +664,7 @@ msgstr "In einem Nicht-Standardmodus starten"
#: zathura/main.c:160
msgid "Search for the given phrase and display results"
msgstr "Suche nach der gegeben Phrase und anzeigen der Ergebnisse"
msgstr "Suche nach der gegeben Phrase und anzeigen der Ergebnisse"
#: zathura/page-widget.c:654
msgid "Loading..."
...
...
po/nl.po
View file @
12c8cd91
# zathura - language file (Dutch)
# SPDX-License-Identifier: Zlib
#
# Translators:
# Heimen Stoffels <vistausss@outlook.com>, 2017-20
19
# Heimen Stoffels <vistausss@outlook.com>, 2017-20
20
msgid ""
msgstr ""
"Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-0
7-27 10:06
+0200\n"
"PO-Revision-Date: 2020-0
3
-2
2 22:48
+0000\n"
"POT-Creation-Date: 2020-0
9-03 21:33
+0200\n"
"PO-Revision-Date: 2020-0
7
-2
7 15:17
+0000\n"
"Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n"
"Language-Team: Dutch (http://www.transifex.com/pwmt/zathura/language/nl/)\n"
"Language: nl\n"
...
...
@@ -22,7 +23,7 @@ msgstr "Zathura"
#: data/org.pwmt.zathura.appdata.xml.in:8 data/org.pwmt.zathura.desktop.in:6
msgid "A minimalistic document viewer"
msgstr "Een minimalistisch
e
documentweergave
-applicatie
"
msgstr "Een minimalistisch documentweergave
programma
"
#: data/org.pwmt.zathura.appdata.xml.in:10
msgid ""
...
...
@@ -31,9 +32,9 @@ msgid ""
"mainly focuses on keyboard interaction. Zathura makes it possible to "
"completely view and navigate through documents without using a mouse."
msgstr ""
"Zath
r
ua is een zeer aanpasbar
e
en functione
l
e documentweergave
-applicatie
. "
"
Het bied
t een minimalistisch
en
ruimtebesparend
uiterlijk
en is vooral "
"gefocust op eenvoudig navigeren middels het toetsenbord.
Zathura
maakt het "
"Zathu
r
a is een zeer aanpasba
a
r en functionee
l
documentweergave
programma
. "
"
Zathura heef
t een minimalistisch
e,
ruimtebesparend
e vormgeving
en is vooral "
"gefocust op eenvoudig navigeren middels het toetsenbord.
Dit
maakt het "
"mogelijk om volledig zonder muis door documenten te kunnen bladeren."
#: data/org.pwmt.zathura.appdata.xml.in:17
...
...
@@ -41,6 +42,8 @@ msgid ""
"Zathura can be extended to support multiple document formats using plugins. "
"Other features include:"
msgstr ""
"Met plug-ins kun je ondersteuning toevoegen voor meerdere bestandsformaten. "
"Andere mogelijkheden zijn:"
#: data/org.pwmt.zathura.appdata.xml.in:22
msgid "SyncTeX forward and backward synchronization support."
...
...
@@ -52,7 +55,7 @@ msgstr "Verwijzingen en bladwijzers."
#: data/org.pwmt.zathura.appdata.xml.in:24
msgid "Automatic document reloading."
msgstr "Automatisch
e
documentherlad
ing
."
msgstr "Automatisch document
en
herlad
en
."
#. Translators: Icon of the desktop entry.
#: data/org.pwmt.zathura.desktop.in:9
...
...
@@ -73,22 +76,22 @@ msgstr "'%s' mag niet op 0 worden ingesteld. Stel in op 1."
#: zathura/callbacks.c:395
#, c-format
msgid "Invalid input '%s' given."
msgstr "Ongeldige invoer
,
'%s'
,
opgegeven."
msgstr "Ongeldige invoer '%s' opgegeven."
#: zathura/callbacks.c:433
#, c-format
msgid "Invalid index '%s' given."
msgstr "Ongeldige index
,
'%s'
,
opgegeven."
msgstr "Ongeldige index '%s' opgegeven."
#: zathura/callbacks.c:674
#, c-format
msgid "Copied selected text to selection %s: %s"
msgstr "
T
ekst gekopieerd naar selectie %s: %s"
msgstr "
De t
ekst
is
gekopieerd naar
de
selectie %s: %s"
#: zathura/callbacks.c:706
#, c-format
msgid "Copied selected image to selection %s"
msgstr "
A
fbeelding gekopieerd naar selectie %s"
msgstr "
De a
fbeelding
is
gekopieerd naar
de
selectie %s"
#: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103
#: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311
...
...
@@ -96,7 +99,7 @@ msgstr "Afbeelding gekopieerd naar selectie %s"
#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257
#: zathura/shortcuts.c:1284
msgid "No document opened."
msgstr "Geen
geopend
document."
msgstr "Geen document
geopend
."
#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442
msgid "Invalid number of arguments given."
...
...
@@ -105,32 +108,32 @@ msgstr "Ongeldig aantal argumenten opgegeven."
#: zathura/commands.c:53
#, c-format
msgid "Could not update bookmark: %s"
msgstr "
B
ladwijzer kan niet worden bijgewerkt: %s"
msgstr "
De b
ladwijzer kan niet worden bijgewerkt: %s"
#: zathura/commands.c:55
#, c-format
msgid "Could not create bookmark: %s"
msgstr "
B
ladwijzer kan niet worden
gecreëer
d: %s"
msgstr "
De b
ladwijzer kan niet worden
toegevoeg
d: %s"
#: zathura/commands.c:60
#, c-format
msgid "Bookmark successfully updated: %s"
msgstr "
B
ladwijzer bijgewerkt: %s"
msgstr "
De b
ladwijzer
is
bijgewerkt: %s"
#: zathura/commands.c:62
#, c-format
msgid "Bookmark successfully created: %s"
msgstr "
B
ladwijzer
gecreëer
d: %s"
msgstr "
De b
ladwijzer
is toegevoeg
d: %s"
#: zathura/commands.c:88
#, c-format
msgid "Removed bookmark: %s"
msgstr "
B
ladwijzer verwijderd: %s"
msgstr "
De b
ladwijzer
is
verwijderd: %s"
#: zathura/commands.c:90
#, c-format
msgid "Failed to remove bookmark: %s"
msgstr "
B
ladwijzer
verwijderen mislukt
: %s"
msgstr "
De b
ladwijzer
kan niet worden verwijderd
: %s"
#: zathura/commands.c:119
msgid "No bookmarks available."
...
...
@@ -139,7 +142,7 @@ msgstr "Geen bladwijzers beschikbaar."
#: zathura/commands.c:129
#, c-format
msgid "No such bookmark: %s"
msgstr "
Geen b
ladwijzer: %s"
msgstr "
B
ladwijzer
bestaat niet
: %s"
#: zathura/commands.c:175
msgid "Title"
...
...
@@ -151,7 +154,7 @@ msgstr "Onderwerp"
#: zathura/commands.c:177
msgid "Keywords"
msgstr "
Sleutel
woorden"
msgstr "
Tref
woorden"
#: zathura/commands.c:178
msgid "Author"
...
...
@@ -167,11 +170,11 @@ msgstr "Producent"
#: zathura/commands.c:181
msgid "Creation date"
msgstr "
Creatiedatum
"
msgstr "
Aangemaakt op
"
#: zathura/commands.c:182
msgid "Modification date"
msgstr "Bijwerk
datum
"
msgstr "Bij
ge
werk
t op
"
#: zathura/commands.c:183
msgid "Format"
...
...
@@ -187,7 +190,7 @@ msgstr "Geen informatie beschikbaar."
#: zathura/commands.c:247
msgid "Too many arguments."
msgstr "Teveel argumenten."
msgstr "Te
veel argumenten."
#: zathura/commands.c:258
msgid "No arguments given."
...
...
@@ -195,15 +198,15 @@ msgstr "Geen argumenten opgegeven."
#: zathura/commands.c:286
msgid "Printing is not permitted in strict sandbox mode"
msgstr "Afdrukken is niet toegestaan in de strenge sandbox
-
modus"
msgstr "Afdrukken is niet toegestaan in de strenge sandboxmodus"
#: zathura/commands.c:317 zathura/commands.c:343
msgid "Document saved."
msgstr "
D
ocument opgeslagen."
msgstr "
Het d
ocument
is
opgeslagen."
#: zathura/commands.c:319 zathura/commands.c:345
msgid "Failed to save document."
msgstr "
D
ocument
opslaan mislukt
."
msgstr "
Het d
ocument
kan niet worden opgeslagen
."
#: zathura/commands.c:322 zathura/commands.c:348
msgid "Invalid number of arguments."
...
...
@@ -212,40 +215,40 @@ msgstr "Ongeldig aantal argumenten."
#: zathura/commands.c:461
#, c-format
msgid "Couldn't write attachment '%s' to '%s'."
msgstr "
B
ijlage '%s' kan niet worden weggeschreven naar '%s'."
msgstr "
De b
ijlage '%s' kan niet worden weggeschreven naar '%s'."
#: zathura/commands.c:463
#, c-format
msgid "Wrote attachment '%s' to '%s'."
msgstr "
B
ijlage '%s' weggeschreven naar '%s'."
msgstr "
De b
ijlage '%s'
is
weggeschreven naar '%s'."
#: zathura/commands.c:507
#, c-format
msgid "Wrote image '%s' to '%s'."
msgstr "
A
fbeelding '%s' weggeschreven naar '%s'."
msgstr "
De a
fbeelding '%s'
is
weggeschreven naar '%s'."
#: zathura/commands.c:509
#, c-format
msgid "Couldn't write image '%s' to '%s'."
msgstr "
A
fbeelding '%s' kan niet worden weggeschreven naar '%s'."
msgstr "
De a
fbeelding '%s' kan niet worden weggeschreven naar '%s'."
#: zathura/commands.c:516
#, c-format
msgid "Unknown image '%s'."
msgstr "Onbekende afbeelding '%s'."
msgstr "Onbekende afbeelding
:
'%s'."
#: zathura/commands.c:520
#, c-format
msgid "Unknown attachment or image '%s'."
msgstr "Onbekende bijlage of afbeelding '%s'."
msgstr "Onbekende bijlage of afbeelding
:
'%s'."
#: zathura/commands.c:538
msgid "Exec is not permitted in strict sandbox mode"
msgstr "Uitvoeren is niet toegestaan in de strenge sandbox
-
modus"
msgstr "Uitvoeren is niet toegestaan in de strenge sandboxmodus"
#: zathura/commands.c:582
msgid "Argument must be a number."
msgstr "
A
rgument moet een getal zijn."
msgstr "
Het a
rgument moet een getal zijn."
#: zathura/completion.c:287
#, c-format
...
...
@@ -264,11 +267,11 @@ msgstr "Afbeeldingen"
#. zathura settings
#: zathura/config.c:183
msgid "Database backend"
msgstr "Databa
se-
backend"
msgstr "Databa
nk
back
-
end"
#: zathura/config.c:184
msgid "File monitor backend"
msgstr "Bestandsmonitor
-
backend"
msgstr "Bestandsmonitorback
-
end"
#: zathura/config.c:186
msgid "Zoom step"
...
...
@@ -292,11 +295,11 @@ msgstr "Pagina's van rechts naar links tonen"
#: zathura/config.c:196
msgid "Scroll step"
msgstr "Scrolls
chaal
"
msgstr "Scrolls
nelheid
"
#: zathura/config.c:198
msgid "Horizontal scroll step"
msgstr "Horizontale scrolls
chaal
"
msgstr "Horizontale scrolls
nelheid
"
#: zathura/config.c:200
msgid "Full page scroll overlap"
...
...
@@ -304,33 +307,32 @@ msgstr "Scrolloverlapping op volledige pagina"
#: zathura/config.c:202
msgid "Zoom minimum"
msgstr "Minimal
e
zoom"
msgstr "Minima
a
l zoom
niveau
"
#: zathura/config.c:204
msgid "Zoom maximum"
msgstr "Maximal
e
zoom"
msgstr "Maxima
a
l zoom
niveau
"
#: zathura/config.c:206
msgid "Maximum number of pages to keep in the cache"
msgstr "
Maximaal
aantal pagina's dat moet worden bewaard in de cache"
msgstr "
Het maximum
aantal pagina's dat moet worden bewaard in de cache"
#: zathura/config.c:208
msgid "Maximum size in pixels of thumbnails to keep in the cache"
msgstr ""
"Maximaal aantal in pixels van voorbeeldweergaven die moeten worden bewaard "
"in de cache"
"Het maximumaantal miniaturen dat moet worden bewaard in de cache (in pixels)"
#: zathura/config.c:210
msgid "Number of positions to remember in the jumplist"
msgstr "
A
antal posities dat moet worden onthouden in de jumplist"
msgstr "
Het a
antal posities dat moet worden onthouden in de jumplist"
#: zathura/config.c:212
msgid "Recoloring (dark color)"
msgstr "Herkleuren (donkere kleur)"
msgstr "Her
in
kleuren (donkere kleur)"
#: zathura/config.c:213
msgid "Recoloring (light color)"
msgstr "Herkleuren (lichte kleur)"
msgstr "Her
in
kleuren (lichte kleur)"
#: zathura/config.c:214
msgid "Color for highlighting"
...
...
@@ -366,13 +368,13 @@ msgstr "Indexmodus-achtergrondkleur (actief element)"
#: zathura/config.c:229
msgid "Recolor pages"
msgstr "Pagina's herkleuren"
msgstr "Pagina's her
in
kleuren"
#: zathura/config.c:231
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
"Behoudt tijdens het herkleuren de o
riginel
e tint en pas alleen de
belichting
"
"aan"
"Behoudt tijdens het her
in
kleuren de o
orspronkelijk
e tint en pas alleen de "
"
belichting
aan"
#: zathura/config.c:233
msgid "When recoloring keep original image colors"
...
...
@@ -404,7 +406,7 @@ msgstr "Linkdoel uitlijnen naar links"
#: zathura/config.c:247
msgid "Let zoom be changed when following links"
msgstr "Zoom
wijzig
en bij volgen van links"
msgstr "Zoom
aanpass
en bij volgen van links"
#: zathura/config.c:249
msgid "Center result horizontally"
...
...
@@ -412,11 +414,11 @@ msgstr "Resultaat horizontaal centreren"
#: zathura/config.c:251
msgid "Transparency for highlighting"
msgstr "
D
oorzichtigheid
bij markeren
"
msgstr "
Markeerd
oorzichtigheid"
#: zathura/config.c:253
msgid "Render 'Loading ...'"
msgstr "'Bezig met laden...'
render
en"
msgstr "'Bezig met laden...'
ton
en"
#: zathura/config.c:254
msgid "Adjust to when opening file"
...
...
@@ -432,11 +434,11 @@ msgstr "Mappen tonen"
#: zathura/config.c:260
msgid "Show recent files"
msgstr "
Rec
en
t
e bestanden tonen"
msgstr "
Onlangs geop
en
d
e bestanden tonen"
#: zathura/config.c:262
msgid "Always open on first page"
msgstr "Altijd
openen op
eerste pagina"
msgstr "Altijd
de
eerste pagina
openen
"
#: zathura/config.c:264
msgid "Highlight search results"
...
...
@@ -460,7 +462,7 @@ msgstr "~ gebruiken i.p.v. $HOME in de bestandsnaam in de venstertitel"
#: zathura/config.c:275
msgid "Display the page number in the window title"
msgstr "Paginanummer
weergev
en in de venstertitel"
msgstr "Paginanummer
ton
en in de venstertitel"
#: zathura/config.c:277
msgid "Use first page of a document as window icon"
...
...
@@ -488,21 +490,21 @@ msgstr "D-Bus-dienst inschakelen"
#: zathura/config.c:288
msgid "Save history at each page change"
msgstr "Geschiedenis opslaan
bij
elke pagina
wijzigin
g"
msgstr "Geschiedenis opslaan
na
elke pagina
-omsla
g"
#: zathura/config.c:289
msgid "The clipboard into which mouse-selected data will be written"
msgstr ""
"Het klembord waarnaar met de muis geselecteerde gegevens moet worden "
"Het klembord waarnaar met de muis geselecteerde gegevens moet
en
worden "
"weggeschreven"
#: zathura/config.c:291
msgid "Enable notification after selecting text"
msgstr "Melding
inschakel
en na selecteren van tekst"
msgstr "Melding
ton
en na selecteren van tekst"
#: zathura/config.c:294
msgid "Sandbox level"
msgstr "Sandbox
-
niveau"
msgstr "Sandboxniveau"
#. define default inputbar commands
#: zathura/config.c:485
...
...
@@ -552,7 +554,7 @@ msgstr "Document opslaan"
#: zathura/config.c:497
msgid "Save document (and force overwriting)"
msgstr "Document opslaan (en overschrijven
forcer
en)"
msgstr "Document opslaan (en overschrijven
afdwing
en)"
#: zathura/config.c:498
msgid "Save attachments"
...
...
@@ -584,13 +586,13 @@ msgstr "Versie-informatie tonen"
#: zathura/links.c:233
msgid "Failed to run xdg-open."
msgstr "
Uitvoer
en
v
an
xdg-open mislukt
."
msgstr "
xdg-op
en
k
an
niet worden uitgevoerd
."
#: zathura/links.c:247
msgid "Opening external applications in strict sandbox mode is not permitted"
msgstr ""
"Het openen van externe
applicatie
s is niet toegestaan in de strenge
sandbox-
"
"modus"
"Het openen van externe
programma'
s is niet toegestaan in de strenge "
"
sandbox
modus"
#: zathura/links.c:280
#, c-format
...
...
@@ -624,7 +626,7 @@ msgstr "Pad naar de cachemap"
#: zathura/main.c:150
msgid "Path to the directories containing plugins"
msgstr "Pad naar de
mappen die plug-ins bevatt
en"
msgstr "Pad naar de
plug-inmapp
en"
#: zathura/main.c:151
msgid "Fork into the background"
...
...
@@ -636,7 +638,7 @@ msgstr "Documentwachtwoord"
#: zathura/main.c:153
msgid "Page number to go to"
msgstr "
P
aginanummer
om naartoe te gaan
"
msgstr "
Ga naar p
aginanummer"
#: zathura/main.c:154
msgid "Log level (debug, info, warning, error)"
...
...
@@ -664,7 +666,7 @@ msgstr "Starten in een niet-standaardmodus"
#: zathura/main.c:160
msgid "Search for the given phrase and display results"
msgstr ""
msgstr "
Zoeken naar zoekterm en resultaten tonen
"
#: zathura/page-widget.c:654
msgid "Loading..."
...
...
@@ -687,7 +689,7 @@ msgstr "Bezig met afdrukken van pagina %d..."
#: zathura/print.c:192
#, c-format
msgid "Printing failed: %s"
msgstr "
A
fdrukken mislukt: %s"
msgstr "
Het a
fdrukken
is
mislukt: %s"
#: zathura/shortcuts.c:105
#, c-format
...
...
@@ -697,7 +699,7 @@ msgstr "Ongeldige aanpassingsmodus: %d"
#: zathura/shortcuts.c:974
#, c-format
msgid "Pattern not found: %s"
msgstr "
P
atroon niet gevonden: %s"
msgstr "
Het p
atroon
is
niet gevonden: %s"
#: zathura/shortcuts.c:1132
msgid "This document does not contain any index"
...
...
@@ -710,14 +712,14 @@ msgstr "[Naamloos]"
#: zathura/zathura.c:835
msgid "Could not read file from stdin and write it to a temporary file."
msgstr ""
"
B
estand kan niet worden gelezen uit stdin en
worden
weggeschreven naar een "
"
Het b
estand kan niet worden gelezen uit stdin en weggeschreven naar een "
"tijdelijk bestand."
#: zathura/zathura.c:855
msgid "Could not read file from GIO and copy it to a temporary file."
msgstr ""
"
B
estand kan niet worden gelezen uit GIO en
worden
gekopieerd naar een "
"
tijdelijk
bestand."
"
Het b
estand kan niet worden gelezen uit GIO en gekopieerd naar een
tijdelijk
"
"bestand."
#: zathura/zathura.c:952
msgid "Enter password:"
...
...
@@ -729,4 +731,4 @@ msgstr "Niet-ondersteund bestandstype. Installeer de benodigde plug-in."
#: zathura/zathura.c:1001
msgid "Document does not contain any pages"
msgstr "
D
ocument bevat geen pagina's"
msgstr "
Het d
ocument bevat geen pagina's"
tests/meson.build
View file @
12c8cd91
...
...
@@ -24,15 +24,17 @@ if check.found()
test
(
'session'
,
session
,
timeout
:
60
*
60
)
sandbox
=
executable
(
'test_sandbox'
,
[
'test_sandbox.c'
,
'tests.c'
],
dependencies
:
build_dependencies
+
test_dependencies
,
include_directories
:
include_directories
,
c_args
:
defines
+
flags
)
test
(
'sandbox'
,
sandbox
,
timeout
:
60
*
60
)
if
seccomp
.
found
()
sandbox
=
executable
(
'test_sandbox'
,
[
'test_sandbox.c'
,
'tests.c'
],
dependencies
:
build_dependencies
+
test_dependencies
,
include_directories
:
include_directories
,
c_args
:
defines
+
flags
)
test
(
'sandbox'
,
sandbox
,
timeout
:
60
*
60
)
endif
utils
=
executable
(
'test_utils'
,
[
'test_utils.c'
,
'tests.c'
],
dependencies
:
build_dependencies
+
test_dependencies
,
...
...
zathura/database-plain.c
View file @
12c8cd91
...
...
@@ -895,7 +895,7 @@ zathura_plaindatabase_class_init(ZathuraPlainDatabaseClass* class)
object_class
->
set_property
=
plain_set_property
;
g_object_class_install_property
(
object_class
,
PROP_PATH
,
g_param_spec_string
(
"path"
,
"path"
,
"path to directory where the bookmarks and history are locate
s
"
,
g_param_spec_string
(
"path"
,
"path"
,
"path to directory where the bookmarks and history are locate
d
"
,
NULL
,
G_PARAM_WRITABLE
|
G_PARAM_CONSTRUCT_ONLY
|
G_PARAM_STATIC_STRINGS
));
}
...
...
zathura/utils.c
View file @
12c8cd91
...
...
@@ -313,8 +313,8 @@ running_under_wsl(void)
typedef
struct
zathura_point_s
{
double
x
;
double
y
;
unsigned
int
x
;
unsigned
int
y
;
}
zathura_point_t
;
static
int
...
...
@@ -322,13 +322,31 @@ cmp_point(const void* va, const void* vb) {
const
zathura_point_t
*
a
=
va
;
const
zathura_point_t
*
b
=
vb
;
return
a
->
x
==
b
->
x
&&
a
->
y
==
b
->
y
?
0
:
-
1
;
if
(
a
->
x
==
b
->
x
)
{
if
(
a
->
y
==
b
->
y
)
{
return
0
;
}
return
a
->
y
<
b
->
y
?
-
1
:
1
;
}
return
a
->
x
<
b
->
x
?
-
1
:
1
;
}
static
unsigned
int
ufloor
(
double
f
)
{
return
floor
(
f
);
}
static
unsigned
int
uceil
(
double
f
)
{
return
ceil
(
f
);
}
static
int
cmp_
double
(
const
void
*
vx
,
const
void
*
vy
)
{
const
double
*
x
=
vx
;
const
double
*
y
=
vy
;
cmp_
uint
(
const
void
*
vx
,
const
void
*
vy
)
{
const
unsigned
int
*
x
=
vx
;
const
unsigned
int
*
y
=
vy
;
return
*
x
==
*
y
?
0
:
(
*
x
>
*
y
?
1
:
-
1
);
}
...
...
@@ -338,8 +356,8 @@ cmp_rectangle(const void* vr1, const void* vr2) {
const
zathura_rectangle_t
*
r1
=
vr1
;
const
zathura_rectangle_t
*
r2
=
vr2
;
return
(
r1
->
x1
==
r2
->
x1
&&
r1
->
x2
==
r2
->
x2
&&
r1
->
y1
==
r2
->
y1
&&
r1
->
y2
==
r2
->
y2
)
return
(
ufloor
(
r1
->
x1
)
==
ufloor
(
r2
->
x1
)
&&
uceil
(
r1
->
x2
)
==
uceil
(
r2
->
x2
)
&&
ufloor
(
r1
->
y1
)
==
ufloor
(
r2
->
y1
)
&&
uceil
(
r1
->
y2
)
==
uceil
(
r2
->
y2
)
)
?
0
:
-
1
;
}
...
...
@@ -356,7 +374,7 @@ girara_list_append_unique(girara_list_t* l, girara_compare_function_t cmp, void*
}
static
void
append_unique_point
(
girara_list_t
*
list
,
const
double
x
,
const
double
y
)
{
append_unique_point
(
girara_list_t
*
list
,
const
unsigned
int
x
,
const
unsigned
int
y
)
{
zathura_point_t
*
p
=
g_try_malloc
(
sizeof
(
zathura_point_t
));
if
(
p
==
NULL
)
{
return
;
...
...
@@ -375,22 +393,22 @@ rectangle_to_points(void* vrect, void* vlist) {
const
zathura_rectangle_t
*
rect
=
vrect
;
girara_list_t
*
list
=
vlist
;
append_unique_point
(
list
,
rect
->
x1
,
rect
->
y1
);
append_unique_point
(
list
,
rect
->
x1
,
rect
->
y2
);
append_unique_point
(
list
,
rect
->
x2
,
rect
->
y1
);
append_unique_point
(
list
,
rect
->
x2
,
rect
->
y2
);
append_unique_point
(
list
,
ufloor
(
rect
->
x1
)
,
ufloor
(
rect
->
y1
)
)
;
append_unique_point
(
list
,
ufloor
(
rect
->
x1
)
,
uceil
(
rect
->
y2
)
)
;
append_unique_point
(
list
,
uceil
(
rect
->
x2
)
,
ufloor
(
rect
->
y1
)
)
;
append_unique_point
(
list
,
uceil
(
rect
->
x2
)
,
uceil
(
rect
->
y2
)
)
;
}
static
void
append_unique_
double
(
girara_list_t
*
list
,
const
double
v
)
{
double
*
p
=
g_try_malloc
(
sizeof
(
double
));
append_unique_
uint
(
girara_list_t
*
list
,
const
unsigned
int
v
)
{
double
*
p
=
g_try_malloc
(
sizeof
(
v
));
if
(
p
==
NULL
)
{
return
;
}
*
p
=
v
;
if
(
girara_list_append_unique
(
list
,
cmp_
double
,
p
)
==
false
)
{
if
(
girara_list_append_unique
(
list
,
cmp_
uint
,
p
)
==
false
)
{
g_free
(
p
);
}
}
...
...
@@ -399,24 +417,24 @@ append_unique_double(girara_list_t* list, const double v) {
static
void
cut_rectangle
(
const
zathura_rectangle_t
*
rect
,
girara_list_t
*
points
,
girara_list_t
*
rectangles
)
{
// Lists of ordred relevant points
girara_list_t
*
xs
=
girara_sorted_list_new2
(
cmp_
double
,
g_free
);
girara_list_t
*
ys
=
girara_sorted_list_new2
(
cmp_
double
,
g_free
);
girara_list_t
*
xs
=
girara_sorted_list_new2
(
cmp_
uint
,
g_free
);
girara_list_t
*
ys
=
girara_sorted_list_new2
(
cmp_
uint
,
g_free
);
append_unique_
double
(
xs
,
rect
->
x2
);
append_unique_
double
(
ys
,
rect
->
y2
);
append_unique_
uint
(
xs
,
uceil
(
rect
->
x2
)
)
;
append_unique_
uint
(
ys
,
uceil
(
rect
->
y2
)
)
;
GIRARA_LIST_FOREACH
(
points
,
zathura_point_t
*
,
i_pt
,
pt
)
if
(
pt
->
x
>
rect
->
x1
&&
pt
->
x
<
rect
->
x2
)
{
append_unique_
double
(
xs
,
pt
->
x
);
if
(
pt
->
x
>
ufloor
(
rect
->
x1
)
&&
pt
->
x
<
uceil
(
rect
->
x2
)
)
{
append_unique_
uint
(
xs
,
pt
->
x
);
}