[llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h
Misha Brukman
brukman at cs.uiuc.edu
Tue Jul 20 08:58:48 PDT 2004
Changes in directory llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr:
bintree.h updated: 1.2 -> 1.3
---
Log message:
* malloc() is declared in <stdlib.h> on MacOS X
* Make file readable: fix whitespace
---
Diffs of the changes: (+26 -27)
Index: llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h
diff -u llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h:1.2 llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h:1.3
--- llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h:1.2 Wed Jun 23 09:23:34 2004
+++ llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h Tue Jul 20 10:58:38 2004
@@ -1,11 +1,11 @@
/***************************************************************************/
-/* */
-/* Filename : bintree.h */
-/* */
-/* Author : Frederic Bergeron (91 485 12) */
-/* */
-/* Date : 1996/09/26 */
-/* */
+/* */
+/* Filename : bintree.h */
+/* */
+/* Author : Frederic Bergeron (91 485 12) */
+/* */
+/* Date : 1996/09/26 */
+/* */
/***************************************************************************/
#ifndef _bintree
@@ -13,44 +13,43 @@
#include "general.h"
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__APPLE__)
# include <stdlib.h>
#else
# include <malloc.h>
#endif
-
struct binaryTree {
- int value;
- struct binaryTree* left;
- struct binaryTree* right;
+ int value;
+ struct binaryTree* left;
+ struct binaryTree* right;
};
+struct binaryTree* createBinaryTree(int newValue);
-struct binaryTree* createBinaryTree( int newValue );
+void printBinaryTree(struct binaryTree* tree);
-void printBinaryTree( struct binaryTree* tree );
+void printSortedBinaryTree(struct binaryTree* tree);
-void printSortedBinaryTree( struct binaryTree* tree );
+struct binaryTree* insertSortedBinaryTree(int newValue,
+ struct binaryTree** tree);
-struct binaryTree* insertSortedBinaryTree( int newValue,
- struct binaryTree** tree );
+double getArithmeticMeanBinaryTree(struct binaryTree* tree);
-double getArithmeticMeanBinaryTree( struct binaryTree* tree );
+double getArithmeticMeanOptimized(struct binaryTree* tree);
-double getArithmeticMeanOptimized( struct binaryTree* tree );
+void getArithmeticMeanOptimizedRecurs(struct binaryTree* tree, double* sum,
+ double* count);
-void getArithmeticMeanOptimizedRecurs( struct binaryTree* tree, double* sum, double* count );
+int memberOfBinaryTree(struct binaryTree* tree, int searchedValue);
-int memberOfBinaryTree( struct binaryTree* tree, int searchedValue );
+void memberOfBinaryTreeRecurs(struct binaryTree* tree, int searchedValue,
+ int* found);
-void memberOfBinaryTreeRecurs( struct binaryTree* tree, int searchedValue, int* found );
+int memberOfSortedBinaryTree(struct binaryTree* tree, int searchedValue);
-int memberOfSortedBinaryTree( struct binaryTree* tree, int searchedValue );
+int getSizeBinaryTree(struct binaryTree* tree);
-int getSizeBinaryTree( struct binaryTree* tree );
+double getSumBinaryTree(struct binaryTree* tree);
-double getSumBinaryTree( struct binaryTree* tree );
-
-
#endif
More information about the llvm-commits
mailing list