From b7d08a9a3fc640a05bcbca93b8c96129deff6e3a Mon Sep 17 00:00:00 2001 From: Jason Stubbs Date: Sat, 20 Nov 2004 14:51:42 +0000 Subject: Added qualifiers to bmh_search parameters and return type. Slightly modified parameter type on main() to get rid of a warning. --- src/filter-env/bmh_search.c | 4 +--- src/filter-env/bmh_search.h | 4 +--- src/filter-env/posix.c | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/filter-env/bmh_search.c b/src/filter-env/bmh_search.c index 190bdfa..4d9f74c 100644 --- a/src/filter-env/bmh_search.c +++ b/src/filter-env/bmh_search.c @@ -5,9 +5,7 @@ aparently distributed by Addison-Wesley Publishing Co. Inc, http://aw.com/ #include #define MAXCHAR 256 -char *bmh_search( pat, text, n ) -char *pat, *text; -int n; +const char *bmh_search( const char *pat, const char *text, int n ) { int i, j, k, m, skip[MAXCHAR]; m = strlen(pat); diff --git a/src/filter-env/bmh_search.h b/src/filter-env/bmh_search.h index e0eb706..e44fdff 100644 --- a/src/filter-env/bmh_search.h +++ b/src/filter-env/bmh_search.h @@ -2,6 +2,4 @@ aparently distributed by Addison-Wesley Publishing Co. Inc, http://aw.com/ */ -char *bmh_search(pat, text, n ); -//char *pat, *text; -//int n; +const char *bmh_search(const char *pat, const char *text, int n ); diff --git a/src/filter-env/posix.c b/src/filter-env/posix.c index 376a7ca..16749a3 100644 --- a/src/filter-env/posix.c +++ b/src/filter-env/posix.c @@ -38,7 +38,7 @@ const char *walk_command(const char *p, const char *end, char endchar, const cha static int debugging; int -main(int argc, const char **argv) +main(int argc, char *const *argv) { int fd = 0; char **funcs = NULL; char **vars = NULL; -- cgit v1.2.3-65-gdbad