Index: src/librt/primitives/nmg/nmg_tri_mc.c
===================================================================
--- src/librt/primitives/nmg/nmg_tri_mc.c	(revision 54151)
+++ src/librt/primitives/nmg/nmg_tri_mc.c	(working copy)
@@ -511,7 +511,7 @@
 }
 
 HIDDEN int
-rt_nmg_mc_crosspew(struct application *a, int edge, point_t *p, point_t *edges, struct whack *muh, const fastf_t step, const struct bn_tol *tol)
+nmg_mc_crosspew(struct application *a, int edge, point_t *p, point_t *edges, struct whack *muh, const fastf_t step, const struct bn_tol *tol)
 {
     struct whack *puh;
     int i;
@@ -541,7 +541,7 @@
 }
 
 HIDDEN int
-rt_nmg_mc_pew(struct shell *s, struct whack  *primp[4], struct application *a, fastf_t x, fastf_t y, fastf_t b, fastf_t step, const struct bn_tol *tol)
+nmg_mc_pew(struct shell *s, struct whack  *primp[4], struct application *a, fastf_t x, fastf_t y, fastf_t b, fastf_t step, const struct bn_tol *tol)
 {
     int i, in[4] = { 0, 0, 0, 0}, count=0;
     fastf_t last_b = -VOODOO;
@@ -612,7 +612,7 @@
 		    VADD2SCALE(edges[i], p[edge_vertex[i][0]], p[edge_vertex[i][1]], 0.5);
 	} else {
 	    /* the 'muh' list may have to be walked. */
-#define MEH(A,B,C) if(bitdiff(pv,B,C)) rt_nmg_mc_crosspew(a, A, p+B, edges, muh, step, tol)
+#define MEH(A,B,C) if(bitdiff(pv,B,C)) nmg_mc_crosspew(a, A, p+B, edges, muh, step, tol)
 	    VSET(a->a_ray.r_dir, 1, 0, 0);
 	    MEH(0 ,0,1);
 	    MEH(2 ,3,2);
@@ -713,7 +713,7 @@
 
 	    z = +INFINITY;
 
-	    count += rt_nmg_mc_pew(m->s, primp, &a, x, y, z, m->step, m->tol);
+	    count += nmg_mc_pew(m->s, primp, &a, x, y, z, m->step, m->tol);
 	}
     }
     bu_log("%d done, %d\n", cpu, count);
Index: src/librt/primitives/nmg/nmg.c
===================================================================
--- src/librt/primitives/nmg/nmg.c	(revision 54151)
+++ src/librt/primitives/nmg/nmg.c	(working copy)
@@ -674,7 +674,7 @@
 #define NMG_N_KINDS                26
 
 
