+ Fixes
[opsoft.git] / silentbob / sblib / t_op2.cxx
blob4909f21f59af00b31d7f3f510641472522af3278
1 /*
2 * (c) Oleg Puchinin 2006
3 * graycardinalster@gmail.com
5 */
7 char t_op2 (char ** d_in, char ** d_prev)
9 char *d_ptr = *d_in;
10 char ch = 0;
12 if (*d_prev)
13 *d_prev = *d_in;
15 while (*d_ptr) {
16 if (*d_ptr == '{' || *d_ptr == ';' ||
17 *d_ptr == '}') {
18 if (d_ptr[-1] == '\\') {
19 ++d_ptr;
20 continue;
22 ch = *d_ptr;
23 *d_ptr = 0;
24 ++d_ptr; // space
25 break;
27 ++d_ptr;
30 ++d_ptr;
31 *d_in = d_ptr;
32 return ch;