Lines Matching refs:pstr
234 static int glh_line_matches_glob(GlhLineStream *lstr, GlhLineStream *pstr);
235 static int glh_matches_range(char c, GlhLineStream *pstr);
2418 GlhLineStream pstr; /* The stream that is used to traverse 'prefix' */ in _glh_line_matches_prefix() local
2430 glh_init_stream(&pstr, prefix); in _glh_line_matches_prefix()
2436 return glh_line_matches_glob(&lstr, &pstr); in _glh_line_matches_prefix()
2445 while(pstr.c != '\0' && pstr.c == lstr.c) { in _glh_line_matches_prefix()
2447 glh_step_stream(&pstr); in _glh_line_matches_prefix()
2453 return pstr.c == '\0'; in _glh_line_matches_prefix()
2598 GlhLineStream pstr; /* The stream that is used to traverse 'prefix' */ in glh_contains_glob() local
2603 glh_init_stream(&pstr, prefix); in glh_contains_glob()
2607 while(pstr.c != '\0') { in glh_contains_glob()
2608 switch(pstr.c) { in glh_contains_glob()
2610 glh_step_stream(&pstr); in glh_contains_glob()
2616 glh_step_stream(&pstr); in glh_contains_glob()
2637 static int glh_line_matches_glob(GlhLineStream *lstr, GlhLineStream *pstr) in glh_line_matches_glob() argument
2643 while(pstr->c != '\0') { in glh_line_matches_glob()
2647 switch(pstr->c) { in glh_line_matches_glob()
2655 glh_step_stream(pstr); in glh_line_matches_glob()
2660 if(pstr->c == '\0') in glh_line_matches_glob()
2669 GlhLineStream old_pstr = *pstr; in glh_line_matches_glob()
2670 if(glh_line_matches_glob(lstr, pstr)) in glh_line_matches_glob()
2676 *pstr = old_pstr; in glh_line_matches_glob()
2694 glh_step_stream(pstr); in glh_line_matches_glob()
2708 glh_step_stream(pstr); /* Skip the '[' character */ in glh_line_matches_glob()
2709 if(!lstr->c || !glh_matches_range(lstr->c, pstr)) in glh_line_matches_glob()
2718 glh_step_stream(pstr); /* Skip the backslash */ in glh_line_matches_glob()
2725 if(lstr->c == pstr->c) { in glh_line_matches_glob()
2727 glh_step_stream(pstr); in glh_line_matches_glob()
2738 return pstr->c == '\0' && lstr->c == '\0'; in glh_line_matches_glob()
2754 static int glh_matches_range(char c, GlhLineStream *pstr) in glh_matches_range() argument
2764 if(pstr->c == '^') { in glh_matches_range()
2765 glh_step_stream(pstr); in glh_matches_range()
2772 if(pstr->c == '-') { in glh_matches_range()
2773 glh_step_stream(pstr); in glh_matches_range()
2779 while(pstr->c == '-') in glh_matches_range()
2780 glh_step_stream(pstr); in glh_matches_range()
2786 if(pstr->c == ']') { in glh_matches_range()
2787 glh_step_stream(pstr); in glh_matches_range()
2797 while(!matched && pstr->c && pstr->c != ']') { in glh_matches_range()
2802 if(pstr->c == '-') { in glh_matches_range()
2803 glh_step_stream(pstr); /* Skip the hyphen */ in glh_matches_range()
2804 if(pstr->c != ']') { in glh_matches_range()
2805 if(c >= lastc && c <= pstr->c) in glh_matches_range()
2811 } else if(pstr->c == c) { in glh_matches_range()
2817 lastc = pstr->c; in glh_matches_range()
2818 if(pstr->c != ']') in glh_matches_range()
2819 glh_step_stream(pstr); in glh_matches_range()
2824 while(pstr->c && pstr->c != ']') in glh_matches_range()
2825 glh_step_stream(pstr); in glh_matches_range()
2829 if(pstr->c == ']') { in glh_matches_range()
2833 glh_step_stream(pstr); in glh_matches_range()