OSSP CVS Repository

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

ossp-pkg/sio/al_test.c 1.4 -> 1.5

--- al_test.c    2002/10/14 15:26:04     1.4
+++ al_test.c    2002/10/14 15:41:37     1.5
@@ -100,7 +100,7 @@
 int main()
 {
     al_rc_t rc;
-    al_t *al, *al2, *al3;
+    al_t *al, *al2, *al3, *al4;
     char baf[] = "Mittendrin\n";
     int i;
 
@@ -122,15 +122,17 @@
     DUMP("BUFFER",al2);
     DUMP("REPLACEMENT", al3);
 
-#if 1
     rc = al_splice(al, al_bytes(al)-500, 500, al3, al2);
-#endif
     printf("splice result: %d (%s)\n\n",rc,al_error(rc));
 
     checklen("SPLICED",al);
     checklen("BUFFER",al2);
     checklen("REPLACEMENT",al3);
 
+    al_create(&al4);
+    rc = al_copy(al, al_bytes(al)-42, 38, al4);
+    printf("copy result: %d (%s)\n\n",rc,al_error(rc));
+
     DUMP("SPLICED",al);
     print("SPLICED", al);
 
@@ -153,5 +155,13 @@
     al_destroy(al);
 
 
+
+    DUMP("COPY", al4);
+    print("COPY", al4);
+
+    printf("free COPY\n");
+    fflush(stdout);
+    al_destroy(al4);
+
     return 0;
 }

CVSTrac 2.0.1