/[pcre]/code/trunk/pcre_ucp_searchfuncs.c
ViewVC logotype

Diff of /code/trunk/pcre_ucp_searchfuncs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 91 by nigel, Sat Feb 24 21:41:34 2007 UTC revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC
# Line 131  letter, return the other case. Otherwise Line 131  letter, return the other case. Otherwise
131  Arguments:  Arguments:
132    c           the character value    c           the character value
133    
134  Returns:      the other case or -1 if none  Returns:      the other case or NOTACHAR if none
135  */  */
136    
137  int  unsigned int
138  _pcre_ucp_othercase(const int c)  _pcre_ucp_othercase(const unsigned int c)
139  {  {
140  int bot = 0;  int bot = 0;
141  int top = sizeof(ucp_table)/sizeof(cnode);  int top = sizeof(ucp_table)/sizeof(cnode);
# Line 161  for (;;) Line 161  for (;;)
161      }      }
162    }    }
163    
164  /* Found an entry in the table. Return -1 for a range entry. Otherwise return  /* Found an entry in the table. Return NOTACHAR for a range entry. Otherwise
165  the other case if there is one, else -1. */  return the other case if there is one, else NOTACHAR. */
166    
167  if ((ucp_table[mid].f0 & f0_rangeflag) != 0) return -1;  if ((ucp_table[mid].f0 & f0_rangeflag) != 0) return NOTACHAR;
168    
169  offset = ucp_table[mid].f1 & f1_casemask;  offset = ucp_table[mid].f1 & f1_casemask;
170  if ((offset & f1_caseneg) != 0) offset |= f1_caseneg;  if ((offset & f1_caseneg) != 0) offset |= f1_caseneg;
171  return (offset == 0)? -1 : c + offset;  return (offset == 0)? NOTACHAR : c + offset;
172  }  }
173    
174    

Legend:
Removed from v.91  
changed lines
  Added in v.93

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12