248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
** PATTERN is a comma-separated list of glob patterns. Show which of
** the STRINGs that follow match the PATTERN.
*/
void glob_test_cmd(void){
Glob *pGlob;
int i;
if( g.argc<4 ) usage("PATTERN STRING ...");
printf("SQL expression: %s\n", glob_expr("x", g.argv[2]));
pGlob = glob_create(g.argv[2]);
for(i=0; i<pGlob->nPattern; i++){
printf("pattern[%d] = [%s]\n", i, pGlob->azPattern[i]);
}
for(i=3; i<g.argc; i++){
printf("%d %s\n", glob_match(pGlob, g.argv[i]), g.argv[i]);
}
glob_free(pGlob);
}
|
|
|
|
|
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
** PATTERN is a comma-separated list of glob patterns. Show which of
** the STRINGs that follow match the PATTERN.
*/
void glob_test_cmd(void){
Glob *pGlob;
int i;
if( g.argc<4 ) usage("PATTERN STRING ...");
fossil_print("SQL expression: %s\n", glob_expr("x", g.argv[2]));
pGlob = glob_create(g.argv[2]);
for(i=0; i<pGlob->nPattern; i++){
fossil_print("pattern[%d] = [%s]\n", i, pGlob->azPattern[i]);
}
for(i=3; i<g.argc; i++){
fossil_print("%d %s\n", glob_match(pGlob, g.argv[i]), g.argv[i]);
}
glob_free(pGlob);
}
|