diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ReferenceManual/CCTKReference.tex | 109 | ||||
-rw-r--r-- | doc/ReferenceManual/UtilReference.tex | 142 |
2 files changed, 245 insertions, 6 deletions
diff --git a/doc/ReferenceManual/CCTKReference.tex b/doc/ReferenceManual/CCTKReference.tex index c985438d..1a7a0310 100644 --- a/doc/ReferenceManual/CCTKReference.tex +++ b/doc/ReferenceManual/CCTKReference.tex @@ -114,6 +114,15 @@ from Fortran. \item[\code{CCTK\_CmplxSub}] [\pageref{CCTK-CmplxSub}] Returns the subtraction of two complex numbers (only C) +\item[\code{CCTK\_CompileDate}] [\pageref{CCTK-CompileDate}] + Returns a formatted string containing the date stamp when Cactus was compiled + +\item[\code{CCTK\_CompileDateTime}] [\pageref{CCTK-CompileDateTime}] + Returns a formatted string containing the datetime stamp when Cactus was compiled + +\item[\code{CCTK\_CompileTime}] [\pageref{CCTK-CompileTime}] + Returns a formatted string containing the time stamp when Cactus was compiled + \item[\code{CCTK\_CompiledImplementation}] [\pageref{CCTK-CompiledImplementation}] Return the name of the compiled implementation with given index @@ -1571,6 +1580,106 @@ $$ \end{CCTKFunc} +% datestamp.c +\begin{FunctionDescription}{CCTK\_CompileDate} +\label{CCTK-CompileDate} +Returns a formatted string containing the date stamp when Cactus was compiled + +\begin{SynopsisSection} +\begin{Synopsis}{C} +\begin{verbatim} +#include "cctk.h" + +const char *compile_date = CCTK_CompileDate (); +\end{verbatim} +\end{Synopsis} +\end{SynopsisSection} + +\begin{ResultSection} +\begin{Result}{compile\_date} +formatted string containing the date stamp +\end{Result} +\end{ResultSection} + +\begin{SeeAlsoSection} +\begin{SeeAlso2}{CCTK\_CompileTime}{CCTK-CompileTime} + Returns a formatted string containing the time stamp when Cactus was compiled +\end{SeeAlso2} +\begin{SeeAlso2}{CCTK\_CompileDateTime}{CCTK-CompileDateTime} + Returns a formatted string containing the datetime stamp when Cactus was compiled +\end{SeeAlso2} +\end{SeeAlsoSection} + +\end{FunctionDescription} + + +\begin{FunctionDescription}{CCTK\_CompileDateTime} +\label{CCTK-CompileDateTime} +Returns a formatted string containing the datetime stamp when Cactus was compiled + +\begin{SynopsisSection} +\begin{Synopsis}{C} +\begin{verbatim} +#include "cctk.h" + +const char *compile_datetime = CCTK_CompileDateTime (); +\end{verbatim} +\end{Synopsis} +\end{SynopsisSection} + +\begin{ResultSection} +\begin{Result}{compile\_datetime} +formatted string containing the datetime stamp +\end{Result} +\end{ResultSection} + +\begin{Discussion} +If possible, the formatted string returned contains the datetime in a +machine-processable format as defined in ISO 8601 chapter 5.4. +\end{Discussion} + +\begin{SeeAlsoSection} +\begin{SeeAlso2}{CCTK\_CompileDate}{CCTK-CompileDate} + Returns a formatted string containing the date stamp when Cactus was compiled +\end{SeeAlso2} +\begin{SeeAlso2}{CCTK\_CompileTime}{CCTK-CompileTime} + Returns a formatted string containing the time stamp when Cactus was compiled +\end{SeeAlso2} +\end{SeeAlsoSection} + +\end{FunctionDescription} + +\begin{FunctionDescription}{CCTK\_CompileTime} +\label{CCTK-CompileTime} +Returns a formatted string containing the time stamp when Cactus was compiled + +\begin{SynopsisSection} +\begin{Synopsis}{C} +\begin{verbatim} +#include "cctk.h" + +const char *compile_time = CCTK_CompileTime (); +\end{verbatim} +\end{Synopsis} +\end{SynopsisSection} + +\begin{ResultSection} +\begin{Result}{compile\_time} +formatted string containing the time stamp +\end{Result} +\end{ResultSection} + +\begin{SeeAlsoSection} +\begin{SeeAlso2}{CCTK\_CompileDate}{CCTK-CompileDate} + Returns a formatted string containing the date stamp when Cactus was compiled +\end{SeeAlso2} +\begin{SeeAlso2}{CCTK\_CompileDateTime}{CCTK-CompileDateTime} + Returns a formatted string containing the datetime stamp when Cactus was compiled +\end{SeeAlso2} +\end{SeeAlsoSection} + +\end{FunctionDescription} + % cctk_ActiveThorns.c \begin{FunctionDescription}{CCTK\_CompiledImplementation} diff --git a/doc/ReferenceManual/UtilReference.tex b/doc/ReferenceManual/UtilReference.tex index 722cb130..059f25c0 100644 --- a/doc/ReferenceManual/UtilReference.tex +++ b/doc/ReferenceManual/UtilReference.tex @@ -37,6 +37,16 @@ Here the functions are listed alphabetically within each section. \begin{Lentry} +\item[\code{Util\_CurrentDate}] [\pageref{Util-CurrentDate}] + Fills string with current local date + +\item[\code{Util\_CurrentDateTime}] [\pageref{Util-CurrentDateTime}] + Returns the current datetime in a machine-processable format + as defined in ISO 8601 chapter 5.4. + +\item[\code{Util\_CurrentTime}] [\pageref{Util-CurrentTime}] + Fills string with current local time + \item[\code{Util\_snprintf}] [\pageref{Util-snprintf}] Safely format data into a caller-supplied buffer. @@ -69,12 +79,6 @@ Safely format data into a caller-supplied buffer. %%\item[\code{Util\_CacheMalloc}] %% [\pageref{Util-CacheMalloc}] -%%\item[\code{Util\_CurrentDate}] -%% [\pageref{Util-CurrentDate}] - -%%\item[\code{Util\_CurrentTime}] -%% [\pageref{Util-CurrentTime}] - %%\item[\code{Util\_DeleteHandle}] %% [\pageref{Util-DeleteHandle}] @@ -342,6 +346,132 @@ a copy of a specified C-style null-terminated character string \chapter{Full Descriptions of Miscellaneous Functions} +\begin{FunctionDescription}{Util\_CurrentDate} +\label{Util-CurrentDate} +Fills string with current local date + +\begin{SynopsisSection} +\begin{Synopsis}{C} +\begin{verbatim} +#include "cctk.h" +#include "cctk_Misc.h.h" + +int retval = Util_CurrentDate (int len, char *now); +\end{verbatim} +\end{Synopsis} +\end{SynopsisSection} + +\begin{ParameterSection} +\begin{Parameter}{len} +length of the user-supplied string buffer +\end{Parameter} +\begin{Parameter}{now} +user-supplied string buffer to write the date stamp to +\end{Parameter} +\end{ParameterSection} + +\begin{ResultSection} +\begin{Result}{retval} +length of the string returned in {\code now}, or 0 if the string was truncated +\end{Result} +\end{ResultSection} + +\begin{SeeAlsoSection} +\begin{SeeAlso2}{Util\_CurrentTime}{Util-CurrentTime} + Fills string with current local time +\end{SeeAlso2} +\begin{SeeAlso2}{Util\_CurrentDateTime}{Util-CurrentDateTime} + Returns the current datetime in a machine-processable format + as defined in ISO 8601 chapter 5.4. +\end{SeeAlso2} +\end{SeeAlsoSection} + +\end{FunctionDescription} + + +\begin{FunctionDescription}{Util\_CurrentDateTime} +\label{Util-CurrentDateTime} +Returns the current datetime in a machine-processable format +as defined in ISO 8601 chapter 5.4. + +\begin{SynopsisSection} +\begin{Synopsis}{C} +\begin{verbatim} +#include "cctk.h" +#include "cctk_Misc.h.h" + +char *current_datetime = Util_CurrentDateTime (); +\end{verbatim} +\end{Synopsis} +\end{SynopsisSection} + +\begin{ResultSection} +\begin{Result}{current\_datetime} +Pointer to an allocated formatted string containing the current datetime stamp. +The pointer should be freed by the caller. +\end{Result} +\end{ResultSection} + +\begin{Discussion} +The formatted string returned contains the current datetime in a +machine-processable format as defined in ISO 8601 chapter 5.4: +{\code "YYYY-MM-DDThh:mm:ss+hh:mm"} +\end{Discussion} + +\begin{SeeAlsoSection} +\begin{SeeAlso2}{Util\_CurrentDate}{Util-CurrentDate} + Fills string with current local date +\end{SeeAlso2} +\begin{SeeAlso2}{Util\_CurrentTime}{Util-CurrentTime} + Fills string with current local time +\end{SeeAlso2} +\end{SeeAlsoSection} + +\end{FunctionDescription} + +\begin{FunctionDescription}{Util\_CurrentTime} +\label{Util-CurrentTime} +Fills string with current local time + +\begin{SynopsisSection} +\begin{Synopsis}{C} +\begin{verbatim} +#include "cctk.h" +#include "cctk_Misc.h.h" + +int retval = Util_CurrentTime (int len, char *now); +\end{verbatim} +\end{Synopsis} +\end{SynopsisSection} + +\begin{ParameterSection} +\begin{Parameter}{len} +length of the user-supplied string buffer +\end{Parameter} +\begin{Parameter}{now} +user-supplied string buffer to write the time stamp to +\end{Parameter} +\end{ParameterSection} + +\begin{ResultSection} +\begin{Result}{retval} +length of the string returned in {\code now}, or 0 if the string was truncated +\end{Result} +\end{ResultSection} + +\begin{SeeAlsoSection} +\begin{SeeAlso2}{Util\_CurrentDate}{Util-CurrentDate} + Fills string with current local date +\end{SeeAlso2} +\begin{SeeAlso2}{Util\_CurrentDateTime}{Util-CurrentDateTime} + Returns the current datetime in a machine-processable format +as defined in ISO 8601 chapter 5.4. +\end{SeeAlso2} +\end{SeeAlsoSection} + +\end{FunctionDescription} + + %Entering a function descrpition for Util\_snprintf \begin{FunctionDescription}{Util\_snprintf} \label{Util-snprintf} |