OSSP CVS Repository

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

ossp-pkg/act/act_test.c 1.4 -> 1.5

--- act_test.c   2002/01/17 20:19:57     1.4
+++ act_test.c   2003/01/06 12:10:58     1.5
@@ -1,3 +1,31 @@
+/*
+**  OSSP act - Abstract Container Types
+**  Copyright (c) 1999-2003 Ralf S. Engelschall <rse@engelschall.com>
+**  Copyright (c) 1999-2003 The OSSP Project <http://www.ossp.org/>
+**
+**  This file is part of OSSP act, an abstract container type library
+**  which can be found at http://www.ossp.org/pkg/lib/act/.
+**
+**  Permission to use, copy, modify, and distribute this software for
+**  any purpose with or without fee is hereby granted, provided that
+**  the above copyright notice and this permission notice appear in all
+**  copies.
+**
+**  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+**  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+**  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+**  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+**  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+**  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+**  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+**  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+**  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+**  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+**  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+**  SUCH DAMAGE.
+**
+**  act_test.c: test suite
+*/
 
 #include <stdio.h>
 #include <string.h>
@@ -17,7 +45,7 @@
 #define act_hash_delete_str(h,k) \
         act_hash_delete((h),(k),strlen((k)))
 
-int main(int argc, char *argv[]) 
+int main(int argc, char *argv[])
 {
     act_hash_t *h;
     char buf[1024];
@@ -73,7 +101,7 @@
     while (fgets(buf, sizeof(buf), fp) != NULL) {
         buf[strlen(buf)-1] = '\0';
         sprintf(buf2, "%ld", i);
-        if (!act_hash_lookup_str(h, buf, (void **)&cp)) 
+        if (!act_hash_lookup_str(h, buf, (void **)&cp))
             fprintf(stderr, "failed to lookup `%s'\n", buf);
         else {
             if (strcmp(cp, buf2) != 0)
@@ -99,7 +127,7 @@
             act_hash_status(h, s, sizeof s);
             fprintf(stderr, "%s\n", s);
         }
-        if (!act_hash_delete_str(h, buf)) 
+        if (!act_hash_delete_str(h, buf))
             fprintf(stderr, "failed to delete `%s'\n", buf);
         i--;
     }

CVSTrac 2.0.1