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
b0d97f90
Vérifiée
Valider
b0d97f90
rédigé
Il y a 5 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Adding printing of subcommands help
parent
b80455f2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!64
Resolve "Installation"
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
inc/lektor/cmd.h
+1
-1
1 ajout, 1 suppression
inc/lektor/cmd.h
src/cmd.c
+10
-0
10 ajouts, 0 suppression
src/cmd.c
src/main/lktadm.c
+5
-5
5 ajouts, 5 suppressions
src/main/lktadm.c
src/module/module_sdl2.c
+1
-5
1 ajout, 5 suppressions
src/module/module_sdl2.c
avec
17 ajouts
et
11 suppressions
inc/lektor/cmd.h
+
1
−
1
Voir le fichier @
b0d97f90
...
...
@@ -18,7 +18,7 @@ struct lkt_cmd_opt {
const
char
*
name
;
lkt_cmd_callback
call
;
const
char
*
help
;
int
sub
;
struct
lkt_cmd_opt
*
sub
;
};
/* Parse the command line with the list of options. No parameter may be NULL.
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/cmd.c
+
10
−
0
Voir le fichier @
b0d97f90
...
...
@@ -84,4 +84,14 @@ lkt_cmd_help(struct lkt_cmd_opt *opts, const char *name)
printf
(
"
\t
%*s %s
\n
"
,
max_len
,
it
->
name
,
it
->
help
);
it
=
opts
+
(
++
offset
);
}
/* Prints the sub commands help */
it
=
opts
;
offset
=
0
;
write
(
1
,
"
\n
"
,
sizeof
(
char
));
while
(
it
&&
it
->
name
)
{
if
(
it
->
sub
)
lkt_cmd_help
(
it
->
sub
,
it
->
name
);
it
=
opts
+
(
++
offset
);
}
}
Ce diff est replié.
Cliquez pour l'agrandir.
src/main/lktadm.c
+
5
−
5
Voir le fichier @
b0d97f90
...
...
@@ -292,7 +292,7 @@ init__(struct lkt_cmd_args *args)
}
static
struct
lkt_cmd_opt
options
[]
=
{
{
.
name
=
"init"
,
.
call
=
init__
,
.
help
=
"The init sub-command"
,
.
sub
=
1
},
{
.
name
=
"init"
,
.
call
=
init__
,
.
help
=
"The init sub-command"
,
.
sub
=
options_init
},
{
.
name
=
"get"
,
.
call
=
get__
,
.
help
=
"Get the mdt of a kara by its id"
},
{
.
name
=
"download"
,
.
call
=
download__
,
.
help
=
"Download a kara by its id"
},
{
.
name
=
"cat"
,
.
call
=
cat__
,
.
help
=
"Prints the mdt of a kara on the fs"
},
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/module/module_sdl2.c
+
1
−
5
Voir le fichier @
b0d97f90
...
...
@@ -156,17 +156,14 @@ loop:
break
;
case
SDL_WINDOWEVENT
:
if
(
event
.
window
.
event
==
SDL_WINDOWEVENT_EXPOSED
)
{
fprintf
(
stderr
,
" . sdl_thread__: Window exposed
\n
"
);
if
(
event
.
window
.
event
==
SDL_WINDOWEVENT_EXPOSED
)
redraw
=
1
;
}
break
;
case
SDL_KEYDOWN
:
if
(
event
.
key
.
keysym
.
sym
==
SDLK_SPACE
)
{
const
char
*
cmd_pause
[]
=
{
"cycle"
,
"pause"
,
NULL
};
mpv_command_async
((
mpv_handle
*
)
sdl2
->
mpv
,
0
,
cmd_pause
);
fprintf
(
stderr
,
" . sdl_thread__: Toggle pause
\n
"
);
}
break
;
...
...
@@ -178,7 +175,6 @@ loop:
SDL_SetWindowFullscreen
((
SDL_Window
*
)
sdl2
->
window
,
SDL_WINDOW_FULLSCREEN
);
/* May use SDL_WINDOW_FULLSCREEN_DESKTOP, need to check. */
sdl2
->
is_fullscreen
=
1
-
sdl2
->
is_fullscreen
;
fprintf
(
stderr
,
" . sdl_thread__: Toggle fullscreen
\n
"
);
}
break
;
...
...
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