ffnnmmaattcchh() -- String Function (libc)

Match a string with a normal expression
#iinncclluuddee <ffnnmmaattcchh.hh>
iinntt ffnnmmaattcchh(_p_a_t_t_e_r_n, _s_t_r_i_n_g, _f_l_a_g_s)
ccoonnsstt cchhaarr *_p_a_t_t_e_r_n, *_s_t_r_i_n_g; _i_n_t _f_l_a_g_s;

The function  ffnnmmaattcchh() checks  whether the  string to which  _s_t_r_i_n_g points
matches the normal expression to which _p_a_t_t_e_r_n points.  A _n_o_r_m_a_l _e_x_p_r_e_s_s_i_o_n
is one that  uses wildcard characters to broaden the  range of strings that
it matches.  For more information, see the Lexicon entry for wwiillddccaarrddss.

_f_l_a_g_s is a  bit map whose bits are defined  in the header file <ffnnmmaattcchh.hh>.
ffnnmmaattcchh() recognizes any or all of following flags:

FFNNMM_NNOOEESSCCAAPPEE
     Disable recognizing the backslash as an escape character.

     If this flag is not set,  then prefixing a character in _p_a_t_t_e_r_n with a
     backslash `\' matches that  same character in _s_t_r_i_n_g. For example, the
     pair `\*'  in _p_a_t_t_e_r_n matches  a literal `*'  in _s_t_r_i_n_g; and  the pair
     `\\' in _p_a_t_t_e_r_n matches `\' in _s_t_r_i_n_g.

FFNNMM_PPAATTHHNNAAMMEE
     A slash `/' in _s_t_r_i_n_g matches only a slash in _p_a_t_t_e_r_n. If this flag is
     set,  then a  `/' in  _s_t_r_i_n_g will  not match  a wildcard  character in
     _p_a_t_t_e_r_n.

FFNNMM_PPEERRIIOODD
     A leading period `.' in _s_t_r_i_n_g  must be matched exactly by a period in
     _p_a_t_t_e_r_n. If FFNNMM_PPAATTHHNNAAMMEE is set, then a ``leading'' period is one that
     occurs either  at the beginning  of _s_t_r_i_n_g or  immediately following a
     slash; if it is not set, then a ``leading'' period is one that appears
     at the  beginning of _s_t_r_i_n_g. If FFNNMM_PPEERRIIOODD is  not set, then ffnnmmaattcchh()
     places no special restrictions on matching a period.

If _s_t_r_i_n_g  matches _p_a_t_t_e_r_n, ffnnmmaattcchh() returns zero.  If  it does not match,
ffnnmmaattcchh() returns FFNN_NNOOMMAATTCCHH. If an error occurs, ffnnmmaattcchh() returns a value
other than zero or FFNN_NNOOMMAATTCCHH.

_S_e_e _A_l_s_o
lliibbcc, ppnnmmaattcchh(), ssttrriinngg.hh, wwiillddccaarrddss
