TPCCLIB
|
Functions for printing usage and build information from executables. More...
#include "libtpcmisc.h"
Go to the source code of this file.
Functions | |
int | tpcProcessStdOptions (const char *s, int *print_usage, int *print_version, int *verbose_level) |
void | tpcProgramName (const char *program, int version, int copyright, char *prname, int n) |
void | tpcPrintUsage (const char *program, char *text[], FILE *fp) |
int | tpcHtmlUsage (const char *program, char *text[], const char *path) |
void | tpcPrintBuild (const char *program, FILE *fp) |
Functions for printing usage and build information from executables.
Definition in file proginfo.c.
int tpcHtmlUsage | ( | const char * | program, |
char * | text[], | ||
const char * | path ) |
Write program usage given as argument, plus program name, tpcclib version, and default copyright text, into HTML file.
program | Program name, may contain extension and path. |
text | Program usage text. |
path | Path name where to create file programname.html; path may contain trailing '/' or '\'. |
Definition at line 213 of file proginfo.c.
void tpcPrintBuild | ( | const char * | program, |
FILE * | fp ) |
Print tpctools build information.
program | Program name; enter NULL, if not to be printed. |
fp | File pointer where to print; usually stdout. |
Definition at line 383 of file proginfo.c.
void tpcPrintUsage | ( | const char * | program, |
char * | text[], | ||
FILE * | fp ) |
Print program usage given as argument, plus program name, tpcclib version, and default copyright text.
program | Program name |
text | Program usage text |
fp | File pointer where to print; usually stdout |
Definition at line 158 of file proginfo.c.
int tpcProcessStdOptions | ( | const char * | s, |
int * | print_usage, | ||
int * | print_version, | ||
int * | verbose_level ) |
Check if given command-line argument string is one of the standard command-line options of this project.
s | Pointer to command-line option string. |
print_usage | If option string is either -h or –help, then this variable is set to 1. |
print_version | If option string is either -v, -V, –version, or –build, then this variable is set to 1. |
verbose_level | The level of debugging messages and listings:
|
Definition at line 40 of file proginfo.c.
void tpcProgramName | ( | const char * | program, |
int | version, | ||
int | copyright, | ||
char * | prname, | ||
int | n ) |
Process program name and optionally version into given string from argv[0].
program | Set to argv[0] |
version | Add version (1) or do not add (0) |
copyright | Add copyright (1) or do not add (0) |
prname | Pointer to string where program name is written |
n | Length of prname string, including trailing zero |
Definition at line 101 of file proginfo.c.