summaryrefslogtreecommitdiff
path: root/ddb/db_command.c
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-12-15 11:48:39 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-15 21:42:30 +0100
commitf885fde0a7177f954893be22efdf8c55c7c40fdb (patch)
tree1052965ca2da8f0e22142205d8fe1bb4de0fd531 /ddb/db_command.c
parent442227ee5519f307e9f74030a9eeb7aa7983a4bc (diff)
ddb: qualify pointers whose dereferenced values are constant with const
Diffstat (limited to 'ddb/db_command.c')
-rw-r--r--ddb/db_command.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ddb/db_command.c b/ddb/db_command.c
index 85cbf81..3257e07 100644
--- a/ddb/db_command.c
+++ b/ddb/db_command.c
@@ -95,15 +95,15 @@ boolean_t db_ed_style = TRUE;
*/
int
db_cmd_search(name, table, cmdp)
- char * name;
- struct db_command *table;
- struct db_command **cmdp; /* out */
+ const char * name;
+ const struct db_command *table;
+ const struct db_command **cmdp; /* out */
{
- struct db_command *cmd;
+ const struct db_command *cmd;
int result = CMD_NONE;
for (cmd = table; cmd->name != 0; cmd++) {
- char *lp;
+ const char *lp;
char *rp;
int c;
@@ -142,9 +142,9 @@ db_cmd_search(name, table, cmdp)
void
db_cmd_list(table)
- struct db_command *table;
+ const struct db_command *table;
{
- struct db_command *cmd;
+ const struct db_command *cmd;
for (cmd = table; cmd->name != 0; cmd++) {
db_printf("%-12s", cmd->name);
@@ -447,7 +447,7 @@ db_exec_cmd_nest(cmd, size)
}
void db_error(s)
- char *s;
+ const char *s;
{
extern int db_macro_level;
@@ -524,10 +524,10 @@ db_fncall(void)
boolean_t
db_option(modif, option)
- char *modif;
- int option;
+ const char *modif;
+ int option;
{
- char *p;
+ const char *p;
for (p = modif; *p; p++)
if (*p == option)