Revision: 50698
          http://brlcad.svn.sourceforge.net/brlcad/?rev=50698&view=rev
Author:   brlcad
Date:     2012-05-26 14:17:42 +0000 (Sat, 26 May 2012)
Log Message:
-----------
ws cleanup, run sh/ws.sh

Modified Paths:
--------------
    brlcad/trunk/src/libbu/test_bitv.c
    brlcad/trunk/src/libbu/test_booleanize.c
    brlcad/trunk/src/libbu/test_quote.c
    brlcad/trunk/src/libbu/test_vls.c

Modified: brlcad/trunk/src/libbu/test_bitv.c
===================================================================
--- brlcad/trunk/src/libbu/test_bitv.c  2012-05-26 11:20:20 UTC (rev 50697)
+++ brlcad/trunk/src/libbu/test_bitv.c  2012-05-26 14:17:42 UTC (rev 50698)
@@ -29,10 +29,10 @@
 #include "bu.h"
 
 
-unsigned int 
+unsigned int
 power(unsigned int base , int exponent)
 {
-    int i ; 
+    int i ;
     unsigned int product = 1;
 
     for (i = 0; i < exponent; i++) {
@@ -43,14 +43,14 @@
 }
 
 
-int 
+int
 test_bu_hex_to_bitv(char *inp, char *res , int errno)
 {
     struct bu_bitv *res_bitv ;
     int pass;
 
     res_bitv = bu_hex_to_bitv(inp);
-   
+
     if (errno == 1 && res_bitv == NULL) {
        printf("\nbu_hex_to_bitv PASSED Input:%s Output:%s", inp, res);
        return 0;
@@ -70,7 +70,7 @@
 }
 
 
-int 
+int
 test_bu_bitv_to_hex(char *inp , char *res , int length)
 {
     struct bu_vls *a;
@@ -82,7 +82,7 @@
     strcpy((char*)res_bitv->bits, inp);
 
     bu_bitv_to_hex(a, res_bitv);
-  
+
     if (!bu_strcmp(a->vls_str, res)) {
        printf("\nbu_bitv_to_hex PASSED Input:%5s Output:%9s", inp, res);
        pass = 1 ;
@@ -97,8 +97,8 @@
     return pass;
 }
 
-       
-int 
+
+int
 test_bu_bitv_vls(char *inp , char *exp)
 {
     struct bu_vls *a;
@@ -116,15 +116,15 @@
        printf("\nbu_bitv_vls FAILED for Input:%s Expected:%s", inp, exp);
        pass = 0;
     }
-       
+
     bu_vls_free(a);
     bu_bitv_free(res_bitv);
 
     return pass;
-}      
+}
 
 
-int 
+int
 test_bu_bitv_or(char *inp1 , char *inp2 , char *exp)
 {
     struct bu_bitv *res_bitv , *res_bitv1 , *result;
@@ -154,11 +154,11 @@
     bu_bitv_free(res_bitv1);
     bu_bitv_free(result);
 
-    return pass;       
+    return pass;
 }
 
 
-int 
+int
 test_bu_bitv_and(char *inp1 , char *inp2 , char *exp)
 {
     struct bu_bitv *res_bitv , *res_bitv1 , *result;
@@ -171,11 +171,11 @@
     res_bitv1 = bu_hex_to_bitv(inp1);
     res_bitv  = bu_hex_to_bitv(inp2);
     result    = bu_hex_to_bitv(exp);
- 
+
     bu_bitv_and(res_bitv1,res_bitv);
     bu_bitv_vls(a,res_bitv1);
     bu_bitv_vls(b,result);
-       
+
     if (!bu_strcmp(a->vls_str , b->vls_str)) {
        printf("\nbu_bitv_and test PASSED Input1:%s Input2:%s Output:%s", inp1, 
inp2, exp);
        pass = 1;
@@ -188,15 +188,15 @@
     bu_bitv_free(res_bitv1);
     bu_bitv_free(result);
 
-    return pass;       
+    return pass;
 }
 
 
-int 
+int
 main(int ac , char **av)
 {
     int res , pass = 1;
-    
+
     /* unused variables generate warnings, and sometimes warnings are treated 
as errors*/
     if (ac) {};
     if (av) {};
@@ -213,7 +213,7 @@
     }
 
     printf("\n\n");
-                        
+
     /*testing bu_hex_to_bitv*/
     printf("Testing bu_hex_to_bitv...");
     test_bu_hex_to_bitv("33323130", "0123", 0);

Modified: brlcad/trunk/src/libbu/test_booleanize.c
===================================================================
--- brlcad/trunk/src/libbu/test_booleanize.c    2012-05-26 11:20:20 UTC (rev 
50697)
+++ brlcad/trunk/src/libbu/test_booleanize.c    2012-05-26 14:17:42 UTC (rev 
50698)
@@ -17,7 +17,7 @@
  * License along with this file; see the file named COPYING for more
  * information.
  */
- 
+
 #include "common.h"
 #include "bu.h"
 
@@ -31,58 +31,58 @@
     int buf_len, check, res, ans;
 
     if (input) {
-        bu_strlcpy(buf_input, input, strlen(input)+1);
+       bu_strlcpy(buf_input, input, strlen(input)+1);
 
-        buf_len = strlen(buf_input);
+       buf_len = strlen(buf_input);
 
-        /* Remove ending white space  */
-        while ((buf_len > 0) && (buf_input[buf_len-1] == ' ')) {
-            buf_input[buf_len-1] = '\0';
-            buf_len = strlen(buf_input);
-        }
+       /* Remove ending white space  */
+       while ((buf_len > 0) && (buf_input[buf_len-1] == ' ')) {
+           buf_input[buf_len-1] = '\0';
+           buf_len = strlen(buf_input);
+       }
 
-        /* Remove leading white space  */
-        while ((buf_len > 0) && (buf_input[0] == ' ')) {
-            bu_strlcpy(buf_aux, buf_input + 1, buf_len);
-            bu_strlcpy(buf_input, buf_aux, buf_len);
-            buf_len = strlen(buf_input);
-        }
-        res = bu_str_true(buf_input);
+       /* Remove leading white space  */
+       while ((buf_len > 0) && (buf_input[0] == ' ')) {
+           bu_strlcpy(buf_aux, buf_input + 1, buf_len);
+           bu_strlcpy(buf_input, buf_aux, buf_len);
+           buf_len = strlen(buf_input);
+       }
+       res = bu_str_true(buf_input);
 
-        /* empty/'n'/'N' as first character for buf_input string */
-        if ((buf_len == 0) || (buf_input[0] == 'n') || (buf_input[0] == 'N') ||
-            (bu_strcmp(buf_input, "(null)") == 0)) {
-            ans = 0;
-            check = (res == ans);
-        } else {
-            /* true value comes from here on */
-            /* 'y'/'Y' as first character/"1" or variants of 1 for buf_input 
string  */
-            if ((buf_input[0] == 'y') || (buf_input[0] == 'Y') || 
(atol(buf_input) == 1)) {
-                ans = 1;
-                check = (res == ans);
-            } else {
-                /* "0" or variants of 0 */
-                if ((buf_input[0] == '0') && (atol(buf_input) == 0)) {
-                    ans = 0;
-                    check = (res == ans);
-                } else {
-                    ans = (int)buf_input[0];
-                    check = (res == ans);
-                }
-            }
-        }
+       /* empty/'n'/'N' as first character for buf_input string */
+       if ((buf_len == 0) || (buf_input[0] == 'n') || (buf_input[0] == 'N') ||
+           (bu_strcmp(buf_input, "(null)") == 0)) {
+           ans = 0;
+           check = (res == ans);
+       } else {
+           /* true value comes from here on */
+           /* 'y'/'Y' as first character/"1" or variants of 1 for buf_input 
string  */
+           if ((buf_input[0] == 'y') || (buf_input[0] == 'Y') || 
(atol(buf_input) == 1)) {
+               ans = 1;
+               check = (res == ans);
+           } else {
+               /* "0" or variants of 0 */
+               if ((buf_input[0] == '0') && (atol(buf_input) == 0)) {
+                   ans = 0;
+                   check = (res == ans);
+               } else {
+                   ans = (int)buf_input[0];
+                   check = (res == ans);
+               }
+           }
+       }
     }
 
     if (!input) {
-        ans = 0;
-        res = bu_str_true(NULL);
-        check = (res == ans);
+       ans = 0;
+       res = bu_str_true(NULL);
+       check = (res == ans);
     }
 
     if (check) {
-        printf("%24s -> %d [PASSED]\n", buf_input, res);
+       printf("%24s -> %d [PASSED]\n", buf_input, res);
     } else {
-        printf("%24s -> %d (should be: %d) [FAIL]\n", buf_input, res, ans);
+       printf("%24s -> %d (should be: %d) [FAIL]\n", buf_input, res, ans);
     }
 }
 
@@ -113,18 +113,18 @@
 
     /*  user tests */
     if (ac > 1) {
-        printf("Enter a string:\n");
-        bu_fgets(input, 1000, stdin);
-        if (strlen(input) > 0)
-            input[strlen(input)-1] = '\0';
-        automatic_test(input);
+       printf("Enter a string:\n");
+       bu_fgets(input, 1000, stdin);
+       if (strlen(input) > 0)
+           input[strlen(input)-1] = '\0';
+       automatic_test(input);
     }
 
     printf("%s: testing complete\n", av[0]);
     return 0;
 }
