|
TPCCLIB
|
Functions for printing usage and build information from executables. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <time.h>#include <string.h>#include "tpcextensions.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 | 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) |
| void | tpcProgramName (const char *program, int version, int copyright, char *prname, int n) |
| int | tpcYesNo (const char *s) |
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 169 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 339 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 114 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 47 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, based on user-given string, usually 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 | Buffer length of prname, max n-1 characters are written into it, plus nul char. |
Definition at line 406 of file proginfo.c.
| int tpcYesNo | ( | const char * | s | ) |
Check whether argument string is 'y(es)' or 'n(o)', or 'on' or 'off'.
| s | String to be tested. |
Definition at line 459 of file proginfo.c.