Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (e - f) fnmatch(3)
A period is determined to be leading according to the setting of the FNM_PATHNAME flag, as
follows:
If FNM_PATHNAME is set, a period is leading only if it is the first character in the
string parameter or if it immediately follows a slash.
If FNM_PATHNAME is not set, a period is leading only if it is the first character of the
string parameter.
NOTES
If you use this function on the local / (slash) root directory, the action includes the /G and /E
directories. Actions appropriate for local OSS files under / often are not appropriate for local
Guardian files or for any files on other HP NonStop server nodes.
The UTILSGE environment variable that governs shell utility behavior can be used to test or
recommend whether use should include Guardian files or files on remote HP NonStop server
nodes. Note that UTILSGE settings are only advisory for functions; changing the variable value
does not affect function behavior. Refer to the environ(5) reference page either online or in the
Open System Services System Calls Reference Manual for more information about UTILSGE.
RETURN VALUES
If the value in the string parameter matches the pattern specified by the pattern parameter, then
the fnmatch( ) function returns 0 (zero). If there is no match, fnmatch( ) returns one of the fol-
lowing values, which are defined in the fnmatch.h header file:
FNM_NOMATCH
Indicates that the string does not match the specified pattern.
FNM_ESLASH
Indicates that a slash (/) in the string is not exactly matched by a slash in the
specified pattern.
FNM_EPERIOD
Indicates that a leading period (.) in the string is not exactly matched by a period
in the specified pattern.
For conformance with the XPG4 specification, the fnmatch.h header file also defines the return
flag FNM_NOSYS, which would indicate that the function was not implemented.
If an error occurs, fnmatch( ) returns a nonzero value other than these return flags.
ERRORS
None. This function does not set errno.
RELATED INFORMATION
Functions: glob(3), globfree(3), regcomp(3).
STANDARDS CONFORMANCE
The following are HP extensions to the XPG4 Version 2 specification:
The return value flags FNM_ESLASH and FNM_EPERIOD are defined.
527187-017 Hewlett-Packard Company 2101