-/*
- * Return values:
- * NOTOK if cp doesn't point to {param}
- * OK if cp points to {param} and that attribute exists, and returns
- * its value
- * 1 if cp points to {param} and that attribute doesn't exist
- */
-int
-parameter_value (CI ci, const char *param, const char *cp, const char **value) {
- int found = NOTOK;
- char *braced_param = concat ("{", param, "}", NULL);
-
- if (! strncasecmp(cp, braced_param, strlen (braced_param))) {
- char **ap, **ep;
-
- found = 1;
-
- for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ++ap, ++ep) {
- if (!strcasecmp (*ap, param)) {
- found = OK;
- *value = *ep;
- break;
- }
- }
- }
-
- free (braced_param);
- return found;
-}
-
-