MCPcopy Index your code
hub / github.com/RsyncProject/rsync / showHelpIntro

Function showHelpIntro

popt/popthelp.c:613–630  ·  view source on GitHub ↗

* @param con context * @param fp output file handle */

Source from the content-addressed store, hash-verified

611 * @param fp output file handle
612 */
613static size_t showHelpIntro(poptContext con, FILE * fp)
614{
615 const char *usage_str = POPT_("Usage:");
616 size_t len = strlen(usage_str);
617 POPT_fprintf(fp, "%s", usage_str);
618
619 if (!(con->flags & POPT_CONTEXT_KEEP_FIRST)) {
620 struct optionStackEntry * os = con->optionStack;
621 const char * fn = (os->argv ? os->argv[0] : NULL);
622 if (fn == NULL) return len;
623 if (strchr(fn, '/')) fn = strrchr(fn, '/') + 1;
624 /* XXX POPT_fprintf not needed for argv[0] display. */
625 fprintf(fp, " %s", fn);
626 len += strlen(fn) + 1;
627 }
628
629 return len;
630}
631
632void poptPrintHelp(poptContext con, FILE * fp, UNUSED(int flags))
633{

Callers 2

poptPrintHelpFunction · 0.85
poptPrintUsageFunction · 0.85

Calls 1

POPT_fprintfFunction · 0.85

Tested by

no test coverage detected