Very old versions for history.
[opsoft_archive.git] / silentbob / silentbob-1.1 / src / sblib / skip_macro.cpp
blobddaafb87ddcad81beeab6a51db8a060c215100d9
1 /*
2 * (c) Oleg Puchinin 2006.
3 * graycardinalster@gmail.com
5 */
7 #include "../head.h"
8 #include "bugs.h"
10 void skip_macro (char ** d_ptr, char ** d_out, char ch)
12 char *macro_start;
13 char * d_my;
14 int n = 0;
16 d_my = *d_out;
17 macro_start = *d_out;
18 while (true) {
19 if (ch == '\n')
20 n++;
22 if ((ch == '\n') && (d_my[strlen (d_my) - 1] != '\\'))
23 break;
25 if (n > 300)
26 bug_longmacro ();
28 ch = t_op (d_ptr, d_out);
29 ENV->t_op_no ++;
30 if (ch == 0)
31 break;
32 d_my = *d_out;