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