Mercurial > pidgin.yaz
comparison plugins/spellchk.c @ 1862:fd60aa357882
[gaim-migrate @ 1872]
fun stuff
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 19 May 2001 18:24:45 +0000 |
parents | 72a30a73f689 |
children | 08ac51210d09 |
comparison
equal
deleted
inserted
replaced
1861:7ec37e31e5eb | 1862:fd60aa357882 |
---|---|
190 int state = 0; | 190 int state = 0; |
191 | 191 |
192 for (pos = 0; pos < strlen(m) && count <= word; pos++) { | 192 for (pos = 0; pos < strlen(m) && count <= word; pos++) { |
193 switch (state) { | 193 switch (state) { |
194 case 0: | 194 case 0: |
195 if (isalnum(m[pos])) { | 195 if (!isspace(m[pos]) && !ispunct(m[pos])) { |
196 count++; | 196 count++; |
197 state = 1; | 197 state = 1; |
198 } else if (m[pos] == '<') | 198 } else if (m[pos] == '<') |
199 state = 2; | 199 state = 2; |
200 break; | 200 break; |
201 case 1: | 201 case 1: |
202 if (m[pos] == '<') | 202 if (m[pos] == '<') |
203 state = 2; | 203 state = 2; |
204 else if (!isalnum(m[pos])) | 204 else if (isspace(m[pos]) || ispunct(m[pos])) |
205 state = 0; | 205 state = 0; |
206 break; | 206 break; |
207 case 2: | 207 case 2: |
208 if (m[pos] == '>') | 208 if (m[pos] == '>') |
209 state = 0; | 209 state = 0; |