Changeset View
Changeset View
Standalone View
Standalone View
intern/clog/clog.c
| Context not available. | |||||
| */ | */ | ||||
| static bool clg_ctx_filter_check(CLogContext *ctx, const char *identifier) | static bool clg_ctx_filter_check(CLogContext *ctx, const char *identifier) | ||||
| { | { | ||||
| const int identifier_len = strlen(identifier); | const size_t identifier_len = strlen(identifier); | ||||
| for (uint i = 0; i < 2; i++) { | for (uint i = 0; i < 2; i++) { | ||||
| const CLG_IDFilter *flt = ctx->filters[i]; | const CLG_IDFilter *flt = ctx->filters[i]; | ||||
| while (flt != NULL) { | while (flt != NULL) { | ||||
| const int len = strlen(flt->match); | const size_t len = strlen(flt->match); | ||||
| if (STREQ(flt->match, "*") || ((len == identifier_len) && (STREQ(identifier, flt->match)))) { | if (STREQ(flt->match, "*") || ((len == identifier_len) && (STREQ(identifier, flt->match)))) { | ||||
| return (bool)i; | return (bool)i; | ||||
| } | } | ||||
| Context not available. | |||||
| static void clg_ctx_type_filter_append(CLG_IDFilter **flt_list, | static void clg_ctx_type_filter_append(CLG_IDFilter **flt_list, | ||||
| const char *type_match, | const char *type_match, | ||||
| int type_match_len) | size_t type_match_len) | ||||
| { | { | ||||
| if (type_match_len == 0) { | if (type_match_len == 0) { | ||||
| return; | return; | ||||
| Context not available. | |||||
| static void CLG_ctx_type_filter_exclude(CLogContext *ctx, | static void CLG_ctx_type_filter_exclude(CLogContext *ctx, | ||||
| const char *type_match, | const char *type_match, | ||||
| int type_match_len) | size_t type_match_len) | ||||
| { | { | ||||
| clg_ctx_type_filter_append(&ctx->filters[0], type_match, type_match_len); | clg_ctx_type_filter_append(&ctx->filters[0], type_match, type_match_len); | ||||
| } | } | ||||
| static void CLG_ctx_type_filter_include(CLogContext *ctx, | static void CLG_ctx_type_filter_include(CLogContext *ctx, | ||||
| const char *type_match, | const char *type_match, | ||||
| int type_match_len) | size_t type_match_len) | ||||
| { | { | ||||
| clg_ctx_type_filter_append(&ctx->filters[1], type_match, type_match_len); | clg_ctx_type_filter_append(&ctx->filters[1], type_match, type_match_len); | ||||
| } | } | ||||
| Context not available. | |||||