OSSP CVS Repository

ossp - Difference in ossp-pkg/sio/sio_sa.c versions 1.1 and 1.2
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/sio/sio_sa.c 1.1 -> 1.2

--- sio_sa.c     2002/11/05 13:23:36     1.1
+++ sio_sa.c     2002/11/05 15:52:21     1.2
@@ -20,9 +20,9 @@
     sa_t *sa;
     buffer_t input;
     size_t written;
-    void *label_data;
-    void *label_error;
-    void *label_eof;
+    al_label_t data_label;
+    al_label_t error_label;
+    al_label_t eof_label;
     char eof;
     char error;
 } private_t;
@@ -33,7 +33,7 @@
  * allocate private instance data
  */
 static
-sio_rc_t sa_init(sio_t *sio, void **u)
+sio_rc_t saw_init(sio_t *sio, void **u)
 {
     private_t *my;
     
@@ -46,9 +46,9 @@
     my->input.mem    = NULL;
     my->input.size   = 0;
 
-    sio_label(sio, SIO_LN_DATA,  &my->label_data);
-    sio_label(sio, SIO_LN_ERROR, &my->label_error);
-    sio_label(sio, SIO_LN_EOF,   &my->label_eof);
+    sio_label(sio, SIO_LN_DATA,  &my->data_label);
+    sio_label(sio, SIO_LN_ERROR, &my->error_label);
+    sio_label(sio, SIO_LN_EOF,   &my->eof_label);
 
     my->eof   = '\0';
     my->error = '\0';
@@ -63,7 +63,7 @@
  *
  */
 static
-sio_rc_t sa_configure(sio_t *sio, void *u, void *obj, void *val)
+sio_rc_t saw_configure(sio_t *sio, void *u, void *obj, void *val)
 {
     private_t *my = (private_t *)u;
     const char *name = (const char *)obj;
@@ -83,13 +83,13 @@
  * destroy stage
  */
 static
-sio_rc_t sa_cleanup(sio_t *sio, void *u)
+sio_rc_t saw_cleanup(sio_t *sio, void *u)
 {
     return SIO_OK;
 }
 
 static
-sio_rc_t sa_openr(sio_t *sio, al_t *al, void *u)
+sio_rc_t saw_openr(sio_t *sio, al_t *al, void *u)
 {
     private_t *my = (private_t *)u;
     buffer_t *buf = &my->input;
@@ -108,7 +108,7 @@
 }
 
 static
-sio_rc_t sa_closer(sio_t *sio, al_t *al, void *u)
+sio_rc_t saw_closer(sio_t *sio, al_t *al, void *u)
 {
     private_t *my = (private_t *)u;
     buffer_t *buf = &my->input;
@@ -122,33 +122,33 @@
 }
 
 static
-sio_rc_t sa_openw(sio_t *sio, al_t *al, void *u)
+sio_rc_t saw_openw(sio_t *sio, al_t *al, void *u)
 {
     return SIO_OK;
 }
 
 static
-sio_rc_t sa_closew(sio_t *sio, al_t *al, void *u)
+sio_rc_t saw_closew(sio_t *sio, al_t *al, void *u)
 {
     return SIO_OK;
 }
 
 static
-void sa_writeeof(al_t *al, private_t *my)
+void saw_writeeof(al_t *al, private_t *my)
 {
     al_splice(al, 0, al_bytes(al), NULL, NULL);
-    al_append_bytes(al, &my->eof, sizeof(my->eof), my->label_eof);
+    al_append_bytes(al, &my->eof, sizeof(my->eof), my->eof_label);
 }
 
 static
-void sa_writeerror(al_t *al, private_t *my)
+void saw_writeerror(al_t *al, private_t *my)
 {
     al_splice(al, 0, al_bytes(al), NULL, NULL);
-    al_append_bytes(al, &my->error, sizeof(my->error), my->label_error);
+    al_append_bytes(al, &my->error, sizeof(my->error), my->error_label);
 }
 
 static
-sio_rc_t sa_input(sio_t *sio, al_t *al, void *u)
+sio_rc_t saw_input(sio_t *sio, al_t *al, void *u)
 {
     private_t *my = (private_t *)u;
     buffer_t *buf = &my->input;
@@ -157,20 +157,20 @@
 
     src = sa_read(my->sa, buf->mem, buf->size, &actual);
     if (src != SA_OK) {
-        sa_writeerror(al, my);
+        saw_writeerror(al, my);
         return SIO_DOWNSTREAM;
     } else if (src == SA_ERR_EOF) {
-        sa_writeeof(al, my);
+        saw_writeeof(al, my);
         return SIO_DOWNSTREAM;
     }
 
-    al_append_bytes(al, buf->mem, actual, my->label_data);
+    al_append_bytes(al, buf->mem, actual, my->data_label);
 
     return SIO_DOWNSTREAM;
 }
 
 static
-al_rc_t sa_output_chunk(al_chunk_t *alc, void *u)
+al_rc_t saw_output_chunk(al_chunk_t *alc, void *u)
 {
     private_t *my = (private_t *)u;
     char   *p;
@@ -190,7 +190,7 @@
 }
 
 static
-sio_rc_t sa_output(sio_t *sio, al_t *al, void *u)
+sio_rc_t saw_output(sio_t *sio, al_t *al, void *u)
 {
     private_t *my = (private_t *)u;
     al_rc_t arc;
@@ -198,8 +198,8 @@
 
     my->written = 0;
 
-    arc = al_traverse_cb(al, 0, n, AL_FORWARD, my->label_data,
-                         sa_output_chunk, u);
+    arc = al_traverse_cb(al, 0, n, AL_FORWARD, my->data_label,
+                         saw_output_chunk, u);
     if (arc != AL_OK) return SIO_ERR_INT;
 
     arc = al_splice(al, 0, al_bytes(al), NULL, NULL);
@@ -210,15 +210,15 @@
 
 sio_module_t sio_module_sa = {
     "sa",
-    sa_init,
-    sa_configure,
-    sa_cleanup,
-    sa_openr,
-    sa_closer,
-    sa_openw,
-    sa_closew,
-    sa_input,
-    sa_output
+    saw_init,
+    saw_configure,
+    saw_cleanup,
+    saw_openr,
+    saw_closer,
+    saw_openw,
+    saw_closew,
+    saw_input,
+    saw_output
 };
 
 

CVSTrac 2.0.1