summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/sys/vector.c6
-rw-r--r--include/cmsys.h6
-rw-r--r--include/proto.h2
-rw-r--r--mbbsd/name.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/common/sys/vector.c b/common/sys/vector.c
index 70931096..fc99bdc8 100644
--- a/common/sys/vector.c
+++ b/common/sys/vector.c
@@ -47,7 +47,7 @@ Vector_clear(struct Vector *self, const int size)
}
int
-Vector_length(struct Vector *self)
+Vector_length(const struct Vector *self)
{
return self->length;
}
@@ -93,7 +93,7 @@ Vector_add(struct Vector *self, const char *name)
}
const char*
-Vector_get(struct Vector *self, const int idx)
+Vector_get(const struct Vector *self, const int idx)
{
assert(0 <= idx && idx < self->length);
return self->base + self->size * idx;
@@ -138,7 +138,7 @@ Vector_match(const struct Vector *src, struct Vector *dst, const int key, const
}
void
-Vector_sublist(struct Vector *src, struct Vector *dst, const char *tag)
+Vector_sublist(const struct Vector *src, struct Vector *dst, const char *tag)
{
int i;
int len;
diff --git a/include/cmsys.h b/include/cmsys.h
index 0c565bb4..9b3ccef3 100644
--- a/include/cmsys.h
+++ b/include/cmsys.h
@@ -161,13 +161,13 @@ extern void Vector_init(struct Vector *self, const int size);
extern void Vector_init_const(struct Vector *self, char * base, const int length, const int size);
extern void Vector_delete(struct Vector *self);
extern void Vector_clear(struct Vector *self, const int size);
-extern int Vector_length(struct Vector *self);
+extern int Vector_length(const struct Vector *self);
extern void Vector_resize(struct Vector *self, const int length);
extern void Vector_add(struct Vector *self, const char *name);
-extern const char* Vector_get(struct Vector *self, const int idx);
+extern const char* Vector_get(const struct Vector *self, const int idx);
extern int Vector_MaxLen(const struct Vector *list, const int offset, const int count);
extern int Vector_match(const struct Vector *src, struct Vector *dst, const int key, const int pos);
-extern void Vector_sublist(struct Vector *src, struct Vector *dst, const char *tag);
+extern void Vector_sublist(const struct Vector *src, struct Vector *dst, const char *tag);
extern int Vector_remove(struct Vector *self, const char *name);
extern int Vector_search(const struct Vector *self, const char *name);
diff --git a/include/proto.h b/include/proto.h
index 680a2b9c..228ee393 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -428,7 +428,7 @@ typedef int (*gnc_comp_func)(int, const char*, int);
typedef int (*gnc_perm_func)(int);
typedef char* (*gnc_getname_func)(int);
-extern void namecomplete2(struct Vector *namelist, const char *prompt, char *data);
+extern void namecomplete2(const struct Vector *namelist, const char *prompt, char *data);
extern void ShowVector(struct Vector *self, int row, int column, const char *prompt);
extern void ToggleVector(struct Vector *list, int *recipient, const char *listfile, const char *msg);
diff --git a/mbbsd/name.c b/mbbsd/name.c
index 1a11e967..bf34dc06 100644
--- a/mbbsd/name.c
+++ b/mbbsd/name.c
@@ -53,7 +53,7 @@ ToggleVector(struct Vector *list, int *recipient, const char *listfile, const ch
}
void
-namecomplete2(struct Vector *namelist, const char *prompt, char *data)
+namecomplete2(const struct Vector *namelist, const char *prompt, char *data)
{
char *temp;
int x, y, origx, scrx;