cli: declare external variable nm_cli in <nmcli.h> header

This commit is contained in:
Thomas Haller
2016-04-30 15:02:53 +02:00
parent a9908c012c
commit 7752f390c2
5 changed files with 2 additions and 18 deletions

View File

@@ -1170,10 +1170,6 @@ nmc_set_in_readline (gboolean in_readline)
pthread_mutex_unlock (&readline_mutex);
}
/* Global variable defined in nmcli.c */
extern NmCli nm_cli;
static char *
nmc_readline_helper (const char *prompt)
{

View File

@@ -261,9 +261,6 @@ typedef struct {
} TabCompletionInfo;
static TabCompletionInfo nmc_tab_completion = {NULL, NULL, NULL, NULL};
/* Global variable defined in nmcli.c - used for TAB completion */
extern NmCli nm_cli;
static char *gen_connection_types (const char *text, int state);
static void

View File

@@ -3572,9 +3572,6 @@ is_single_word (const char* line)
return FALSE;
}
/* Global variable defined in nmcli.c */
extern NmCli nm_cli;
static char *
gen_func_ifnames (const char *text, int state)
{

View File

@@ -161,6 +161,8 @@ typedef struct _NmCli {
NmcTermColor editor_prompt_color; /* Color of prompt in connection editor */
} NmCli;
extern NmCli nm_cli;
/* Error quark for GError domain */
#define NMCLI_ERROR (nmcli_error_quark ())
GQuark nmcli_error_quark (void);
@@ -169,5 +171,4 @@ gboolean nmc_seen_sigint (void);
void nmc_clear_sigint (void);
void nmc_set_sigquit_internal (void);
#endif /* NMC_NMCLI_H */

View File

@@ -2082,13 +2082,6 @@ typedef struct {
NmcPropertyFuncsFields
} NmcPropertyFuncs;
/*
* We need NmCli in some _set_property functions, and they aren't passed NmCli.
* So use the global variable.
*/
/* Global variable defined in nmcli.c */
extern NmCli nm_cli;
NMSetting *
nmc_setting_new_for_name (const char *name)
{