INFO: The new Git default branch name is "main". Details here:

Commit 3a88db45 authored by Matteo Quintiliani's avatar Matteo Quintiliani
Browse files

Add print help information if there is no arguments provided

parent 2fa55744
......@@ -93,6 +93,7 @@ char *convert_escape_sequence(char *in_str);
int fprintf_str_format(FILE *f, char *str_format, char delimiter, MYSQL_ROW *row, int num_fields, int i_f_start);
void mysql_printf_author_support();
void mysql_printf_help_info();
void mysql_printf_version();
void mysql_printf_supports();
void mysql_printf_usage(struct option long_options[]);
......@@ -667,6 +668,14 @@ int mysql_printf_getopt_long(int argc, char **argv, MYSQL_FORMAT_PARAMS *params)
int option_index = 0;
/* if there is no arguments provided */
if(argc == 1) {
/* getopt_long stores the option index here. */
/* init array for checking one time option */
for(i=0; i<255; i++) {
......@@ -835,6 +844,12 @@ Mail bug reports and suggestions to <%s>.\n",
void mysql_printf_help_info() {
Run with option --help for printing help information.\n\
void mysql_printf_version() {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment