summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
authorpaul <paul>2005-05-06 21:25:49 +0000
committerpaul <paul>2005-05-06 21:25:49 +0000
commit8cc4198f9fabe5f10f5a773de1503d82f33a01fb (patch)
tree77045da709ff66629bd12029b9ee17700360909b /lib/command.h
parente7fe8c88c3d552400e1ae3ae9243319ab95d6f2d (diff)
2005-05-06 Paul Jakma <paul@dishone.st>
* (general) extern and static'ification of functions in code and header. Cleanup any definitions with unspecified arguments. Add casts for callback assignments where the callback is defined, typically, as passing void *, but the function being assigned has some other pointer type defined as its argument, as gcc complains about casts from void * to X* via function arguments. Fix some old K&R style function argument definitions. Add noreturn gcc attribute to some functions, as appropriate. Add unused gcc attribute to some functions (eg ones meant to help while debugging) Add guard defines to headers which were missing them. * command.c: (install_node) add const qualifier, still doesnt shut up the warning though, because of the double pointer. (cmp_node) ditto * keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived fromn vty.h ones to fix some of the (long) < 0 warnings. * thread.c: (various) use thread_empty (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type * vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they removed from ospfd/ospf_vty.h * zebra.h: Move definition of ZEBRA_PORT to here, to remove dependence of lib on zebra/zserv.h
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/command.h b/lib/command.h
index 6fd42fa1..5328888a 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -318,27 +318,27 @@ struct desc
#endif /* HAVE_IPV6 */
/* Prototypes. */
-void install_node (struct cmd_node *, int (*) (struct vty *));
-void install_default (enum node_type);
-void install_element (enum node_type, struct cmd_element *);
-void sort_node ();
+extern void install_node (struct cmd_node *, int (*) (struct vty *));
+extern void install_default (enum node_type);
+extern void install_element (enum node_type, struct cmd_element *);
+extern void sort_node (void);
/* Concatenates argv[shift] through argv[argc-1] into a single NUL-terminated
string with a space between each element (allocated using
XMALLOC(MTYPE_TMP)). Returns NULL if shift >= argc. */
-char *argv_concat (const char **argv, int argc, int shift);
-
-vector cmd_make_strvec (const char *);
-void cmd_free_strvec (vector);
-vector cmd_describe_command ();
-char **cmd_complete_command ();
-const char *cmd_prompt (enum node_type);
-int config_from_file (struct vty *, FILE *);
-enum node_type node_parent (enum node_type);
-int cmd_execute_command (vector, struct vty *, struct cmd_element **, int);
-int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **);
-void config_replace_string (struct cmd_element *, char *, ...);
-void cmd_init (int);
+extern char *argv_concat (const char **argv, int argc, int shift);
+
+extern vector cmd_make_strvec (const char *);
+extern void cmd_free_strvec (vector);
+extern vector cmd_describe_command (vector, struct vty *, int *status);
+extern char **cmd_complete_command (vector, struct vty *, int *status);
+extern const char *cmd_prompt (enum node_type);
+extern int config_from_file (struct vty *, FILE *);
+extern enum node_type node_parent (enum node_type);
+extern int cmd_execute_command (vector, struct vty *, struct cmd_element **, int);
+extern int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **);
+extern void config_replace_string (struct cmd_element *, char *, ...);
+extern void cmd_init (int);
/* Export typical functions. */
extern struct cmd_element config_end_cmd;
@@ -346,9 +346,9 @@ extern struct cmd_element config_exit_cmd;
extern struct cmd_element config_quit_cmd;
extern struct cmd_element config_help_cmd;
extern struct cmd_element config_list_cmd;
-char *host_config_file ();
-void host_config_set (char *);
-
-void print_version (const char *);
+extern char *host_config_file (void);
+extern void host_config_set (char *);
+extern void print_version (const char *);
+
#endif /* _ZEBRA_COMMAND_H */