![Netscape ENTERPRISE SERVER 6.1 Manual Download Page 180](http://html1.mh-extra.com/html/netscape/enterprise-server-6-1/enterprise-server-6-1_manual_1674653180.webp)
NSAPI Functions (in Alphabetical Order)
180
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
Parameters
char *str
is the string to be compared.
char *exp
is the shell expression (wildcard pattern) to compare against.
Example
/* Use wildcard match to see if this path is one we want */
char *path;
char *match = "/usr/netscape/*";
if (shexp_cmp(path, match) != 0)
return REQ_NOACTION;
/* no match */
See also
shexp_casecmp, shexp_match, shexp_valid
shexp_match
The
shexp_match
function compares a specified pre-validated shell expression
against a specified string. It returns one of three possible values representing
match, no match, and invalid comparison. The comparison (in contrast to that of
the
shexp_casecmp
function) is case-sensitive.
The
shexp_match
function doesn’t perform validation of the shell expression;
instead the function assumes that you have already called
shexp_valid
.
Use this function if you have a shell expression like
*.example.com
and you want
to make sure that a string matches it, such as
foo.example.com
.
Syntax
int shexp_match(char *str, char *exp);
Returns
0 if a match was found.
1 if no match was found.
-1 if the comparison resulted in an invalid expression.
Parameters
char *str
is the string to be compared.
char *exp
is the pre-validated shell expression (wildcard pattern) to compare
against.
See also
shexp_casecmp, shexp_cmp, shexp_valid
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...