00001 /* 00002 * Copyright (C) 2007 Jolien Creighton 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 /********************************* <lalVerbatim file="LALRCSIDHV"> 00021 Author: Unknown? Provided by Stuart Anderson 00022 $Id: LALRCSID.h,v 1.6 2007/06/08 14:41:52 bema Exp $ 00023 ********************************** </lalVerbatim> */ 00024 00025 /* <lalLaTeX> 00026 00027 \section{Header \texttt{LALRCSID.h}} 00028 \label{s:LALRCSID.h} 00029 00030 Provides macros for assigning an RCS ID string to a file. 00031 00032 \subsection*{Synopsis} 00033 \begin{verbatim} 00034 #include <lal/LALRCSID.h> 00035 \end{verbatim} 00036 00037 \noindent This header defines a pair of macros \verb@RCSID()@ and 00038 \verb@NRCSID()@, which are used to assign Revision Control System 00039 (RCS) ID strings to a given source file. Whenever a file is added or 00040 changed in the central LAL distribution, the RCS software searches for 00041 symbols of the form \texttt{\$Id\$} or \texttt{\$Id:} \ldots\ 00042 \texttt{\$}, and expands them into strings that give information about 00043 the file's name, version number, when it was last modified and by 00044 whom. For an example of an RCS ID string, look at the \texttt{\$Id:} 00045 \ldots\ \texttt{\$} line at the bottom of this page. 00046 00047 The macro \verb@RCSID()@ is called as follows: 00048 00049 \vspace{2ex} 00050 \noindent\texttt{RCSID(\$Id\$);} 00051 \vspace{2ex} 00052 00053 \noindent This assigns the RCS ID string to a variable 00054 \verb@static const char *rcsid@ in a given module or header. This 00055 variable will be loaded onto the stack whenever code from that module 00056 or header is used. This can be used as a diagnostic tool by 00057 debuggers. 00058 00059 The macro \verb@NRCSID()@ is called in the following manner: 00060 00061 \vspace{2ex} 00062 \noindent\texttt{NRCSID(MYFILEC,\$Id\$);} 00063 \vspace{2ex} 00064 00065 \noindent This assigns the RCS ID string to the variable 00066 \verb@MYFILEC@, as above. Standard LAL naming conventions are that 00067 the variable name should be the file name converted to capital 00068 letters, \emph{with} file extensions but \emph{without} periods. Thus 00069 the module \verb@MyFile.c@ should store its ID in the variable 00070 \verb@MYFILEC@, while the header \verb@MyHeader.h@ should store it in 00071 \verb@MYHEADERH@. 00072 00073 LAL convention dictates that all modules and header files must call 00074 \verb@NRCSID()@ using the naming convention above. The call must be 00075 made after all subsidiary header files have been included (notably 00076 this header file, or \verb@LALStdlib.h@ which includes this header 00077 file), but before any actual functions or function prototypes. In 00078 modules containing LAL functions, the RCS ID string will typically be 00079 assigned to the \verb@LALStatus@ structure for those functions; see the 00080 documentation for the header \verb@LALStatusMacros.h@. 00081 00082 This header is included automatically by all standard LAL headers, 00083 including \verb@LALDatatypes.h@, \verb@LALStatusMacros.h@, and 00084 \verb@LALStdlib.h@. Thus if you have included \emph{any} of the 00085 standard LAL headers, you will have gotten \verb@LALRCSID.h@ as well, 00086 and don't need to \verb@#include@ it separately. However, including 00087 it separately is not an error, as this and all LAL headers are 00088 required to have double-include protection. 00089 00090 </lalLaTeX> */ 00091 00092 #ifndef _LALRCSID_H 00093 #define _LALRCSID_H 00094 00095 #ifdef __cplusplus 00096 extern "C" { 00097 #endif 00098 00099 #if !defined(lint) 00100 # ifndef __GNUC__ 00101 # define RCSID(id) static volatile const char *rcsid = (id) 00102 # define NRCSID(name,id) static volatile const char *name = (id) 00103 # else 00104 # define RCSID(id) \ 00105 static volatile const char __attribute__ ((unused)) *rcsid = (id) 00106 # define NRCSID(name,id) \ 00107 static volatile const char __attribute__ ((unused)) *name = (id) 00108 # endif /* !__GNUC__ */ 00109 #else 00110 # define RCSID(id) typedef void useless 00111 # define NRCSID(name,id) typedef void useless 00112 #endif /* !lint */ 00113 00114 NRCSID (LALRCSIDH, "$Id: LALRCSID.h,v 1.6 2007/06/08 14:41:52 bema Exp $"); 00115 00116 00117 /* <lalLaTeX> 00118 \vfill{\footnotesize\input{LALRCSIDHV}} 00119 </lalLaTeX> */ 00120 00121 00122 #ifdef __cplusplus 00123 } 00124 #endif 00125 00126 #endif /* _LALRCSID_H */
1.5.2