X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fargpar%2Fargpar.h;h=909da9cb3cce4ae3ff15633be0090271f058e985;hb=28f23191dcbf047429d51950a337a57d7a3f866a;hp=af9df9f5bee69caf8c8ff6bd99e52acd67889ea0;hpb=f250b40e2179eccdb83766bf4abef5a35036c47b;p=lttng-tools.git diff --git a/src/common/argpar/argpar.h b/src/common/argpar/argpar.h index af9df9f5b..909da9cb3 100644 --- a/src/common/argpar/argpar.h +++ b/src/common/argpar/argpar.h @@ -119,9 +119,9 @@ argpar_iter_next() produces the following items, in this order: * . */ #if defined(_WIN32) || defined(__CYGWIN__) -# define ARGPAR_HIDDEN +#define ARGPAR_HIDDEN #else -# define ARGPAR_HIDDEN __attribute__((visibility("hidden"))) +#define ARGPAR_HIDDEN __attribute__((visibility("hidden"))) #endif struct argpar_opt_descr; @@ -190,8 +190,7 @@ enum argpar_item_type argpar_item_type(const struct argpar_item *item); /// @cond hidden_macro ARGPAR_HIDDEN /// @endcond -const struct argpar_opt_descr *argpar_item_opt_descr( - const struct argpar_item *item); +const struct argpar_opt_descr *argpar_item_opt_descr(const struct argpar_item *item); /*! @brief @@ -331,10 +330,10 @@ void argpar_item_destroy(const struct argpar_item *item); Item to destroy and variable to reset (const struct argpar_item * type). */ -#define ARGPAR_ITEM_DESTROY_AND_RESET(_item) \ - { \ - argpar_item_destroy(_item); \ - ((_item)) = NULL; \ +#define ARGPAR_ITEM_DESTROY_AND_RESET(_item) \ + { \ + argpar_item_destroy(_item); \ + ((_item)) = NULL; \ } /// @} @@ -468,8 +467,8 @@ const char *argpar_error_unknown_opt_name(const struct argpar_error *error); /// @cond hidden_macro ARGPAR_HIDDEN /// @endcond -const struct argpar_opt_descr *argpar_error_opt_descr( - const struct argpar_error *error, bool *is_short); +const struct argpar_opt_descr *argpar_error_opt_descr(const struct argpar_error *error, + bool *is_short); /*! @brief @@ -516,7 +515,7 @@ struct argpar_opt_descr { const char short_name; /// Long option name (without the \-- prefix), or \c NULL - const char * const long_name; + const char *const long_name; /// \c true if this option has an argument const bool with_arg; @@ -537,7 +536,10 @@ const struct argpar_opt_descr descrs[] = { }; @endcode */ -#define ARGPAR_OPT_DESCR_SENTINEL { -1, '\0', NULL, false } +#define ARGPAR_OPT_DESCR_SENTINEL \ + { \ + -1, '\0', NULL, false \ + } /*! @struct argpar_iter @@ -607,8 +609,8 @@ argpar_iter_next(). ARGPAR_HIDDEN /// @endcond struct argpar_iter *argpar_iter_create(unsigned int argc, - const char * const *argv, - const struct argpar_opt_descr *descrs); + const char *const *argv, + const struct argpar_opt_descr *descrs); /*! @brief @@ -681,9 +683,9 @@ If there are no more original arguments to parse, this function returns /// @cond hidden_macro ARGPAR_HIDDEN /// @endcond -enum argpar_iter_next_status argpar_iter_next( - struct argpar_iter *iter, const struct argpar_item **item, - const struct argpar_error **error); +enum argpar_iter_next_status argpar_iter_next(struct argpar_iter *iter, + const struct argpar_item **item, + const struct argpar_error **error); /* * Returns the number of ingested elements from `argv`, as passed to