Mixe for Privacy and Anonymity in the Internet
Functions | Variables
popthelp.cpp File Reference
#include "../StdAfx.h"
#include "poptint.h"
Include dependency graph for popthelp.cpp:

Go to the source code of this file.

Functions

void poptPrintHelp (poptContext con, FILE *f, int)
void poptPrintUsage (poptContext con, FILE *f, int)
void poptSetOtherOptionHelp (poptContext con, const char *text)

Variables

struct poptOption poptHelpOptions []

Function Documentation

void poptPrintHelp ( poptContext  con,
FILE *  f,
int   
)

Definition at line 186 of file popthelp.cpp.

References poptContext_s::options, poptContext_s::otherHelp, and POPT_.

                                                       {
    int leftColWidth;
    
    showHelpIntro(con, f);
    if (con->otherHelp)
        fprintf(f, " %s\n", con->otherHelp);
    else
        fprintf(f, " %s\n", POPT_("[OPTION...]"));
    
    leftColWidth = maxArgWidth(con->options, NULL);
    singleTableHelp(f, con->options, leftColWidth, NULL);
}
void poptPrintUsage ( poptContext  con,
FILE *  f,
int   
)

Definition at line 283 of file popthelp.cpp.

References poptContext_s::options, and poptContext_s::otherHelp.

                                                        {
    int cursor;

    cursor = showHelpIntro(con, f);
    cursor += showShortOptions(con->options, f, NULL);
    singleTableUsage(f, cursor, con->options, NULL);

    if (con->otherHelp) {
  cursor += strlen(con->otherHelp) + 1;
  if (cursor > 79) fprintf(f, "\n       ");
  fprintf(f, " %s", con->otherHelp);
    }

    fprintf(f, "\n");
}
void poptSetOtherOptionHelp ( poptContext  con,
const char *  text 
)

Definition at line 299 of file popthelp.cpp.

References poptContext_s::otherHelp, xfree, and xstrdup().

                                                                {
    if (con->otherHelp) xfree(con->otherHelp);
    con->otherHelp = xstrdup(text);
}

Here is the call graph for this function:


Variable Documentation

Initial value:
 {
    { NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
    { "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
    { "usage", 'u', 0, NULL, 'u', N_("Display brief usage message"), NULL },
    { NULL, '\0', 0, NULL, 0, NULL, NULL }
}

Definition at line 21 of file popthelp.cpp.