summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authormwayne <[email protected]>2019-04-17 00:05:05 +0200
committerJohn Stebbins <[email protected]>2019-04-17 07:50:39 -0700
commit9582c349bbf51453d6eec93e4ee68b1ccd920078 (patch)
tree24a5caa67013c5953864a7105e9c39388ea5f207 /gtk
parent91a2a7afda4de02cb0dcd24e015a052a48f8ed43 (diff)
gtk: Fix cross compile issue with regex
introduced in commit a9daef1e18b93f793479155210110322234bb655 - remove duplicate regex match function - replace strptime call with ffmpeg implementation
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 7024b4311..0e066c08a 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -50,8 +50,6 @@
#include <netinet/in.h>
#include <netdb.h>
-#include <regex.h>
-
#if !defined(_NO_UPDATE_CHECK)
#if defined(_OLD_WEBKIT)
#include <webkit.h>
@@ -1051,24 +1049,6 @@ check_name_template(signal_user_data_t *ud, const char *str)
return FALSE;
}
-static int
-match_by_pattern(const char *string, const char *pattern)
-{
- int status;
- regex_t re;
- if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB) != 0)
- {
- return 0;
- }
- status = regexec(&re, string, (size_t) 0, NULL, 0);
- regfree(&re);
- if (status != 0)
- {
- return 0;
- }
- return 1;
-}
-
typedef struct {
const char *pattern;
const char *format;
@@ -1083,9 +1063,9 @@ parse_datestring(const char *src, struct tm *tm)
for (int i = 0; i < sizeof(maps); i++)
{
- if (match_by_pattern(src, maps[i].pattern))
+ if (hb_validate_param_string(maps[i].pattern), src)
{
- strptime(src, maps[i].format, tm);
+ av_small_strptime(src, maps[i].format, tm);
return 1;
}
}