MCPcopy Index your code
hub / github.com/RsyncProject/rsync / configAppMatch

Function configAppMatch

popt/poptconfig.c:202–220  ·  view source on GitHub ↗

* Check for application match. * @param con context * @param s config application name * return 0 if config application matches */

Source from the content-addressed store, hash-verified

200 * return 0 if config application matches
201 */
202static int configAppMatch(poptContext con, const char * s)
203{
204 int rc = 1;
205
206 if (con->appName == NULL) /* XXX can't happen. */
207 return rc;
208
209#if defined(HAVE_GLOB_H) && defined(HAVE_FNMATCH_H)
210 if (glob_pattern_p(s, 1)) {
211 static int flags = FNM_PATHNAME | FNM_PERIOD;
212#ifdef FNM_EXTMATCH
213 flags |= FNM_EXTMATCH;
214#endif
215 rc = fnmatch(s, con->appName, flags);
216 } else
217#endif
218 rc = strcmp(s, con->appName);
219 return rc;
220}
221
222static int poptConfigLine(poptContext con, char * line)
223{

Callers 1

poptConfigLineFunction · 0.85

Calls 1

glob_pattern_pFunction · 0.85

Tested by

no test coverage detected