Revision: 55409
http://sourceforge.net/p/brlcad/code/55409
Author: starseeker
Date: 2013-05-14 02:04:34 +0000 (Tue, 14 May 2013)
Log Message:
-----------
Reverse merge back out the bu_ prefixing of ntohd and htond - will probably need it later, so doing it all in one commit per Sean's suggestion. Should do this after release, and anyway a complete solution to the Windows API changes will be a lot more extensive than this - while this rename lets BRL-CAD compile with VS2012, there are runtime failures in database IO due to related Windows API changes.
Modified Paths:
--------------
brlcad/trunk/doc/docbook/system/man3/en/CMakeLists.txt
brlcad/trunk/include/bu.h
brlcad/trunk/src/conv/stl/g-stl.c
brlcad/trunk/src/conv/stl/stl-g.c
brlcad/trunk/src/fb/pl-fb.c
brlcad/trunk/src/libbn/plot3.c
brlcad/trunk/src/libbu/convert.c
brlcad/trunk/src/libbu/htond.c
brlcad/trunk/src/libbu/htonf.c
brlcad/trunk/src/libbu/parse.c
brlcad/trunk/src/libged/bot_dump.c
brlcad/trunk/src/libmultispectral/sh_temp.c
brlcad/trunk/src/librt/binunif/db5_bin.c
brlcad/trunk/src/librt/comb/comb.c
brlcad/trunk/src/librt/primitives/arb8/arb8.c
brlcad/trunk/src/librt/primitives/arbn/arbn.c
brlcad/trunk/src/librt/primitives/ars/ars.c
brlcad/trunk/src/librt/primitives/bot/bot.c
brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
brlcad/trunk/src/librt/primitives/cline/cline.c
brlcad/trunk/src/librt/primitives/dsp/dsp.c
brlcad/trunk/src/librt/primitives/ehy/ehy.c
brlcad/trunk/src/librt/primitives/ell/ell.c
brlcad/trunk/src/librt/primitives/epa/epa.c
brlcad/trunk/src/librt/primitives/eto/eto.c
brlcad/trunk/src/librt/primitives/extrude/extrude.c
brlcad/trunk/src/librt/primitives/grip/grip.c
brlcad/trunk/src/librt/primitives/half/half.c
brlcad/trunk/src/librt/primitives/hyp/hyp.c
brlcad/trunk/src/librt/primitives/metaball/metaball.c
brlcad/trunk/src/librt/primitives/nmg/nmg.c
brlcad/trunk/src/librt/primitives/part/part.c
brlcad/trunk/src/librt/primitives/pipe/pipe.c
brlcad/trunk/src/librt/primitives/pnts/pnts.c
brlcad/trunk/src/librt/primitives/revolve/revolve.c
brlcad/trunk/src/librt/primitives/rhc/rhc.c
brlcad/trunk/src/librt/primitives/rpc/rpc.c
brlcad/trunk/src/librt/primitives/sketch/sketch.c
brlcad/trunk/src/librt/primitives/superell/superell.c
brlcad/trunk/src/librt/primitives/tgc/tgc.c
brlcad/trunk/src/librt/primitives/tor/tor.c
brlcad/trunk/src/librt/primitives/xxx/xxx.c
brlcad/trunk/src/librt/vlist.c
brlcad/trunk/src/librtserver/rtserver.c
brlcad/trunk/src/librtserver/rtserverTest.c
brlcad/trunk/src/rt/view.c
brlcad/trunk/src/util/double-asc.c
brlcad/trunk/src/util/pl-X.c
brlcad/trunk/src/util/pl-asc.c
brlcad/trunk/src/util/pl-pl.c
brlcad/trunk/src/util/pl-ps.c
brlcad/trunk/src/util/pl-tek.c
brlcad/trunk/src/util/pldebug.c
brlcad/trunk/src/util/plrot.c
brlcad/trunk/src/util/plstat.c
Added Paths:
-----------
brlcad/trunk/doc/docbook/system/man3/en/htond.xml
Removed Paths:
-------------
brlcad/trunk/doc/docbook/system/man3/en/bu_htond.xml
Modified: brlcad/trunk/doc/docbook/system/man3/en/CMakeLists.txt
===================================================================
--- brlcad/trunk/doc/docbook/system/man3/en/CMakeLists.txt 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/doc/docbook/system/man3/en/CMakeLists.txt 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1,5 +1,5 @@
set(docbook_man3_EN
- bu_htond.xml
+ htond.xml
libcursor.xml
libfb.xml
liborle.xml
Deleted: brlcad/trunk/doc/docbook/system/man3/en/bu_htond.xml
===================================================================
--- brlcad/trunk/doc/docbook/system/man3/en/bu_htond.xml 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/doc/docbook/system/man3/en/bu_htond.xml 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- lifted from troff+man by doclifter -->
-<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='bu_htond3'>
-<refmeta>
- <refentrytitle>BU_HTOND</refentrytitle>
-<manvolnum>3</manvolnum>
-<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
-<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
-</refmeta>
-
-<refnamediv>
-<refname>bu_htond</refname>
-<refname>bu_ntohd</refname>
-<refpurpose>convert double-precision floating point numbers between host and network format and byte order</refpurpose>
-</refnamediv>
-<!-- body begins here -->
-<refsynopsisdiv xml:id='synopsis'>
-<funcsynopsis>
-<funcprototype>
-<funcdef><function>bu_htond</function></funcdef>
-<paramdef><parameter>netptr</parameter></paramdef>
-<paramdef><parameter>hostptr</parameter></paramdef>
-<paramdef><parameter>count</parameter></paramdef>
-</funcprototype>
-<funcsynopsisinfo>
-unsigned char *netptr;
-unsigned char *hostptr;
-int count;
-
-</funcsynopsisinfo>
-<funcprototype>
-<funcdef><function>bu_ntohd</function></funcdef>
-<paramdef><parameter>hostptr</parameter></paramdef>
-<paramdef><parameter>netptr</parameter></paramdef>
-<paramdef><parameter>count</parameter></paramdef>
-</funcprototype>
-<funcsynopsisinfo>
-unsigned char *hostptr;
-unsigned char *netptr;
-int count;
-</funcsynopsisinfo>
-</funcsynopsis>
-</refsynopsisdiv>
-
-
-<refsect1 xml:id='description'><title>DESCRIPTION</title>
-<para>These routines are used for
-conversion between the local host
-64-bit ("double precision") representation, and
-64-bit IEEE double precision representation, in "network order",
-i.e., big-endian, the MSB in byte [0], on the left.</para>
-
-<para>As a quick review, the IEEE double precision format is as follows:
-sign bit, 11 bits of exponent (bias 1023), and 52 bits of mantissa,
-with a hidden leading one (0.1 binary).
-When the exponent is 0, IEEE defines a "denormalized number",
-which is not supported here.
-When the exponent is 2047 (all bits set), and:
-all mantissa bits are zero, value is infinity*sign,
-mantissa is non-zero, and:
-msb of mantissa=0: signaling NAN
-msb of mantissa=1: quiet NAN</para>
-
-<para>Note that neither the input or output buffers need be word aligned,
-for greatest flexibility in converting data, even though this
-may impose a speed penalty on some architectures.</para>
-
-<para>These subroutines operate on a sequential block of numbers,
-to save on subroutine linkage execution costs, and to allow
-some hope for vectorization.</para>
-
-<para>On brain-damaged machines like the SGI 3-D, where type "double"
-allocates only 4 bytes of space, these routines *still* return
-8 bytes in the IEEE buffer.</para>
-</refsect1>
-
-<refsect1 xml:id='see_also'><title>SEE ALSO</title>
-<para><citerefentry><refentrytitle>htons</refentrytitle><manvolnum>3N</manvolnum></citerefentry>, <citerefentry><refentrytitle>ntohs</refentrytitle><manvolnum>3N</manvolnum></citerefentry>, <citerefentry><refentrytitle>htonl</refentrytitle><manvolnum>3N</manvolnum></citerefentry>, <citerefentry><refentrytitle>ntohl</refentrytitle><manvolnum>3N</manvolnum></citerefentry></para>
-</refsect1>
-
-<refsect1 xml:id='bugs'><title>BUGS</title>
-<para>The VAX handles bytes backwards from most everyone else in
-the world. This is not expected to be fixed in the near future.</para>
-
-</refsect1>
-
-<refsect1 xml:id='author'><title>AUTHOR</title>
-<para>BRL-CAD Team</para>
-
-</refsect1>
-
-<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
-<para>This software is Copyright (c) 1988-2013 by the United States
-Government as represented by U.S. Army Research Laboratory.</para>
-
-</refsect1>
-
-<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
-<para>Reports of bugs or problems should be submitted via electronic
-mail to <devs@...>
-</refsect1>
-</refentry>
-
Copied: brlcad/trunk/doc/docbook/system/man3/en/htond.xml (from rev 55405, brlcad/trunk/doc/docbook/system/man3/en/htond.xml)
===================================================================
--- brlcad/trunk/doc/docbook/system/man3/en/htond.xml (rev 0)
+++ brlcad/trunk/doc/docbook/system/man3/en/htond.xml 2013-05-14 02:04:34 UTC (rev 55409)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- lifted from troff+man by doclifter -->
+<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='htond3'>
+<refmeta>
+ <refentrytitle>HTOND</refentrytitle>
+<manvolnum>3</manvolnum>
+<refmiscinfo class='source'>BRL-CAD</refmiscinfo>
+<refmiscinfo class='manual'>BRL-CAD</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+<refname>htond</refname>
+<refname>ntohd</refname>
+<refpurpose>convert double-precision floating point numbers between host and network format and byte order</refpurpose>
+</refnamediv>
+<!-- body begins here -->
+<refsynopsisdiv xml:id='synopsis'>
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>htond</function></funcdef>
+<paramdef><parameter>netptr</parameter></paramdef>
+<paramdef><parameter>hostptr</parameter></paramdef>
+<paramdef><parameter>count</parameter></paramdef>
+</funcprototype>
+<funcsynopsisinfo>
+unsigned char *netptr;
+unsigned char *hostptr;
+int count;
+
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef><function>ntohd</function></funcdef>
+<paramdef><parameter>hostptr</parameter></paramdef>
+<paramdef><parameter>netptr</parameter></paramdef>
+<paramdef><parameter>count</parameter></paramdef>
+</funcprototype>
+<funcsynopsisinfo>
+unsigned char *hostptr;
+unsigned char *netptr;
+int count;
+</funcsynopsisinfo>
+</funcsynopsis>
+</refsynopsisdiv>
+
+
+<refsect1 xml:id='description'><title>DESCRIPTION</title>
+<para>These routines are used for
+conversion between the local host
+64-bit ("double precision") representation, and
+64-bit IEEE double precision representation, in "network order",
+i.e., big-endian, the MSB in byte [0], on the left.</para>
+
+<para>As a quick review, the IEEE double precision format is as follows:
+sign bit, 11 bits of exponent (bias 1023), and 52 bits of mantissa,
+with a hidden leading one (0.1 binary).
+When the exponent is 0, IEEE defines a "denormalized number",
+which is not supported here.
+When the exponent is 2047 (all bits set), and:
+all mantissa bits are zero, value is infinity*sign,
+mantissa is non-zero, and:
+msb of mantissa=0: signaling NAN
+msb of mantissa=1: quiet NAN</para>
+
+<para>Note that neither the input or output buffers need be word aligned,
+for greatest flexibility in converting data, even though this
+may impose a speed penalty on some architectures.</para>
+
+<para>These subroutines operate on a sequential block of numbers,
+to save on subroutine linkage execution costs, and to allow
+some hope for vectorization.</para>
+
+<para>On brain-damaged machines like the SGI 3-D, where type "double"
+allocates only 4 bytes of space, these routines *still* return
+8 bytes in the IEEE buffer.</para>
+</refsect1>
+
+<refsect1 xml:id='see_also'><title>SEE ALSO</title>
+<para><citerefentry><refentrytitle>htons</refentrytitle><manvolnum>3N</manvolnum></citerefentry>, <citerefentry><refentrytitle>ntohs</refentrytitle><manvolnum>3N</manvolnum></citerefentry>, <citerefentry><refentrytitle>htonl</refentrytitle><manvolnum>3N</manvolnum></citerefentry>, <citerefentry><refentrytitle>ntohl</refentrytitle><manvolnum>3N</manvolnum></citerefentry></para>
+</refsect1>
+
+<refsect1 xml:id='bugs'><title>BUGS</title>
+<para>The VAX handles bytes backwards from most everyone else in
+the world. This is not expected to be fixed in the near future.</para>
+
+</refsect1>
+
+<refsect1 xml:id='author'><title>AUTHOR</title>
+<para>BRL-CAD Team</para>
+
+</refsect1>
+
+<refsect1 xml:id='copyright'><title>COPYRIGHT</title>
+<para>This software is Copyright (c) 1988-2013 by the United States
+Government as represented by U.S. Army Research Laboratory.</para>
+
+</refsect1>
+
+<refsect1 xml:id='bug_reports'><title>BUG REPORTS</title>
+<para>Reports of bugs or problems should be submitted via electronic
+mail to <devs@...>
+</refsect1>
+</refentry>
+
Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/include/bu.h 2013-05-14 02:04:34 UTC (rev 55409)
@@ -3412,14 +3412,14 @@
/**
* Host to Network Doubles
*/
-BU_EXPORT extern void bu_htond(unsigned char *out,
+BU_EXPORT extern void htond(unsigned char *out,
const unsigned char *in,
size_t count);
/**
* Network to Host Doubles
*/
-BU_EXPORT extern void bu_ntohd(unsigned char *out,
+BU_EXPORT extern void ntohd(unsigned char *out,
const unsigned char *in,
size_t count);
@@ -3434,14 +3434,14 @@
/**
* Host to Network Floats
*/
-BU_EXPORT extern void bu_htonf(unsigned char *out,
+BU_EXPORT extern void htonf(unsigned char *out,
const unsigned char *in,
size_t count);
/**
* Network to Host Floats
*/
-BU_EXPORT extern void bu_ntohf(unsigned char *out,
+BU_EXPORT extern void ntohf(unsigned char *out,
const unsigned char *in,
size_t count);
Modified: brlcad/trunk/src/conv/stl/g-stl.c
===================================================================
--- brlcad/trunk/src/conv/stl/g-stl.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/conv/stl/g-stl.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -255,7 +255,7 @@
} else {
int i;
- bu_htonf(vert_buffer, (const unsigned char *)flts, 12);
+ htonf(vert_buffer, (const unsigned char *)flts, 12);
for (i=0; i<12; i++) {
lswap((unsigned int *)&vert_buffer[i*4]);
}
Modified: brlcad/trunk/src/conv/stl/stl-g.c
===================================================================
--- brlcad/trunk/src/conv/stl/stl-g.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/conv/stl/stl-g.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -432,7 +432,7 @@
}
/* now use our network to native host format conversion tools */
- bu_ntohf((unsigned char *)flts, buf, 12);
+ ntohf((unsigned char *)flts, buf, 12);
/* unused attribute byte count */
ret = fread(buf, 2, 1, fd_in);
Modified: brlcad/trunk/src/fb/pl-fb.c
===================================================================
--- brlcad/trunk/src/fb/pl-fb.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/fb/pl-fb.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -807,7 +807,7 @@
/* read coordinates */
if (fread(in, sizeof(in), 1, pfin) != 1)
return false;
- bu_ntohd((unsigned char *)out, in, 2);
+ ntohd((unsigned char *)out, in, 2);
x = out[0];
y = out[1];
@@ -846,7 +846,7 @@
/* read coordinates */
if (fread(in, sizeof(in), 1, pfin) != 1)
return false;
- bu_ntohd((unsigned char *)out, in, 2);
+ ntohd((unsigned char *)out, in, 2);
x = out[0];
y = out[1];
@@ -1158,7 +1158,7 @@
fprintf(stderr, "dspace3\n");
if (fread(in, sizeof(in), 1, pfin) != 1)
return Foo(-11);
- bu_ntohd((unsigned char *)out, in, 5);
+ ntohd((unsigned char *)out, in, 5);
/* Only need X and Y, ignore Z */
space.left = out[0]; /* x1 */
space.bottom= out[1]; /* y1 */
@@ -1177,7 +1177,7 @@
fprintf(stderr, "dspace\n");
if (fread(in, sizeof(in), 1, pfin) != 1)
return Foo(-11);
- bu_ntohd((unsigned char *)out, in, 4);
+ ntohd((unsigned char *)out, in, 4);
space.left = out[0]; /* x1 */
space.bottom= out[1]; /* y1 */
space.right = out[2]; /* x2 */
Modified: brlcad/trunk/src/libbn/plot3.c
===================================================================
--- brlcad/trunk/src/libbn/plot3.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libbn/plot3.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -377,7 +377,7 @@
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
in[0] = x;
in[1] = y;
- bu_htond(&out[1], (unsigned char *)in, 2);
+ htond(&out[1], (unsigned char *)in, 2);
out[0] = 'x';
ret = fwrite(out, 1, 2*8+1, plotfp);
@@ -401,7 +401,7 @@
in[1] = py1;
in[2] = px2;
in[3] = py2;
- bu_htond(&out[1], (unsigned char *)in, 4);
+ htond(&out[1], (unsigned char *)in, 4);
out[0] = 'v';
ret = fwrite(out, 1, 4*8+1, plotfp);
@@ -425,7 +425,7 @@
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
in[0] = x;
in[1] = y;
- bu_htond(&out[1], (unsigned char *)in, 2);
+ htond(&out[1], (unsigned char *)in, 2);
out[0] = 'o';
ret = fwrite(out, 1, 2*8+1, plotfp);
@@ -447,7 +447,7 @@
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
in[0] = x;
in[1] = y;
- bu_htond(&out[1], (unsigned char *)in, 2);
+ htond(&out[1], (unsigned char *)in, 2);
out[0] = 'q';
ret = fwrite(out, 1, 2*8+1, plotfp);
@@ -471,7 +471,7 @@
in[1] = py1;
in[2] = px2;
in[3] = py2;
- bu_htond(&out[1], (unsigned char *)in, 4);
+ htond(&out[1], (unsigned char *)in, 4);
out[0] = 'w';
ret = fwrite(out, 1, 4*8+1, plotfp);
@@ -494,7 +494,7 @@
in[0] = x;
in[1] = y;
in[2] = r;
- bu_htond(&out[1], (unsigned char *)in, 3);
+ htond(&out[1], (unsigned char *)in, 3);
out[0] = 'i';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -520,7 +520,7 @@
in[3] = py1;
in[4] = px2;
in[5] = py2;
- bu_htond(&out[1], (unsigned char *)in, 6);
+ htond(&out[1], (unsigned char *)in, 6);
out[0] = 'r';
ret = fwrite(out, 1, 6*8+1, plotfp);
@@ -551,8 +551,8 @@
unsigned char out[6*8+1];
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
- bu_htond(&out[1], (unsigned char *)min, 3);
- bu_htond(&out[3*8+1], (unsigned char *)max, 3);
+ htond(&out[1], (unsigned char *)min, 3);
+ htond(&out[3*8+1], (unsigned char *)max, 3);
out[0] = 'W';
ret = fwrite(out, 1, 6*8+1, plotfp);
@@ -578,7 +578,7 @@
in[3] = px2;
in[4] = py2;
in[5] = pz2;
- bu_htond(&out[1], (unsigned char *)in, 6);
+ htond(&out[1], (unsigned char *)in, 6);
out[0] = 'W';
ret = fwrite(out, 1, 6*8+1, plotfp);
@@ -597,7 +597,7 @@
unsigned char out[3*8+1];
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
- bu_htond(&out[1], (unsigned char *)pt, 3);
+ htond(&out[1], (unsigned char *)pt, 3);
out[0] = 'X';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -620,7 +620,7 @@
in[0] = x;
in[1] = y;
in[2] = z;
- bu_htond(&out[1], (unsigned char *)in, 3);
+ htond(&out[1], (unsigned char *)in, 3);
out[0] = 'X';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -639,7 +639,7 @@
unsigned char out[3*8+1];
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
- bu_htond(&out[1], (unsigned char *)pt, 3);
+ htond(&out[1], (unsigned char *)pt, 3);
out[0] = 'O';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -662,7 +662,7 @@
in[0] = x;
in[1] = y;
in[2] = z;
- bu_htond(&out[1], (unsigned char *)in, 3);
+ htond(&out[1], (unsigned char *)in, 3);
out[0] = 'O';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -681,7 +681,7 @@
unsigned char out[3*8+1];
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
- bu_htond(&out[1], (unsigned char *)pt, 3);
+ htond(&out[1], (unsigned char *)pt, 3);
out[0] = 'Q';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -704,7 +704,7 @@
in[0] = x;
in[1] = y;
in[2] = z;
- bu_htond(&out[1], (unsigned char *)in, 3);
+ htond(&out[1], (unsigned char *)in, 3);
out[0] = 'Q';
ret = fwrite(out, 1, 3*8+1, plotfp);
@@ -723,8 +723,8 @@
unsigned char out[6*8+1];
if (pl_outputMode == PL_OUTPUT_MODE_BINARY) {
- bu_htond(&out[1], (unsigned char *)a, 3);
- bu_htond(&out[3*8+1], (unsigned char *)b, 3);
+ htond(&out[1], (unsigned char *)a, 3);
+ htond(&out[3*8+1], (unsigned char *)b, 3);
out[0] = 'V';
ret = fwrite(out, 1, 6*8+1, plotfp);
@@ -750,7 +750,7 @@
in[3] = px2;
in[4] = py2;
in[5] = pz2;
- bu_htond(&out[1], (unsigned char *)in, 6);
+ htond(&out[1], (unsigned char *)in, 6);
out[0] = 'V';
ret = fwrite(out, 1, 6*8+1, plotfp);
Modified: brlcad/trunk/src/libbu/convert.c
===================================================================
--- brlcad/trunk/src/libbu/convert.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libbu/convert.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -550,7 +550,7 @@
case CV_32:
return bu_cv_ntohul((unsigned long *)out, size, in, count);
case CV_D:
- (void) bu_ntohd((unsigned char *)out, (unsigned char *)in, count);
+ (void) ntohd((unsigned char *)out, (unsigned char *)in, count);
return count;
}
@@ -570,7 +570,7 @@
case CV_32:
return bu_cv_htonul(out, size, (unsigned long *)in, count);
case CV_D:
- (void) bu_htond((unsigned char *)out, (unsigned char *)in, count);
+ (void) htond((unsigned char *)out, (unsigned char *)in, count);
return count;
}
}
@@ -659,7 +659,7 @@
(void) bu_cv_ntohul((unsigned long *)t1, bufsize, from, work_count);
break;
case CV_D:
- (void) bu_ntohd((unsigned char *)t1, (unsigned char *)from, work_count);
+ (void) ntohd((unsigned char *)t1, (unsigned char *)from, work_count);
break;
}
/*
Modified: brlcad/trunk/src/libbu/htond.c
===================================================================
--- brlcad/trunk/src/libbu/htond.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libbu/htond.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -56,7 +56,7 @@
void
-bu_htond(register unsigned char *out, register const unsigned char *in, size_t count)
+htond(register unsigned char *out, register const unsigned char *in, size_t count)
{
register size_t i;
@@ -300,7 +300,7 @@
#endif
exp += 1023 - 040000 - 1;
if ((exp & ~0x7FF) != 0) {
- fprintf(stderr, "bu_htond: Cray exponent too large on x%x\n", word);
+ fprintf(stderr, "htond: Cray exponent too large on x%x\n", word);
OUT_IEEE_NAN;
}
@@ -344,7 +344,7 @@
/* What value here is a Convex NaN ? */
exp += 1023 - 1024 - 1;
if ((exp & ~0x7FF) != 0) {
- fprintf(stderr, "bu_htond: Convex exponent too large on x%lx\n", word);
+ fprintf(stderr, "htond: Convex exponent too large on x%lx\n", word);
OUT_IEEE_NAN;
}
@@ -357,12 +357,12 @@
return;
#endif
- bu_bomb("bu_htond.c: ERROR, no HtoND conversion for this machine type\n");
+ bu_bomb("htond.c: ERROR, no HtoND conversion for this machine type\n");
}
void
-bu_ntohd(register unsigned char *out, register const unsigned char *in, size_t count)
+ntohd(register unsigned char *out, register const unsigned char *in, size_t count)
{
register size_t i;
bu_endian_t order;
@@ -410,7 +410,7 @@
#if defined(sgi) && !defined(mips)
/*
* Silicon Graphics Iris workstation.
- * See comments in bu_htond() for discussion of the braindamage.
+ * See comments in htond() for discussion of the braindamage.
*/
for (i=count; i > 0; i--) {
/* Brain-damaged 3-D case */
@@ -475,7 +475,7 @@
exp += 129 - 1023;
/* Check for exponent out of range */
if ((exp & ~0xFF) != 0) {
- fprintf(stderr, "bu_ntohd: VAX exponent overflow\n");
+ fprintf(stderr, "ntohd: VAX exponent overflow\n");
goto vax_undef;
}
left = ((left & 0x000FFFFF)<<3) | signbit | (exp<<23) |
@@ -529,7 +529,7 @@
exp /= 4; /* excess 32, base 16 */
exp += (64-32+1); /* excess 64, base 16, plus fudge */
if ((exp & ~0xFF) != 0) {
- fprintf(stderr, "bu_ntohd: IBM exponent overflow\n");
+ fprintf(stderr, "ntohd: IBM exponent overflow\n");
goto ibm_undef;
}
@@ -644,7 +644,7 @@
}
if (exp == 0x7FF) {
/* IEEE NaN = Convex what? */
- fprintf(stderr, "bu_ntohd: Convex NaN unimplemented\n");
+ fprintf(stderr, "ntohd: Convex NaN unimplemented\n");
word = 0;
goto convex_out;
}
@@ -659,7 +659,7 @@
return;
#endif
- bu_bomb("bu_ntohd.c: ERROR, no NtoHD conversion for this machine type\n");
+ bu_bomb("ntohd.c: ERROR, no NtoHD conversion for this machine type\n");
}
Modified: brlcad/trunk/src/libbu/htonf.c
===================================================================
--- brlcad/trunk/src/libbu/htonf.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libbu/htonf.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -30,7 +30,7 @@
void
-bu_htonf(register unsigned char *out, register const unsigned char *in, size_t count)
+htonf(register unsigned char *out, register const unsigned char *in, size_t count)
{
register size_t i;
@@ -62,12 +62,12 @@
break;
}
- bu_bomb("bu_ntohf.c: ERROR, no NtoHD conversion for this machine type\n");
+ bu_bomb("ntohf.c: ERROR, no NtoHD conversion for this machine type\n");
}
void
-bu_ntohf(register unsigned char *out, register const unsigned char *in, size_t count)
+ntohf(register unsigned char *out, register const unsigned char *in, size_t count)
{
register size_t i;
@@ -99,7 +99,7 @@
break;
}
- bu_bomb("bu_ntohf.c: ERROR, no NtoHD conversion for this machine type\n");
+ bu_bomb("ntohf.c: ERROR, no NtoHD conversion for this machine type\n");
}
/*
Modified: brlcad/trunk/src/libbu/parse.c
===================================================================
--- brlcad/trunk/src/libbu/parse.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libbu/parse.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -162,11 +162,11 @@
CKMEM(len);
switch(sizeof(fastf_t)) {
case sizeof(float):
- bu_htonf((unsigned char *)cp, (unsigned char *)loc, ip->sp_count);
+ htonf((unsigned char *)cp, (unsigned char *)loc, ip->sp_count);
break;
case sizeof(double):
default:
- bu_htond((unsigned char *)cp, (unsigned char *)loc, ip->sp_count);
+ htond((unsigned char *)cp, (unsigned char *)loc, ip->sp_count);
break;
}
cp += len;
@@ -175,7 +175,7 @@
/* Double-precision floating point */
len = ip->sp_count * sizeof(double);
CKMEM(len);
- bu_htond((unsigned char *)cp, (unsigned char *)loc, ip->sp_count);
+ htond((unsigned char *)cp, (unsigned char *)loc, ip->sp_count);
cp += len;
continue;
case 'd':
@@ -331,11 +331,11 @@
len = ip->sp_count * sizeof(fastf_t);
switch(sizeof(fastf_t)) {
case sizeof(float):
- bu_ntohf((unsigned char *)loc, cp, ip->sp_count);
+ ntohf((unsigned char *)loc, cp, ip->sp_count);
break;
case sizeof(double):
default:
- bu_ntohd((unsigned char *)loc, cp, ip->sp_count);
+ ntohd((unsigned char *)loc, cp, ip->sp_count);
break;
}
cp += len;
@@ -344,7 +344,7 @@
case 'g':
/* Double-precision floating point */
len = ip->sp_count * sizeof(double);
- bu_ntohd((unsigned char *)loc, cp, ip->sp_count);
+ ntohd((unsigned char *)loc, cp, ip->sp_count);
cp += len;
bytes_used += len;
break;
Modified: brlcad/trunk/src/libged/bot_dump.c
===================================================================
--- brlcad/trunk/src/libged/bot_dump.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libged/bot_dump.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -559,7 +559,7 @@
VMOVE(flt_ptr, C);
flt_ptr += 3;
- bu_htonf(vert_buffer, (const unsigned char *)flts, 12);
+ htonf(vert_buffer, (const unsigned char *)flts, 12);
for (j = 0; j < 12; j++) {
lswap((unsigned int *)&vert_buffer[j*4]);
}
Modified: brlcad/trunk/src/libmultispectral/sh_temp.c
===================================================================
--- brlcad/trunk/src/libmultispectral/sh_temp.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/libmultispectral/sh_temp.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -143,7 +143,7 @@
cp = ((unsigned char *)(tp->mp->buf)) +
(int)(ymin * (tp->t_n-1)) * tp->t_w * 8 +
(int)(xmin * (tp->t_w-1)) * 8;
- bu_ntohd((unsigned char *)&ttemp, cp, 1);
+ ntohd((unsigned char *)&ttemp, cp, 1);
temp += ttemp;
} else {
/* Calculate weighted average of cells in footprint */
@@ -198,7 +198,7 @@
cell_area = line_factor * (col_upper - col_lower);
tot_area += cell_area;
- bu_ntohd((unsigned char *)&ttemp, cp, 1);
+ ntohd((unsigned char *)&ttemp, cp, 1);
if (rdebug & RDEBUG_SHADE)
bu_log("\t %g weight=%g (from col=%d line=%d)\n",
Modified: brlcad/trunk/src/librt/binunif/db5_bin.c
===================================================================
--- brlcad/trunk/src/librt/binunif/db5_bin.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/binunif/db5_bin.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -153,14 +153,14 @@
bip->count = ep->ext_nbytes/SIZEOF_NETWORK_FLOAT;
bip->u.uint8 = (unsigned char *) bu_malloc( bip->count * sizeof(float),
"rt_binunif_internal" );
- bu_ntohf( (unsigned char *) bip->u.uint8,
+ ntohf( (unsigned char *) bip->u.uint8,
ep->ext_buf, bip->count );
break;
case DB5_MINORTYPE_BINU_DOUBLE:
bip->count = ep->ext_nbytes/SIZEOF_NETWORK_DOUBLE;
bip->u.uint8 = (unsigned char *) bu_malloc( bip->count * sizeof(double),
"rt_binunif_internal" );
- bu_ntohd( (unsigned char *) bip->u.uint8, ep->ext_buf, bip->count );
+ ntohd( (unsigned char *) bip->u.uint8, ep->ext_buf, bip->count );
break;
case DB5_MINORTYPE_BINU_8BITINT:
case DB5_MINORTYPE_BINU_8BITINT_U:
@@ -259,13 +259,13 @@
ep->ext_nbytes = bip->count * SIZEOF_NETWORK_FLOAT;
ep->ext_buf = (genptr_t)bu_malloc( ep->ext_nbytes,
"binunif external");
- bu_htonf( ep->ext_buf, (unsigned char *) bip->u.uint8, bip->count );
+ htonf( ep->ext_buf, (unsigned char *) bip->u.uint8, bip->count );
break;
case DB5_MINORTYPE_BINU_DOUBLE:
ep->ext_nbytes = bip->count * SIZEOF_NETWORK_DOUBLE;
ep->ext_buf = (genptr_t)bu_malloc( ep->ext_nbytes,
"binunif external");
- bu_htond( ep->ext_buf, (unsigned char *) bip->u.uint8, bip->count );
+ htond( ep->ext_buf, (unsigned char *) bip->u.uint8, bip->count );
break;
case DB5_MINORTYPE_BINU_8BITINT:
case DB5_MINORTYPE_BINU_8BITINT_U:
Modified: brlcad/trunk/src/librt/comb/comb.c
===================================================================
--- brlcad/trunk/src/librt/comb/comb.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/comb/comb.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -199,7 +199,7 @@
double scanmat[ELEMENTS_PER_MAT];
MAT_COPY(scanmat, tp->tr_l.tl_mat); /* convert fastf_t to double */
- bu_htond(ssp->matp, (const unsigned char *)scanmat, ELEMENTS_PER_MAT);
+ htond(ssp->matp, (const unsigned char *)scanmat, ELEMENTS_PER_MAT);
ssp->matp += ELEMENTS_PER_MAT * SIZEOF_NETWORK_DOUBLE;
}
@@ -538,7 +538,7 @@
BU_ASSERT_SIZE_T(mi, <, nmat);
/* read matrix */
- bu_ntohd((unsigned char *)scanmat, &matp[mi*ELEMENTS_PER_MAT*SIZEOF_NETWORK_DOUBLE], ELEMENTS_PER_MAT);
+ ntohd((unsigned char *)scanmat, &matp[mi*ELEMENTS_PER_MAT*SIZEOF_NETWORK_DOUBLE], ELEMENTS_PER_MAT);
MAT_COPY(diskmat, scanmat); /* convert double to fastf_t */
if (!mat || bn_mat_is_identity(mat)) {
@@ -661,7 +661,7 @@
BU_ASSERT_SIZE_T(mi, <, nmat);
/* read matrix */
- bu_ntohd((unsigned char *)scanmat, &matp[mi*ELEMENTS_PER_MAT*SIZEOF_NETWORK_DOUBLE], ELEMENTS_PER_MAT);
+ ntohd((unsigned char *)scanmat, &matp[mi*ELEMENTS_PER_MAT*SIZEOF_NETWORK_DOUBLE], ELEMENTS_PER_MAT);
MAT_COPY(diskmat, scanmat); /* convert double to fastf_t */
if (!mat || bn_mat_is_identity(mat)) {
Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c
===================================================================
--- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1343,7 +1343,7 @@
aip->magic = RT_ARB_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 8*3);
+ ntohd((unsigned char *)vec, ep->ext_buf, 8*3);
if (mat == NULL) mat = bn_mat_identity;
for (i=0; i<8; i++) {
MAT4X3PNT(aip->pt[i], mat, &vec[i*3]);
@@ -1377,7 +1377,7 @@
for (i=0; i<8; i++) {
VSCALE(&vec[i*ELEMENTS_PER_VECT], aip->pt[i], local2mm);
}
- bu_htond(ep->ext_buf, (unsigned char *)vec, 8*ELEMENTS_PER_VECT);
+ htond(ep->ext_buf, (unsigned char *)vec, 8*ELEMENTS_PER_VECT);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/arbn/arbn.c
===================================================================
--- brlcad/trunk/src/librt/primitives/arbn/arbn.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/arbn/arbn.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -858,7 +858,7 @@
aip->eqn = (plane_t *)bu_malloc(aip->neqn*sizeof(plane_t), "arbn plane eqn[]");
scan = (double *)bu_malloc(aip->neqn*sizeof(double)*ELEMENTS_PER_PLANE, "scan array");
- bu_ntohd((unsigned char *)scan, (unsigned char *)(&rp[1]), aip->neqn*ELEMENTS_PER_PLANE);
+ ntohd((unsigned char *)scan, (unsigned char *)(&rp[1]), aip->neqn*ELEMENTS_PER_PLANE);
for (i=0; i<aip->neqn; i++) {
aip->eqn[i][X] = scan[(i*ELEMENTS_PER_PLANE)+0]; /* convert double to fastf_t */
aip->eqn[i][Y] = scan[(i*ELEMENTS_PER_PLANE)+1]; /* convert double to fastf_t */
@@ -949,7 +949,7 @@
*sp++ = aip->eqn[i][W] * local2mm;
}
- bu_htond((unsigned char *)&rec[1], (unsigned char *)sbuf, aip->neqn * ELEMENTS_PER_PLANE);
+ htond((unsigned char *)&rec[1], (unsigned char *)sbuf, aip->neqn * ELEMENTS_PER_PLANE);
bu_free((char *)sbuf, "arbn temp");
return 0; /* OK */
@@ -995,7 +995,7 @@
if (aip->neqn <= 0) return -1;
eqn = (double *)bu_malloc(byte_count, "arbn plane eqn[] temp buf");
- bu_ntohd((unsigned char *)eqn, (unsigned char *)ep->ext_buf + ELEMENTS_PER_PLANE, double_count);
+ ntohd((unsigned char *)eqn, (unsigned char *)ep->ext_buf + ELEMENTS_PER_PLANE, double_count);
aip->eqn = (plane_t *)bu_malloc(double_count * sizeof(fastf_t), "arbn plane eqn[]");
for (i=0; i < aip->neqn; i++) {
HMOVE(aip->eqn[i], &eqn[i*ELEMENTS_PER_PLANE]);
@@ -1077,7 +1077,7 @@
}
/* Convert from internal (host) to database (network) format */
- bu_htond((unsigned char *)ep->ext_buf + SIZEOF_NETWORK_LONG, (unsigned char *)vec, double_count);
+ htond((unsigned char *)ep->ext_buf + SIZEOF_NETWORK_LONG, (unsigned char *)vec, double_count);
bu_free((char *)vec, "arbn temp");
return 0; /* OK */
Modified: brlcad/trunk/src/librt/primitives/ars/ars.c
===================================================================
--- brlcad/trunk/src/librt/primitives/ars/ars.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/ars/ars.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -349,7 +349,7 @@
sizeof(fastf_t), "ARS points");
fp = ari->curves[i];
for (j=0; j<ari->pts_per_curve; j++) {
- bu_ntohd((unsigned char *)tmp_pnt, cp, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)tmp_pnt, cp, ELEMENTS_PER_POINT);
MAT4X3PNT(fp, mat, tmp_pnt);
cp += ELEMENTS_PER_POINT * SIZEOF_NETWORK_DOUBLE;
fp += ELEMENTS_PER_POINT;
@@ -400,7 +400,7 @@
fp = arip->curves[cur];
for (npts=0; npts < arip->pts_per_curve; npts++) {
VSCALE(tmp_pnt, fp, local2mm);
- bu_htond(cp, (unsigned char *)tmp_pnt, ELEMENTS_PER_POINT);
+ htond(cp, (unsigned char *)tmp_pnt, ELEMENTS_PER_POINT);
cp += ELEMENTS_PER_POINT * SIZEOF_NETWORK_DOUBLE;
fp += ELEMENTS_PER_POINT;
}
Modified: brlcad/trunk/src/librt/primitives/bot/bot.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bot/bot.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/bot/bot.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -948,7 +948,7 @@
for (i = 0; i < bot_ip->num_vertices; i++) {
double tmp[ELEMENTS_PER_POINT];
- bu_ntohd((unsigned char *)tmp, (const unsigned char *)(&rp->bot.bot_data[i*24]), ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)tmp, (const unsigned char *)(&rp->bot.bot_data[i*24]), ELEMENTS_PER_POINT);
MAT4X3PNT(&(bot_ip->vertices[i*ELEMENTS_PER_POINT]), mat, tmp);
}
@@ -969,7 +969,7 @@
for (i = 0; i < bot_ip->num_faces; i++) {
double scan;
- bu_ntohd((unsigned char *)&scan, (const unsigned char *)(&rp->bot.bot_data[chars_used + i*8]), 1);
+ ntohd((unsigned char *)&scan, (const unsigned char *)(&rp->bot.bot_data[chars_used + i*8]), 1);
bot_ip->thickness[i] = scan; /* convert double to fastf_t */
}
@@ -1054,7 +1054,7 @@
double tmp[ELEMENTS_PER_POINT];
VSCALE(tmp, &bot_ip->vertices[i*ELEMENTS_PER_POINT], local2mm);
- bu_htond((unsigned char *)&rec->bot.bot_data[i*24], (const unsigned char *)tmp, ELEMENTS_PER_POINT);
+ htond((unsigned char *)&rec->bot.bot_data[i*24], (const unsigned char *)tmp, ELEMENTS_PER_POINT);
}
chars_used = bot_ip->num_vertices * 24;
@@ -1075,7 +1075,7 @@
double tmp;
tmp = bot_ip->thickness[i] * local2mm;
- bu_htond((unsigned char *)&rec->bot.bot_data[chars_used], (const unsigned char *)&tmp, 1);
+ htond((unsigned char *)&rec->bot.bot_data[chars_used], (const unsigned char *)&tmp, 1);
chars_used += 8;
}
bu_strlcpy((char *)&rec->bot.bot_data[chars_used], bu_vls_addr(&face_mode), ep->ext_nbytes - (sizeof(struct bot_rec)-1) - chars_used);
@@ -1141,7 +1141,7 @@
/* must be double for import and export */
double tmp[ELEMENTS_PER_POINT];
- bu_ntohd((unsigned char *)tmp, (const unsigned char *)cp, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)tmp, (const unsigned char *)cp, ELEMENTS_PER_POINT);
cp += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_POINT;
MAT4X3PNT(&(bip->vertices[i*ELEMENTS_PER_POINT]), mat, tmp);
}
@@ -1159,7 +1159,7 @@
bip->thickness = (fastf_t *)bu_calloc(bip->num_faces, sizeof(fastf_t), "BOT thickness");
for (i = 0; i < bip->num_faces; i++) {
double scan;
- bu_ntohd((unsigned char *)&scan, cp, 1);
+ ntohd((unsigned char *)&scan, cp, 1);
bip->thickness[i] = scan; /* convert double to fastf_t */
cp += SIZEOF_NETWORK_DOUBLE;
}
@@ -1189,7 +1189,7 @@
bip->normals = (fastf_t *)bu_calloc(bip->num_normals * 3, sizeof(fastf_t), "BOT normals");
for (i = 0; i < bip->num_normals; i++) {
- bu_ntohd((unsigned char *)tmp, (const unsigned char *)cp, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)tmp, (const unsigned char *)cp, ELEMENTS_PER_VECT);
cp += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_VECT;
MAT4X3VEC(&(bip->normals[i*ELEMENTS_PER_VECT]), mat, tmp);
}
@@ -1283,7 +1283,7 @@
double tmp[ELEMENTS_PER_POINT];
VSCALE(tmp, &bip->vertices[i*ELEMENTS_PER_POINT], local2mm);
- bu_htond(cp, (unsigned char *)tmp, ELEMENTS_PER_POINT);
+ htond(cp, (unsigned char *)tmp, ELEMENTS_PER_POINT);
cp += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_POINT;
rem -= SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_POINT;
}
@@ -1308,7 +1308,7 @@
double tmp;
tmp = bip->thickness[i] * local2mm;
- bu_htond(cp, (const unsigned char *)&tmp, 1);
+ htond(cp, (const unsigned char *)&tmp, 1);
cp += SIZEOF_NETWORK_DOUBLE;
rem -= SIZEOF_NETWORK_DOUBLE;
}
@@ -1340,7 +1340,7 @@
normals[i] = bip->normals[i];
}
- bu_htond(cp, (unsigned char*)normals, bip->num_normals*ELEMENTS_PER_VECT);
+ htond(cp, (unsigned char*)normals, bip->num_normals*ELEMENTS_PER_VECT);
bu_free(normals, "normals");
Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1102,11 +1102,11 @@
}
/* serialize */
- bu_htond(cp, (unsigned char *)uknots, srf->u.k_size);
+ htond(cp, (unsigned char *)uknots, srf->u.k_size);
cp += srf->u.k_size * SIZEOF_NETWORK_DOUBLE;
- bu_htond(cp, (unsigned char *)vknots, srf->v.k_size);
+ htond(cp, (unsigned char *)vknots, srf->v.k_size);
cp += srf->v.k_size * SIZEOF_NETWORK_DOUBLE;
- bu_htond(cp, (unsigned char *)srf->ctl_points,
+ htond(cp, (unsigned char *)srf->ctl_points,
coords * srf->s_size[0] * srf->s_size[1]);
cp += coords * srf->s_size[0] * srf->s_size[1] * SIZEOF_NETWORK_DOUBLE;
@@ -1196,9 +1196,9 @@
uknots = (double *)bu_malloc(srf->u.k_size * sizeof(double), "uknots");
vknots = (double *)bu_malloc(srf->v.k_size * sizeof(double), "vknots");
- bu_ntohd((unsigned char *)uknots, cp, srf->u.k_size);
+ ntohd((unsigned char *)uknots, cp, srf->u.k_size);
cp += srf->u.k_size * SIZEOF_NETWORK_DOUBLE;
- bu_ntohd((unsigned char *)vknots, cp, srf->v.k_size);
+ ntohd((unsigned char *)vknots, cp, srf->v.k_size);
cp += srf->v.k_size * SIZEOF_NETWORK_DOUBLE;
/* convert double to fastf_t */
@@ -1217,7 +1217,7 @@
points = (double *)bu_malloc(coords * srf->s_size[0] * srf->s_size[1] * sizeof(double), "points");
- bu_ntohd((unsigned char *)points, cp, coords * srf->s_size[0] * srf->s_size[1]);
+ ntohd((unsigned char *)points, cp, coords * srf->s_size[0] * srf->s_size[1]);
/* convert double to fastf_t */
for (i=0; i < coords * srf->s_size[0] * srf->s_size[1]; i++) {
Modified: brlcad/trunk/src/librt/primitives/cline/cline.c
===================================================================
--- brlcad/trunk/src/librt/primitives/cline/cline.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/cline/cline.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -856,13 +856,13 @@
cline_ip->magic = RT_CLINE_INTERNAL_MAGIC;
if (mat == NULL) mat = bn_mat_identity;
- bu_ntohd((unsigned char *)&scan, rp->cli.cli_thick, 1);
+ ntohd((unsigned char *)&scan, rp->cli.cli_thick, 1);
cline_ip->thickness = scan / mat[15];
- bu_ntohd((unsigned char *)&scan, rp->cli.cli_radius, 1);
+ ntohd((unsigned char *)&scan, rp->cli.cli_radius, 1);
cline_ip->radius = scan / mat[15];
- bu_ntohd((unsigned char *)&work, rp->cli.cli_V, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)&work, rp->cli.cli_V, ELEMENTS_PER_POINT);
MAT4X3PNT(cline_ip->v, mat, work);
- bu_ntohd((unsigned char *)&work, rp->cli.cli_h, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)&work, rp->cli.cli_h, ELEMENTS_PER_POINT);
MAT4X3VEC(cline_ip->h, mat, work);
return 0; /* OK */
@@ -900,13 +900,13 @@
rec->cli.cli_id = DBID_CLINE; /* GED primitive type from db.h */
tmp = cline_ip->thickness * local2mm;
- bu_htond(rec->cli.cli_thick, (unsigned char *)(&tmp), 1);
+ htond(rec->cli.cli_thick, (unsigned char *)(&tmp), 1);
tmp = cline_ip->radius * local2mm;
- bu_htond(rec->cli.cli_radius, (unsigned char *)(&tmp), 1);
+ htond(rec->cli.cli_radius, (unsigned char *)(&tmp), 1);
VSCALE(work, cline_ip->v, local2mm);
- bu_htond(rec->cli.cli_V, (unsigned char *)work, ELEMENTS_PER_VECT);
+ htond(rec->cli.cli_V, (unsigned char *)work, ELEMENTS_PER_VECT);
VSCALE(work, cline_ip->h, local2mm);
- bu_htond(rec->cli.cli_h, (unsigned char *)work, ELEMENTS_PER_VECT);
+ htond(rec->cli.cli_h, (unsigned char *)work, ELEMENTS_PER_VECT);
return 0;
}
@@ -941,7 +941,7 @@
cline_ip->magic = RT_CLINE_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 8);
+ ntohd((unsigned char *)vec, ep->ext_buf, 8);
if (mat == NULL) mat = bn_mat_identity;
cline_ip->thickness = vec[0] / mat[15];
@@ -983,7 +983,7 @@
VSCALE(&vec[5], cline_ip->h, local2mm);
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 8);
+ htond(ep->ext_buf, (unsigned char *)vec, 8);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c
===================================================================
--- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -4443,7 +4443,7 @@
}
/* convert matrix */
- bu_ntohd((unsigned char *)scanmat, cp, ELEMENTS_PER_MAT);
+ ntohd((unsigned char *)scanmat, cp, ELEMENTS_PER_MAT);
MAT_COPY(dsp_ip->dsp_stom, scanmat); /* double to fastf_t */
cp += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_MAT;
@@ -4557,7 +4557,7 @@
dsp_ip->dsp_stom[15] *= local2mm;
MAT_COPY(scanmat, dsp_ip->dsp_stom); /* convert fastf_t to double */
- bu_htond(cp, (unsigned char *)scanmat, ELEMENTS_PER_MAT);
+ htond(cp, (unsigned char *)scanmat, ELEMENTS_PER_MAT);
cp += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_MAT;
rem -= SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_MAT;
Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c
===================================================================
--- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1805,7 +1805,7 @@
xip->ehy_magic = RT_EHY_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 3*4);
+ ntohd((unsigned char *)vec, ep->ext_buf, 3*4);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1884,7 +1884,7 @@
vec[3*3+2] = xip->ehy_c * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 3*4);
+ htond(ep->ext_buf, (unsigned char *)vec, 3*4);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/ell/ell.c
===================================================================
--- brlcad/trunk/src/librt/primitives/ell/ell.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/ell/ell.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1376,7 +1376,7 @@
eip->magic = RT_ELL_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, ELEMENTS_PER_VECT*4);
+ ntohd((unsigned char *)vec, ep->ext_buf, ELEMENTS_PER_VECT*4);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1424,7 +1424,7 @@
VSCALE(&vec[3*ELEMENTS_PER_VECT], eip->c, local2mm);
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*4);
+ htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*4);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/epa/epa.c
===================================================================
--- brlcad/trunk/src/librt/primitives/epa/epa.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/epa/epa.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1778,7 +1778,7 @@
xip->epa_magic = RT_EPA_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 11);
+ ntohd((unsigned char *)vec, ep->ext_buf, 11);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1856,7 +1856,7 @@
vec[3*3+1] = xip->epa_r2 * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 11);
+ htond(ep->ext_buf, (unsigned char *)vec, 11);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/eto/eto.c
===================================================================
--- brlcad/trunk/src/librt/primitives/eto/eto.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/eto/eto.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1455,7 +1455,7 @@
tip->eto_magic = RT_ETO_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 11);
+ ntohd((unsigned char *)vec, ep->ext_buf, 11);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1508,7 +1508,7 @@
vec[3*3+1] = tip->eto_rd * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 11);
+ htond(ep->ext_buf, (unsigned char *)vec, 11);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c
===================================================================
--- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -2358,13 +2358,13 @@
}
if (mat == NULL) mat = bn_mat_identity;
- bu_ntohd((unsigned char *)tmp_vec, rp->extr.ex_V, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)tmp_vec, rp->extr.ex_V, ELEMENTS_PER_VECT);
MAT4X3PNT(extrude_ip->V, mat, tmp_vec);
- bu_ntohd((unsigned char *)tmp_vec, rp->extr.ex_h, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)tmp_vec, rp->extr.ex_h, ELEMENTS_PER_VECT);
MAT4X3VEC(extrude_ip->h, mat, tmp_vec);
- bu_ntohd((unsigned char *)tmp_vec, rp->extr.ex_uvec, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)tmp_vec, rp->extr.ex_uvec, ELEMENTS_PER_VECT);
MAT4X3VEC(extrude_ip->u_vec, mat, tmp_vec);
- bu_ntohd((unsigned char *)tmp_vec, rp->extr.ex_vvec, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)tmp_vec, rp->extr.ex_vvec, ELEMENTS_PER_VECT);
MAT4X3VEC(extrude_ip->v_vec, mat, tmp_vec);
extrude_ip->keypoint = ntohl(*(uint32_t *)&rp->extr.ex_key[0]);
@@ -2408,13 +2408,13 @@
rec->extr.ex_id = DBID_EXTR;
VSCALE(tmp_vec, extrude_ip->V, local2mm);
- bu_htond(rec->extr.ex_V, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->extr.ex_V, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
VSCALE(tmp_vec, extrude_ip->h, local2mm);
- bu_htond(rec->extr.ex_h, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->extr.ex_h, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
VSCALE(tmp_vec, extrude_ip->u_vec, local2mm);
- bu_htond(rec->extr.ex_uvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->extr.ex_uvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
VSCALE(tmp_vec, extrude_ip->v_vec, local2mm);
- bu_htond(rec->extr.ex_vvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->extr.ex_vvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
*(uint32_t *)rec->extr.ex_key = htonl(extrude_ip->keypoint);
*(uint32_t *)rec->extr.ex_count = htonl(1);
@@ -2461,7 +2461,7 @@
VSCALE(tmp_vec[1], extrude_ip->h, local2mm);
VSCALE(tmp_vec[2], extrude_ip->u_vec, local2mm);
VSCALE(tmp_vec[3], extrude_ip->v_vec, local2mm);
- bu_htond(ptr, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT*4);
+ htond(ptr, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT*4);
ptr += ELEMENTS_PER_VECT * 4 * SIZEOF_NETWORK_DOUBLE;
rem -= ELEMENTS_PER_VECT * 4 * SIZEOF_NETWORK_DOUBLE;
@@ -2525,7 +2525,7 @@
}
}
- bu_ntohd((unsigned char *)tmp_vec, ptr, ELEMENTS_PER_VECT*4);
+ ntohd((unsigned char *)tmp_vec, ptr, ELEMENTS_PER_VECT*4);
if (mat == NULL) mat = bn_mat_identity;
MAT4X3PNT(extrude_ip->V, mat, tmp_vec[0]);
MAT4X3VEC(extrude_ip->h, mat, tmp_vec[1]);
Modified: brlcad/trunk/src/librt/primitives/grip/grip.c
===================================================================
--- brlcad/trunk/src/librt/primitives/grip/grip.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/grip/grip.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -389,7 +389,7 @@
gip->magic = RT_GRIP_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 7);
+ ntohd((unsigned char *)vec, ep->ext_buf, 7);
/* Transform the point, and the normal */
if (mat == NULL) mat = bn_mat_identity;
@@ -443,7 +443,7 @@
vec[6] = gip->mag * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 7);
+ htond(ep->ext_buf, (unsigned char *)vec, 7);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/half/half.c
===================================================================
--- brlcad/trunk/src/librt/primitives/half/half.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/half/half.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -685,7 +685,7 @@
hip->magic = RT_HALF_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)tmp_plane, ep->ext_buf, ELEMENTS_PER_PLANE);
+ ntohd((unsigned char *)tmp_plane, ep->ext_buf, ELEMENTS_PER_PLANE);
/* to apply modeling transformations, create a temporary normal
* vector and point on the plane
@@ -748,10 +748,10 @@
/* the normal */
VMOVE(eqn, hip->eqn); /* convert fastf_t to double */
- bu_htond((unsigned char *)ep->ext_buf, (unsigned char *)eqn, ELEMENTS_PER_VECT);
+ htond((unsigned char *)ep->ext_buf, (unsigned char *)eqn, ELEMENTS_PER_VECT);
/* the distance */
- bu_htond(((unsigned char *)(ep->ext_buf)) + SIZEOF_NETWORK_DOUBLE*ELEMENTS_PER_VECT,
+ htond(((unsigned char *)(ep->ext_buf)) + SIZEOF_NETWORK_DOUBLE*ELEMENTS_PER_VECT,
(unsigned char *)&scaled_dist, 1);
return 0;
Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c
===================================================================
--- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1234,7 +1234,7 @@
* conversion from network data (Big Endian ints, IEEE double
* floating point) to host local data representations.
*/
- bu_ntohd((unsigned char *)&vec, (const unsigned char *)ep->ext_buf, ELEMENTS_PER_VECT*4);
+ ntohd((unsigned char *)&vec, (const unsigned char *)ep->ext_buf, ELEMENTS_PER_VECT*4);
/* Apply the modeling transformation */
if (mat == NULL) mat = bn_mat_identity;
@@ -1292,7 +1292,7 @@
vec[10] = hyp_ip->hyp_bnr * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*4);
+ htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*4);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c
===================================================================
--- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -718,7 +718,7 @@
BU_CK_EXTERNAL(ep);
metaball_count = ntohl(*(uint32_t *)ep->ext_buf);
buf = (double *)bu_malloc((metaball_count*5+1)*SIZEOF_NETWORK_DOUBLE, "rt_metaball_import5: buf");
- bu_ntohd((unsigned char *)buf, (unsigned char *)ep->ext_buf+2*SIZEOF_NETWORK_LONG, metaball_count*5+1);
+ ntohd((unsigned char *)buf, (unsigned char *)ep->ext_buf+2*SIZEOF_NETWORK_LONG, metaball_count*5+1);
RT_CK_DB_INTERNAL(ip);
ip->idb_major_type = DB5_MAJORTYPE_BRLCAD;
@@ -800,7 +800,7 @@
buf[i+3] = mbpt->fldstr * local2mm;
buf[i+4] = mbpt->sweat;
}
- bu_htond((unsigned char *)ep->ext_buf + 2*SIZEOF_NETWORK_LONG, (unsigned char *)buf, 1 + 5 * metaball_count);
+ htond((unsigned char *)ep->ext_buf + 2*SIZEOF_NETWORK_LONG, (unsigned char *)buf, 1 + 5 * metaball_count);
bu_free(buf, "rt_metaball_export5: buf");
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/nmg/nmg.c
===================================================================
--- brlcad/trunk/src/librt/primitives/nmg/nmg.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/nmg/nmg.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -863,7 +863,7 @@
for (i=0; i<count; i++) {
scanp[i] = fp[i];
}
- bu_htond(cp + (4+4), (unsigned char *)scanp, count);
+ htond(cp + (4+4), (unsigned char *)scanp, count);
bu_free(scanp, "scanp");
} else {
/* Need to scale data by 'scale' ! */
@@ -881,7 +881,7 @@
/* Scale everything as one long array */
VSCALEN(scanp, fp, scale, count);
}
- bu_htond(cp + (4+4), (unsigned char *)scanp, count);
+ htond(cp + (4+4), (unsigned char *)scanp, count);
bu_free(scanp, "rt_nmg_export4_fastf");
}
cp += (4+4) + count * 8;
@@ -935,7 +935,7 @@
ret = (fastf_t *)bu_malloc(count * sizeof(fastf_t), "rt_nmg_import4_fastf[]");
if (!mat) {
scanp = (double *)bu_malloc(count * sizeof(double), "scanp");
- bu_ntohd((unsigned char *)scanp, cp + (4+4), count);
+ ntohd((unsigned char *)scanp, cp + (4+4), count);
/* read as double, return as fastf_t */
for (i=0; i<count; i++) {
ret[i] = scanp[i];
@@ -950,7 +950,7 @@
* The vector times matrix calculation can't be done in place.
*/
tmp = (double *)bu_malloc(count * sizeof(double), "rt_nmg_import4_fastf tmp[]");
- bu_ntohd((unsigned char *)tmp, cp + (4+4), count);
+ ntohd((unsigned char *)tmp, cp + (4+4), count);
switch (RT_NURB_EXTRACT_COORDS(pt_type)) {
case 3:
@@ -1085,8 +1085,8 @@
PUTMAGIC(DISK_REGION_A_MAGIC);
VSCALE(min, r->min_pt, local2mm);
VSCALE(max, r->max_pt, local2mm);
- bu_htond(d->min_pt, (unsigned char *)min, ELEMENTS_PER_POINT);
- bu_htond(d->max_pt, (unsigned char *)max, ELEMENTS_PER_POINT);
+ htond(d->min_pt, (unsigned char *)min, ELEMENTS_PER_POINT);
+ htond(d->max_pt, (unsigned char *)max, ELEMENTS_PER_POINT);
}
return;
case NMG_KIND_SHELL: {
@@ -1117,8 +1117,8 @@
PUTMAGIC(DISK_SHELL_A_MAGIC);
VSCALE(min, sa->min_pt, local2mm);
VSCALE(max, sa->max_pt, local2mm);
- bu_htond(d->min_pt, (unsigned char *)min, ELEMENTS_PER_POINT);
- bu_htond(d->max_pt, (unsigned char *)max, ELEMENTS_PER_POINT);
+ htond(d->min_pt, (unsigned char *)min, ELEMENTS_PER_POINT);
+ htond(d->max_pt, (unsigned char *)max, ELEMENTS_PER_POINT);
}
return;
case NMG_KIND_FACEUSE: {
@@ -1166,7 +1166,7 @@
VMOVE(plane, fg->N);
plane[W] = fg->N[W] * local2mm;
- bu_htond(d->N, (unsigned char *)plane, ELEMENTS_PER_PLANE);
+ htond(d->N, (unsigned char *)plane, ELEMENTS_PER_PLANE);
}
return;
case NMG_KIND_FACE_G_SNURB: {
@@ -1237,8 +1237,8 @@
VSCALE(min, lg->min_pt, local2mm);
VSCALE(max, lg->max_pt, local2mm);
- bu_htond(d->min_pt, (unsigned char *)min, ELEMENTS_PER_POINT);
- bu_htond(d->max_pt, (unsigned char *)max, ELEMENTS_PER_POINT);
+ htond(d->min_pt, (unsigned char *)min, ELEMENTS_PER_POINT);
+ htond(d->max_pt, (unsigned char *)max, ELEMENTS_PER_POINT);
}
return;
case NMG_KIND_EDGEUSE: {
@@ -1289,8 +1289,8 @@
VSCALE(pt, eg->e_pt, local2mm);
VMOVE(dir, eg->e_dir);
- bu_htond(d->e_pt, (unsigned char *)pt, ELEMENTS_PER_POINT);
- bu_htond(d->e_dir, (unsigned char *)dir, ELEMENTS_PER_VECT);
+ htond(d->e_pt, (unsigned char *)pt, ELEMENTS_PER_POINT);
+ htond(d->e_dir, (unsigned char *)dir, ELEMENTS_PER_VECT);
}
return;
case NMG_KIND_EDGE_G_CNURB: {
@@ -1351,7 +1351,7 @@
/* Normal vectors don't scale */
/* This is not a plane equation here */
VMOVE(normal, vua->N); /* convert fastf_t to double */
- bu_htond(d->N, (unsigned char *)normal, ELEMENTS_PER_VECT);
+ htond(d->N, (unsigned char *)normal, ELEMENTS_PER_VECT);
}
return;
case NMG_KIND_VERTEXUSE_A_CNURB: {
@@ -1368,7 +1368,7 @@
/* (u, v) parameters on curves don't scale */
VMOVE(param, vua->param); /* convert fastf_t to double */
- bu_htond(d->param, (unsigned char *)param, 3);
+ htond(d->param, (unsigned char *)param, 3);
}
return;
case NMG_KIND_VERTEX: {
@@ -1393,7 +1393,7 @@
PUTMAGIC(DISK_VERTEX_G_MAGIC);
VSCALE(pt, vg->coord, local2mm);
- bu_htond(d->coord, (unsigned char *)pt, ELEMENTS_PER_POINT);
+ htond(d->coord, (unsigned char *)pt, ELEMENTS_PER_POINT);
}
return;
}
@@ -1493,9 +1493,9 @@
d = &((struct disk_nmgregion_a *)ip)[iindex];
NMG_CK_REGION_A(r);
NMG_CK_DISKMAGIC(d->magic, DISK_REGION_A_MAGIC);
- bu_ntohd((unsigned char *)scanmin, d->min_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanmin, d->min_pt, ELEMENTS_PER_POINT);
VMOVE(min, scanmin); /* convert double to fastf_t */
- bu_ntohd((unsigned char *)scanmax, d->max_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanmax, d->max_pt, ELEMENTS_PER_POINT);
VMOVE(max, scanmax); /* convert double to fastf_t */
bn_rotate_bbox(r->min_pt, r->max_pt, mat, min, max);
}
@@ -1529,9 +1529,9 @@
d = &((struct disk_shell_a *)ip)[iindex];
NMG_CK_SHELL_A(sa);
NMG_CK_DISKMAGIC(d->magic, DISK_SHELL_A_MAGIC);
- bu_ntohd((unsigned char *)scanmin, d->min_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanmin, d->min_pt, ELEMENTS_PER_POINT);
VMOVE(min, scanmin); /* convert double to fastf_t */
- bu_ntohd((unsigned char *)scanmax, d->max_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanmax, d->max_pt, ELEMENTS_PER_POINT);
VMOVE(max, scanmax); /* convert double to fastf_t */
bn_rotate_bbox(sa->min_pt, sa->max_pt, mat, min, max);
}
@@ -1582,7 +1582,7 @@
NMG_CK_FACE_G_PLANE(fg);
NMG_CK_DISKMAGIC(d->magic, DISK_FACE_G_PLANE_MAGIC);
INDEXL_HD(d, fg, f_hd, fg->f_hd);
- bu_ntohd((unsigned char *)scan, d->N, ELEMENTS_PER_PLANE);
+ ntohd((unsigned char *)scan, d->N, ELEMENTS_PER_PLANE);
HMOVE(plane, scan); /* convert double to fastf_t */
bn_rotate_plane(fg->N, mat, plane);
}
@@ -1673,9 +1673,9 @@
d = &((struct disk_loop_g *)ip)[iindex];
NMG_CK_LOOP_G(lg);
NMG_CK_DISKMAGIC(d->magic, DISK_LOOP_G_MAGIC);
- bu_ntohd((unsigned char *)scanmin, d->min_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanmin, d->min_pt, ELEMENTS_PER_POINT);
VMOVE(min, scanmin); /* convert double to fastf_t */
- bu_ntohd((unsigned char *)scanmax, d->max_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanmax, d->max_pt, ELEMENTS_PER_POINT);
VMOVE(max, scanmax); /* convert double to fastf_t */
bn_rotate_bbox(lg->min_pt, lg->max_pt, mat, min, max);
}
@@ -1745,9 +1745,9 @@
NMG_CK_DISKMAGIC(d->magic, DISK_EDGE_G_LSEG_MAGIC);
/* Forw subscript points to edgeuse, not edgeuse2 */
INDEXL_HD2(d, eg, eu_hd2, eg->eu_hd2);
- bu_ntohd((unsigned char *)scanpt, d->e_pt, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)scanpt, d->e_pt, ELEMENTS_PER_POINT);
VMOVE(pt, scanpt); /* convert double to fastf_t */
- bu_ntohd((unsigned char *)scandir, d->e_dir, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)scandir, d->e_dir, ELEMENTS_PER_VECT);
VMOVE(dir, scandir); /* convert double to fastf_t */
MAT4X3PNT(eg->e_pt, mat, pt);
MAT4X3VEC(eg->e_dir, mat, dir);
@@ -1822,7 +1822,7 @@
d = &((struct disk_vertexuse_a_plane *)ip)[iindex];
NMG_CK_VERTEXUSE_A_PLANE(vua);
NMG_CK_DISKMAGIC(d->magic, DISK_VERTEXUSE_A_PLANE_MAGIC);
- bu_ntohd((unsigned char *)norm, d->N, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)norm, d->N, ELEMENTS_PER_VECT);
MAT4X3VEC(vua->N, mat, norm);
}
return 0;
@@ -1837,7 +1837,7 @@
NMG_CK_VERTEXUSE_A_CNURB(vua);
NMG_CK_DISKMAGIC(d->magic, DISK_VERTEXUSE_A_CNURB_MAGIC);
/* These parameters are invariant w.r.t. 'mat' */
- bu_ntohd((unsigned char *)scan, d->param, 3);
+ ntohd((unsigned char *)scan, d->param, 3);
VMOVE(vua->param, scan); /* convert double to fastf_t */
}
return 0;
@@ -1860,7 +1860,7 @@
d = &((struct disk_vertex_g *)ip)[iindex];
NMG_CK_VERTEX_G(vg);
NMG_CK_DISKMAGIC(d->magic, DISK_VERTEX_G_MAGIC);
- bu_ntohd((unsigned char *)pt, d->coord, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)pt, d->coord, ELEMENTS_PER_POINT);
MAT4X3PNT(vg->coord, mat, pt);
}
return 0;
Modified: brlcad/trunk/src/librt/primitives/part/part.c
===================================================================
--- brlcad/trunk/src/librt/primitives/part/part.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/part/part.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1471,10 +1471,10 @@
}
/* Convert from database to internal format */
- bu_ntohd((unsigned char *)v, rp->part.p_v, ELEMENTS_PER_POINT);
- bu_ntohd((unsigned char *)h, rp->part.p_h, ELEMENTS_PER_VECT);
- bu_ntohd((unsigned char *)&vrad, rp->part.p_vrad, 1);
- bu_ntohd((unsigned char *)&hrad, rp->part.p_hrad, 1);
+ ntohd((unsigned char *)v, rp->part.p_v, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)h, rp->part.p_h, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)&vrad, rp->part.p_vrad, 1);
+ ntohd((unsigned char *)&hrad, rp->part.p_hrad, 1);
RT_CK_DB_INTERNAL(ip);
ip->idb_major_type = DB5_MAJORTYPE_BRLCAD;
@@ -1571,10 +1571,10 @@
/* pip->part_type is not converted -- internal only */
rec->part.p_id = DBID_PARTICLE;
- bu_htond(rec->part.p_v, (unsigned char *)vert, ELEMENTS_PER_POINT);
- bu_htond(rec->part.p_h, (unsigned char *)hi, ELEMENTS_PER_VECT);
- bu_htond(rec->part.p_vrad, (unsigned char *)&vrad, 1);
- bu_htond(rec->part.p_hrad, (unsigned char *)&hrad, 1);
+ htond(rec->part.p_v, (unsigned char *)vert, ELEMENTS_PER_POINT);
+ htond(rec->part.p_h, (unsigned char *)hi, ELEMENTS_PER_VECT);
+ htond(rec->part.p_vrad, (unsigned char *)&vrad, 1);
+ htond(rec->part.p_hrad, (unsigned char *)&hrad, 1);
return 0;
}
@@ -1608,7 +1608,7 @@
part->part_magic = RT_PART_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 8);
+ ntohd((unsigned char *)vec, ep->ext_buf, 8);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1692,7 +1692,7 @@
/* !!! should make sure the values are proper (no negative radius) */
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 8);
+ htond(ep->ext_buf, (unsigned char *)vec, 8);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/pipe/pipe.c
===================================================================
--- brlcad/trunk/src/librt/primitives/pipe/pipe.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/pipe/pipe.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -3996,16 +3996,16 @@
mat = bn_mat_identity;
}
for (exp_pipept = &rp->pwr.pwr_data[pip->pipe_count - 1]; exp_pipept >= &rp->pwr.pwr_data[0]; exp_pipept--) {
- bu_ntohd((unsigned char *)&scan[0], exp_pipept->epp_id, 1);
+ ntohd((unsigned char *)&scan[0], exp_pipept->epp_id, 1);
tmp.pp_id = scan[0]; /* convert double to fastf_t */
- bu_ntohd((unsigned char *)&scan[1], exp_pipept->epp_od, 1);
+ ntohd((unsigned char *)&scan[1], exp_pipept->epp_od, 1);
tmp.pp_od = scan[1]; /* convert double to fastf_t */
- bu_ntohd((unsigned char *)&scan[2], exp_pipept->epp_bendradius, 1);
+ ntohd((unsigned char *)&scan[2], exp_pipept->epp_bendradius, 1);
tmp.pp_bendradius = scan[2]; /* convert double to fastf_t */
- bu_ntohd((unsigned char *)scan, exp_pipept->epp_coord, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)scan, exp_pipept->epp_coord, ELEMENTS_PER_VECT);
VMOVE(tmp.pp_coord, scan); /* convert double to fastf_t */
/* Apply modeling transformations */
@@ -4092,16 +4092,16 @@
VMOVE(scan, tmp.pp_coord); /* convert fastf_t to double */
- bu_htond(epp->epp_coord, (unsigned char *)scan, ELEMENTS_PER_POINT);
+ htond(epp->epp_coord, (unsigned char *)scan, ELEMENTS_PER_POINT);
scan[0] = tmp.pp_id; /* convert fastf_t to double */
- bu_htond(epp->epp_id, (unsigned char *)&scan[0], 1);
+ htond(epp->epp_id, (unsigned char *)&scan[0], 1);
scan[1] = tmp.pp_od; /* convert fastf_t to double */
- bu_htond(epp->epp_od, (unsigned char *)&scan[1], 1);
+ htond(epp->epp_od, (unsigned char *)&scan[1], 1);
scan[2] = tmp.pp_bendradius; /* convert fastf_t to double */
- bu_htond(epp->epp_bendradius, (unsigned char *)&scan[2], 1);
+ htond(epp->epp_bendradius, (unsigned char *)&scan[2], 1);
}
return 0;
@@ -4154,7 +4154,7 @@
vec = (double *)bu_malloc(byte_count, "rt_pipe_import5: vec");
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, (unsigned char *)ep->ext_buf + 4, double_count);
+ ntohd((unsigned char *)vec, (unsigned char *)ep->ext_buf + 4, double_count);
/*
* Walk the array of segments in reverse order, allocating a
@@ -4243,7 +4243,7 @@
}
/* Convert from internal (host) to database (network) format */
- bu_htond((unsigned char *)ep->ext_buf + 4, (unsigned char *)vec, double_count);
+ htond((unsigned char *)ep->ext_buf + 4, (unsigned char *)vec, double_count);
bu_free((genptr_t)vec, "rt_pipe_export5: vec");
return 0;
Modified: brlcad/trunk/src/librt/primitives/pnts/pnts.c
===================================================================
--- brlcad/trunk/src/librt/primitives/pnts/pnts.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/pnts/pnts.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -42,7 +42,7 @@
HIDDEN unsigned char *
pnts_pack_double(unsigned char *buf, unsigned char *data, unsigned int count)
{
- bu_htond(buf, data, count);
+ htond(buf, data, count);
buf += count * SIZEOF_NETWORK_DOUBLE;
return buf;
}
@@ -51,7 +51,7 @@
HIDDEN unsigned char *
pnts_unpack_double(unsigned char *buf, unsigned char *data, unsigned int count)
{
- bu_ntohd(data, buf, count);
+ ntohd(data, buf, count);
buf += count * SIZEOF_NETWORK_DOUBLE;
return buf;
}
@@ -135,7 +135,7 @@
buf = (unsigned char *)external->ext_buf;
scan = pnts->scale; /* convert fastf_t to double */
- bu_htond(buf, (unsigned char *)&scan, 1);
+ htond(buf, (unsigned char *)&scan, 1);
buf += SIZEOF_NETWORK_DOUBLE;
*(uint16_t *)buf = htons((unsigned short)pnts->type);
buf += SIZEOF_NETWORK_SHORT;
@@ -384,7 +384,7 @@
pnts->point = NULL;
/* unpack the header */
- bu_ntohd((unsigned char *)&scan, buf, 1);
+ ntohd((unsigned char *)&scan, buf, 1);
pnts->scale = scan; /* convert double to fastf_t */
buf += SIZEOF_NETWORK_DOUBLE;
pnts->type = (rt_pnt_type)ntohs(*(uint16_t *)buf);
Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c
===================================================================
--- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1543,7 +1543,7 @@
rip->skt = (struct rt_sketch_internal *)tmp_ip.idb_ptr;
}
- bu_ntohd((unsigned char *)&vv, (unsigned char *)ep->ext_buf, ELEMENTS_PER_VECT*3 + 1);
+ ntohd((unsigned char *)&vv, (unsigned char *)ep->ext_buf, ELEMENTS_PER_VECT*3 + 1);
/* Apply the modeling transformation */
if (mat == NULL) mat = bn_mat_identity;
@@ -1674,7 +1674,7 @@
VSCALE(&vec[2*3], rip->r, local2mm);
vec[9] = rip->ang;
- bu_htond(ptr, (unsigned char *)vec, ELEMENTS_PER_VECT*3 + 1);
+ htond(ptr, (unsigned char *)vec, ELEMENTS_PER_VECT*3 + 1);
ptr += (ELEMENTS_PER_VECT*3 + 1) * SIZEOF_NETWORK_DOUBLE;
bu_strlcpy((char *)ptr, bu_vls_addr(&rip->sketch_name), bu_vls_strlen(&rip->sketch_name) + 1);
Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c
===================================================================
--- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1620,7 +1620,7 @@
xip->rhc_magic = RT_RHC_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 11);
+ ntohd((unsigned char *)vec, ep->ext_buf, 11);
/* Apply modeling transformations */
if (mat == NULL) {
@@ -1683,7 +1683,7 @@
vec[3 * 3 + 1] = xip->rhc_c * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 11);
+ htond(ep->ext_buf, (unsigned char *)vec, 11);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c
===================================================================
--- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1476,7 +1476,7 @@
xip->rpc_magic = RT_RPC_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, 10);
+ ntohd((unsigned char *)vec, ep->ext_buf, 10);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1541,7 +1541,7 @@
vec[3*3] = xip->rpc_r * local2mm;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 10);
+ htond(ep->ext_buf, (unsigned char *)vec, 10);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/sketch/sketch.c
===================================================================
--- brlcad/trunk/src/librt/primitives/sketch/sketch.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/sketch/sketch.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -995,11 +995,11 @@
sketch_ip->magic = RT_SKETCH_INTERNAL_MAGIC;
if (mat == NULL) mat = bn_mat_identity;
- bu_ntohd((unsigned char *)v, rp->skt.skt_V, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)v, rp->skt.skt_V, ELEMENTS_PER_VECT);
MAT4X3PNT(sketch_ip->V, mat, v);
- bu_ntohd((unsigned char *)v, rp->skt.skt_uvec, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)v, rp->skt.skt_uvec, ELEMENTS_PER_VECT);
MAT4X3VEC(sketch_ip->u_vec, mat, v);
- bu_ntohd((unsigned char *)v, rp->skt.skt_vvec, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)v, rp->skt.skt_vvec, ELEMENTS_PER_VECT);
MAT4X3VEC(sketch_ip->v_vec, mat, v);
sketch_ip->vert_count = ntohl(*(uint32_t *)rp->skt.skt_vert_count);
sketch_ip->curve.count = ntohl(*(uint32_t *)rp->skt.skt_count);
@@ -1009,7 +1009,7 @@
if (sketch_ip->vert_count) {
sketch_ip->verts = (point2d_t *)bu_calloc(sketch_ip->vert_count, sizeof(point2d_t), "sketch_ip->vert");
vp = (double *)bu_calloc(sketch_ip->vert_count, sizeof(double)*ELEMENTS_PER_VECT2D, "vp");
- bu_ntohd((unsigned char *)vp, ptr, sketch_ip->vert_count*ELEMENTS_PER_VECT2D);
+ ntohd((unsigned char *)vp, ptr, sketch_ip->vert_count*ELEMENTS_PER_VECT2D);
/* convert double to fastf_t */
for (i=0; i<sketch_ip->vert_count; i++) {
@@ -1059,7 +1059,7 @@
ptr += SIZEOF_NETWORK_LONG;
csg->center_is_left = ntohl(*(uint32_t *)ptr);
ptr += SIZEOF_NETWORK_LONG;
- bu_ntohd((unsigned char *)&scan, ptr, 1);
+ ntohd((unsigned char *)&scan, ptr, 1);
csg->radius = scan; /* convert double to fastf_t */
ptr += SIZEOF_NETWORK_DOUBLE;
sketch_ip->curve.segment[seg_no] = (genptr_t)csg;
@@ -1076,7 +1076,7 @@
nsg->k.knots = (fastf_t *)bu_malloc(nsg->k.k_size * sizeof(fastf_t), "nsg->k.knots");
scanp = (double *)bu_malloc(nsg->k.k_size * sizeof(double), "scanp");
- bu_ntohd((unsigned char *)scanp, ptr, nsg->k.k_size);
+ ntohd((unsigned char *)scanp, ptr, nsg->k.k_size);
/* convert double to fastf_t */
for (i=0; i<(size_t)nsg->k.k_size; i++) {
@@ -1095,7 +1095,7 @@
if (RT_NURB_IS_PT_RATIONAL(nsg->pt_type)) {
nsg->weights = (fastf_t *)bu_malloc(nsg->c_size * sizeof(fastf_t), "nsg->weights");
scanp = (double *)bu_malloc(nsg->c_size * sizeof(double), "scanp");
- bu_ntohd((unsigned char *)scanp, ptr, nsg->c_size);
+ ntohd((unsigned char *)scanp, ptr, nsg->c_size);
/* convert double to fastf_t */
for (i=0; i<(size_t)nsg->k.k_size; i++) {
@@ -1219,13 +1219,13 @@
* to database record format
*/
VSCALE(tmp_vec, sketch_ip->V, local2mm);
- bu_htond(rec->skt.skt_V, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->skt.skt_V, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
/* uvec and uvec are unit vectors, do not convert to/from mm */
VMOVE(tmp_vec, sketch_ip->u_vec); /* convert fastf_t to double */
- bu_htond(rec->skt.skt_uvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->skt.skt_uvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
VMOVE(tmp_vec, sketch_ip->v_vec); /* convert fastf_t to double */
- bu_htond(rec->skt.skt_vvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(rec->skt.skt_vvec, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
*(uint32_t *)rec->skt.skt_vert_count = htonl(sketch_ip->vert_count);
*(uint32_t *)rec->skt.skt_count = htonl(sketch_ip->curve.count);
@@ -1239,7 +1239,7 @@
double pt2d[ELEMENTS_PER_VECT2D];
V2SCALE(pt2d, sketch_ip->verts[i], local2mm);
- bu_htond(ptr, (const unsigned char *)pt2d, ELEMENTS_PER_VECT2D);
+ htond(ptr, (const unsigned char *)pt2d, ELEMENTS_PER_VECT2D);
ptr += 16;
}
@@ -1279,7 +1279,7 @@
*(uint32_t *)ptr = htonl(cseg->center_is_left);
ptr += SIZEOF_NETWORK_LONG;
tmp_fastf = cseg->radius * local2mm;
- bu_htond(ptr, (unsigned char *)&tmp_fastf, 1);
+ htond(ptr, (unsigned char *)&tmp_fastf, 1);
ptr += SIZEOF_NETWORK_DOUBLE;
break;
case CURVE_NURB_MAGIC:
@@ -1297,7 +1297,7 @@
for (i=0; i<(size_t)nseg->k.k_size; i++) {
scanp[i] = nseg->k.knots[i];
}
- bu_htond(ptr, (const unsigned char *)scanp, nseg->k.k_size);
+ htond(ptr, (const unsigned char *)scanp, nseg->k.k_size);
bu_free(scanp, "scanp");
ptr += nseg->k.k_size * 8;
*(uint32_t *)ptr = htonl(nseg->c_size);
@@ -1312,7 +1312,7 @@
for (i=0; i<(size_t)nseg->c_size; i++) {
scanp[i] = nseg->weights[i];
}
- bu_htond(ptr, (const unsigned char *)scanp, nseg->c_size);
+ htond(ptr, (const unsigned char *)scanp, nseg->c_size);
bu_free(scanp, "scanp");
ptr += SIZEOF_NETWORK_DOUBLE * nseg->c_size;
}
@@ -1386,13 +1386,13 @@
ptr = ep->ext_buf;
if (mat == NULL) mat = bn_mat_identity;
- bu_ntohd((unsigned char *)v, ptr, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)v, ptr, ELEMENTS_PER_VECT);
MAT4X3PNT(sketch_ip->V, mat, v);
ptr += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_VECT;
- bu_ntohd((unsigned char *)v, ptr, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)v, ptr, ELEMENTS_PER_VECT);
MAT4X3VEC(sketch_ip->u_vec, mat, v);
ptr += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_VECT;
- bu_ntohd((unsigned char *)v, ptr, ELEMENTS_PER_VECT);
+ ntohd((unsigned char *)v, ptr, ELEMENTS_PER_VECT);
MAT4X3VEC(sketch_ip->v_vec, mat, v);
ptr += SIZEOF_NETWORK_DOUBLE * ELEMENTS_PER_VECT;
sketch_ip->vert_count = ntohl(*(uint32_t *)ptr);
@@ -1403,7 +1403,7 @@
if (sketch_ip->vert_count) {
sketch_ip->verts = (point2d_t *)bu_calloc(sketch_ip->vert_count, sizeof(point2d_t), "sketch_ip->vert");
vp = (double *)bu_calloc(sketch_ip->vert_count, sizeof(double)*ELEMENTS_PER_VECT2D, "vp");
- bu_ntohd((unsigned char *)vp, ptr, sketch_ip->vert_count*2);
+ ntohd((unsigned char *)vp, ptr, sketch_ip->vert_count*2);
/* convert double to fastf_t */
for (i=0; i<sketch_ip->vert_count; i++) {
@@ -1453,7 +1453,7 @@
ptr += SIZEOF_NETWORK_LONG;
csg->center_is_left = ntohl(*(uint32_t *)ptr);
ptr += SIZEOF_NETWORK_LONG;
- bu_ntohd((unsigned char *)&scan, ptr, 1);
+ ntohd((unsigned char *)&scan, ptr, 1);
csg->radius = scan; /* double to fastf_t */
ptr += SIZEOF_NETWORK_DOUBLE;
sketch_ip->curve.segment[seg_no] = (genptr_t)csg;
@@ -1470,7 +1470,7 @@
nsg->k.knots = (fastf_t *)bu_malloc(nsg->k.k_size * sizeof(fastf_t), "nsg->k.knots");
scanp = (double *)bu_malloc(nsg->k.k_size * sizeof(double), "scanp");
- bu_ntohd((unsigned char *)scanp, ptr, nsg->k.k_size);
+ ntohd((unsigned char *)scanp, ptr, nsg->k.k_size);
/* convert double to fastf_t */
for (i=0; i<(size_t)nsg->k.k_size; i++) {
@@ -1489,7 +1489,7 @@
if (RT_NURB_IS_PT_RATIONAL(nsg->pt_type)) {
nsg->weights = (fastf_t *)bu_malloc(nsg->c_size * sizeof(fastf_t), "nsg->weights");
scanp = (double *)bu_malloc(nsg->c_size * sizeof(double), "scanp");
- bu_ntohd((unsigned char *)scanp, ptr, nsg->c_size);
+ ntohd((unsigned char *)scanp, ptr, nsg->c_size);
/* convert double to fastf_t */
for (i=0; i<(size_t)nsg->k.k_size; i++) {
@@ -1621,15 +1621,15 @@
/* scale and export */
VSCALE(tmp_vec, sketch_ip->V, local2mm);
- bu_htond(cp, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(cp, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
cp += ELEMENTS_PER_VECT * SIZEOF_NETWORK_DOUBLE;
/* uvec and uvec are unit vectors, do not convert to/from mm */
VMOVE(tmp_vec, sketch_ip->u_vec); /* convert fastf_t to double */
- bu_htond(cp, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(cp, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
cp += ELEMENTS_PER_VECT * SIZEOF_NETWORK_DOUBLE;
VMOVE(tmp_vec, sketch_ip->v_vec); /* convert fastf_t to double */
- bu_htond(cp, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
+ htond(cp, (unsigned char *)tmp_vec, ELEMENTS_PER_VECT);
cp += ELEMENTS_PER_VECT * SIZEOF_NETWORK_DOUBLE;
*(uint32_t *)cp = htonl(sketch_ip->vert_count);
@@ -1643,7 +1643,7 @@
double pt2d[ELEMENTS_PER_VECT2D];
V2SCALE(pt2d, sketch_ip->verts[i], local2mm);
- bu_htond(cp, (const unsigned char *)pt2d, ELEMENTS_PER_VECT2D);
+ htond(cp, (const unsigned char *)pt2d, ELEMENTS_PER_VECT2D);
cp += 2 * SIZEOF_NETWORK_DOUBLE;
}
@@ -1683,7 +1683,7 @@
*(uint32_t *)cp = htonl(cseg->center_is_left);
cp += SIZEOF_NETWORK_LONG;
scan = cseg->radius * local2mm;
- bu_htond(cp, (unsigned char *)&scan, 1);
+ htond(cp, (unsigned char *)&scan, 1);
cp += SIZEOF_NETWORK_DOUBLE;
break;
case CURVE_NURB_MAGIC:
@@ -1701,7 +1701,7 @@
for (i=0; i<(size_t)nseg->k.k_size; i++) {
scanp[i] = nseg->k.knots[i];
}
- bu_htond(cp, (const unsigned char *)nseg->k.knots, nseg->k.k_size);
+ htond(cp, (const unsigned char *)nseg->k.knots, nseg->k.k_size);
bu_free(scanp, "scanp");
cp += nseg->k.k_size * SIZEOF_NETWORK_DOUBLE;
*(uint32_t *)cp = htonl(nseg->c_size);
@@ -1716,7 +1716,7 @@
for (i=0; i<(size_t)nseg->c_size; i++) {
scanp[i] = nseg->weights[i];
}
- bu_htond(cp, (const unsigned char *)scanp, nseg->c_size);
+ htond(cp, (const unsigned char *)scanp, nseg->c_size);
bu_free(scanp, "scanp");
cp += SIZEOF_NETWORK_DOUBLE * nseg->c_size;
}
Modified: brlcad/trunk/src/librt/primitives/superell/superell.c
===================================================================
--- brlcad/trunk/src/librt/primitives/superell/superell.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/superell/superell.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -921,7 +921,7 @@
eip->magic = RT_SUPERELL_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, ELEMENTS_PER_VECT*4 + 2);
+ ntohd((unsigned char *)vec, ep->ext_buf, ELEMENTS_PER_VECT*4 + 2);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -974,7 +974,7 @@
vec[4*ELEMENTS_PER_VECT + 1] = eip->e;
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*4 + 2);
+ htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*4 + 2);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c
===================================================================
--- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1707,7 +1707,7 @@
tip->magic = RT_TGC_INTERNAL_MAGIC;
/* Convert from database (network) to internal (host) format */
- bu_ntohd((unsigned char *)vec, ep->ext_buf, ELEMENTS_PER_VECT*6);
+ ntohd((unsigned char *)vec, ep->ext_buf, ELEMENTS_PER_VECT*6);
/* Apply modeling transformations */
if (mat == NULL) mat = bn_mat_identity;
@@ -1753,7 +1753,7 @@
VSCALE(&vec[5*ELEMENTS_PER_VECT], tip->d, local2mm);
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*6);
+ htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT*6);
return 0;
}
Modified: brlcad/trunk/src/librt/primitives/tor/tor.c
===================================================================
--- brlcad/trunk/src/librt/primitives/tor/tor.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/tor/tor.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -1503,7 +1503,7 @@
vec[2*3+1] = tip->r_h*local2mm; /* r2 */
/* convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, 2*3+2);
+ htond(ep->ext_buf, (unsigned char *)vec, 2*3+2);
return 0;
}
@@ -1644,7 +1644,7 @@
tip = (struct rt_tor_internal *)ip->idb_ptr;
tip->magic = RT_TOR_INTERNAL_MAGIC;
- bu_ntohd((unsigned char *)&rec, ep->ext_buf, 2*3+2);
+ ntohd((unsigned char *)&rec, ep->ext_buf, 2*3+2);
/* Apply modeling transformations */
MAT4X3PNT(tip->v, mat, rec.v);
Modified: brlcad/trunk/src/librt/primitives/xxx/xxx.c
===================================================================
--- brlcad/trunk/src/librt/primitives/xxx/xxx.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/primitives/xxx/xxx.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -318,7 +318,7 @@
* conversion from network data (Big Endian ints, IEEE double
* floating point) to host local data representations.
*/
- bu_ntohd((unsigned char *)&vv, (unsigned char *)ep->ext_buf, ELEMENTS_PER_VECT*1);
+ ntohd((unsigned char *)&vv, (unsigned char *)ep->ext_buf, ELEMENTS_PER_VECT*1);
/* Apply the modeling transformation */
if (mat == NULL) mat = bn_mat_identity;
@@ -362,7 +362,7 @@
VSCALE(vec, xxx_ip->v, local2mm);
/* Convert from internal (host) to database (network) format */
- bu_htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT);
+ htond(ep->ext_buf, (unsigned char *)vec, ELEMENTS_PER_VECT);
return 0;
}
Modified: brlcad/trunk/src/librt/vlist.c
===================================================================
--- brlcad/trunk/src/librt/vlist.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librt/vlist.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -353,7 +353,7 @@
for (i = 0; i < nused; i++) {
VMOVE(point, pt[i]); /* convert fastf_t to double */
- bu_htond(bp, (unsigned char *)point, ELEMENTS_PER_VECT);
+ htond(bp, (unsigned char *)point, ELEMENTS_PER_VECT);
bp += ELEMENTS_PER_VECT*SIZEOF_NETWORK_DOUBLE;
}
}
@@ -387,7 +387,7 @@
int cmd;
cmd = *bp++;
- bu_ntohd((unsigned char *)point, pp, ELEMENTS_PER_POINT);
+ ntohd((unsigned char *)point, pp, ELEMENTS_PER_POINT);
pp += ELEMENTS_PER_POINT*SIZEOF_NETWORK_DOUBLE;
BN_ADD_VLIST(&rt_g.rtg_vlfree, hp, point, cmd);
}
@@ -565,7 +565,7 @@
ret = fread(inbuf, SIZEOF_NETWORK_DOUBLE, 1, fp);
if (ret != 1)
bu_log("WARNING: uplot read failure\n");
- bu_ntohd((unsigned char *)&scan, (unsigned char *)inbuf, 1);
+ ntohd((unsigned char *)&scan, (unsigned char *)inbuf, 1);
arg[i] = scan; /* convert double to fastf_t */
break;
}
Modified: brlcad/trunk/src/librtserver/rtserver.c
===================================================================
--- brlcad/trunk/src/librtserver/rtserver.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librtserver/rtserver.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -631,16 +631,16 @@
/* write partition info to the byte array */
/* start with entrance point */
- bu_htond(buffer, (unsigned char *)pp->pt_inhit->hit_point, 3);
+ htond(buffer, (unsigned char *)pp->pt_inhit->hit_point, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* next exit point */
- bu_htond(buffer, (unsigned char *)pp->pt_outhit->hit_point, 3);
+ htond(buffer, (unsigned char *)pp->pt_outhit->hit_point, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* next entrance surface normal vector */
- bu_htond(buffer, (unsigned char *)enterNormal, 3);
+ htond(buffer, (unsigned char *)enterNormal, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* next entrance surface normal vector */
- bu_htond(buffer, (unsigned char *)exitNormal, 3);
+ htond(buffer, (unsigned char *)exitNormal, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* calculate the entrance and exit obliquities */
@@ -673,8 +673,8 @@
}
/* write obliquities to the buffer */
- bu_htond( buffer, (unsigned char *)&inObl, 1 );
- bu_htond( &buffer[SIZEOF_NETWORK_DOUBLE], (unsigned char *)&outObl, 1);
+ htond( buffer, (unsigned char *)&inObl, 1 );
+ htond( &buffer[SIZEOF_NETWORK_DOUBLE], (unsigned char *)&outObl, 1);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*2);
/* get the region index from the hash table */
@@ -711,7 +711,7 @@
/* write the MUVEStoORCA matrix elements (if any) */
for ( i = 0; i < matrixSize*matrixSize; ++i ) {
double value = (double)inv_mat[i];
- bu_htond(buffer, (unsigned char *)&value, 1);
+ htond(buffer, (unsigned char *)&value, 1);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE);
}
@@ -757,27 +757,27 @@
double outObl;
int regionIndex;
- bu_ntohd((unsigned char *)enterPt, c, 3);
+ ntohd((unsigned char *)enterPt, c, 3);
bu_log("\t\tenter hit at (%g %g %g)\n", V3ARGS(enterPt));
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char *)exitPt, c, 3);
+ ntohd((unsigned char *)exitPt, c, 3);
bu_log("\t\texit hit at (%g %g %g)\n", V3ARGS(exitPt));
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char *)enterNorm, c, 3);
+ ntohd((unsigned char *)enterNorm, c, 3);
bu_log("\t\tenter normal: (%g %g %g)\n", V3ARGS(enterNorm));
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char *)exitNorm, c, 3);
+ ntohd((unsigned char *)exitNorm, c, 3);
bu_log("\t\texit normal; (%g %g %g)\n", V3ARGS(exitNorm));
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char*)&inObl, c, 1);
+ ntohd((unsigned char*)&inObl, c, 1);
bu_log("\t\tenter obliquity: %g\n", inObl);
c += SIZEOF_NETWORK_DOUBLE;
- bu_ntohd((unsigned char*)&outObl, c, 1);
+ ntohd((unsigned char*)&outObl, c, 1);
bu_log("\t\tenter obliquity: %g\n", outObl);
c += SIZEOF_NETWORK_DOUBLE;
@@ -1309,9 +1309,9 @@
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_LONG);
/* write this ray info to the byte array */
- bu_htond(buffer, (unsigned char *)ap->a_ray.r_pt, 3);
+ htond(buffer, (unsigned char *)ap->a_ray.r_pt, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
- bu_htond(buffer, (unsigned char *)ap->a_ray.r_dir, 3);
+ htond(buffer, (unsigned char *)ap->a_ray.r_dir, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* shoot the ray */
@@ -1523,9 +1523,9 @@
}
/* write this ray info to the byte array */
- bu_htond(buffer, (unsigned char *)ap->a_ray.r_pt, 3);
+ htond(buffer, (unsigned char *)ap->a_ray.r_pt, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
- bu_htond(buffer, (unsigned char *)ap->a_ray.r_dir, 3);
+ htond(buffer, (unsigned char *)ap->a_ray.r_dir, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* shoot the ray */
@@ -1763,9 +1763,9 @@
VJOIN2( ap->a_ray.r_pt, base_pt, (double)row, row_dir, (double)col, col_dir );
/* write this ray info to the byte array */
- bu_htond(buffer, (unsigned char *)ap->a_ray.r_pt, 3);
+ htond(buffer, (unsigned char *)ap->a_ray.r_pt, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
- bu_htond(buffer, (unsigned char *)ap->a_ray.r_dir, 3);
+ htond(buffer, (unsigned char *)ap->a_ray.r_dir, 3);
bu_vlb_write(vlb, buffer, SIZEOF_NETWORK_DOUBLE*3);
/* finally, shoot this ray */
Modified: brlcad/trunk/src/librtserver/rtserverTest.c
===================================================================
--- brlcad/trunk/src/librtserver/rtserverTest.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/librtserver/rtserverTest.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -101,22 +101,22 @@
double outObl;
/* UNUSED: int regionIndex; */
- bu_ntohd((unsigned char *)enterPt, c, 3);
+ ntohd((unsigned char *)enterPt, c, 3);
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char *)exitPt, c, 3);
+ ntohd((unsigned char *)exitPt, c, 3);
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char *)enterNorm, c, 3);
+ ntohd((unsigned char *)enterNorm, c, 3);
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char *)exitNorm, c, 3);
+ ntohd((unsigned char *)exitNorm, c, 3);
c += SIZEOF_NETWORK_DOUBLE * 3;
- bu_ntohd((unsigned char*)&inObl, c, 1);
+ ntohd((unsigned char*)&inObl, c, 1);
c += SIZEOF_NETWORK_DOUBLE;
- bu_ntohd((unsigned char*)&outObl, c, 1);
+ ntohd((unsigned char*)&outObl, c, 1);
c += SIZEOF_NETWORK_DOUBLE;
/* UNUSED: regionIndex = BU_GLONG(c); */
Modified: brlcad/trunk/src/rt/view.c
===================================================================
--- brlcad/trunk/src/rt/view.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/rt/view.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -205,7 +205,7 @@
if (rpt_dist)
- bu_htond(dist, (unsigned char *)&(ap->a_dist), 1);
+ htond(dist, (unsigned char *)&(ap->a_dist), 1);
if (ap->a_user == 0) {
/* Shot missed the model, don't dither */
Modified: brlcad/trunk/src/util/double-asc.c
===================================================================
--- brlcad/trunk/src/util/double-asc.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/double-asc.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -195,7 +195,7 @@
for (line_nm = 0; line_nm < l_per_b; ++line_nm) {
if (make_cells)
printf("%d %d", col, row);
- bu_ntohd((unsigned char *)value, bp, d_per_l);
+ ntohd((unsigned char *)value, bp, d_per_l);
bp += d_per_l * 8;
for (i = 0; i < d_per_l; ++i)
printf(format, value[i]);
Modified: brlcad/trunk/src/util/pl-X.c
===================================================================
--- brlcad/trunk/src/util/pl-X.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/pl-X.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -179,7 +179,7 @@
ret = fread(in, 8, 1, stdin);
if (ret != 1)
perror("fread");
- bu_ntohd((unsigned char *)&d, in, 1);
+ ntohd((unsigned char *)&d, in, 1);
return d;
}
Modified: brlcad/trunk/src/util/pl-asc.c
===================================================================
--- brlcad/trunk/src/util/pl-asc.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/pl-asc.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -270,7 +270,7 @@
if (ret < (size_t)n)
perror("fread");
- bu_ntohd((unsigned char *)out, (unsigned char *)in, n);
+ ntohd((unsigned char *)out, (unsigned char *)in, n);
for (i = 0; i < n; i++) {
if (i != 0)
Modified: brlcad/trunk/src/util/pl-pl.c
===================================================================
--- brlcad/trunk/src/util/pl-pl.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/pl-pl.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -380,7 +380,7 @@
if (ret < 1)
perror("fread");
- bu_ntohd((unsigned char *)&d, (unsigned char *)in, 1);
+ ntohd((unsigned char *)&d, (unsigned char *)in, 1);
return d;
}
@@ -484,7 +484,7 @@
unsigned char out[8];
size_t ret;
- bu_htond(out, (unsigned char *)&d, 1);
+ htond(out, (unsigned char *)&d, 1);
ret = fwrite(out, 1, 8, stdout);
if (ret < 8)
perror("fwrite");
Modified: brlcad/trunk/src/util/pl-ps.c
===================================================================
--- brlcad/trunk/src/util/pl-ps.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/pl-ps.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -175,7 +175,7 @@
if (ret < 1)
perror("fread");
- bu_ntohd((unsigned char *)&d, in, 1);
+ ntohd((unsigned char *)&d, in, 1);
return d;
}
Modified: brlcad/trunk/src/util/pl-tek.c
===================================================================
--- brlcad/trunk/src/util/pl-tek.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/pl-tek.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -176,7 +176,7 @@
if (ret < 1)
perror("fread");
- bu_ntohd((unsigned char *)&d, in, 1);
+ ntohd((unsigned char *)&d, in, 1);
return d;
}
Modified: brlcad/trunk/src/util/pldebug.c
===================================================================
--- brlcad/trunk/src/util/pldebug.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/pldebug.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -196,7 +196,7 @@
if (ret < (size_t)n)
perror("fread");
- bu_ntohd((unsigned char *)out, in, n);
+ ntohd((unsigned char *)out, in, n);
putchar('(');
for (i = 0; i < n; i++) {
Modified: brlcad/trunk/src/util/plrot.c
===================================================================
--- brlcad/trunk/src/util/plrot.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/plrot.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -600,12 +600,12 @@
if (ret < 2*8)
perror("fread");
- bu_ntohd((unsigned char *)p1, buf, 2);
+ ntohd((unsigned char *)p1, buf, 2);
p1[2] = 0; /* no Z */
MAT4X3PNT(p2, m, p1);
- bu_htond(buf, (unsigned char *)p2, 3);
+ htond(buf, (unsigned char *)p2, 3);
ret = fwrite(buf, 1, 3*8, stdout);
if (ret < 3*8)
perror("fwrite");
@@ -624,11 +624,11 @@
if (ret < 3*8)
perror("fread");
- bu_ntohd((unsigned char *)p1, buf, 3);
+ ntohd((unsigned char *)p1, buf, 3);
MAT4X3PNT(p2, m, p1);
- bu_htond(buf, (unsigned char *)p2, 3);
+ htond(buf, (unsigned char *)p2, 3);
ret = fwrite(buf, 1, 3*8, stdout);
if (ret < 3*8)
perror("fwrite");
@@ -646,7 +646,7 @@
if (ret < 1)
perror("fread");
- bu_ntohd((unsigned char *)&d, buf, 1);
+ ntohd((unsigned char *)&d, buf, 1);
return d;
}
Modified: brlcad/trunk/src/util/plstat.c
===================================================================
--- brlcad/trunk/src/util/plstat.c 2013-05-14 01:16:42 UTC (rev 55408)
+++ brlcad/trunk/src/util/plstat.c 2013-05-14 02:04:34 UTC (rev 55409)
@@ -259,7 +259,7 @@
if (ret < (size_t)n)
perror("fread");
- bu_ntohd((unsigned char *)out, in, n);
+ ntohd((unsigned char *)out, in, n);
for (i = 0; i < n; i++) {
/*printf("%g", out[i]);*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|