-const int rt_nmg_disk_sizes[NMG_N_KINDS] = {
+const int nmg_disk_sizes[NMG_N_KINDS] = {
     sizeof(struct disk_model),		/* 0 */
     sizeof(struct disk_nmgregion),
     sizeof(struct disk_nmgregion_a),
@@ -702,7 +702,7 @@
     0,
     0  /* disk_double_array, MUST BE ZERO */	/* 25: MUST BE ZERO */
 };
-const char rt_nmg_kind_names[NMG_N_KINDS+2][18] = {
+const char nmg_kind_names[NMG_N_KINDS+2][18] = {
     "model",				/* 0 */
     "nmgregion",
     "nmgregion_a",
@@ -741,7 +741,7 @@
  * manifest constant which identifies that structure kind.
  */
 int
-rt_nmg_magic_to_kind(uint32_t magic)
+nmg_magic_to_kind(uint32_t magic)
 {
     switch (magic) {
 	case NMG_MODEL_MAGIC:
@@ -789,7 +789,7 @@
     }
     /* default */
     bu_log("magic = x%x\n", magic);
-    bu_bomb("rt_nmg_magic_to_kind: bad magic");
+    bu_bomb("nmg_magic_to_kind: bad magic");
     return -1;
 }
 
@@ -806,8 +806,8 @@
 
 
 /* XXX These are horribly non-PARALLEL, and they *must* be PARALLEL ! */
-static unsigned char *rt_nmg_fastf_p;
-static unsigned int rt_nmg_cur_fastf_subscript;
+static unsigned char *nmg_fastf_p;
+static unsigned int nmg_cur_fastf_subscript;
 
 
 /**
@@ -854,7 +854,7 @@
     if (pt_type)
 	count *= RT_NURB_EXTRACT_COORDS(pt_type);
 
-    cp = rt_nmg_fastf_p;
+    cp = nmg_fastf_p;
     *(uint32_t *)&cp[0] = htonl(DISK_DOUBLE_ARRAY_MAGIC);
     *(uint32_t *)&cp[4] = htonl(count);
     if (pt_type == 0 || ZERO(scale - 1.0)) {
@@ -885,8 +885,8 @@
 	bu_free(scanp, "rt_nmg_export4_fastf");
     }
     cp += (4+4) + count * 8;
-    rt_nmg_fastf_p = cp;
-    return rt_nmg_cur_fastf_subscript++;
+    nmg_fastf_p = cp;
+    return nmg_cur_fastf_subscript++;
 }
 
 
@@ -1026,7 +1026,7 @@
 #define INDEX(o, i, elem) *(uint32_t *)(o)->elem = htonl(reindex((genptr_t)((i)->elem), ecnt))
 #define INDEXL(oo, ii, elem) {						\
 	uint32_t _f = reindex((genptr_t)((ii)->elem.forw), ecnt);	\
-	if (_f == DISK_INDEX_NULL) bu_log("Warning rt_nmg_edisk: reindex forw to null?\n"); \
+	if (_f == DISK_INDEX_NULL) bu_log("Warning nmg_edisk: reindex forw to null?\n"); \
 	*(uint32_t *)((oo)->elem.forw) = htonl(_f);			\
 	*(uint32_t *)((oo)->elem.back) = htonl(reindex((genptr_t)((ii)->elem.back), ecnt)); }
 #define PUTMAGIC(_magic) *(uint32_t *)d->magic = htonl(_magic)
@@ -1040,7 +1040,7 @@
  * Scale geometry by 'local2mm'
  */
 void
-rt_nmg_edisk(genptr_t op, genptr_t ip, struct nmg_exp_counts *ecnt, int idx, double local2mm)
+nmg_edisk(genptr_t op, genptr_t ip, struct nmg_exp_counts *ecnt, int idx, double local2mm)
     /* base of disk array */
     /* ptr to in-memory structure */
 
@@ -1397,7 +1397,7 @@
 	}
 	    return;
     }
-    bu_log("rt_nmg_edisk kind=%d unknown\n", ecnt[idx].kind);
+    bu_log("nmg_edisk kind=%d unknown\n", ecnt[idx].kind);
 }
 #undef INDEX
 #undef INDEXL
@@ -1447,7 +1447,7 @@
  * Transform geometry by given matrix.
  */
 int
-rt_nmg_idisk(genptr_t op, genptr_t ip, struct nmg_exp_counts *ecnt, int idx, uint32_t **ptrs, const fastf_t *mat, const unsigned char *basep)
+nmg_idisk(genptr_t op, genptr_t ip, struct nmg_exp_counts *ecnt, int idx, uint32_t **ptrs, const fastf_t *mat, const unsigned char *basep)
     /* ptr to in-memory structure */
     /* base of disk array */
 
@@ -1636,7 +1636,7 @@
 	    } else bu_log("bad loopuse up, index=%d, kind=%d\n", up_index, up_kind);
 	    INDEXL_HD(d, lu, down_hd, lu->down_hd);
 	    if (lu->down_hd.forw == BU_LIST_NULL)
-		bu_bomb("rt_nmg_idisk: null loopuse down_hd.forw\n");
+		bu_bomb("nmg_idisk: null loopuse down_hd.forw\n");
 	    NMG_CK_LOOP(lu->l_p);
 	}
 	    return 0;
@@ -1847,7 +1847,7 @@
 	}
 	    return 0;
     }
-    bu_log("rt_nmg_idisk kind=%d unknown\n", ecnt[idx].kind);
+    bu_log("nmg_idisk kind=%d unknown\n", ecnt[idx].kind);
     return -1;
 }
 
@@ -1860,7 +1860,7 @@
  * macros, so that m->maxindex, etc., are all appropriately handled.
  */
 HIDDEN struct model *
