From 6c1a2a82e9d957e2cfe123cfe8bf55c1e415564e Mon Sep 17 00:00:00 2001 From: goodale Date: Mon, 13 Nov 2000 17:46:00 +0000 Subject: grdoc, coding guidelines, removing obsolete code. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1888 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/util/File.c | 60 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 12 deletions(-) diff --git a/src/util/File.c b/src/util/File.c index f01ccc3a..2d4cbf6f 100644 --- a/src/util/File.c +++ b/src/util/File.c @@ -1,14 +1,15 @@ -#include "cctk.h" - /*@@ @file File.c @date September 6th 1999 @author Gabrielle Allen @desc - File Handling routines + File Handling routines @enddesc + @version $Header$ @@*/ +#include "cctk.h" + #include #include #include @@ -23,6 +24,22 @@ static char *rcsid = "$Header$"; CCTK_FILEVERSION(util_File_c) +/******************************************************************** + ********************* Local Data Types *********************** + ********************************************************************/ + +/******************************************************************** + ********************* Local Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Other Routine Prototypes ********************* + ********************************************************************/ + +/******************************************************************** + ********************* Local Data ***************************** + ********************************************************************/ + /* some systems (eg. Windows NT) don't define this macro */ #ifndef S_ISDIR #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) @@ -32,18 +49,12 @@ CCTK_FILEVERSION(util_File_c) #ifdef HAVE_MODE_T #define MKDIR_WRAPPER(a,b) mkdir(a,b) #else - -/* FIXME: Temporary kludge until everyone has reconfigured */ -#ifdef WIN32 #define MKDIR_WRAPPER(a,b) mkdir(a) -#else -/* Should just be the clause with one argument, this one should go. */ -#endif /* WIN32 */ - #endif /* HAVE_MODE_T */ -int CCTK_CreateDirectory(int mode,const char *pathname); - +/******************************************************************** + ********************* External Routines ********************** + ********************************************************************/ /*@@ @routine CCTK_CreateDirectory @@ -57,7 +68,26 @@ int CCTK_CreateDirectory(int mode,const char *pathname); @history @endhistory + @var mode + @vdesc permissions of the directory to be created + @vtype int + @vio in + @vcomment + This is the unix mode, e.g. 0755 + @endvar + @var pathname + @vdesc Name of directory to create + @vtype const char * + @vio in + @vcomment + + @endvar + @returntype int + @returndesc + 0 - success + -1 - failure + @endreturndesc @@*/ int CCTK_CreateDirectory(int mode, const char *pathname) { @@ -165,3 +195,9 @@ void CCTK_FCALL CCTK_FNAME(CCTK_CreateDirectory) *ierr = CCTK_CreateDirectory(*mode,arg1); free(arg1); } + +/******************************************************************** + ********************* Local Routines ************************* + ********************************************************************/ + + -- cgit v1.2.3