[utils]: add show_options to utils

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@316 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
ChenHengming
2015-09-28 22:31:52 +00:00
parent c6d93bd1b9
commit bed52a856e
6 changed files with 37 additions and 41 deletions

View File

@@ -17,10 +17,22 @@
#ifndef __UTILS_H__
#define __UTILS_H__
typedef struct OptionInfo_t {
const char* name;
const char* argname;
const char* help;
} OptionInfo;
#define show_options(opt) \
do { \
_show_options(sizeof(opt)/sizeof(OptionInfo), opt); \
} while (0)
#ifdef __cplusplus
extern "C" {
#endif
void _show_options(int count, OptionInfo *options);
#ifdef __cplusplus
}