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

Last change on this file since 11262 was 11040, checked in by tbretz, 13 years ago
Removed obsolete include of tools.h
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//! \verbatim
24//! - <version>
25//! - <program> <version>
26//! - {GNU,Free} <program> <version>
27//! - <program> ({GNU,Free} <package>) <version>
28//! - <program> - {GNU,Free} <package> <version>
29//! \endverbatim
30//!
31//! and separated from any copyright/author details by a blank line.
32//!
33//! Handle multi-line bug reporting sections of the form:
34//!
35//! \verbatim
36//! - Report <program> bugs to <addr>
37//! - GNU <package> home page: <url>
38//! - ...
39//! \endverbatim
40//!
41//! @param name
42//! name of the program (usually argv[0]). A possible leading "lt-"
43//! is removed.
44//!
45void FACT::PrintVersion(const char *name)
46{
47 const std::string n = boost::filesystem::path(name).filename();
48
49 std::cout <<
50 n << " - "PACKAGE_STRING"\n"
51 "\n"
52 "Written by Thomas Bretz et al.\n"
53 "\n"
54 "Report bugs to <"PACKAGE_BUGREPORT">\n"
55 "Home page: "PACKAGE_URL"\n"
56 "\n"
57 "Copyright (C) 2011 by the FACT Collaboration.\n"
58 "This is free software; see the source for copying conditions.\n"
59 << std::endl;
60}
Note: See TracBrowser for help on using the repository browser.