-rt_nmg_ialloc(uint32_t **ptrs, struct nmg_exp_counts *ecnt, int *kind_counts)
+nmg_ialloc(uint32_t **ptrs, struct nmg_exp_counts *ecnt, int *kind_counts)
 {
     struct model *m = (struct model *)0;
     int subscript;
@@ -2061,7 +2061,7 @@
  * appropriate.
  */
 void
-rt_nmg_i2alloc(struct nmg_exp_counts *ecnt, unsigned char *cp, int *kind_counts)
+nmg_i2alloc(struct nmg_exp_counts *ecnt, unsigned char *cp, int *kind_counts)
 {
     int kind;
     int nkind;
@@ -2077,7 +2077,7 @@
     offset = 0;
     for (kind = 0; kind < NMG_N_KINDS; kind++) {
 	if (kind == NMG_KIND_DOUBLE_ARRAY) continue;
-	offset += rt_nmg_disk_sizes[kind] * kind_counts[kind];
+	offset += nmg_disk_sizes[kind] * kind_counts[kind];
 	subscript += kind_counts[kind];
     }
 
@@ -2162,20 +2162,20 @@
     ptrs[maxindex+1] = &bad_magic;	/* [maxindex+1] gives bad magic */
 
     /* Allocate storage for all the NMG structs, in ptrs[] */
-    m = rt_nmg_ialloc(ptrs, ecnt, kind_counts);
+    m = nmg_ialloc(ptrs, ecnt, kind_counts);
 
     /* Locate the variably sized fastf_t arrays.  ecnt[] has room. */
     cp = (unsigned char *)(rp+1);	/* start at first granule in */
-    rt_nmg_i2alloc(ecnt, cp, kind_counts);
+    nmg_i2alloc(ecnt, cp, kind_counts);
 
     /* Import each structure, in turn */
     for (i=1; i < maxindex; i++) {
 	/* If we made it to the last kind, stop.  Nothing follows */
 	if (ecnt[i].kind == NMG_KIND_DOUBLE_ARRAY) break;
-	if (rt_nmg_idisk((genptr_t)(ptrs[i]), (genptr_t)cp,
+	if (nmg_idisk((genptr_t)(ptrs[i]), (genptr_t)cp,
 			 ecnt, i, ptrs, mat, (unsigned char *)(rp+1)) < 0)
 	    return -1;	/* FAIL */
-	cp += rt_nmg_disk_sizes[ecnt[i].kind];
+	cp += nmg_disk_sizes[ecnt[i].kind];
     }
 
     if (rebound) {
@@ -2289,7 +2289,7 @@
 	    ecnt[i].kind = -1;
 	    continue;
 	}
-	kind = rt_nmg_magic_to_kind(*(ptrs[i]));
+	kind = nmg_magic_to_kind(*(ptrs[i]));
 	ecnt[i].per_struct_index = kind_counts[kind]++;
 	ecnt[i].kind = kind;
 	/* Handle the variable sized kinds */
@@ -2355,7 +2355,7 @@
 	}
     }
     /* Tack on the variable sized fastf_t arrays at the end */
-    rt_nmg_cur_fastf_subscript = subscript;
+    nmg_cur_fastf_subscript = subscript;
     subscript += kind_counts[NMG_KIND_DOUBLE_ARRAY];
 
     /* Sanity checking */
@@ -2365,9 +2365,9 @@
 	    bu_log("***ERROR, ptrs[%d]->index = %d\n",
 		   i, nmg_index_of_struct((uint32_t *)ptrs[i]));
 	}
-	if (rt_nmg_magic_to_kind(*ptrs[i]) != ecnt[i].kind) {
+	if (nmg_magic_to_kind(*ptrs[i]) != ecnt[i].kind) {
 	    bu_log("@@@ERROR, ptrs[%d] kind(%d) != %d\n",
-		   i, rt_nmg_magic_to_kind(*ptrs[i]),
+		   i, nmg_magic_to_kind(*ptrs[i]),
 		   ecnt[i].kind);
 	}
     }
@@ -2378,7 +2378,7 @@
 	    disk_arrays[i] = GENPTR_NULL;
 	    continue;
 	}
-	tot_size += kind_counts[i] * rt_nmg_disk_sizes[i];
+	tot_size += kind_counts[i] * nmg_disk_sizes[i];
     }
     /* Account for variable sized double arrays, at the end */
     tot_size += kind_counts[NMG_KIND_DOUBLE_ARRAY] * (4+4) +
@@ -2403,17 +2403,17 @@
     cp = (char *)(rp+1);	/* advance one granule */
     for (i=0; i < NMG_N_KINDS; i++) {
 	disk_arrays[i] = (genptr_t)cp;
-	cp += kind_counts[i] * rt_nmg_disk_sizes[i];
+	cp += kind_counts[i] * nmg_disk_sizes[i];
     }
     /* disk_arrays[NMG_KIND_DOUBLE_ARRAY] is set properly because it is last */
