5 /*=========================================================================*
7 *=========================================================================*/
8 int env_prefix(env
, prefix
)
9 char *env
; /* environment variable to inspect */
10 char *prefix
; /* prefix to test for */
12 /* An environment setting may be prefixed by a word, usually "pci".
13 * Return TRUE if a given prefix is used.
15 char value
[EP_BUF_SIZE
];
16 char punct
[] = ":,;.";
20 if ((s
= env_get_param(env
, value
, sizeof(value
))) != 0) {
21 if (s
!= ESRCH
) /* only error allowed */
22 printf("WARNING: env_get_param() failed in env_prefix(): %d\n", s
);
26 return(strncmp(value
, prefix
, n
) == 0
27 && strchr(punct
, value
[n
]) != NULL
);