X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Fstring-utils.h;h=2186052942819fa6f8a183bb2c0e54908bb29cd5;hb=8936b6c0add7eb6706e0a1ca50e03c446dda4006;hp=414b6e6ae4d6efdf9f3e55ec89dac744ab464c4b;hpb=b4051ad8c170901d5297e1b3005b24e63cb0ab1e;p=lttng-ust.git diff --git a/liblttng-ust/string-utils.h b/liblttng-ust/string-utils.h index 414b6e6a..21860529 100644 --- a/liblttng-ust/string-utils.h +++ b/liblttng-ust/string-utils.h @@ -1,33 +1,22 @@ -#ifndef _STRING_UTILS_H -#define _STRING_UTILS_H - /* - * Copyright (C) 2017 - Philippe Proulx - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * SPDX-License-Identifier: MIT * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright (C) 2017 Philippe Proulx */ +#ifndef _STRING_UTILS_H +#define _STRING_UTILS_H + #include #include +__attribute__((visibility("hidden"))) bool strutils_is_star_glob_pattern(const char *pattern); + +__attribute__((visibility("hidden"))) bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); + +__attribute__((visibility("hidden"))) bool strutils_star_glob_match(const char *pattern, size_t pattern_len, const char *candidate, size_t candidate_len);