summaryrefslogtreecommitdiff
path: root/loadapi.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-10-05 16:10:30 -0400
committerPaul Smith <psmith@gnu.org>2013-10-05 16:10:30 -0400
commit2fb91e19a02ff8a3e43145d582cfebaf3a60f1d9 (patch)
tree7bd7b902fd68f6df94c90d7544184067031a2502 /loadapi.c
parentf96c114e22c26dbcd18b7c16590b5e0ef0c58fe9 (diff)
downloadgunmake-2fb91e19a02ff8a3e43145d582cfebaf3a60f1d9.tar.gz
Sanitize the registered function interface.
Expand the characters which are legal in a function name, and check the name for validity. Create a type for the function pointer. Convert the last argument from a boolean to flags, to allow for expansion.
Diffstat (limited to 'loadapi.c')
-rw-r--r--loadapi.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/loadapi.c b/loadapi.c
index e314390..0568cbd 100644
--- a/loadapi.c
+++ b/loadapi.c
@@ -54,9 +54,8 @@ gmk_expand (const char *ref)
/* Register a function to be called from makefiles. */
void
-gmk_add_function (const char *name,
- char *(*func)(const char *nm, int argc, char **argv),
- int min, int max, int expand)
+gmk_add_function (const char *name, gmk_func_ptr func,
+ unsigned int min, unsigned int max, unsigned int flags)
{
- define_new_function (reading_file, name, min, max, expand, func);
+ define_new_function (reading_file, name, min, max, flags, func);
}