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
c0b29298
Vérifiée
Valider
c0b29298
rédigé
Il y a 4 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
LKT: Case incensitive for types/languages/categories and update CHANGELOG
parent
04175995
Branches
Branches contenant la validation
Étiquettes
Étiquettes contenant la validation
1 requête de fusion
!127
Lkt update
Pipeline
#1959
réussi
Il y a 4 ans
Étape : initialization
Étape : configure
Étape : build
Étape : finalization
Modifications
2
Pipelines
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
CHANGELOG
+1
-0
1 ajout, 0 suppression
CHANGELOG
src/main/lkt.c
+9
-42
9 ajouts, 42 suppressions
src/main/lkt.c
avec
10 ajouts
et
42 suppressions
CHANGELOG
+
1
−
0
Voir le fichier @
c0b29298
...
...
@@ -4,6 +4,7 @@
- Add json-c to the download dependency script (add cmake as a requirement for that)
- Choose between static or shared library for liblektor
- Download the bakabase with obfuscation or not
- Implicit types for queries with lkt
# v2.1 (df74b85f)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/main/lkt.c
+
9
−
42
Voir le fichier @
c0b29298
...
...
@@ -55,26 +55,6 @@ static const char *LKT_QUEUE_DEFAULT[] = { "10" };
/* Communication functions and fonction that interact with lektor stuff. */
static
inline
int
__string_is_lower
(
const
char
*
str
)
{
while
(
*
str
!=
'\0'
)
{
if
(
!
islower
(
*
str
))
return
1
;
}
return
0
;
}
static
inline
int
__string_is_upper
(
const
char
*
str
)
{
while
(
*
str
!=
'\0'
)
{
if
(
!
isupper
(
*
str
))
return
1
;
}
return
0
;
}
static
inline
void
__concat_strings
(
char
*
const
res
,
size_t
len
,
const
char
**
tab
,
size_t
count
)
{
...
...
@@ -105,24 +85,12 @@ lkt_get_query_type(struct cmd_args *args, char *const regex, size_t regex_len)
return
0
;
}
/* Type ?== type */
else
if
(
__string_is_upper
(
args
->
argv
[
0
]))
{
#define kara_category(unused)
#define kara_language(unused)
/* Type ?== type OR Type ?== category OR Type ?== lang */
#define kara_type(tp) \
if (STR_MATCH(tp, args->argv[0])) { \
safe_snprintf(regex, regex_len, "type://%s", args->argv[0]); \
return 0; \
}
#include
<lektor/database.def>
#undef kara_category
#undef kara_language
#undef kara_type
}
/* Type ?== category OR Type ?== lang */
else
if
(
__string_is_lower
(
args
->
argv
[
0
]))
{
#define kara_type(unused)
#define kara_category(ct) \
if (STR_MATCH(ct, args->argv[0])) { \
safe_snprintf(regex, regex_len, "category://%s", args->argv[0]); \
...
...
@@ -138,7 +106,6 @@ if (STR_MATCH(lg, args->argv[0])) { \
#undef kara_language
#undef kara_type
}
}
memset
(
regex
,
0
,
regex_len
*
sizeof
(
char
));
...
...
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