LAL  7.5.0.1-8083555
LALVCSInfoType.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014, 2016 Karl Wette
3  * Copyright (C) 2009-2013 Adam Mercer
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or (at
8  * your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with with program; see the file COPYING. If not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18  * MA 02110-1301 USA
19  */
20 
21 #ifndef _LALVCSINFOTYPE_H
22 #define _LALVCSINFOTYPE_H
23 
24 #include <stdio.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /**
31  * \defgroup LALVCSInfoType_h Header LALVCSInfoType.h
32  * \ingroup lal_std
33  * \author Adam Mercer, Karl Wette
34  * \brief Contains routines for dealing with VCS and build information
35  */
36 /** @{ */
37 
38 /**
39  * VCS and build information structure
40  */
41 typedef struct tagLALVCSInfo
42 {
43  const char *const name; /**< Library name */
44  const char *const version; /**< Library version */
45  const char *const vcsId; /**< Identifier (e.g. git SHA1) of last commit */
46  const char *const vcsDate; /**< Committer date of last commit */
47  const char *const vcsBranch; /**< Branch of last commit */
48  const char *const vcsTag; /**< Tag of last commit */
49  const char *const vcsAuthor; /**< Author of last commit */
50  const char *const vcsCommitter; /**< Committer of last commit */
51  const char *const vcsClean; /**< (UN)CLEAN */
52  const char *const vcsStatus; /**< (UN)CLEAN: Status message */
53  const char *const configureArgs; /**< <tt>configure</tt> arguments */
54  const char *const configureDate; /**< <tt>configure</tt> date */
55  const char *const buildDate; /**< Build date */
56 } LALVCSInfo;
57 
58 /**
59  * <tt>NULL</tt>-terminated list of VCS and build information structures
60  */
61 typedef const LALVCSInfo *const LALVCSInfoList[16];
62 
63 /**
64  * Generate a multi-line string containing VCS and build information for a library and
65  * its dependencies, as given in \p vcs_list. The verbosity of information contained in
66  * the string is controlled by \p verbose. The string \p prefix is prepended to each line.
67  */
68 char *XLALVCSInfoString(const LALVCSInfoList vcs_list, const int verbose, const char *prefix);
69 
70 /**
71  * Output VCS and build information, as generated by XLALVCSInfoString(), to a file pointer \p fp.
72  * The arguments \p vcs_list, \p verbose, and \p prefix are as for XLALVCSInfoString().
73  */
74 int XLALOutputVCSInfo(FILE *fp, const LALVCSInfoList vcs_list, const int verbose, const char *prefix);
75 
76 /** @} */
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* _LALVCSINFOTYPE_H */
static const size_t prefix
Definition: LALMalloc.c:256
int XLALOutputVCSInfo(FILE *fp, const LALVCSInfoList vcs_list, const int verbose, const char *prefix)
Output VCS and build information, as generated by XLALVCSInfoString(), to a file pointer fp.
const LALVCSInfo *const LALVCSInfoList[16]
NULL-terminated list of VCS and build information structures
char * XLALVCSInfoString(const LALVCSInfoList vcs_list, const int verbose, const char *prefix)
Generate a multi-line string containing VCS and build information for a library and its dependencies,...
VCS and build information structure.
const char *const buildDate
Build date.
const char *const vcsCommitter
Committer of last commit.
const char *const version
Library version.
const char *const vcsDate
Committer date of last commit.
const char *const configureDate
configure date
const char *const vcsStatus
(UN)CLEAN: Status message
const char *const vcsClean
(UN)CLEAN
const char *const vcsTag
Tag of last commit.
const char *const vcsAuthor
Author of last commit.
const char *const vcsId
Identifier (e.g.
const char *const vcsBranch
Branch of last commit.
const char *const configureArgs
configure arguments
const char *const name
Library name.
int verbose
Definition: tconvert.c:103
FILE * fp
Definition: tconvert.c:105