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
dbe81551
Vérifiée
Valider
dbe81551
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Differentiate optional and non optional settings in config.inc
parent
d72f3a1d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!93
Config rewrite
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
inc/lektor/config.h
+4
-2
4 ajouts, 2 suppressions
inc/lektor/config.h
inc/lektor/config.inc
+2
-2
2 ajouts, 2 suppressions
inc/lektor/config.inc
src/config.c
+11
-4
11 ajouts, 4 suppressions
src/config.c
src/reg.c
+1
-1
1 ajout, 1 suppression
src/reg.c
avec
18 ajouts
et
9 suppressions
inc/lektor/config.h
+
4
−
2
Voir le fichier @
dbe81551
...
...
@@ -10,10 +10,12 @@ struct lkt_state;
#define section(sct) "\n[" sct "]\n"
#define value(key, val) key " = " val "\n"
#define value_opt(key, val) value(key, val)
static
const
char
*
const
lkt_default_config_file
=
#include
<lektor/config.inc>
;
#undef value
#undef value_opt
#undef section
/* It is just an alias to the consecutive use of config_detect_file and
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
inc/lektor/config.inc
+
2
−
2
Voir le fichier @
dbe81551
...
...
@@ -11,7 +11,7 @@ value("kara_dir", "/home/kara")
value
(
"db_path"
,
"/home/kara/kara.db"
)
section
(
"repo"
)
value
(
"path"
,
"STATIC"
)
value
_opt
(
"path"
,
"STATIC"
)
value
(
"load_function"
,
"load_repo_https"
)
value
(
"name"
,
"Kurisu"
)
value
(
"url"
,
"https://kurisu.iiens.net"
)
...
...
@@ -20,7 +20,7 @@ value("id_json", "https://kurisu.iiens.net/api?id=%ld")
value
(
"id_kara"
,
"https://kurisu.iiens.net/download.php?id=%ld"
)
section
(
"player"
)
value
(
"path"
,
"STATIC"
)
value
_opt
(
"path"
,
"STATIC"
)
value
(
"load_function"
,
"load_sdl2"
)
value
(
"autoclear"
,
"true"
)
value
(
"def_random"
,
"false"
)
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/config.c
+
11
−
4
Voir le fichier @
dbe81551
...
...
@@ -139,9 +139,14 @@ load_module_by_name(struct lkt_state *srv, const char *name, void *mod)
{
char
mod_path
[
PATH_MAX
],
mod_load
[
INI_MAX_LINE_LEN
];
if
(
!
database_config_get_text
(
srv
->
db
,
name
,
"path"
,
mod_path
,
PATH_MAX
)
||
!
database_config_get_text
(
srv
->
db
,
name
,
"load_function"
,
mod_load
,
INI_MAX_LINE_LEN
))
{
LOG_ERROR
(
"Module named %s is incomplete or is not defined in config file"
,
name
);
/* When, don't mind if its not here */
if
(
!
database_config_get_text
(
srv
->
db
,
name
,
"path"
,
mod_path
,
PATH_MAX
))
{
LOG_WARN_SCT
(
"CONFIG"
,
"No setting 'path' in section '%s'"
,
name
);
mod_path
[
0
]
=
'\0'
;
}
if
(
!
database_config_get_text
(
srv
->
db
,
name
,
"load_function"
,
mod_load
,
INI_MAX_LINE_LEN
))
{
LOG_ERROR_SCT
(
"CONFIG"
,
"Module named %s is incomplete or is not defined in config file"
,
name
);
return
1
;
}
...
...
@@ -153,6 +158,7 @@ validate_conf(volatile sqlite3 *db)
{
const
char
*
section
;
#define section(_sct) section = _sct;
#define value_opt(name, value)
#define value(name, value) \
if (!database_config_exists(db, section, name)) { \
LOG_ERROR_SCT("CONFIG", "Missing option \""name"\" in section \"%s\"", \
...
...
@@ -162,6 +168,7 @@ validate_conf(volatile sqlite3 *db)
#include
<lektor/config.inc>
#undef section
#undef value
#undef value_opt
return
0
;
}
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/reg.c
+
1
−
1
Voir le fichier @
dbe81551
...
...
@@ -17,7 +17,7 @@ reg_pick(const char *file, void **handle, const char *symbol)
return
NULL
;
/* Use the register instead of dlfcn? */
if
(
!
file
||
STR_MATCH
(
file
,
"STATIC"
)
||
handle
==
NULL
)
if
(
!
file
||
file
[
0
]
==
'\0'
||
STR_MATCH
(
file
,
"STATIC"
)
||
handle
==
NULL
)
goto
use_reg
;
/* Use dlsym */
...
...
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