Revision: 41893
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41893&view=rev
Author:   starseeker
Date:     2010-12-31 00:02:22 +0000 (Fri, 31 Dec 2010)

Log Message:
-----------
more const stuff and casting, eliminate what looks like a duplicate NEAR_EQUAL 
definition in a private step-g header, pull stray spaces out of nastran-g.

Modified Paths:
--------------
    brlcad/trunk/src/conv/nastran-g.c
    brlcad/trunk/src/conv/step/PullbackCurve.h
    brlcad/trunk/src/libdm/dm_obj.c
    brlcad/trunk/src/libtclcad/ged_obj.c
    brlcad/trunk/src/rt/view.c
    brlcad/trunk/src/rt/view_bot_faces.c
    brlcad/trunk/src/rt/viewmlt.c

Modified: brlcad/trunk/src/conv/nastran-g.c
===================================================================
--- brlcad/trunk/src/conv/nastran-g.c   2010-12-30 23:34:18 UTC (rev 41892)
+++ brlcad/trunk/src/conv/nastran-g.c   2010-12-31 00:02:22 UTC (rev 41893)
@@ -375,10 +375,10 @@
            while (line[i] != '\0' && isspace(line[i]))
                i++;
            j = (-1);
-           while (line[i] != '\0' && line[i] != ', ' && !isspace(line[i]))
+           while (line[i] != '\0' && line[i] != ',' && !isspace(line[i]))
                curr_rec[field_no][++j] = line[i++];
            curr_rec[field_no][++j] = '\0';
-           if (line[i] == ', ')
+           if (line[i] == ',')
                i++;
        }
 
@@ -393,10 +393,10 @@
                while (line[i] != '\0' && isspace(line[i]))
                    i++;
                j = (-1);
-               while (line[i] != '\0' && line[i] != ', ' && !isspace(line[i]))
+               while (line[i] != '\0' && line[i] != ',' && !isspace(line[i]))
                    curr_rec[field_no][++j] = line[i++];
                curr_rec[field_no][++j] = '\0';
-               if (line[i] == ', ')
+               if (line[i] == ',')
                    i++;
            }
        }
@@ -461,7 +461,7 @@
        return 1;
 
     /* check which format is being used */
-    tmp = strchr(line, ', ');
+    tmp = strchr(line, ',');
     if (tmp && tmp - line < 10)
        form = FREE_FIELD;
     else {

Modified: brlcad/trunk/src/conv/step/PullbackCurve.h
===================================================================
--- brlcad/trunk/src/conv/step/PullbackCurve.h  2010-12-30 23:34:18 UTC (rev 
41892)
+++ brlcad/trunk/src/conv/step/PullbackCurve.h  2010-12-31 00:02:22 UTC (rev 
41893)
@@ -64,7 +64,6 @@
 };
 
 
-#define NEAR_EQUAL(_a, _b, _tol) (fabs((_a) - (_b)) <= _tol)
 #define PBC_TOL 0.000001
 #define PBC_FROM_OFFSET 0.001
 #define PBC_SEAM_TOL 0.01

Modified: brlcad/trunk/src/libdm/dm_obj.c
===================================================================
--- brlcad/trunk/src/libdm/dm_obj.c     2010-12-30 23:34:18 UTC (rev 41892)
+++ brlcad/trunk/src/libdm/dm_obj.c     2010-12-31 00:02:22 UTC (rev 41893)
@@ -311,10 +311,10 @@
        int arg_start = 3;
        int newargs = 2;
        int ac;
-       char **av;
+       const char **av;
 
        ac = argc + newargs;
