From: Willy Tarreau Date: Thu, 29 Aug 2019 07:32:21 +0000 (+0200) Subject: MINOR: tools: add a generic struct "name_desc" for name-description pairs X-Git-Tag: v2.1-dev2~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb4ba91ac1a2fd059cea66b0c7e01b95fcc9203a;p=thirdparty%2Fhaproxy.git MINOR: tools: add a generic struct "name_desc" for name-description pairs In prompts on the CLI we now commonly need to propose a keyword name and a description and it doesn't make sense to define a new struct for each such pairs. Let's simply have a generic "name_desc" for this. --- diff --git a/include/common/standard.h b/include/common/standard.h index 0b8a327266..69d760dd8b 100644 --- a/include/common/standard.h +++ b/include/common/standard.h @@ -87,6 +87,12 @@ struct split_url { int host_len; }; +/* generic structure associating a name and a value, for use in arrays */ +struct name_desc { + const char *name; + const char *desc; +}; + extern THREAD_LOCAL int itoa_idx; /* index of next itoa_str to use */ /*