summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
authorhasso <hasso>2004-10-05 21:01:23 +0000
committerhasso <hasso>2004-10-05 21:01:23 +0000
commit8c328f1106cf0498333c2d8a96940e7b4581e316 (patch)
tree9bf24cca6a68a9dd5d4dda586484e497d0c19ca6 /lib/command.h
parent98c91ac6ac085713c00af00a6ac41779be6b50b3 (diff)
Number of warnings is down to 3 again in lib directory. A lot of const's
added to strings and a lot of int -> unsigned int changes.
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/command.h b/lib/command.h
index d1648d68..66883fbb 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -60,7 +60,7 @@ struct host
int encrypt;
/* Banner configuration. */
- char *motd;
+ const char *motd;
};
/* There are some command levels which called from command node. */
@@ -113,7 +113,7 @@ struct cmd_node
enum node_type node;
/* Prompt character at vty interface. */
- char *prompt;
+ const char *prompt;
/* Is this node's configuration goes to vtysh ? */
int vtysh;
@@ -128,12 +128,12 @@ struct cmd_node
/* Structure of command element. */
struct cmd_element
{
- char *string; /* Command specification by string. */
+ const char *string; /* Command specification by string. */
int (*func) (struct cmd_element *, struct vty *, int, char **);
- char *doc; /* Documentation of this command. */
+ const char *doc; /* Documentation of this command. */
int daemon; /* Daemon to which this command belong. */
vector strvec; /* Pointing out each description vector. */
- int cmdsize; /* Command index count. */
+ unsigned int cmdsize; /* Command index count. */
char *config; /* Configuration string */
vector subconfig; /* Sub configuration string */
};
@@ -141,8 +141,8 @@ struct cmd_element
/* Command description structure. */
struct desc
{
- char *cmd; /* Command string. */
- char *str; /* Command's description. */
+ const char *cmd; /* Command string. */
+ const char *str; /* Command's description. */
};
/* Return value of the commands. */
@@ -291,7 +291,7 @@ vector cmd_make_strvec (char *);
void cmd_free_strvec (vector);
vector cmd_describe_command ();
char **cmd_complete_command ();
-char *cmd_prompt (enum node_type);
+const char *cmd_prompt (enum node_type);
int config_from_file (struct vty *, FILE *);
int cmd_execute_command (vector, struct vty *, struct cmd_element **);
int cmd_execute_command_strict (vector, struct vty *, struct cmd_element **);