Revision: 56290
          http://sourceforge.net/p/brlcad/code/56290
Author:   brlcad
Date:     2013-07-28 16:09:24 +0000 (Sun, 28 Jul 2013)
Log Message:
-----------
just rename them, avoid the preprocessor issue altogether

Modified Paths:
--------------
    brlcad/trunk/src/libged/analyze.c

Modified: brlcad/trunk/src/libged/analyze.c
===================================================================
--- brlcad/trunk/src/libged/analyze.c   2013-07-28 15:59:45 UTC (rev 56289)
+++ brlcad/trunk/src/libged/analyze.c   2013-07-28 16:09:24 UTC (rev 56290)
@@ -1248,13 +1248,7 @@
 {
     struct rt_superell_internal *superell = (struct rt_superell_internal 
*)ip->idb_ptr;
     fastf_t ma, mb, mc;
-#ifdef major           /* Some systems have these defined as macros!!! */
-#undef major
-#endif
-#ifdef minor
-#undef minor
-#endif
-    fastf_t ecc, major, minor;
+    fastf_t ecc, major_mag, minor_mag;
     fastf_t vol, sur_area;
     int type;
 
@@ -1278,13 +1272,13 @@
        if (mc > ma) {
            /* oblate spheroid */
            type = OBLATE;
-           major = mc;
-           minor = ma;
+           major_mag = mc;
+           minor_mag = ma;
        } else {
            /* prolate spheroid */
            type = PROLATE;
-           major = ma;
-           minor = mc;
+           major_mag = ma;
+           minor_mag = mc;
        }
     } else
        if (fabs(ma-mc) < .00001) {
@@ -1292,13 +1286,13 @@
            if (mb > ma) {
                /* oblate spheroid */
                type = OBLATE;
-               major = mb;
-               minor = ma;
+               major_mag = mb;
+               minor_mag = ma;
            } else {
                /* prolate spheroid */
                type = PROLATE;
-               major = ma;
-               minor = mb;
+               major_mag = ma;
+               minor_mag = mb;
            }
        } else
            if (fabs(mb-mc) < .00001) {
@@ -1306,25 +1300,25 @@
                if (ma > mb) {
                    /* oblate spheroid */
                    type = OBLATE;
-                   major = ma;
-                   minor = mb;
+                   major_mag = ma;
+                   minor_mag = mb;
                } else {
                    /* prolate spheroid */
                    type = PROLATE;
-                   major = mb;
-                   minor = ma;
+                   major_mag = mb;
+                   minor_mag = ma;
                }
            } else {
                bu_vls_printf(gedp->ged_result_str, "   Cannot find surface 
area\n");
                return;
            }
-    ecc = sqrt(major*major - minor*minor) / major;
+    ecc = sqrt(major_mag*major_mag - minor_mag*minor_mag) / major_mag;
     if (type == PROLATE) {
-       sur_area = 2.0 * M_PI * minor * minor +
-           (2.0 * M_PI * (major*minor/ecc) * asin(ecc));
+       sur_area = 2.0 * M_PI * minor_mag * minor_mag +
+           (2.0 * M_PI * (major_mag*minor_mag/ecc) * asin(ecc));
     } else { /* type == OBLATE */
-       sur_area = 2.0 * M_PI * major * major +
-           (M_PI * (minor*minor/ecc) * log((1.0+ecc)/(1.0-ecc)));
+       sur_area = 2.0 * M_PI * major_mag * major_mag +
+           (M_PI * (minor_mag*minor_mag/ecc) * log((1.0+ecc)/(1.0-ecc)));
     }
 
 print_results:

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


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to