From f9a8f3e72773095d5d7b2f2e1ff3eb3e58122f14 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 5 Jul 2015 11:41:32 +0200 Subject: [PATCH] Clean up various whitespace and fix one header guard. --- headers/private/kernel/file_cache.h | 2 +- headers/private/kernel/util/BitUtils.h | 2 +- headers/private/kernel/util/Constructor.h | 12 +++++----- .../private/kernel/util/MallocFreeAllocator.h | 4 ++-- headers/private/kernel/util/OpenHashTable.h | 2 +- headers/private/kernel/util/SplayTree.h | 24 +++++++++---------- src/system/kernel/lib/Jamfile | 12 +++++----- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/headers/private/kernel/file_cache.h b/headers/private/kernel/file_cache.h index 3454aeb065..3e8fee2af6 100644 --- a/headers/private/kernel/file_cache.h +++ b/headers/private/kernel/file_cache.h @@ -20,7 +20,7 @@ #define CACHE_MODULES_NAME "file_cache" #define FILE_CACHE_SEQUENTIAL_ACCESS 0x01 -#define FILE_CACHE_LOADED_COMPLETELY 0x02 +#define FILE_CACHE_LOADED_COMPLETELY 0x02 #define FILE_CACHE_NO_IO 0x04 struct cache_module_info { diff --git a/headers/private/kernel/util/BitUtils.h b/headers/private/kernel/util/BitUtils.h index 55191d0079..43dab013fc 100644 --- a/headers/private/kernel/util/BitUtils.h +++ b/headers/private/kernel/util/BitUtils.h @@ -56,5 +56,5 @@ log2(uint32 v) } -#endif // KERNEL_UTIL_RANDOM_H +#endif // KERNEL_UTIL_BITUTIL_H diff --git a/headers/private/kernel/util/Constructor.h b/headers/private/kernel/util/Constructor.h index 796b66b289..4c46cbe3b3 100644 --- a/headers/private/kernel/util/Constructor.h +++ b/headers/private/kernel/util/Constructor.h @@ -10,7 +10,7 @@ public: typedef const DataType* ConstPointer; typedef DataType& Reference; typedef const DataType& ConstReference; - + /*! Constructs the object pointed to by \a object via a zero-parameter constructor. */ @@ -19,7 +19,7 @@ public: if (object) new(reinterpret_cast(object)) DataType(); } - + /*! Constructs the object pointed to by \a object via a one-parameter constructor using the given argument. */ @@ -29,7 +29,7 @@ public: if (object) new(reinterpret_cast(object)) DataType(arg1); } - + /*! Constructs the object pointed to by \a object via a two-parameter constructor using the given arguments. */ @@ -39,7 +39,7 @@ public: if (object) new(reinterpret_cast(object)) DataType(arg1, arg2); } - + /*! Constructs the object pointed to by \a object via a three-parameter constructor using the given arguments. */ @@ -49,7 +49,7 @@ public: if (object) new(reinterpret_cast(object)) DataType(arg1, arg2, arg3); } - + /*! Constructs the object pointed to by \a object via a four-parameter constructor using the given arguments. */ @@ -60,7 +60,7 @@ public: ArgType4 arg4) { if (object) new(reinterpret_cast(object)) DataType(arg1, arg2, arg3, arg4); - } + } /*! Calls the destructor for the object pointed to be \a object. */ diff --git a/headers/private/kernel/util/MallocFreeAllocator.h b/headers/private/kernel/util/MallocFreeAllocator.h index 5947f4b6fc..12eb665c0c 100644 --- a/headers/private/kernel/util/MallocFreeAllocator.h +++ b/headers/private/kernel/util/MallocFreeAllocator.h @@ -12,14 +12,14 @@ public: typedef const DataType* ConstPointer; typedef DataType& Reference; typedef const DataType& ConstReference; - + /*! malloc()'s an object of type \c DataType and returns a pointer to it. */ Pointer Allocate() { return reinterpret_cast(malloc(sizeof(DataType))); } - + /*! free()'s the given object. */ void Deallocate(Pointer object) { diff --git a/headers/private/kernel/util/OpenHashTable.h b/headers/private/kernel/util/OpenHashTable.h index 9f54849aa4..bb1479cd7b 100644 --- a/headers/private/kernel/util/OpenHashTable.h +++ b/headers/private/kernel/util/OpenHashTable.h @@ -74,7 +74,7 @@ struct MallocAllocator { * stored in a linked list. The table may be made to adjust its number of slots * depending on the load factor (this should be enabled unless the object is to * be used at times where memory allocations aren't possible, such as code - * called byt he memory allocator). + * called by the memory allocator). * * The link between entries is part of the ValueType stored items, which makes * sure the table can always accept new items and will never fail because it is diff --git a/headers/private/kernel/util/SplayTree.h b/headers/private/kernel/util/SplayTree.h index 551a7a4ce6..4a2c8c7efb 100644 --- a/headers/private/kernel/util/SplayTree.h +++ b/headers/private/kernel/util/SplayTree.h @@ -117,7 +117,7 @@ public: } return node; - } + } /*! Remove from the tree. @@ -143,7 +143,7 @@ public: } return true; - } + } /*! Find the smallest item in the tree. @@ -163,9 +163,9 @@ public: return node; } - /*! + /*! Find the largest item in the tree. - */ + */ Node* FindMax() { if (fRoot == NULL) @@ -179,9 +179,9 @@ public: _Splay(Definition::GetKey(node)); return node; - } + } - /*! + /*! Find an item in the tree. */ Node* Lookup(const Key& key) @@ -192,14 +192,14 @@ public: _Splay(key); return Definition::Compare(key, fRoot) == 0 ? fRoot : NULL; - } + } Node* Root() const { return fRoot; } - /*! + /*! Test if the tree is logically empty. \return true if empty, false otherwise. */ @@ -267,16 +267,16 @@ private: _Splay(key) does the splay operation on the given key. If key is in the tree, then the node containing - that key becomes the root. If key is not in the tree, + that key becomes the root. If key is not in the tree, then after the splay, key.root is either the greatest key < key in the tree, or the least key > key in the tree. This means, among other things, that if you splay with a key that's larger than any in the tree, the rightmost - node of the tree becomes the root. This property is used + node of the tree becomes the root. This property is used in the Remove() method. */ - void _Splay(const Key& key) { + void _Splay(const Key& key) { Link headerLink; headerLink.left = headerLink.right = NULL; @@ -554,7 +554,7 @@ public: return fTree.Root(); } - /*! + /*! Test if the tree is logically empty. \return true if empty, false otherwise. */ diff --git a/src/system/kernel/lib/Jamfile b/src/system/kernel/lib/Jamfile index cfb7b2a4f6..e890322ca9 100644 --- a/src/system/kernel/lib/Jamfile +++ b/src/system/kernel/lib/Jamfile @@ -46,12 +46,12 @@ SEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ; KernelMergeObject kernel_lib_posix.o : # main - kernel_errno.cpp - dirent.c + kernel_errno.cpp + dirent.c fcntl.cpp - poll.c - utime.c - # locale + poll.c + utime.c + # locale ctype.cpp localeconv.cpp LocaleData.cpp @@ -76,7 +76,7 @@ KernelMergeObject kernel_lib_posix.o : mkdir.c select.c gettimeofday.c - uio.c + uio.c # time time.c # unistd