Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/utils.c @ 979:ea939ff047d8
Improve /buffer search_*
Quotes can be used in search strings, for example one can search for
" is " now (with spaces around the word).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 21 Oct 2006 11:22:15 +0200 |
parents | 5b01de4ac5e1 |
children | c0d44a9a99bc |
comparison
equal
deleted
inserted
replaced
978:a58dfdd6d058 | 979:ea939ff047d8 |
---|---|
381 { | 381 { |
382 int instring = FALSE; | 382 int instring = FALSE; |
383 int escape = FALSE; | 383 int escape = FALSE; |
384 char *p; | 384 char *p; |
385 | 385 |
386 if (!s) return; | |
387 | |
386 for (p = s; *p; p++) { | 388 for (p = s; *p; p++) { |
387 if (*p == '"') { | 389 if (*p == '"') { |
388 if (!escape) { | 390 if (!escape) { |
389 instring = !instring; | 391 instring = !instring; |
390 strcpy(p, p+1); | 392 strcpy(p, p+1); |