|
|
|
@ -72,8 +72,8 @@ fail (hb_bool_t suggest_help, const char *format, ...) |
|
|
|
|
|
|
|
|
|
struct option_parser_t |
|
|
|
|
{ |
|
|
|
|
option_parser_t (const char *usage = nullptr) |
|
|
|
|
: context (g_option_context_new (usage)), |
|
|
|
|
option_parser_t (const char *parameter_string = nullptr) |
|
|
|
|
: context (g_option_context_new (parameter_string)), |
|
|
|
|
to_free (g_ptr_array_new ()) |
|
|
|
|
{} |
|
|
|
|
|
|
|
|
@ -130,6 +130,15 @@ struct option_parser_t |
|
|
|
|
g_option_context_set_main_group (context, group); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void set_summary (const char *summary) |
|
|
|
|
{ |
|
|
|
|
g_option_context_set_summary (context, summary); |
|
|
|
|
} |
|
|
|
|
void set_description (const char *description) |
|
|
|
|
{ |
|
|
|
|
g_option_context_set_description (context, description); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void free_later (char *p) { |
|
|
|
|
g_ptr_array_add (to_free, p); |
|
|
|
|
} |
|
|
|
|