+/*----------------------------------------------------------
+ | printHelp
+ | print information from long option array
+ +--------------------------------------------------------- */
+
+static void printHelp(FILE *file, const char *name)
+{
+ int ind;
+ char command[50];
+
+ fprintf (file, "%s:\nallowed options\n", name);
+ for (ind=0; cliOptions [ind].name != NULL;ind++)
+ {
+ // display options
+ if (cliOptions [ind].has_arg == 0 )
+ {
+ fprintf (file, " --%-15s %s\n", cliOptions [ind].name, cliOptions[ind].help);
+ } else {
+ sprintf(command, "%s=xxxx", cliOptions [ind].name);
+ fprintf (file, " --%-15s %s\n", command, cliOptions[ind].help);
+ }
+ }
+ fprintf (file, "Example:\n %s\\\n --verbose --port=1234 --token='azerty' --ldpaths=build/plugins:/usr/lib64/agl/plugins\n", name);
+}
+