Lines Matching refs:buf
61 #define LINE_FOREACH(line, llen, buf, blen) \ argument
62 for(line = buf, \
63 llen = ((strchr(line, '\n') == NULL) ? (buf + blen - line) \
65 line + llen < buf + blen; \
67 llen = ((strchr(line, '\n') == NULL) ? (buf + blen - line) \
94 DetectWord(char *buf, int len, char **word, int *wlen) in DetectWord() argument
98 if (isspace(buf[i])) in DetectWord()
101 if (isalpha(buf[i])) { in DetectWord()
102 *word = &buf[i]; in DetectWord()
120 assert(*word >= buf && *word + *wlen <= buf + len); in DetectWord()
1044 DetectBlock(struct conf_block *blk, char *buf, int len) in DetectBlock() argument
1047 char *blkname = NULL, *end = &buf[len]; in DetectBlock()
1052 while (buf < end && isspace(*buf)) in DetectBlock()
1053 buf++; in DetectBlock()
1055 if (DetectWord(buf, len, &blkname, &blknamelen) < 0 in DetectBlock()
1056 || blkname != buf) in DetectBlock()
1061 buf += blknamelen; in DetectBlock()
1064 while (buf < end && isspace(*buf)) in DetectBlock()
1065 buf++; in DetectBlock()
1068 if (buf >= end || *buf != '{') in DetectBlock()
1071 buf++; /* skip '{' */ in DetectBlock()
1072 while (buf < end && isspace(*buf)) in DetectBlock()
1073 buf++; /* skip space */ in DetectBlock()
1078 for (len = 0; &buf[len] < end; len++) { in DetectBlock()
1079 if (buf[len] == '{') in DetectBlock()
1081 else if (buf[len] == '}' && --depth == 0) in DetectBlock()
1097 nblk->buf = buf; in DetectBlock()
1109 LINE_FOREACH(line, llen, blk->buf, blk->len) { in ParseBlock()
1112 if ((nblk = DetectBlock(blk, line, blk->len - (line - blk->buf)))) { in ParseBlock()
1115 line = &nblk->buf[nblk->len] + 1; in ParseBlock()
1192 line = &nblk->buf[nblk->len] + 1; in LoadConfigurationUpperHalf()