Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 89ed2e9a rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Small fixes in lktadm

parent 5974e1ba
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!63Resolve "Drop libpcre dependency"
...@@ -131,6 +131,7 @@ init_populate__(struct lkt_cmd_args *args) ...@@ -131,6 +131,7 @@ init_populate__(struct lkt_cmd_args *args)
noreturn void noreturn void
init_file__(struct lkt_cmd_args *args) init_file__(struct lkt_cmd_args *args)
{ {
open_db();
int i; int i;
for (i = 0; i < args->argc; ++i) for (i = 0; i < args->argc; ++i)
metadata_set_file((char *) args->argv[i], mkvpropedit); metadata_set_file((char *) args->argv[i], mkvpropedit);
...@@ -272,6 +273,7 @@ static struct lkt_cmd_opt options_init[] = { ...@@ -272,6 +273,7 @@ static struct lkt_cmd_opt options_init[] = {
{ .name = "database", .call = init_database__ }, { .name = "database", .call = init_database__ },
{ .name = "populate", .call = init_populate__ }, { .name = "populate", .call = init_populate__ },
{ .name = "metadata", .call = init_metadata__ }, { .name = "metadata", .call = init_metadata__ },
{ .name = "file", .call = init_file__ },
LKT_OPT_NULL, LKT_OPT_NULL,
}; };
...@@ -293,5 +295,5 @@ static struct lkt_cmd_opt options[] = { ...@@ -293,5 +295,5 @@ static struct lkt_cmd_opt options[] = {
int int
main(int argc, const char **argv) main(int argc, const char **argv)
{ {
lkt_cmd_parse(options, argc, argv, help); lkt_cmd_parse(options, argc - 1, argv + 1, help);
} }
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include <lektor/mkv.h> #include <lektor/mkv.h>
#include <pcre.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
...@@ -14,6 +13,10 @@ ...@@ -14,6 +13,10 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/types.h>
#include <regex.h>
#include <pcre.h>
static const char *METADATA_TEMPLATE = static const char *METADATA_TEMPLATE =
" <?xml version=\"1.0\" encoding=\"UTF-8\"?> " " <?xml version=\"1.0\" encoding=\"UTF-8\"?> "
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter