X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=database%2Ftags.c;fp=database%2Ftags.c;h=51d8698fc791c862e6f74262b1021d9f0f4e3ea0;hb=b6235374b91ba7acf62c06c72de2f1291f46ac4c;hp=a28df02b4faae2ac736d6fe02dd4678dce688fad;hpb=86333bedb512d2fd809c3161bc40e682b2e9938b;p=blerg.git diff --git a/database/tags.c b/database/tags.c index a28df02..51d8698 100644 --- a/database/tags.c +++ b/database/tags.c @@ -12,10 +12,9 @@ #include #include "tags.h" #include "util.h" +#include "database.h" #include "config.h" -#define TAG_CHAR(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_') -#define WHITESPACE(c) (c == ' ' || c == '\t' || c == '\n' || c == '\r') int tag_scan(const char *author, const char *data, int len, uint64_t record) { char *taglist[MAX_TAGS_PER_RECORD]; @@ -32,7 +31,7 @@ tag_scan_start: } int begin = i; int start = ++i; - while (i < len && TAG_CHAR(data[i]) && (i - start < MAX_TAG_LENGTH)) { + while (i < len && VALID_CHAR(data[i]) && (i - start < MAX_TAG_LENGTH)) { i++; } if (start - i == 0) continue;