OSSP CVS Repository

ossp - Check-in [2613]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2613
Date: 2002-Oct-18 13:01:59 (local)
2002-Oct-18 11:01:59 (UTC)
User:rse
Branch:
Comment: Be pedantic about consistent argument orders and move al_tx_t argument to second position where it is for all other al_tx_t based functions:

-al_traverse(al_t *al, size_t off, size_t n, al_td_t dir, al_tx_t *tx) +al_traverse(al_t *al, al_tx_t *tx, size_t off, size_t n, al_td_t dir)

Tickets:
Inspections:
Files:
ossp-pkg/sio/al.c      1.21 -> 1.22     4 inserted, 4 deleted
ossp-pkg/sio/al.h      1.10 -> 1.11     1 inserted, 1 deleted
ossp-pkg/sio/al_test.c      1.9 -> 1.10     1 inserted, 1 deleted

ossp-pkg/sio/al.c 1.21 -> 1.22

--- al.c 2002/10/18 10:20:26     1.21
+++ al.c 2002/10/18 11:01:59     1.22
@@ -788,7 +788,7 @@
  * - save traversal parameters
  */
 al_rc_t
-al_traverse(al_t *al, size_t off, size_t n, al_td_t dir, al_tx_t *tx)
+al_traverse(al_t *al, al_tx_t *tx, size_t off, size_t n, al_td_t dir)
 {
     al_rc_t rc;
 
@@ -879,7 +879,7 @@
     al_tx_t tx;                /* XXX - private tx structure on stack */
     al_chunk_t *view;
 
-    rc = al_traverse(al, off, n, dir, &tx);
+    rc = al_traverse(al, &tx, off, n, dir);
     if (rc != AL_OK)
         return AL_RC(rc);
 
@@ -914,7 +914,7 @@
 
     *lenp = 0; /* keep caller on safe side */
 
-    rc = al_traverse(al, off, n, AL_FORWARD, &tx);
+    rc = al_traverse(al, &tx, off, n, AL_FORWARD);
     if (rc != AL_OK)
         return AL_RC(rc);
 
@@ -948,7 +948,7 @@
     al_chunk_t *view;
     size_t step;
 
-    rc = al_traverse(al, off, n, AL_FORWARD, &tx);
+    rc = al_traverse(al, &tx, off, n, AL_FORWARD);
     if (rc != AL_OK)
         return AL_RC(rc);
 


ossp-pkg/sio/al.h 1.10 -> 1.11

--- al.h 2002/10/18 09:09:18     1.10
+++ al.h 2002/10/18 11:01:59     1.11
@@ -61,7 +61,7 @@
 al_rc_t al_attach_buffer(al_t *al, char *p, size_t n);
 al_rc_t al_txalloc      (al_t *al, al_tx_t **txp);
 al_rc_t al_txfree       (al_t *al, al_tx_t *tx);
-al_rc_t al_traverse     (al_t *al, size_t off, size_t n, al_td_t dir, al_tx_t *tx);
+al_rc_t al_traverse     (al_t *al, al_tx_t *tx, size_t off, size_t n, al_td_t dir);
 al_rc_t al_traverse_next(al_t *al, al_tx_t *tx, al_chunk_t **alcp);
 al_rc_t al_traverse_end (al_t *al, al_tx_t *tx, int final);
 al_rc_t al_traverse_cb  (al_t *al, size_t off, size_t n, al_td_t dir, al_rc_t (*cb)(al_chunk_t *, void *), void *u);


ossp-pkg/sio/al_test.c 1.9 -> 1.10

--- al_test.c    2002/10/18 09:10:10     1.9
+++ al_test.c    2002/10/18 11:01:59     1.10
@@ -116,7 +116,7 @@
     total = 0;
 
     al_txalloc(al, &tx);
-    al_traverse(al, 0, -1, AL_FORWARD, tx);
+    al_traverse(al, tx, 0, -1, AL_FORWARD);
     while (al_traverse_next(al, tx, &cur) == AL_OK)
         total += al_chunk_len(cur);
     al_traverse_end(al, tx, 1);

CVSTrac 2.0.1