Cleanup formatting in our head files to be more consistent Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
diff --git a/src/commit.h b/src/commit.h
index c863948..0b19f46 100644
--- a/src/commit.h
+++ b/src/commit.h
@@ -1,5 +1,6 @@
#ifndef INCLUDE_commit_h__
#define INCLUDE_commit_h__
+
#include "git/commit.h"
#include <time.h>
diff --git a/src/common.h b/src/common.h
index bdf2334..0e115c5 100644
--- a/src/common.h
+++ b/src/common.h
@@ -4,6 +4,7 @@
#include "cc-compat.h"
#include "util.h"
#include "errors.h"
+
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
diff --git a/src/errors.h b/src/errors.h
index 1137d90..caebc63 100644
--- a/src/errors.h
+++ b/src/errors.h
@@ -1,5 +1,6 @@
#ifndef INCLUDE_errors_h__
#define INCLUDE_errors_h__
+
#include "git/errors.h"
#include <stdlib.h>
@@ -15,4 +16,5 @@ GIT_INLINE(void) *git_ptr_error(int code)
git_errno = code;
return NULL;
}
+
#endif
diff --git a/src/git/errors.h b/src/git/errors.h
index d0a0d63..18eb2b8 100644
--- a/src/git/errors.h
+++ b/src/git/errors.h
@@ -1,14 +1,15 @@
#ifndef INCLUDE_git_errors_h__
#define INCLUDE_git_errors_h__
+
+#include "common.h"
+#include "thread-utils.h"
+
/**
* @file git/errors.h
* @brief Git error handling routines and variables
* @ingroup Git
* @{
*/
-
-#include "common.h"
-#include "thread-utils.h"
GIT_BEGIN_DECL
/** The git errno. */
@@ -20,6 +21,7 @@ GIT_EXTERN(int) GIT_TLS git_errno;
* @return a string explaining the error code
*/
GIT_EXTERN(const char *) git_strerror(int num);
+
/** @} */
GIT_END_DECL
#endif
diff --git a/src/git/fileops.h b/src/git/fileops.h
index 7f5dd37..657cec1 100644
--- a/src/git/fileops.h
+++ b/src/git/fileops.h
@@ -1,6 +1,8 @@
#ifndef INCLUDE_git_fileops_h__
#define INCLUDE_git_fileops_h__
+#include "common.h"
+
/**
* @file git/fileops.h
* @brief Git platform agnostic filesystem operations
@@ -8,9 +10,8 @@
* @ingroup Git
* @{
*/
-
-#include "common.h"
GIT_BEGIN_DECL
+
/**
* For each directory entry (except "." and ".."), run the function
* "fn", passing it "arg" as its first argument and the path to
diff --git a/src/git/thread-utils.h b/src/git/thread-utils.h
index 7322d43..c14aa17 100644
--- a/src/git/thread-utils.h
+++ b/src/git/thread-utils.h
@@ -1,22 +1,28 @@
#ifndef INCLUDE_git_thread_utils_h__
#define INCLUDE_git_thread_utils_h__
+
/*
* How TLS works is compiler+platform dependant
* Sources: http://en.wikipedia.org/wiki/Thread-Specific_Storage
* http://predef.sourceforge.net/precomp.html
*/
+
#define GIT_HAS_TLS 1
+
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || \
defined(__xlc__) || defined(__xlC__)
# define GIT_TLS __thread
+
#elif defined(__INTEL_COMPILER)
# if defined(_WIN32) || defined(_WIN32_CE)
# define GIT_TLS __declspec(thread)
# else
# define GIT_TLS __thread
# endif
+
#elif defined(_WIN32) || defined(_WIN32_CE) || defined(__BORLANDC__)
# define GIT_TLS __declspec(thread)
+
#else
# undef GIT_HAS_TLS
# define GIT_TLS /* nothing: tls vars are thread-global */