Lines Matching refs:pstr

236 static int glh_line_matches_glob(GlhLineStream *lstr, GlhLineStream *pstr);
237 static int glh_matches_range(char c, GlhLineStream *pstr);
2420 GlhLineStream pstr; /* The stream that is used to traverse 'prefix' */ in _glh_line_matches_prefix() local
2432 glh_init_stream(&pstr, prefix); in _glh_line_matches_prefix()
2438 return glh_line_matches_glob(&lstr, &pstr); in _glh_line_matches_prefix()
2447 while(pstr.c != '\0' && pstr.c == lstr.c) { in _glh_line_matches_prefix()
2449 glh_step_stream(&pstr); in _glh_line_matches_prefix()
2455 return pstr.c == '\0'; in _glh_line_matches_prefix()
2600 GlhLineStream pstr; /* The stream that is used to traverse 'prefix' */ in glh_contains_glob() local
2605 glh_init_stream(&pstr, prefix); in glh_contains_glob()
2609 while(pstr.c != '\0') { in glh_contains_glob()
2610 switch(pstr.c) { in glh_contains_glob()
2612 glh_step_stream(&pstr); in glh_contains_glob()
2618 glh_step_stream(&pstr); in glh_contains_glob()
2639 static int glh_line_matches_glob(GlhLineStream *lstr, GlhLineStream *pstr) in glh_line_matches_glob() argument
2645 while(pstr->c != '\0') { in glh_line_matches_glob()
2649 switch(pstr->c) { in glh_line_matches_glob()
2657 glh_step_stream(pstr); in glh_line_matches_glob()
2662 if(pstr->c == '\0') in glh_line_matches_glob()
2671 GlhLineStream old_pstr = *pstr; in glh_line_matches_glob()
2672 if(glh_line_matches_glob(lstr, pstr)) in glh_line_matches_glob()
2678 *pstr = old_pstr; in glh_line_matches_glob()
2696 glh_step_stream(pstr); in glh_line_matches_glob()
2710 glh_step_stream(pstr); /* Skip the '[' character */ in glh_line_matches_glob()
2711 if(!lstr->c || !glh_matches_range(lstr->c, pstr)) in glh_line_matches_glob()
2720 glh_step_stream(pstr); /* Skip the backslash */ in glh_line_matches_glob()
2726 if(lstr->c == pstr->c) { in glh_line_matches_glob()
2728 glh_step_stream(pstr); in glh_line_matches_glob()
2739 return pstr->c == '\0' && lstr->c == '\0'; in glh_line_matches_glob()
2755 static int glh_matches_range(char c, GlhLineStream *pstr) in glh_matches_range() argument
2765 if(pstr->c == '^') { in glh_matches_range()
2766 glh_step_stream(pstr); in glh_matches_range()
2773 if(pstr->c == '-') { in glh_matches_range()
2774 glh_step_stream(pstr); in glh_matches_range()
2780 while(pstr->c == '-') in glh_matches_range()
2781 glh_step_stream(pstr); in glh_matches_range()
2787 if(pstr->c == ']') { in glh_matches_range()
2788 glh_step_stream(pstr); in glh_matches_range()
2798 while(!matched && pstr->c && pstr->c != ']') { in glh_matches_range()
2803 if(pstr->c == '-') { in glh_matches_range()
2804 glh_step_stream(pstr); /* Skip the hyphen */ in glh_matches_range()
2805 if(pstr->c != ']') { in glh_matches_range()
2806 if(c >= lastc && c <= pstr->c) in glh_matches_range()
2812 } else if(pstr->c == c) { in glh_matches_range()
2818 lastc = pstr->c; in glh_matches_range()
2819 if(pstr->c != ']') in glh_matches_range()
2820 glh_step_stream(pstr); in glh_matches_range()
2825 while(pstr->c && pstr->c != ']') in glh_matches_range()
2826 glh_step_stream(pstr); in glh_matches_range()
2830 if(pstr->c == ']') { in glh_matches_range()
2834 glh_step_stream(pstr); in glh_matches_range()