Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
41faf78f
Vérifiée
Valider
41faf78f
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Using strtol
parent
f2a53cbf
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!63
Resolve "Drop libpcre dependency"
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
inc/lektor/macro.h
+8
-0
8 ajouts, 0 suppression
inc/lektor/macro.h
src/mkv/write.c
+3
-4
3 ajouts, 4 suppressions
src/mkv/write.c
avec
11 ajouts
et
4 suppressions
inc/lektor/macro.h
+
8
−
0
Voir le fichier @
41faf78f
...
@@ -64,3 +64,11 @@
...
@@ -64,3 +64,11 @@
#define GOTO_UNLESS(cond, msg, label) GOTO_IF(!(cond), msg, ret)
#define GOTO_UNLESS(cond, msg, label) GOTO_IF(!(cond), msg, ret)
#define RETURN_UNLESS(cond, msg, ret) RETURN_IF(!(cond), msg, ret)
#define RETURN_UNLESS(cond, msg, ret) RETURN_IF(!(cond), msg, ret)
#define NOTHING
/* Usefull to return nothing. */
#define NOTHING
/* Usefull to return nothing. */
#define STRTOL(ret, str, endptr, err_flag) \
{ \
err_flag = 0; \
errno = 0; \
ret = str == NULL ? 0 : strtol(str, &(endptr), 0); \
err_flag = errno != 0 || endptr == str; \
}
Ce diff est replié.
Cliquez pour l'agrandir.
src/mkv/write.c
+
3
−
4
Voir le fichier @
41faf78f
...
@@ -147,6 +147,7 @@ metadata_from_path(char *const mkvfile, struct kara_metadata *meta)
...
@@ -147,6 +147,7 @@ metadata_from_path(char *const mkvfile, struct kara_metadata *meta)
regmatch_t
pmatch
[
nmatch
];
regmatch_t
pmatch
[
nmatch
];
int
reti
,
sta
=
false
;
int
reti
,
sta
=
false
;
char
msgbuf
[
LEKTOR_TAG_MAX
];
char
msgbuf
[
LEKTOR_TAG_MAX
];
char
*
endptr
;
static
const
char
*
rgx
=
static
const
char
*
rgx
=
"^/(.+)/(vo|va|amv|cdg|autres|vocaloid)/"
"^/(.+)/(vo|va|amv|cdg|autres|vocaloid)/"
...
@@ -178,10 +179,8 @@ metadata_from_path(char *const mkvfile, struct kara_metadata *meta)
...
@@ -178,10 +179,8 @@ metadata_from_path(char *const mkvfile, struct kara_metadata *meta)
goto
error
;
goto
error
;
}
}
if
(
msgbuf
[
0
]
!=
'\0'
)
{
STRTOL
(
meta
->
song_number
,
msgbuf
,
endptr
,
reti
);
meta
->
song_number
=
atoi
(
msgbuf
);
/* TODO: Use strtol */
if
(
reti
||
meta
->
song_number
<=
0
)
meta
->
song_number
=
MAX
(
1
,
meta
->
song_number
);
}
else
meta
->
song_number
=
1
;
meta
->
song_number
=
1
;
sta
=
true
;
sta
=
true
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter