paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Functions
version.h File Reference

Functions for printing the version string. More...

Functions

const char * version_single_line (const char *pfx)
 Get the version string for an executable. More...
 
const char * version_text (const char *pfx)
 Get the full version text. More...
 
void version_handle_flag (const char *pfx, bool flag)
 Print the version text and exit successfully. More...
 

Detailed Description

Functions for printing the version string.

Function Documentation

◆ version_single_line()

const char* version_single_line ( const char *  pfx)

Get the version string for an executable.

Parameters
pfxThe program name (without the leading "para_").
Returns
A statically allocated string which contains the program name and the git version. It must not be freed by the caller.

Referenced by version_text().

◆ version_text()

const char* version_text ( const char *  pfx)

Get the full version text.

Parameters
pfxSee version_single_line().
Returns
A string containing the same text as returned by version_single_line(), augmented by additional build information, a copyright text and the email address of the author.

Like version_single_line(), this string is stored in a statically allocated buffer and must not be freed.

References version_single_line().

Referenced by version_handle_flag().

◆ version_handle_flag()

void version_handle_flag ( const char *  pfx,
bool  flag 
)

Print the version text and exit successfully.

Parameters
pfxSee version_single_line().
flagWhether –version was given.

If flag is false, this function does nothing. Otherwise it prints the full version text as returned by version_text() and exits successfully.

References version_text().