- 
 
+
 /*
  * Local Variables:
  * mode: C

Modified: brlcad/trunk/src/libbu/test_quote.c
===================================================================
--- brlcad/trunk/src/libbu/test_quote.c 2012-05-26 11:20:20 UTC (rev 50697)
+++ brlcad/trunk/src/libbu/test_quote.c 2012-05-26 14:17:42 UTC (rev 50698)
@@ -48,30 +48,30 @@
 
     len_d = bu_vls_strlen(&decoded);
     if (f_wid < len_s)
-        f_wid = len_s + 1;
+       f_wid = len_s + 1;
     if (f_wid < len_d)
-        f_wid = len_d + 1;
+       f_wid = len_d + 1;
 
     if (BU_STR_EQUAL(str, bu_vls_addr(&decoded))
-        /* && !BU_STR_EQUAL(str, bu_vls_addr(&encoded)) */
-        ) {
-        /* a hack for str showing '(null)' in printf if zero length */
-        if (len_s == 0)
-            len_s = 6;
+       /* && !BU_STR_EQUAL(str, bu_vls_addr(&encoded)) */
+       ) {
+       /* a hack for str showing '(null)' in printf if zero length */
+       if (len_s == 0)
+           len_s = 6;
        printf("{%*s}%*s -> {%*s}%*s [PASS]\n",
-               len_s, str, f_wid - len_s, " ",
-               len_d, bu_vls_addr(&decoded), f_wid - len_d, " "
-               );
+              len_s, str, f_wid - len_s, " ",
+              len_d, bu_vls_addr(&decoded), f_wid - len_d, " "
+              );
     } else {
-        /* a hack for str showing '(null)' in printf if zero length */
-        if (len_s == 0)
-            len_s = 6;
+       /* a hack for str showing '(null)' in printf if zero length */
+       if (len_s == 0)
+           len_s = 6;
        printf("{%*s}%*s -> {%*s}%*s [FAIL]  (should be: {%s})\n",
-               len_s, str, f_wid - len_s, " ",
-               len_d, bu_vls_addr(&decoded), f_wid - len_d, " ",
-               str
-               );
-        status = 1;
+              len_s, str, f_wid - len_s, " ",
+              len_d, bu_vls_addr(&decoded), f_wid - len_d, " ",
+              str
+              );
+       status = 1;
     }
 
     bu_vls_free(&encoded);

Modified: brlcad/trunk/src/libbu/test_vls.c
===================================================================
--- brlcad/trunk/src/libbu/test_vls.c   2012-05-26 11:20:20 UTC (rev 50697)
+++ brlcad/trunk/src/libbu/test_vls.c   2012-05-26 14:17:42 UTC (rev 50698)
@@ -54,7 +54,7 @@
        printf("%-*s[PASS]\n", 60, output);
     } else {
        printf("%-*s[FAIL]  (should be: '%s')\n", 60, output, buffer);
-        status = 1;
+       status = 1;
     }
 
     bu_vls_free(&vls);
@@ -257,7 +257,7 @@
 
     if (fails != 0) {
       /* as long as fails is < 127 the STATUS will be the number of unexpected 
failures */
-        return fails;
+       return fails;
     }
 
     return 0;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to