argument-related variables can be local
This commit is contained in:
parent
0feceaf03a
commit
74329a6632
14
termite.c
14
termite.c
|
@ -10,13 +10,6 @@
|
||||||
# define __attribute__(x)
|
# define __attribute__(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static gchar *role = NULL;
|
|
||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
|
||||||
{ "role", 'r', 0, G_OPTION_ARG_STRING, &role, "The role to use", "ROLE" },
|
|
||||||
{ NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct search_dialog_info {
|
typedef struct search_dialog_info {
|
||||||
GtkWidget *vte;
|
GtkWidget *vte;
|
||||||
GtkWidget *entry;
|
GtkWidget *entry;
|
||||||
|
@ -172,6 +165,13 @@ int main(int argc, char **argv) {
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GOptionContext *context = g_option_context_new("[COMMAND]");
|
GOptionContext *context = g_option_context_new("[COMMAND]");
|
||||||
|
|
||||||
|
const gchar *role = NULL;
|
||||||
|
|
||||||
|
const GOptionEntry entries[] = {
|
||||||
|
{ "role", 'r', 0, G_OPTION_ARG_STRING, &role, "The role to use", "ROLE" },
|
||||||
|
{ NULL }
|
||||||
|
};
|
||||||
|
|
||||||
g_option_context_add_main_entries(context, entries, NULL);
|
g_option_context_add_main_entries(context, entries, NULL);
|
||||||
g_option_context_add_group(context, gtk_get_option_group(TRUE));
|
g_option_context_add_group(context, gtk_get_option_group(TRUE));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue