summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-11-13 17:46:00 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-11-13 17:46:00 +0000
commit6c1a2a82e9d957e2cfe123cfe8bf55c1e415564e (patch)
tree3da7240e228b3cb393125c53301648f0a2f6aca8
parente731876caf256b8b8917652728f69edba241403f (diff)
grdoc, coding guidelines, removing obsolete code.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1888 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--src/util/File.c60
1 files 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 <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -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 *************************
+ ********************************************************************/
+
+