From 59bdb024516ffb110dabb4600e5af55bfc973968 Mon Sep 17 00:00:00 2001 From: allen Date: Wed, 10 May 2000 11:15:44 +0000 Subject: Updates git-svn-id: http://svn.cactuscode.org/flesh/trunk@1634 17b73243-c579-4c4c-a9d2-2d5706c11dac --- doc/UsersGuide/FunctionReference.tex | 42 +++++++++++++++++++++++++++++++++++- doc/UsersGuide/ThornWriters.tex | 3 +-- 2 files changed, 42 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/UsersGuide/FunctionReference.tex b/doc/UsersGuide/FunctionReference.tex index 5b4d444a..615e1f51 100644 --- a/doc/UsersGuide/FunctionReference.tex +++ b/doc/UsersGuide/FunctionReference.tex @@ -106,6 +106,10 @@ available from C, not all are currently available from Fortran. [\pageref{CoordRange}] Return the global upper and lower bounds for a given coordinate name +\item[CCTK\_CreateDirectory] + [\pageref{CreateDirectory}] + Creates a directory + \item[CCTK\_DecomposeName] [\pageref{DecomposeName}] Given the full name of a variable/group, separates the name returning both the implementation and the variable/group @@ -588,6 +592,40 @@ is registered by {\t CCTK\_RegisterCoordRange}. \end{CCTKFunc} +% Coord.c +\begin{CCTKFunc}{CCTK\_CreateDirectory}{Create a directory with required permissions} +\label{CreateDirectory} +\subroutine{int}{integer}{ierr} +\argument{const char *}{character*(*)}{pathname} +\argument{int}{integer}{mode} +\showargs +\begin{params} +\parameter{ierr}{Error code} +\parameter{pathname}{Directory to create} +\parameter{mode}{Permission mode for new directory as an octal number} +\end{params} +\begin{discussion} +To create a directory readable by everyone, but writeable only by the user runnning the code, the permission mode would be 0755. +\end{discussion} +\begin{examples} +\begin{tabular}{@{}p{3cm}cp{11cm}} +\hfill {\bf C} && {\t ierr = CCTK\_CreateDirectory(`Results/New`,0755) }; +\\ +\hfill {\bf Fortran} && {\t call CCTK\_CREATEDIRECTORY(ierr,`Results/New`,0755)}; +\\ +\end{tabular} +\end{examples} +\begin{errorcodes} +\begin{tabular}{ll} +0 & Directory successfully created\\ +-1 & Memory allocation failed\\ +-2 & Failed to create directory\\ +-3 & pathname exists but is not a directory\\ +\end{tabular} +\end{errorcodes} +\end{CCTKFunc} + + %%%%% % DDD %%%%% @@ -604,7 +642,9 @@ is registered by {\t CCTK\_RegisterCoordRange}. \parameter{cctkGH}{pointer to CCTK grid hierarchy} \end{params} \begin{discussion} -Turning off communications means that ghost zones will not be communicated during a call to {\tt CCTK\_SyncGroup}. By default communications are all off. +Turning off communications means that ghost zones will not be +communicated during a call to {\tt CCTK\_SyncGroup}. By default +communications are all off. \end{discussion} \begin{examples} \begin{tabular}{@{}p{3cm}cp{11cm}} diff --git a/doc/UsersGuide/ThornWriters.tex b/doc/UsersGuide/ThornWriters.tex index 024f23fe..997d2cd4 100644 --- a/doc/UsersGuide/ThornWriters.tex +++ b/doc/UsersGuide/ThornWriters.tex @@ -2038,8 +2038,7 @@ the reduction call is made. To call a utility Fortran routine from C use {\tt - -void FMODIFIER FORTRAN\_NAME()() +void CCTK\_FCALL CCTK\_FNAME()() } -- cgit v1.2.3