pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/algorithm.c


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/algorithm.c
Date: Tue, 25 Oct 2005 00:28:18 -0400

Index: pspp/src/algorithm.c
diff -u pspp/src/algorithm.c:1.17 pspp/src/algorithm.c:1.18
--- pspp/src/algorithm.c:1.17   Mon Oct 24 05:41:45 2005
+++ pspp/src/algorithm.c        Tue Oct 25 04:28:17 2005
@@ -117,7 +117,7 @@
       const void *target,
       algo_compare_func *compare, void *aux) 
 {
-  const unsigned char *element = array;
+  const char *element = array;
 
   while (count-- > 0) 
     {
@@ -139,7 +139,7 @@
              const void *element,
              algo_compare_func *compare, void *aux)
 {
-  const unsigned char *first = array;
+  const char *first = array;
   size_t equal_cnt = 0;
 
   while (count-- > 0) 
@@ -161,7 +161,7 @@
 count_if (const void *array, size_t count, size_t size,
           algo_predicate_func *predicate, void *aux) 
 {
-  const unsigned char *first = array;
+  const char *first = array;
   size_t nonzero_cnt = 0;
 
   while (count-- > 0) 
@@ -294,7 +294,7 @@
                 size_t nonzero_cnt,
                 algo_predicate_func *predicate, void *aux) 
 {
-  const unsigned char *first = array;
+  const char *first = array;
   size_t idx;
 
   assert (nonzero_cnt <= count);
@@ -316,9 +316,9 @@
          void *result,
          algo_predicate_func *predicate, void *aux) 
 {
-  const unsigned char *input = array;
-  const unsigned char *last = input + size * count;
-  unsigned char *output = result;
+  const char *input = array;
+  const char *last = input + size * count;
+  char *output = result;
   size_t nonzero_cnt = 0;
   
   while (input < last)
@@ -421,9 +421,9 @@
               void *element,
               algo_compare_func *compare, void *aux) 
 {
-  unsigned char *first = array;
-  unsigned char *last = first + count * size;
-  unsigned char *result;
+  char *first = array;
+  char *last = first + count * size;
+  char *result;
 
   for (;;)
     {
@@ -489,14 +489,14 @@
 
   if (count != 0) 
     {
-      const unsigned char *first = array;
+      const char *first = array;
       int low = 0;
       int high = count - 1;
 
       while (low <= high) 
         {
           int middle = (low + high) / 2;
-          const unsigned char *element = first + middle * size;
+          const char *element = first + middle * size;
           int cmp = compare (value, element, aux);
 
           if (cmp > 0) 
@@ -523,8 +523,8 @@
                               size_t size,
                               algo_compare_func *compare, void *aux) 
 {
-  const unsigned char *first1 = array1;
-  const unsigned char *first2 = array2;
+  const char *first1 = array1;
+  const char *first2 = array2;
   size_t min_count = count1 < count2 ? count1 : count2;
 
   while (min_count > 0)
@@ -764,7 +764,7 @@
 is_sorted (const void *array, size_t count, size_t size,
            algo_compare_func *compare, void *aux) 
 {
-  const unsigned char *first = array;
+  const char *first = array;
   size_t idx;
       
   for (idx = 0; idx + 1 < count; idx++)
@@ -788,11 +788,11 @@
                        void *result_,
                        algo_compare_func *compare, void *aux) 
 {
-  const unsigned char *first1 = array1;
-  const unsigned char *last1 = first1 + count1 * size;
-  const unsigned char *first2 = array2;
-  const unsigned char *last2 = first2 + count2 * size;
-  unsigned char *result = result_;
+  const char *first1 = array1;
+  const char *last1 = first1 + count1 * size;
+  const char *first2 = array2;
+  const char *last2 = first2 + count2 * size;
+  char *result = result_;
   size_t result_count = 0;
   
   while (first1 != last1 && first2 != last2) 
@@ -835,8 +835,8 @@
 adjacent_find_equal (const void *array, size_t count, size_t size,
                      algo_compare_func *compare, void *aux) 
 {
-  const unsigned char *first = array;
-  const unsigned char *last = first + count * size;
+  const char *first = array;
+  const char *last = first + count * size;
 
   while (first < last && first + size < last) 
     {
@@ -858,15 +858,15 @@
 push_heap (void *array, size_t count, size_t size,
            algo_compare_func *compare, void *aux) 
 {
-  unsigned char *first = array;
+  char *first = array;
   size_t i;
   
   expensive_assert (count < 1 || is_heap (array, count - 1,
                                           size, compare, aux));
   for (i = count; i > 1; i /= 2) 
     {
-      unsigned char *parent = first + (i / 2 - 1) * size;
-      unsigned char *element = first + (i - 1) * size;
+      char *parent = first + (i / 2 - 1) * size;
+      char *element = first + (i - 1) * size;
       if (compare (parent, element, aux) < 0)
         SWAP (parent, element, size);
       else
@@ -885,7 +885,7 @@
          size_t idx,
          algo_compare_func *compare, void *aux) 
 {
-  unsigned char *first = array;
+  char *first = array;
   
   for (;;) 
     {
@@ -921,7 +921,7 @@
 pop_heap (void *array, size_t count, size_t size,
           algo_compare_func *compare, void *aux) 
 {
-  unsigned char *first = array;
+  char *first = array;
 
   expensive_assert (is_heap (array, count, size, compare, aux));
   SWAP (first, first + (count - 1) * size, size);
@@ -952,7 +952,7 @@
 sort_heap (void *array, size_t count, size_t size,
            algo_compare_func *compare, void *aux) 
 {
-  unsigned char *first = array;
+  char *first = array;
   size_t idx;
 
   expensive_assert (is_heap (array, count, size, compare, aux));
@@ -972,7 +972,7 @@
 is_heap (const void *array, size_t count, size_t size,
          algo_compare_func *compare, void *aux) 
 {
-  const unsigned char *first = array;
+  const char *first = array;
   size_t child;
   
   for (child = 2; child <= count; child++)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]