source: trunk/FACT++/src/FACT.cc@ 10663

Last change on this file since 10663 was 10657, checked in by tbretz, 14 years ago
Added or improved documentation.
File size: 1.6 KB
Line 
1// **************************************************************************
2/** @namespace FACT
3
4@brief Namespace to help with some general things in the program initialization
5
6*/
7// **************************************************************************
8#include "FACT.h"
9
10#include <iostream>
11
12#include <boost/filesystem.hpp>
13
14// --------------------------------------------------------------------------
15//
16//! Print version information about FACT++
17//!
18//! From help2man:
19//!
20//! The first line of the --version information is assumed to be in one
21//! of the following formats:
22//!
23//! - <version>
24//! - <program> <version>
25//! - {GNU,Free} <program> <version>
26//! - <program> ({GNU,Free} <package>) <version>
27//! - <program> - {GNU,Free} <package> <version>
28//!
29//! and separated from any copyright/author details by a blank line.
30//!
31//! Handle multi-line bug reporting sections of the form:
32//!
33//! - Report <program> bugs to <addr>
34//! - GNU <package> home page: <url>
35//! - ...
36//!
37//!
38//! @param name
39//! name of the program (usually argv[0]). A possible leading "lt-"
40//! is removed.
41//!
42void FACT::PrintVersion(const char *name)
43{
44 std::string n = boost::filesystem::basename(name);
45 if (n.substr(0, 3)=="lt-")
46 n = n.substr(3);
47
48 std::cout <<
49 n << " - "PACKAGE_STRING"\n"
50 "\n"
51 "Written by Thomas Bretz et al.\n"
52 "\n"
53 "Report bugs to <"PACKAGE_BUGREPORT">\n"
54 "Home page: "PACKAGE_URL"\n"
55 "\n"
56 "Copyright (C) 2011 by the FACT Collaboration.\n"
57 "This is free software; see the source for copying conditions.\n"
58 << std::endl;
59}
Note: See TracBrowser for help on using the repository browser.