-    rt_nmg_fastf_p = (unsigned char *)disk_arrays[NMG_KIND_DOUBLE_ARRAY];
+    nmg_fastf_p = (unsigned char *)disk_arrays[NMG_KIND_DOUBLE_ARRAY];
 
     /* Convert all the structures to their disk versions */
     for (i = m->maxindex-1; i >= 0; i--) {
 	if (ptrs[i] == NULL) continue;
 	kind = ecnt[i].kind;
 	if (kind_counts[kind] <= 0) continue;
-	rt_nmg_edisk((genptr_t)(disk_arrays[kind]),
+	nmg_edisk((genptr_t)(disk_arrays[kind]),
 		     (genptr_t)(ptrs[i]), ecnt, i, local2mm);
     }
 
@@ -2534,19 +2534,19 @@
     ptrs[maxindex] = &bad_magic;
     ptrs[maxindex+1] = &bad_magic;
 
-    m = rt_nmg_ialloc(ptrs, ecnt, kind_counts);
+    m = nmg_ialloc(ptrs, ecnt, kind_counts);
 
-    rt_nmg_i2alloc(ecnt, dp, kind_counts);
+    nmg_i2alloc(ecnt, dp, kind_counts);
 
     /* Now import each structure, in turn */
     for (i=1; i < maxindex; i++) {
 	/* We know that the DOUBLE_ARRAY is the last thing to process */
 	if (ecnt[i].kind == NMG_KIND_DOUBLE_ARRAY) break;
-	if (rt_nmg_idisk((genptr_t)(ptrs[i]), (genptr_t)dp, ecnt,
+	if (nmg_idisk((genptr_t)(ptrs[i]), (genptr_t)dp, ecnt,
 			 i, ptrs, mat, (unsigned char *)startdata) < 0) {
 	    return -1;
 	}
-	dp += rt_nmg_disk_sizes[ecnt[i].kind];
+	dp += nmg_disk_sizes[ecnt[i].kind];
     }
 
     /* Face min_pt and max_pt are not stored, so this is mandatory. */
@@ -2640,7 +2640,7 @@
 	    continue;
 	}
 
-	kind = rt_nmg_magic_to_kind(*(ptrs[i]));
+	kind = nmg_magic_to_kind(*(ptrs[i]));
 	ecnt[i].per_struct_index = kind_counts[kind]++;
 	ecnt[i].kind = kind;
 
@@ -2703,7 +2703,7 @@
 	}
     }
     /* Tack on the variable sized fastf_t arrays at the end */
-    rt_nmg_cur_fastf_subscript = subscript;
+    nmg_cur_fastf_subscript = subscript;
     subscript += kind_counts[NMG_KIND_DOUBLE_ARRAY];
 
     /* Now do some checking to make sure the world is not totally mad */
@@ -2714,9 +2714,9 @@
 	    bu_log("***ERROR, ptrs[%d]->index = %d\n",
 		   i, nmg_index_of_struct(ptrs[i]));
 	}
-	if (rt_nmg_magic_to_kind(*ptrs[i]) != ecnt[i].kind) {
+	if (nmg_magic_to_kind(*ptrs[i]) != ecnt[i].kind) {
 	    bu_log("***ERROR, ptrs[%d] kind(%d) != %d\n",
-		   i, rt_nmg_magic_to_kind(*ptrs[i]),
+		   i, nmg_magic_to_kind(*ptrs[i]),
 		   ecnt[i].kind);
 	}
 
@@ -2728,7 +2728,7 @@
 	    disk_arrays[i] = GENPTR_NULL;
 	    continue;
 	}
-	tot_size += kind_counts[i] * rt_nmg_disk_sizes[i];
+	tot_size += kind_counts[i] * nmg_disk_sizes[i];
     }
 
     /* Account for variable sized double arrays, at the end */
@@ -2750,15 +2750,15 @@
     }
     for (i=0; i< NMG_N_KINDS; i++) {
 	disk_arrays[i] = dp;
-	dp += kind_counts[i] * rt_nmg_disk_sizes[i];
+	dp += kind_counts[i] * nmg_disk_sizes[i];
     }
-    rt_nmg_fastf_p = (unsigned char*)disk_arrays[NMG_KIND_DOUBLE_ARRAY];
+    nmg_fastf_p = (unsigned char*)disk_arrays[NMG_KIND_DOUBLE_ARRAY];
 
     for (i = m->maxindex-1;i >=0; i--) {
 	if (ptrs[i] == NULL) continue;
 	kind = ecnt[i].kind;
 	if (kind_counts[kind] <= 0) continue;
-	rt_nmg_edisk((genptr_t)(disk_arrays[kind]),
+	nmg_edisk((genptr_t)(disk_arrays[kind]),
 		     (genptr_t)(ptrs[i]), ecnt, i, local2mm);
     }
 
