Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
2f5a7a39
Commit
2f5a7a39
authored
Feb 08, 2012
by
Sebastian Ramacher
Browse files
compare case insensitive
parent
a5829b87
Changes
1
Hide whitespace changes
Inline
Side-by-side
completion.c
View file @
2f5a7a39
...
...
@@ -15,6 +15,17 @@
#include <girara/utils.h>
#include <girara/datastructures.h>
static
int
compare_case_insensitive
(
const
char
*
str1
,
const
char
*
str2
)
{
char
*
ustr1
=
g_utf8_casefold
(
str1
,
-
1
);
char
*
ustr2
=
g_utf8_casefold
(
str2
,
-
1
);
int
res
=
g_utf8_collate
(
ustr1
,
ustr2
);
g_free
(
ustr1
);
g_free
(
ustr2
);
return
res
;
}
static
girara_list_t
*
list_files
(
zathura_t
*
zathura
,
const
char
*
current_path
,
const
char
*
current_file
,
int
current_file_length
,
bool
is_dir
)
{
...
...
@@ -24,7 +35,7 @@ list_files(zathura_t* zathura, const char* current_path, const char* current_fil
return
NULL
;
}
girara_list_t
*
res
=
girara_sorted_list_new2
((
girara_compare_function_t
)
g_strcmp0
,
girara_list_t
*
res
=
girara_sorted_list_new2
((
girara_compare_function_t
)
compare_case_insensitive
,
(
girara_free_function_t
)
g_free
);
/* read files */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment