Code beautification with uncrustify
[alexxy/gromacs.git] / src / gromacs / legacyheaders / futil.h
index db0b0c5c965309c9b87e1af276f277c6bac7e69b..fe0e85dde6d6ff92589a18d900522108e20ca51a 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * 
+ *
  *                This source code is part of
- * 
+ *
  *                 G   R   O   M   A   C   S
- * 
+ *
  *          GROningen MAchine for Chemical Simulations
- * 
+ *
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * If you want to redistribute modifications, please consider that
  * scientific software is very special. Version control is crucial -
  * bugs must be traceable. We will be happy to consider code for
  * inclusion in the official distribution, but derived work must not
  * be called official GROMACS. Details are found in the README & COPYING
  * files - if they are missing, get the official version at www.gromacs.org.
- * 
+ *
  * To help us fund GROMACS development, we humbly ask that you cite
  * the papers on the package - you can find them in the top README file.
- * 
+ *
  * For more info, check our website at http://www.gromacs.org
- * 
+ *
  * And Hey:
  * Gromacs Runs On Most of All Computer Systems
  */
@@ -73,19 +73,19 @@ extern "C" {
 
 
 #ifdef HAVE_FSEEKO
-   typedef off_t              gmx_off_t;
+typedef off_t              gmx_off_t;
 #  define SIZEOF_GMX_OFF_T   SIZEOF_OFF_T
-#elif defined HAVE__FSEEKI64 
-   typedef __int64            gmx_off_t;
+#elif defined HAVE__FSEEKI64
+typedef __int64            gmx_off_t;
 #  define SIZEOF_GMX_OFF_T   8
 #else
-   /* Almost certainly 64 bits, and guaranteed to be available */
-   typedef gmx_large_int_t    gmx_off_t;
+/* Almost certainly 64 bits, and guaranteed to be available */
+typedef gmx_large_int_t    gmx_off_t;
 #  define SIZEOF_GMX_OFF_T   SIZEOF_GMX_LARGE_INT
-#endif    
+#endif
+
 
 
-  
 void no_buffers(void);
 /* Turn off buffering of files (which is default) for debugging purposes */
 
@@ -101,13 +101,13 @@ gmx_bool gmx_eof(FILE *fp);
 gmx_bool is_pipe(FILE *fp);
 /* Check whether the file (opened by ffopen) is a pipe */
 
-/*  Make a backup of file if necessary.  
+/*  Make a backup of file if necessary.
     Return false if there was a problem.
-*/
+ */
 gmx_bool make_backup(const char * file);
 
 FILE *ffopen(const char *file, const char *mode);
-/* Return a valid file pointer when successful, exits otherwise 
+/* Return a valid file pointer when successful, exits otherwise
  * If the file is in compressed format, open a pipe which uncompresses
  * the file! Therefore, files must be closed with ffclose (see below)
  */
@@ -122,10 +122,10 @@ void frewind(FILE *fp);
 #define rewind frewind
 
 
-int gmx_fseek(FILE *stream, gmx_off_t offset, int whence); 
+int gmx_fseek(FILE *stream, gmx_off_t offset, int whence);
 /* OS-independent fseek. 64-bit when available */
 
-gmx_off_t gmx_ftell(FILE *stream); 
+gmx_off_t gmx_ftell(FILE *stream);
 /* OS-independent fseek. 64-bit when available. */
 
 
@@ -142,15 +142,15 @@ FILE *libopen(const char *file);
 
 /* Opaque data type to list directories */
 typedef struct gmx_directory *
-gmx_directory_t;
+    gmx_directory_t;
 
 /* Open a directory for reading. The first argument should be a pointer
  * to a declared gmx_directory_t variable. Returns 0 on success.
  */
 int
-gmx_directory_open(gmx_directory_t *p_gmxdir,const char *dirname);
+gmx_directory_open(gmx_directory_t *p_gmxdir, const char *dirname);
+
 
-    
 /* Given an initialized gmx_directory_t, if there are more files in
  * the directory this routine returns 0 and write the next name
  * into the USER-PROVIDED buffer name. The last argument is the max
@@ -158,30 +158,30 @@ gmx_directory_open(gmx_directory_t *p_gmxdir,const char *dirname);
  * string will NOT be terminated it it is longer than maxlength_name.
  */
 int
-gmx_directory_nextfile(gmx_directory_t gmxdir,char *name,int maxlength_name);
-    
+gmx_directory_nextfile(gmx_directory_t gmxdir, char *name, int maxlength_name);
+
 /* Release all data for a directory structure */
-int 
+int
 gmx_directory_close(gmx_directory_t gmxdir);
-    
 
-    
+
+
 gmx_bool get_libdir(char *libdir);
 
-char *low_gmxlibfn(const char *file,gmx_bool bAddCWD,gmx_bool bFatal);
+char *low_gmxlibfn(const char *file, gmx_bool bAddCWD, gmx_bool bFatal);
 
-FILE *low_libopen(const char *file,gmx_bool bFatal);
+FILE *low_libopen(const char *file, gmx_bool bFatal);
 /* The same as the above, but does not terminate if (!bFatal) */
 
-/* Create unique name for temp file (wrapper around mkstemp). 
- * Buf should be at least 7 bytes long 
+/* Create unique name for temp file (wrapper around mkstemp).
+ * Buf should be at least 7 bytes long
  */
 void gmx_tmpnam(char *buf);
 
 /* truncte the file to the specified length */
 int gmx_truncatefile(char *path, gmx_off_t length);
 
-/* rename/move the file (atomically, if the OS makes that available) oldname 
+/* rename/move the file (atomically, if the OS makes that available) oldname
    to newname */
 int gmx_file_rename(const char *oldname, const char *newname);
 
@@ -189,7 +189,7 @@ int gmx_file_rename(const char *oldname, const char *newname);
    the file won't be copied if it's empty.*/
 int gmx_file_copy(const char *oldname, const char *newname, gmx_bool copy_if_empty);
 
-/* do an fsync() on an open file pointer. 
+/* do an fsync() on an open file pointer.
    Only use this during checkpointing! */
 int gmx_fsync(FILE *fp);
 
@@ -200,4 +200,4 @@ void gmx_getcwd(char *buffer, size_t size);
 }
 #endif
 
-#endif /* _futil_h */
+#endif  /* _futil_h */