-       av = (char **)bu_malloc(sizeof(char *) * (ac+1), "dmo_open_tcl: av");
+       av = (const char **)bu_malloc(sizeof(char *) * (ac+1), "dmo_open_tcl: 
av");
        av[0] = argv[0];
 
        /* Insert new args (i.e. arrange to call init_dm_obj from dm_open()) */
@@ -330,7 +330,7 @@
        /* copy the rest */
        for (i = arg_start; i < argc; ++i)
            av[i+newargs] = argv[i];
-       av[i+newargs] = (char *)NULL;
+       av[i+newargs] = (const char *)NULL;
 
        if ((dmp = dm_open(interp, type, ac, av)) == DM_NULL) {
            if (Tcl_IsShared(obj))

Modified: brlcad/trunk/src/libtclcad/ged_obj.c
===================================================================
--- brlcad/trunk/src/libtclcad/ged_obj.c        2010-12-30 23:34:18 UTC (rev 
41892)
+++ brlcad/trunk/src/libtclcad/ged_obj.c        2010-12-31 00:02:22 UTC (rev 
41893)
@@ -6061,22 +6061,22 @@
        int arg_start = 3;
        int newargs = 0;
        int ac;
-       char **av;
+       const char **av;
 
        ac = argc + newargs;
-       av = (char **)bu_malloc(sizeof(char *) * (ac+1), "go_new_view: av");
-       av[0] = (char *)argv[0];
+       av = (const char **)bu_malloc(sizeof(char *) * (ac+1), "go_new_view: 
av");
+       av[0] = argv[0];
 
        /*
         * Stuff name into argument list.
         */
        av[1] = "-n";
-       av[2] = (char *)argv[name_index];
+       av[2] = argv[name_index];
 
        /* copy the rest */
        for (i = arg_start; i < argc; ++i)
-           av[i+newargs] = (char *)argv[i];
-       av[i+newargs] = (char *)NULL;
+           av[i+newargs] = argv[i];
+       av[i+newargs] = (const char *)NULL;
 
        new_gdvp->gdv_dmp = dm_open(go_current_gop->go_interp, type, ac, av);
        if (new_gdvp->gdv_dmp == DM_NULL) {

Modified: brlcad/trunk/src/rt/view.c
===================================================================
--- brlcad/trunk/src/rt/view.c  2010-12-30 23:34:18 UTC (rev 41892)
+++ brlcad/trunk/src/rt/view.c  2010-12-31 00:02:22 UTC (rev 41893)
@@ -503,7 +503,7 @@
            }
            if (bif != NULL) {
                bu_semaphore_acquire(BU_SEM_SYSCALL);
-               bu_image_save_writeline(bif, ap->a_y, (const unsigned char 
*)scanline[ap->a_y].sl_buf);
+               bu_image_save_writeline(bif, ap->a_y, (unsigned char 
*)scanline[ap->a_y].sl_buf);
                bu_semaphore_release(BU_SEM_SYSCALL);
            } else if (outfp != NULL) {
                size_t count;

Modified: brlcad/trunk/src/rt/view_bot_faces.c
===================================================================
--- brlcad/trunk/src/rt/view_bot_faces.c        2010-12-30 23:34:18 UTC (rev 
41892)
+++ brlcad/trunk/src/rt/view_bot_faces.c        2010-12-31 00:02:22 UTC (rev 
41893)
@@ -292,7 +292,7 @@
        fprintf(outfp, "BOT: %s\n", Tcl_GetHashKey(&bots, entry));
        faces = (struct bu_ptbl *)Tcl_GetHashValue(entry);
        for (i=0; i<BU_PTBL_LEN(faces); i++) {
-           fprintf(outfp, "\t%llu\n", (unsigned long long)BU_PTBL_GET(faces, 
i));
+           fprintf(outfp, "\t%llu\n", (long)BU_PTBL_GET(faces, i));
        }
        entry = Tcl_NextHashEntry(&search);
     }

Modified: brlcad/trunk/src/rt/viewmlt.c
===================================================================
--- brlcad/trunk/src/rt/viewmlt.c       2010-12-30 23:34:18 UTC (rev 41892)
+++ brlcad/trunk/src/rt/viewmlt.c       2010-12-31 00:02:22 UTC (rev 41893)
@@ -690,7 +690,7 @@
     }
     if (outputfile != NULL) {
            bu_semaphore_acquire (BU_SEM_SYSCALL);
-           bu_image_save_writeline(bif, ap->a_y, scanline[ap->a_y].sl_buf);
+           bu_image_save_writeline(bif, ap->a_y, (unsigned char 
*)scanline[ap->a_y].sl_buf);
             bu_semaphore_release(BU_SEM_SYSCALL);
     }
     bu_free(scanline[ap->a_y].sl_buf, "sl_buf scanline buffer");


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

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to