cv_prev_word(): * Find the previous word vi style */
| 304 | * Find the previous word vi style |
| 305 | */ |
| 306 | protected Char * |
| 307 | cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) |
| 308 | { |
| 309 | int test; |
| 310 | |
| 311 | p--; |
| 312 | while (n--) { |
| 313 | while ((p > low) && Isspace(*p)) |
| 314 | p--; |
| 315 | test = (*wtest)(*p); |
| 316 | while ((p >= low) && (*wtest)(*p) == test) |
| 317 | p--; |
| 318 | } |
| 319 | p++; |
| 320 | |
| 321 | /* p now points where we want it */ |
| 322 | if (p < low) |
| 323 | return low; |
| 324 | else |
| 325 | return p; |
| 326 | } |
| 327 | |
| 328 | |
| 329 | /* cv_delfini(): |
no outgoing calls
no test coverage detected