MCPcopy Create free account
hub / github.com/coreutils/coreutils / usage

Function usage

src/fmt.c:261–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259static int last_line_length;
260
261void
262usage (int status)
263{
264 if (status != EXIT_SUCCESS)
265 emit_try_help ();
266 else
267 {
268 printf (_("Usage: %s [-WIDTH] [OPTION]... [FILE]...\n"), program_name);
269 fputs (_("\
270Reformat each paragraph in the FILE(s), writing to standard output.\n\
271The option -WIDTH is an abbreviated form of --width=DIGITS.\n\
272"), stdout);
273
274 emit_stdin_note ();
275 emit_mandatory_arg_note ();
276
277 oputs (_("\
278 -c, --crown-margin\n\
279 preserve indentation of first two lines\n\
280"));
281 oputs (_("\
282 -p, --prefix=STRING\n\
283 reformat only lines beginning with STRING,\n\
284 reattaching the prefix to reformatted lines\n\
285"));
286 oputs (_("\
287 -s, --split-only\n\
288 split long lines, but do not refill\n\
289"));
290 oputs (_("\
291 -t, --tagged-paragraph\n\
292 indentation of first line different from second\n\
293"));
294 oputs (_("\
295 -u, --uniform-spacing\n\
296 one space between words, two after sentences\n\
297"));
298 oputs (_("\
299 -w, --width=WIDTH\n\
300 maximum line width (default of 75 columns)\n\
301"));
302 /* Tell xgettext that the "% o" below is not a printf-style
303 format string: xgettext:no-c-format */
304 oputs (_("\
305 -g, --goal=WIDTH\n\
306 goal width (default of 93% of width)\n\
307"));
308 oputs (HELP_OPTION_DESCRIPTION);
309 oputs (VERSION_OPTION_DESCRIPTION);
310 emit_ancillary_info (PROGRAM_NAME);
311 }
312 exit (status);
313}
314
315/* Decode options and launch execution. */
316

Callers 1

mainFunction · 0.70

Calls 3

emit_stdin_noteFunction · 0.85
emit_mandatory_arg_noteFunction · 0.85
emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected