Changeset 69602
- Timestamp:
- Sep 28, 2016, 6:18:39 PM (8 years ago)
- File:
-
- 1 edited
-
grass/trunk/lib/gis/parser_help.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grass/trunk/lib/gis/parser_help.c
r68092 r69602 65 65 int len, n; 66 66 int new_prompt = 0; 67 int extensive = 0; /* include also less important parts */ 68 int standard = 0; /* include also standard flags */ 69 int detailed = 0; /* details for each flag and option */ 67 70 68 71 new_prompt = G__uses_new_gisprompt(); … … 74 77 75 78 if (st->module_info.label || st->module_info.description) { 76 fprintf(fp, "\n"); 79 if (extensive) 80 fprintf(fp, "\n"); 77 81 if (markers) 78 82 fprintf(fp, "{{{DESCRIPTION}}}\n"); 79 fprintf(fp, "%s\n", _("Description:")); 80 if (st->module_info.label) 81 fprintf(fp, " %s\n", st->module_info.label); 82 if (st->module_info.description) 83 fprintf(fp, " %s\n", st->module_info.description); 84 } 85 if (st->module_info.keywords) { 83 if (extensive) { 84 fprintf(fp, "%s\n", _("Description:")); 85 if (st->module_info.label) 86 fprintf(fp, " %s\n", st->module_info.label); 87 if (st->module_info.description) 88 fprintf(fp, " %s\n", st->module_info.description); 89 } 90 else { 91 /* print label, if no label, try description */ 92 /* no leading space without heading */ 93 if (st->module_info.label) 94 fprintf(fp, "%s\n", st->module_info.label); 95 else if (st->module_info.description) 96 fprintf(fp, "%s\n", st->module_info.description); 97 } 98 } 99 if (extensive &&& st->module_info.keywords) { 86 100 fprintf(fp, "\n"); 87 101 if (markers) … … 184 198 if (flag->label) { 185 199 fprintf(fp, "%s\n", flag->label); 186 if ( flag->description)200 if (detailed && flag->description) 187 201 fprintf(fp, " %s\n", flag->description); 188 202 … … 196 210 } 197 211 198 if (new_prompt) 199 fprintf(fp, " --o %s\n", 200 _("Allow output files to overwrite existing files")); 201 202 fprintf(fp, " --h %s\n", _("Print usage summary")); 203 fprintf(fp, " --v %s\n", _("Verbose module output")); 204 fprintf(fp, " --q %s\n", _("Quiet module output")); 205 fprintf(fp, " --qq %s\n", _("Super quiet module output")); 206 fprintf(fp, " --ui %s\n", _("Force launching GUI dialog")); 207 212 if (standard) { 213 if (new_prompt) 214 fprintf(fp, " --o %s\n", 215 _("Allow output files to overwrite existing files")); 216 217 fprintf(fp, " --h %s\n", _("Print usage summary")); 218 fprintf(fp, " --v %s\n", _("Verbose module output")); 219 fprintf(fp, " --q %s\n", _("Quiet module output")); 220 fprintf(fp, " --qq %s\n", _("Super quiet module output")); 221 fprintf(fp, " --ui %s\n", _("Force launching GUI dialog")); 222 } 223 208 224 /* Print help info for options */ 209 225 … … 219 235 if (opt->label) { 220 236 fprintf(fp, "%s\n", opt->label); 221 if (opt->description) {237 if (detailed && opt->description) { 222 238 fprintf(fp, " %*s %s\n", 223 239 maxlen, " ", opt->description); … … 238 254 opt->def); 239 255 240 if (opt->descs) {256 if (detailed && opt->descs) { 241 257 int i = 0; 242 258
Note:
See TracChangeset
for help on using the changeset viewer.
