1 #include <../../nrnconf.h> 54 #define CABLESECTION 1 66 #define error(enum) hoc_execerror("search string format error", pattern) 94 static int advance(
char* lp,
char* ep);
98 char *cp = (
char*)pat;
103 char bracket[
NBRA], *bracketp;
106 int int_range_index = 0;
126 if ((c = *cp++)==
'\n') {
168 if ((c = *cp++)==
'(') {
177 if (bracketp <= bracket)
206 if (tempc !=
eof && tempc !=
'\n')
215 if (int_range_index >=
NBRA)
219 if (!(*cp >=
'0' && *cp <=
'9') && *cp !=
'-') {
222 }
while (*(++cp) !=
'}');
224 if (2 != sscanf(cp1,
"%d-%d",
229 *ep++ = int_range_index++;
241 if ((c = *cp++) ==
'^') {
251 if (c ==
'-' && *(ep-1) ==
'\\')
257 (tempc = *cp++) !=
']' &&
258 c ==
'-' && cclcnt > 1 &&
260 (c = *(ep-1)) <= tempc
262 while (++c <= tempc) {
280 }
while ((c = *cp++) !=
'>');
283 }
while ((c = *cp++) !=
']');
303 char *target = (
char*)tar;
307 if (target == (
char *)0) {
318 while (*p1++ = *p2++);
359 for (;;)
switch (*ep++) {
386 if (num < 0 || num > 9) {
389 while(*lp >=
'0' && *lp <=
'9') {
390 num = 10*num + *lp -
'0';
393 if (num >= start && num <= stop) {
431 while (*lp++ == *ep);
450 }
while (lp > curlp);
static char * braslist[NBRA]
int hoc_regexp_search(const char *tar)
static int int_range_start[NBRA]
static int int_range_stop[NBRA]
int const size_t const size_t n
static char expbuf[ESIZE+4]
static int advance(char *lp, char *ep)
static int hoc_cclass(char *set, char c, int af)
void hoc_regexp_compile(const char *pat)
static char * braelist[NBRA]