[brlcad-commits] SF.net SVN: brlcad:[42432] brlcad/trunk/doc/deprecation.txt

2011-01-19 Thread brlcad
Revision: 42432
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42432view=rev
Author:   brlcad
Date: 2011-01-19 08:07:30 + (Wed, 19 Jan 2011)

Log Message:
---
renamed db_get_version() to db_version() as a minimally impacting change.

Modified Paths:
--
brlcad/trunk/doc/deprecation.txt

Modified: brlcad/trunk/doc/deprecation.txt
===
--- brlcad/trunk/doc/deprecation.txt2011-01-19 07:59:11 UTC (rev 42431)
+++ brlcad/trunk/doc/deprecation.txt2011-01-19 08:07:30 UTC (rev 42432)
@@ -324,6 +324,8 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+s/db_get_version(/db_version(/g
+db_get_version() renamed to db_version() [7.18]
 s/VAPPROXEQUAL(/VNEAR_EQUAL(/g
 VAPPROXEQUAL() renamed to VNEAR_EQUAL() [7.18]
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42433] brlcad/trunk

2011-01-19 Thread brlcad
Revision: 42433
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42433view=rev
Author:   brlcad
Date: 2011-01-19 08:09:57 + (Wed, 19 Jan 2011)

Log Message:
---
rename db_get_directory_size() to just db_directory_size() for similar 
motivations.  there is no corresponding put routine, so simplify.

Modified Paths:
--
brlcad/trunk/doc/deprecation.txt
brlcad/trunk/include/raytrace.h
brlcad/trunk/src/libged/ged_private.h
brlcad/trunk/src/libged/ls.c
brlcad/trunk/src/libged/wdb_obj.c
brlcad/trunk/src/librt/db_lookup.c

Modified: brlcad/trunk/doc/deprecation.txt
===
--- brlcad/trunk/doc/deprecation.txt2011-01-19 08:07:30 UTC (rev 42432)
+++ brlcad/trunk/doc/deprecation.txt2011-01-19 08:09:57 UTC (rev 42433)
@@ -324,6 +324,8 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+s/db_get_directory_size(/db_directory_size(/g
+db_get_directory_size() renamed to db_directory_size() [7.18]
 s/db_get_version(/db_version(/g
 db_get_version() renamed to db_version() [7.18]
 s/VAPPROXEQUAL(/VNEAR_EQUAL(/g

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:07:30 UTC (rev 42432)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:09:57 UTC (rev 42433)
@@ -3065,8 +3065,15 @@
 struct db_i*dbip));
 
 /* db_lookup.c */
-RT_EXPORT BU_EXTERN(int db_get_directory_size,
-   (const struct db_i  *dbip));
+
+/**
+ * D B _ D I R E C T O R Y _ S I Z E
+ *
+ * Return the number of struct directory nodes in the given
+ * database.
+ */
+RT_EXPORT BU_EXTERN(size_t db_directory_size, (const struct db_i *dbip));
+
 RT_EXPORT BU_EXTERN(void db_ck_directory,
(const struct db_i *dbip));
 

Modified: brlcad/trunk/src/libged/ged_private.h
===
--- brlcad/trunk/src/libged/ged_private.h   2011-01-19 08:07:30 UTC (rev 
42432)
+++ brlcad/trunk/src/libged/ged_private.h   2011-01-19 08:09:57 UTC (rev 
42433)
@@ -282,7 +282,7 @@
   int no_decorate));
 BU_EXTERN(struct directory ** _ged_getspace,
  (struct db_i *dbip,
-  int num_entries));
+  size_t num_entries));
 
 /* defined in preview.c */
 BU_EXTERN (void _ged_setup_rt,

Modified: brlcad/trunk/src/libged/ls.c
===
--- brlcad/trunk/src/libged/ls.c2011-01-19 08:07:30 UTC (rev 42432)
+++ brlcad/trunk/src/libged/ls.c2011-01-19 08:09:57 UTC (rev 42433)
@@ -42,29 +42,21 @@
  * G E D _ G E T S P A C E
  *
  * This routine walks through the directory entry list and mallocs
- * enough space for pointers to hold:
+ * enough space for pointers to hold the number of entries specified
+ * by the argument if  0.
  *
- * a) all of the entries if called with an argument of 0, or
- * b) the number of entries specified by the argument if  0.
- *
  */
 struct directory **
 _ged_getspace(struct db_i *dbip,
- int num_entries)
+ size_t num_entries)
 {
 struct directory **dir_basep;
 
-if (num_entries  0) {
-   bu_log(_ged_getspace: was passed %d, used 0\n,
-  num_entries);
-   num_entries = 0;
-}
+if (num_entries == 0)
+   num_entries = db_directory_size(dbip);
 
-if (num_entries == 0) num_entries = db_get_directory_size(dbip);
-
 /* Allocate and cast num_entries worth of pointers */
-dir_basep = (struct directory **) bu_malloc((num_entries+1) * 
sizeof(struct directory *),
-   _ged_getspace *dir[]);
+dir_basep = (struct directory **) bu_calloc((num_entries+1), sizeof(struct 
directory *), _ged_getspace *dir[]);
 return dir_basep;
 }
 

Modified: brlcad/trunk/src/libged/wdb_obj.c
===
--- brlcad/trunk/src/libged/wdb_obj.c   2011-01-19 08:07:30 UTC (rev 42432)
+++ brlcad/trunk/src/libged/wdb_obj.c   2011-01-19 08:09:57 UTC (rev 42433)
@@ -273,7 +273,7 @@
 void wdb_vls_long_dpp(struct bu_vls *vls, struct directory **list_of_names, 
int num_in_list, int aflag, int cflag, int rflag, int sflag);
 void wdb_vls_line_dpp(struct bu_vls *vls, struct directory **list_of_names, 
int num_in_list, int aflag, int cflag, int rflag, int sflag);
 void wdb_do_list(struct db_i *dbip, Tcl_Interp *interp, struct bu_vls 
*outstrp, struct directory *dp, int verbose);
-struct directory ** wdb_getspace(struct db_i *dbip, int num_entries);
+struct directory ** wdb_getspace(struct db_i *dbip, size_t num_entries);
 struct directory *wdb_combadd(Tcl_Interp *interp, struct db_i *dbip, struct 
directory *objp, char *combname, int region_flag, int relation, int ident, int 
air, struct rt_wdb 

[brlcad-commits] SF.net SVN: brlcad:[42434] brlcad/trunk

2011-01-19 Thread brlcad
Revision: 42434
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42434view=rev
Author:   brlcad
Date: 2011-01-19 08:27:37 + (Wed, 19 Jan 2011)

Log Message:
---
db_get_directory() renamed to db_alloc_directory() to be a little more 
consistent with other (non-macro) routines that don't do much except allocate 
memory.

Modified Paths:
--
brlcad/trunk/doc/deprecation.txt
brlcad/trunk/include/raytrace.h
brlcad/trunk/src/librt/db_lookup.c

Modified: brlcad/trunk/doc/deprecation.txt
===
--- brlcad/trunk/doc/deprecation.txt2011-01-19 08:09:57 UTC (rev 42433)
+++ brlcad/trunk/doc/deprecation.txt2011-01-19 08:27:37 UTC (rev 42434)
@@ -324,6 +324,8 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+s/db_get_directory(/db_alloc_directory(/g
+db_get_directory() renamed to db_alloc_directory() [7.18]
 s/db_get_directory_size(/db_directory_size(/g
 db_get_directory_size() renamed to db_directory_size() [7.18]
 s/db_get_version(/db_version(/g

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:09:57 UTC (rev 42433)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:27:37 UTC (rev 42434)
@@ -928,7 +928,7 @@
  */
 #define RT_GET_DIRECTORY(_p, _res) { \
while (((_p) = (_res)-re_directory_hd) == NULL) \
-   db_get_directory(_res); \
+   db_alloc_directory(_res); \
(_res)-re_directory_hd = (_p)-d_forw; \
(_p)-d_forw = NULL; }
 
@@ -3131,7 +3131,16 @@
 struct directory *,
 const char *newname));
 
+/**
+ * D B _ A L L O C _ D I R E C T O R Y
+ *
+ * This routine is called by the RT_GET_DIRECTORY macro when the
+ * freelist is exhausted.  Rather than simply getting one additional
+ * structure, we get a whole batch, saving overhead.
+ */
+RT_EXPORT BU_EXTERN(void db_alloc_directory, (struct resource *resp));
 
+
 /* db_match.c */
 RT_EXPORT BU_EXTERN(void db_update_nref,
(struct db_i *dbip,
@@ -3360,8 +3369,6 @@
 RT_EXPORT BU_EXTERN(void rt_optim_tree,
(union tree *tp,
 struct resource *resp));
-RT_EXPORT BU_EXTERN(void db_get_directory,
-   (struct resource *resp));
 
 /* db_walk.c */
 RT_EXPORT BU_EXTERN(void db_functree,

Modified: brlcad/trunk/src/librt/db_lookup.c
===
--- brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:09:57 UTC (rev 42433)
+++ brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:27:37 UTC (rev 42434)
@@ -484,15 +484,8 @@
 }
 
 
-/**
- * D B _ G E T _ D I R E C T O R Y
- *
- * This routine is called by the RT_GET_DIRECTORY macro when the
- * freelist is exhausted.  Rather than simply getting one additional
- * structure, we get a whole batch, saving overhead.
- */
 void
-db_get_directory(struct resource *resp)
+db_alloc_directory(struct resource *resp)
 {
 struct directory *dp;
 size_t bytes;
@@ -504,7 +497,7 @@
 
 /* Get a BIG block */
 bytes = (size_t)bu_malloc_len_roundup(1024*sizeof(struct directory));
-dp = (struct directory *)bu_malloc(bytes, re_directory_blocks from 
db_get_directory()  BU_FLSTR);
+dp = (struct directory *)bu_malloc(bytes, re_directory_blocks from 
db_alloc_directory()  BU_FLSTR);
 
 /* Record storage for later */
 bu_ptbl_ins(resp-re_directory_blocks, (long *)dp);


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42435] brlcad/trunk/src/librt

2011-01-19 Thread brlcad
Revision: 42435
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42435view=rev
Author:   brlcad
Date: 2011-01-19 08:29:04 + (Wed, 19 Jan 2011)

Log Message:
---
move the allocation routine into db_alloc.c

Modified Paths:
--
brlcad/trunk/src/librt/db_alloc.c
brlcad/trunk/src/librt/db_lookup.c

Modified: brlcad/trunk/src/librt/db_alloc.c
===
--- brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:27:37 UTC (rev 42434)
+++ brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:29:04 UTC (rev 42435)
@@ -214,6 +214,36 @@
 bu_free((char *)rp, db_zapper buf);
 return ret;
 }
+
+
+void
+db_alloc_directory(struct resource *resp)
+{
+struct directory *dp;
+size_t bytes;
+
+RT_CK_RESOURCE(resp);
+BU_CK_PTBL(resp-re_directory_blocks);
+
+BU_ASSERT_PTR(resp-re_directory_hd, ==, NULL);
+
+/* Get a BIG block */
+bytes = (size_t)bu_malloc_len_roundup(1024*sizeof(struct directory));
+dp = (struct directory *)bu_malloc(bytes, re_directory_blocks from 
db_alloc_directory()  BU_FLSTR);
+
+/* Record storage for later */
+bu_ptbl_ins(resp-re_directory_blocks, (long *)dp);
+
+while (bytes = sizeof(struct directory)) {
+   dp-d_magic = RT_DIR_MAGIC;
+   dp-d_forw = resp-re_directory_hd;
+   resp-re_directory_hd = dp;
+   dp++;
+   bytes -= sizeof(struct directory);
+}
+}
+
+
 /** @} */
 
 /*

Modified: brlcad/trunk/src/librt/db_lookup.c
===
--- brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:27:37 UTC (rev 42434)
+++ brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:29:04 UTC (rev 42435)
@@ -484,34 +484,6 @@
 }
 
 
-void
-db_alloc_directory(struct resource *resp)
-{
-struct directory *dp;
-size_t bytes;
-
-RT_CK_RESOURCE(resp);
-BU_CK_PTBL(resp-re_directory_blocks);
-
-BU_ASSERT_PTR(resp-re_directory_hd, ==, NULL);
-
-/* Get a BIG block */
-bytes = (size_t)bu_malloc_len_roundup(1024*sizeof(struct directory));
-dp = (struct directory *)bu_malloc(bytes, re_directory_blocks from 
db_alloc_directory()  BU_FLSTR);
-
-/* Record storage for later */
-bu_ptbl_ins(resp-re_directory_blocks, (long *)dp);
-
-while (bytes = sizeof(struct directory)) {
-   dp-d_magic = RT_DIR_MAGIC;
-   dp-d_forw = resp-re_directory_hd;
-   resp-re_directory_hd = dp;
-   dp++;
-   bytes -= sizeof(struct directory);
-}
-}
-
-
 /**
  * D B _ L O O K U P _ B Y _ A T T R
  *


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42436] brlcad/trunk

2011-01-19 Thread brlcad
Revision: 42436
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42436view=rev
Author:   brlcad
Date: 2011-01-19 08:32:39 + (Wed, 19 Jan 2011)

Log Message:
---
be more specific.  match the resource struct member name, allocating more than 
one directory.

Modified Paths:
--
brlcad/trunk/doc/deprecation.txt
brlcad/trunk/include/raytrace.h
brlcad/trunk/src/librt/db_alloc.c

Modified: brlcad/trunk/doc/deprecation.txt
===
--- brlcad/trunk/doc/deprecation.txt2011-01-19 08:29:04 UTC (rev 42435)
+++ brlcad/trunk/doc/deprecation.txt2011-01-19 08:32:39 UTC (rev 42436)
@@ -324,8 +324,8 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
-s/db_get_directory(/db_alloc_directory(/g
-db_get_directory() renamed to db_alloc_directory() [7.18]
+s/db_get_directory(/db_alloc_directory_block(/g
+db_get_directory() renamed to db_alloc_directory_block() [7.18]
 s/db_get_directory_size(/db_directory_size(/g
 db_get_directory_size() renamed to db_directory_size() [7.18]
 s/db_get_version(/db_version(/g

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:29:04 UTC (rev 42435)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:32:39 UTC (rev 42436)
@@ -928,7 +928,7 @@
  */
 #define RT_GET_DIRECTORY(_p, _res) { \
while (((_p) = (_res)-re_directory_hd) == NULL) \
-   db_alloc_directory(_res); \
+   db_alloc_directory_block(_res); \
(_res)-re_directory_hd = (_p)-d_forw; \
(_p)-d_forw = NULL; }
 

Modified: brlcad/trunk/src/librt/db_alloc.c
===
--- brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:29:04 UTC (rev 42435)
+++ brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:32:39 UTC (rev 42436)
@@ -217,7 +217,7 @@
 
 
 void
-db_alloc_directory(struct resource *resp)
+db_alloc_directory_block(struct resource *resp)
 {
 struct directory *dp;
 size_t bytes;
@@ -229,7 +229,7 @@
 
 /* Get a BIG block */
 bytes = (size_t)bu_malloc_len_roundup(1024*sizeof(struct directory));
-dp = (struct directory *)bu_malloc(bytes, re_directory_blocks from 
db_alloc_directory()  BU_FLSTR);
+dp = (struct directory *)bu_malloc(bytes, re_directory_blocks from 
db_alloc_directory_block()  BU_FLSTR);
 
 /* Record storage for later */
 bu_ptbl_ins(resp-re_directory_blocks, (long *)dp);


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42437] brlcad/trunk/include/raytrace.h

2011-01-19 Thread brlcad
Revision: 42437
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42437view=rev
Author:   brlcad
Date: 2011-01-19 08:34:51 + (Wed, 19 Jan 2011)

Log Message:
---
make it clear that these affect one global timer

Modified Paths:
--
brlcad/trunk/include/raytrace.h

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:32:39 UTC (rev 42436)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:34:51 UTC (rev 42437)
@@ -2415,14 +2415,14 @@
 RT_EXPORT BU_EXTERN(struct soltab *rt_find_solid,
(const struct rt_i *rtip,
 const char *name));
-/* Start the timer */
+/* Start the global timer */
 RT_EXPORT BU_EXTERN(void rt_prep_timer,
(void));
-/* Read timer, return time + str */
+/* Read global timer, return time + str */
 RT_EXPORT BU_EXTERN(double rt_get_timer,
(struct bu_vls *vp,
 double *elapsed));
-/* Return CPU time, text,  wall clock time */
+/* Return CPU time, text,  wall clock time off the global timer */
 RT_EXPORT BU_EXTERN(double rt_read_timer,
(char *str, int len));
 /* Plot a solid */


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42438] brlcad/trunk

2011-01-19 Thread brlcad
Revision: 42438
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42438view=rev
Author:   brlcad
Date: 2011-01-19 08:40:57 + (Wed, 19 Jan 2011)

Log Message:
---
rename rt_get_set() similarly to rt_alloc_seg_block() since it doesn't actually 
get andthing or have an equivalent put/set.  it's purpose is to allocate a 
block of segs so just say that.

Modified Paths:
--
brlcad/trunk/doc/deprecation.txt
brlcad/trunk/include/raytrace.h
brlcad/trunk/src/librt/storage.c

Modified: brlcad/trunk/doc/deprecation.txt
===
--- brlcad/trunk/doc/deprecation.txt2011-01-19 08:34:51 UTC (rev 42437)
+++ brlcad/trunk/doc/deprecation.txt2011-01-19 08:40:57 UTC (rev 42438)
@@ -324,6 +324,8 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+s/rt_get_seg(/rt_alloc_sed_block(/g
+rt_get_seg() renamed to rt_alloc_seg_block() [7.18]
 s/db_get_directory(/db_alloc_directory_block(/g
 db_get_directory() renamed to db_alloc_directory_block() [7.18]
 s/db_get_directory_size(/db_directory_size(/g

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:34:51 UTC (rev 42437)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:40:57 UTC (rev 42438)
@@ -409,7 +409,7 @@
 
 #define RT_GET_SEG(p, res) { \
while (!BU_LIST_WHILE((p), seg, ((res)-re_seg)) || !(p)) \
-   rt_get_seg(res); \
+   rt_alloc_seg_block(res); \
BU_LIST_DEQUEUE(((p)-l)); \
(p)-l.forw = (p)-l.back = BU_LIST_NULL; \
(p)-seg_in.hit_magic = (p)-seg_out.hit_magic = RT_HIT_MAGIC; \
@@ -2509,7 +2509,7 @@
  * declarations moved to db.h */
 
 /* storage obtainers */
-RT_EXPORT BU_EXTERN(void rt_get_seg,
+RT_EXPORT BU_EXTERN(void rt_alloc_seg_block,
(struct resource *res));
 RT_EXPORT BU_EXTERN(void rt_cut_it,
(struct rt_i *rtip,

Modified: brlcad/trunk/src/librt/storage.c
===
--- brlcad/trunk/src/librt/storage.c2011-01-19 08:34:51 UTC (rev 42437)
+++ brlcad/trunk/src/librt/storage.c2011-01-19 08:40:57 UTC (rev 42438)
@@ -38,7 +38,7 @@
 
 
 /**
- * R T _ G E T _ S E G
+ * R T _ A L L O C _ S E G _ B L O C K
  *
  * This routine is called by the GET_SEG macro when the freelist is
  * exhausted.  Rather than simply getting one additional structure, we
@@ -47,7 +47,7 @@
  * in bu_malloc.
  */
 void
-rt_get_seg(register struct resource *res)
+rt_alloc_seg_block(register struct resource *res)
 {
 register struct seg *sp;
 size_t bytes;
@@ -59,7 +59,7 @@
bu_ptbl_init(res-re_seg_blocks, 64, re_seg_blocks ptbl);
 }
 bytes = bu_malloc_len_roundup(64*sizeof(struct seg));
-sp = (struct seg *)bu_malloc(bytes, rt_get_seg());
+sp = (struct seg *)bu_malloc(bytes, rt_alloc_seg_block());
 bu_ptbl_ins(res-re_seg_blocks, (long *)sp);
 while (bytes = sizeof(struct seg)) {
sp-l.magic = RT_SEG_MAGIC;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42439] brlcad/trunk/include/raytrace.h

2011-01-19 Thread brlcad
Revision: 42439
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42439view=rev
Author:   brlcad
Date: 2011-01-19 08:46:04 + (Wed, 19 Jan 2011)

Log Message:
---
declare db_alloc_directory_block() properly according to the rename.

Modified Paths:
--
brlcad/trunk/include/raytrace.h

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:40:57 UTC (rev 42438)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:46:04 UTC (rev 42439)
@@ -2509,8 +2509,8 @@
  * declarations moved to db.h */
 
 /* storage obtainers */
-RT_EXPORT BU_EXTERN(void rt_alloc_seg_block,
-   (struct resource *res));
+RT_EXPORT BU_EXTERN(void rt_alloc_seg_block, (struct resource *res));
+
 RT_EXPORT BU_EXTERN(void rt_cut_it,
(struct rt_i *rtip,
 int ncpu));
@@ -3138,7 +3138,7 @@
  * freelist is exhausted.  Rather than simply getting one additional
  * structure, we get a whole batch, saving overhead.
  */
-RT_EXPORT BU_EXTERN(void db_alloc_directory, (struct resource *resp));
+RT_EXPORT BU_EXTERN(void db_alloc_directory_block, (struct resource *resp));
 
 
 /* db_match.c */


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42440] brlcad/trunk/include/raytrace.h

2011-01-19 Thread brlcad
Revision: 42440
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42440view=rev
Author:   brlcad
Date: 2011-01-19 08:49:02 + (Wed, 19 Jan 2011)

Log Message:
---
move the related decls closer to each other for the two rt/db_alloc routines

Modified Paths:
--
brlcad/trunk/include/raytrace.h

Modified: brlcad/trunk/include/raytrace.h
===
--- brlcad/trunk/include/raytrace.h 2011-01-19 08:46:04 UTC (rev 42439)
+++ brlcad/trunk/include/raytrace.h 2011-01-19 08:49:02 UTC (rev 42440)
@@ -2508,9 +2508,6 @@
 /* rt_fastf_float, rt_mat_dbmat, rt_dbmat_mat
  * declarations moved to db.h */
 
-/* storage obtainers */
-RT_EXPORT BU_EXTERN(void rt_alloc_seg_block, (struct resource *res));
-
 RT_EXPORT BU_EXTERN(void rt_cut_it,
(struct rt_i *rtip,
 int ncpu));
@@ -3140,6 +3137,16 @@
  */
 RT_EXPORT BU_EXTERN(void db_alloc_directory_block, (struct resource *resp));
 
+/**
+ * R T _ A L L O C _ S E G _ B L O C K
+ *
+ * This routine is called by the GET_SEG macro when the freelist is
+ * exhausted.  Rather than simply getting one additional structure, we
+ * get a whole batch, saving overhead.  When this routine is called,
+ * the seg resource must already be locked.  malloc() locking is done
+ * in bu_malloc.
+ */
+RT_EXPORT BU_EXTERN(void rt_alloc_seg_block, (struct resource *res));
 
 /* db_match.c */
 RT_EXPORT BU_EXTERN(void db_update_nref,


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42441] brlcad/trunk/src/librt

2011-01-19 Thread brlcad
Revision: 42441
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42441view=rev
Author:   brlcad
Date: 2011-01-19 08:50:08 + (Wed, 19 Jan 2011)

Log Message:
---
move rt_alloc_seg_block from storage.c to db_alloc.c so 
db_alloc_directory_bloc() doesn't get lonely.

Modified Paths:
--
brlcad/trunk/src/librt/db_alloc.c
brlcad/trunk/src/librt/storage.c

Modified: brlcad/trunk/src/librt/db_alloc.c
===
--- brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:49:02 UTC (rev 42440)
+++ brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:50:08 UTC (rev 42441)
@@ -244,6 +244,31 @@
 }
 
 
+void
+rt_alloc_seg_block(register struct resource *res)
+{
+register struct seg *sp;
+size_t bytes;
+
+RT_CK_RESOURCE(res);
+
+if (BU_LIST_UNINITIALIZED(res-re_seg)) {
+   BU_LIST_INIT((res-re_seg));
+   bu_ptbl_init(res-re_seg_blocks, 64, re_seg_blocks ptbl);
+}
+bytes = bu_malloc_len_roundup(64*sizeof(struct seg));
+sp = (struct seg *)bu_malloc(bytes, rt_alloc_seg_block());
+bu_ptbl_ins(res-re_seg_blocks, (long *)sp);
+while (bytes = sizeof(struct seg)) {
+   sp-l.magic = RT_SEG_MAGIC;
+   BU_LIST_INSERT((res-re_seg), (sp-l));
+   res-re_seglen++;
+   sp++;
+   bytes -= sizeof(struct seg);
+}
+}
+
+
 /** @} */
 
 /*

Modified: brlcad/trunk/src/librt/storage.c
===
--- brlcad/trunk/src/librt/storage.c2011-01-19 08:49:02 UTC (rev 42440)
+++ brlcad/trunk/src/librt/storage.c2011-01-19 08:50:08 UTC (rev 42441)
@@ -37,40 +37,8 @@
 #include bu.h
 
 
-/**
- * R T _ A L L O C _ S E G _ B L O C K
- *
- * This routine is called by the GET_SEG macro when the freelist is
- * exhausted.  Rather than simply getting one additional structure, we
- * get a whole batch, saving overhead.  When this routine is called,
- * the seg resource must already be locked.  malloc() locking is done
- * in bu_malloc.
- */
-void
-rt_alloc_seg_block(register struct resource *res)
-{
-register struct seg *sp;
-size_t bytes;
 
-RT_CK_RESOURCE(res);
 
-if (BU_LIST_UNINITIALIZED(res-re_seg)) {
-   BU_LIST_INIT((res-re_seg));
-   bu_ptbl_init(res-re_seg_blocks, 64, re_seg_blocks ptbl);
-}
-bytes = bu_malloc_len_roundup(64*sizeof(struct seg));
-sp = (struct seg *)bu_malloc(bytes, rt_alloc_seg_block());
-bu_ptbl_ins(res-re_seg_blocks, (long *)sp);
-while (bytes = sizeof(struct seg)) {
-   sp-l.magic = RT_SEG_MAGIC;
-   BU_LIST_INSERT((res-re_seg), (sp-l));
-   res-re_seglen++;
-   sp++;
-   bytes -= sizeof(struct seg);
-}
-}
-
-
 /*
  * Local Variables:
  * mode: C


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42442] brlcad/trunk

2011-01-19 Thread brlcad
Revision: 42442
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42442view=rev
Author:   brlcad
Date: 2011-01-19 08:51:43 + (Wed, 19 Jan 2011)

Log Message:
---
storage.c is no longer needed.

Modified Paths:
--
brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj
brlcad/trunk/src/librt/CMakeLists.txt
brlcad/trunk/src/librt/Makefile.am

Removed Paths:
-
brlcad/trunk/src/librt/storage.c

Modified: brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj
===
--- brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj2011-01-19 08:50:08 UTC 
(rev 42441)
+++ brlcad/trunk/misc/win32-msvc8/librt/librt.vcproj2011-01-19 08:51:43 UTC 
(rev 42442)
@@ -988,10 +988,6 @@

/File
File
-   RelativePath=..\..\..\src\librt\storage.c
-   
-   /File
-   File

RelativePath=..\..\..\src\librt\primitives\submodel\submodel.c

/File

Modified: brlcad/trunk/src/librt/CMakeLists.txt
===
--- brlcad/trunk/src/librt/CMakeLists.txt   2011-01-19 08:50:08 UTC (rev 
42441)
+++ brlcad/trunk/src/librt/CMakeLists.txt   2011-01-19 08:51:43 UTC (rev 
42442)
@@ -201,7 +201,6 @@
 roots.c
 shoot.c
 spectrum.c
-storage.c
 tcl.c
 transform.c
 tree.c

Modified: brlcad/trunk/src/librt/Makefile.am
===
--- brlcad/trunk/src/librt/Makefile.am  2011-01-19 08:50:08 UTC (rev 42441)
+++ brlcad/trunk/src/librt/Makefile.am  2011-01-19 08:51:43 UTC (rev 42442)
@@ -238,7 +238,6 @@
roots.c \
shoot.c \
spectrum.c \
-   storage.c \
tcl.c \
timer42.c \
transform.c \

Deleted: brlcad/trunk/src/librt/storage.c
===
--- brlcad/trunk/src/librt/storage.c2011-01-19 08:50:08 UTC (rev 42441)
+++ brlcad/trunk/src/librt/storage.c2011-01-19 08:51:43 UTC (rev 42442)
@@ -1,50 +0,0 @@
-/*   S T O R A G E . C
- * BRL-CAD
- *
- * Copyright (c) 2004-2011 United States Government as represented by
- * the U.S. Army Research Laboratory.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this file; see the file named COPYING for more
- * information.
- */
-/** @addtogroup librt */
-/** @{ */
-/** @file storage.c
- *
- * Ray Tracing program, storage manager.
- *
- */
-/** @} */
-
-#include common.h
-
-#include stdio.h
-#include string.h
-#include bio.h
-
-#include vmath.h
-#include raytrace.h
-#include bu.h
-
-
-
-
-/*
- * Local Variables:
- * mode: C
- * tab-width: 8
- * indent-tabs-mode: t
- * c-file-style: stroustrup
- * End:
- * ex: shiftwidth=4 tabstop=8
- */


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42445] brlcad/trunk/src/librt/db5_scan.c

2011-01-19 Thread brlcad
Revision: 42445
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42445view=rev
Author:   brlcad
Date: 2011-01-19 14:00:13 + (Wed, 19 Jan 2011)

Log Message:
---
if the database version has already been calculated, don't bother recalculating 
it. avoids rewind+fseek.

Modified Paths:
--
brlcad/trunk/src/librt/db5_scan.c

Modified: brlcad/trunk/src/librt/db5_scan.c
===
--- brlcad/trunk/src/librt/db5_scan.c   2011-01-19 13:06:20 UTC (rev 42444)
+++ brlcad/trunk/src/librt/db5_scan.c   2011-01-19 14:00:13 UTC (rev 42445)
@@ -27,7 +27,7 @@
 
 #include common.h
 
-#include stdio.h
+#include stdlib.h
 #include string.h
 #include bio.h
 
@@ -451,6 +451,10 @@
 
 RT_CK_DBI(dbip);
 
+/* already calculated during an rt_dirbuild? */
+if (dbip-dbi_version  0)
+   return abs(dbi-dbi_version);
+
 if (!dbip-dbi_fp) {
return -1;
 }


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42446] brlcad/trunk/src/librt/db_open.c

2011-01-19 Thread brlcad
Revision: 42446
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42446view=rev
Author:   brlcad
Date: 2011-01-19 14:00:50 + (Wed, 19 Jan 2011)

Log Message:
---
make sure db_version() calculates the version during db_open(), init to zero.

Modified Paths:
--
brlcad/trunk/src/librt/db_open.c

Modified: brlcad/trunk/src/librt/db_open.c
===
--- brlcad/trunk/src/librt/db_open.c2011-01-19 14:00:13 UTC (rev 42445)
+++ brlcad/trunk/src/librt/db_open.c2011-01-19 14:00:50 UTC (rev 42446)
@@ -207,6 +207,7 @@
 dbip-dbi_magic = DBI_MAGIC;   /* Now it's valid */
 
 /* determine version */
+dbip-dbi_version = 0; /* make db_version() calculate */
 dbip-dbi_version = db_version(dbip);
 
 if (RT_G_DEBUG  DEBUG_DB) {


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42447]

2011-01-19 Thread davidloman
Revision: 42447
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42447view=rev
Author:   davidloman
Date: 2011-01-19 14:29:35 + (Wed, 19 Jan 2011)

Log Message:
---
Add in rough draft of GS graphic.

Added Paths:
---
rt^3/trunk/docs/GS_Symbol.png
rt^3/trunk/docs/GS_Symbol.psd

Added: rt^3/trunk/docs/GS_Symbol.png
===
(Binary files differ)


Property changes on: rt^3/trunk/docs/GS_Symbol.png
___
Added: svn:mime-type
   + application/octet-stream

Added: rt^3/trunk/docs/GS_Symbol.psd
===
(Binary files differ)


Property changes on: rt^3/trunk/docs/GS_Symbol.psd
___
Added: svn:mime-type
   + application/octet-stream


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42449] brlcad/trunk/src

2011-01-19 Thread brlcad
Revision: 42449
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42449view=rev
Author:   brlcad
Date: 2011-01-19 15:44:45 + (Wed, 19 Jan 2011)

Log Message:
---
put db_version() to use, particularly for callers outside of librt since it's a 
private API member that isnt' supposed to be directly accessed.  this sets the 
stage for using dbi_version in other ways.

Modified Paths:
--
brlcad/trunk/src/conv/dbupgrade.c
brlcad/trunk/src/conv/g4-g5.c
brlcad/trunk/src/conv/g5-g4.c
brlcad/trunk/src/gtools/g_diff.c
brlcad/trunk/src/libged/attr.c
brlcad/trunk/src/libged/bo.c
brlcad/trunk/src/libged/bot_smooth.c
brlcad/trunk/src/libged/clone.c
brlcad/trunk/src/libged/color.c
brlcad/trunk/src/libged/concat.c
brlcad/trunk/src/libged/copy.c
brlcad/trunk/src/libged/decompose.c
brlcad/trunk/src/libged/dup.c
brlcad/trunk/src/libged/hide.c
brlcad/trunk/src/libged/importFg4Section.c
brlcad/trunk/src/libged/inside.c
brlcad/trunk/src/libged/keep.c
brlcad/trunk/src/libged/move_all.c
brlcad/trunk/src/libged/prefix.c
brlcad/trunk/src/libged/put_comb.c
brlcad/trunk/src/libged/rmap.c
brlcad/trunk/src/libged/search.c
brlcad/trunk/src/libged/tops.c
brlcad/trunk/src/libged/typein.c
brlcad/trunk/src/libged/unhide.c
brlcad/trunk/src/libged/version.c
brlcad/trunk/src/libged/wdb_importFg4Section.c
brlcad/trunk/src/libged/wdb_obj.c
brlcad/trunk/src/libged/xpush.c
brlcad/trunk/src/librt/db5_io.c
brlcad/trunk/src/librt/db_alloc.c
brlcad/trunk/src/librt/db_inmem.c
brlcad/trunk/src/librt/db_io.c
brlcad/trunk/src/librt/db_lookup.c
brlcad/trunk/src/librt/db_open.c
brlcad/trunk/src/librt/db_scan.c
brlcad/trunk/src/librt/db_walk.c
brlcad/trunk/src/librt/dir.c
brlcad/trunk/src/librt/prep.c
brlcad/trunk/src/librt/primitives/dsp/dsp.c
brlcad/trunk/src/librt/primitives/generic.c
brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c
brlcad/trunk/src/librt/primitives/obj_export.c
brlcad/trunk/src/librt/primitives/obj_import.c
brlcad/trunk/src/librt/tree.c
brlcad/trunk/src/librt/wdb.c
brlcad/trunk/src/libwdb/bot.c
brlcad/trunk/src/libwdb/mater.c
brlcad/trunk/src/mged/clone.c
brlcad/trunk/src/mged/dir.c
brlcad/trunk/src/mged/mater.c
brlcad/trunk/src/mged/mged.c

Modified: brlcad/trunk/src/conv/dbupgrade.c
===
--- brlcad/trunk/src/conv/dbupgrade.c   2011-01-19 15:11:05 UTC (rev 42448)
+++ brlcad/trunk/src/conv/dbupgrade.c   2011-01-19 15:44:45 UTC (rev 42449)
@@ -121,17 +121,17 @@
 }
 
 if ( !reverse ) {
-   if ( dbip-dbi_version == 5 ) {
+   if ( db_version(dbip) == 5 ) {
bu_log( This database (%s) is already at the current version\n,
argv[in_arg] );
return 5;
}
-   if ( dbip-dbi_version != 4 ) {
+   if ( db_version(dbip) != 4 ) {
bu_log( Input database version not recognized\n );
return 4;
}
 } else if ( reverse ) {
-   if ( dbip-dbi_version != 5 ) {
+   if ( db_version(dbip) != 5 ) {
bu_log( Can only revert from db version 5\n );
return 6;
}
@@ -142,7 +142,7 @@
 if ( db_dirbuild( dbip ) )
bu_exit(1, db_dirbuild failed\n );
 
-if ( (BU_STR_EQUAL( dbip-dbi_title, Untitled v4 BRL-CAD Database ))  
(dbip-dbi_version == 4) ) {
+if ( (BU_STR_EQUAL( dbip-dbi_title, Untitled v4 BRL-CAD Database ))  
(db_version(dbip) == 4) ) {
dbip-dbi_title=bu_strdup( Untitled BRL-CAD Database );
 }
 db_update_ident( fp-dbip, dbip-dbi_title, dbip-dbi_local2base );

Modified: brlcad/trunk/src/conv/g4-g5.c
===
--- brlcad/trunk/src/conv/g4-g5.c   2011-01-19 15:11:05 UTC (rev 42448)
+++ brlcad/trunk/src/conv/g4-g5.c   2011-01-19 15:44:45 UTC (rev 42449)
@@ -84,7 +84,7 @@
return 3;
 }
 
-if ( dbip-dbi_version != 4 ) {
+if ( db_version(dbip) != 4 ) {
bu_log( Input database must be a version 4 datbase\n );
return 4;
 }

Modified: brlcad/trunk/src/conv/g5-g4.c
===
--- brlcad/trunk/src/conv/g5-g4.c   2011-01-19 15:11:05 UTC (rev 42448)
+++ brlcad/trunk/src/conv/g5-g4.c   2011-01-19 15:44:45 UTC (rev 42449)
@@ -92,7 +92,7 @@
return 4;
 }
 
-if ( dbip-dbi_version != 5 ) {
+if ( db_version(dbip) != 5 ) {
bu_log( Input database must be a version 5 database\n );
return 5;
 }

Modified: brlcad/trunk/src/gtools/g_diff.c
===
--- brlcad/trunk/src/gtools/g_diff.c2011-01-19 15:11:05 UTC (rev 42448)
+++ brlcad/trunk/src/gtools/g_diff.c2011-01-19 15:44:45 UTC (rev 42449)
@@ -700,7 +700,7 @@
 
 bu_vls_init(vls);

[brlcad-commits] SF.net SVN: brlcad:[42450] brlcad/trunk/src/conv/dbupgrade.c

2011-01-19 Thread brlcad
Revision: 42450
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42450view=rev
Author:   brlcad
Date: 2011-01-19 16:10:48 + (Wed, 19 Jan 2011)

Log Message:
---
get the version number just once, then reference it

Modified Paths:
--
brlcad/trunk/src/conv/dbupgrade.c

Modified: brlcad/trunk/src/conv/dbupgrade.c
===
--- brlcad/trunk/src/conv/dbupgrade.c   2011-01-19 15:44:45 UTC (rev 42449)
+++ brlcad/trunk/src/conv/dbupgrade.c   2011-01-19 16:10:48 UTC (rev 42450)
@@ -59,6 +59,7 @@
 int in_arg=1;
 int out_arg=2;
 long   errors = 0, skipped = 0;
+int version;
 name[16] = '\0';
 
 /* this tolerance structure is only used for converting polysolids to BOT's
@@ -120,18 +121,19 @@
 
 }
 
+version = db_version(dbip);
 if ( !reverse ) {
-   if ( db_version(dbip) == 5 ) {
+   if ( version == 5 ) {
bu_log( This database (%s) is already at the current version\n,
argv[in_arg] );
return 5;
}
-   if ( db_version(dbip) != 4 ) {
+   if ( version != 4 ) {
bu_log( Input database version not recognized\n );
return 4;
}
 } else if ( reverse ) {
-   if ( db_version(dbip) != 5 ) {
+   if ( version != 5 ) {
bu_log( Can only revert from db version 5\n );
return 6;
}
@@ -142,7 +144,7 @@
 if ( db_dirbuild( dbip ) )
bu_exit(1, db_dirbuild failed\n );
 
-if ( (BU_STR_EQUAL( dbip-dbi_title, Untitled v4 BRL-CAD Database ))  
(db_version(dbip) == 4) ) {
+if ( (BU_STR_EQUAL( dbip-dbi_title, Untitled v4 BRL-CAD Database ))  
(version == 4) ) {
dbip-dbi_title=bu_strdup( Untitled BRL-CAD Database );
 }
 db_update_ident( fp-dbip, dbip-dbi_title, dbip-dbi_local2base );


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42451] jbrlcad/trunk/src/main/java/org/brlcad/ geometryservice/GeometryServiceSPI.java

2011-01-19 Thread ronaldbowers
Revision: 42451
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42451view=rev
Author:   ronaldbowers
Date: 2011-01-19 16:19:37 + (Wed, 19 Jan 2011)

Log Message:
---
- Version 0.1 of the GeometryServiceSPI. Implementations should match the 
behavior defined here.

Added Paths:
---

jbrlcad/trunk/src/main/java/org/brlcad/geometryservice/GeometryServiceSPI.java

Added: 
jbrlcad/trunk/src/main/java/org/brlcad/geometryservice/GeometryServiceSPI.java
===
--- 
jbrlcad/trunk/src/main/java/org/brlcad/geometryservice/GeometryServiceSPI.java  
(rev 0)
+++ 
jbrlcad/trunk/src/main/java/org/brlcad/geometryservice/GeometryServiceSPI.java  
2011-01-19 16:19:37 UTC (rev 42451)
@@ -0,0 +1,206 @@
+package org.brlcad.geometryservice;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Classes that implement this interface enable the client to interact
+ * with the BRL-CAD geometry service. The functions provided by the interface
+ * are as follows:
+ * p/
+ * ol
+ * li Verify that the geometry service is reachable./li
+ * li Download versioned geometry from the BRL-CAD Geometry Service./li
+ * li Store downloaded geometry in a local cache./li
+ * li Check the cache for a copy of the desired geometry before 
downloading./li
+ * li Provide a catalog of the local cache./li
+ * li Clear the local cache./li
+ * li Enable queries of the BRL-CAD geometry service./li
+ * li Enable retrieval of geometry metadata from the geometry service.li
+ * li Provide an estimate for the memory footprint of prepped geometry for a 
specified geometry./li
+ * /ol
+ * p/
+ * Implementation can be performed in two stages. The first comprises 
downloading and
+ * caching the geometries. The second covers querying geometries and metadata.
+ */
+public interface GeometryServiceSPI {
+
+/**
+ * Version number that implies that the most recent version is desired.
+ */
+final static int HEAD = -1;
+
+/**
+ * Tests the connection to the geometry service.
+ *
+ * @return true if the connection is operational, false otherwise.
+ * @throws IllegalStateException if the location of the geometry service 
has
+ *   not been specified.
+ */
+boolean ping();
+
+/**
+ * Loads the requested geometry.
+ * Determines if the specified geometry is available from the local cache, 
and
+ * if so returns a File object that points to the local copy. Otherwise, 
this
+ * method retrieves the geometry specified from the geometry service. The
+ * geometry to retrieve is specified by a name and a version number.
+ * The download geometry is stored in the local cache as a .g file and a 
File
+ * to the downloaded geometry is created and returned.
+ *
+ * @param geometryName the name of the geometry, such as T62
+ * @param version  the revision number of the geometry or HEAD for the 
latest version
+ * @return a File object that points to the local on-disk geometry file.
+ * @throws IllegalStateException if the location of the geometry 
service has
+ *   not been specified.
+ * @throws java.io.FileNotFoundException if the geometry cannot be found.
+ * @throws java.io.IOException   if the geometry service cannot be 
reached.
+ */
+File get(String geometryName, int version) throws IOException;
+
+/**
+ * Loads the requested geometry.
+ * pDetermines if the specified geometry is available from the local 
cache, and
+ * if so returns a File object that points to the local copy. Otherwise, 
this
+ * method retrieves the geometry specified from the geometry service. The
+ * geometry to retrieve is specified by a name and a version string.
+ * The download geometry is stored in the local cache as a .g file and a 
File
+ * to the downloaded geometry is created and returned./p
+ *
+ * @param geometryName the name of the geometry, such as T62
+ * @param versionTag   the name of a tagged version.
+ * @return a File object that points to the local on-disk geometry file.
+ * @throws IllegalStateException if the location of the geometry 
service has
+ *   not been specified.
+ * @throws java.io.FileNotFoundException if the geometry cannot be found.
+ * @throws java.io.IOException   if the geometry service cannot be 
reached.
+ */
+File get(String geometryName, String versionTag) throws IOException;
+
+
+/**
+ * Determines if the requested geometry is in the local cache. Should
+ * be called before downloading geometry from the geometry service.
+ *
+ * @param geometryName the name of the geometry, such as T62
+ * @param version  the revision number of the 

[brlcad-commits] SF.net SVN: brlcad:[42452] brlcad/trunk/src/librt/db5_scan.c

2011-01-19 Thread brlcad
Revision: 42452
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42452view=rev
Author:   brlcad
Date: 2011-01-19 16:32:12 + (Wed, 19 Jan 2011)

Log Message:
---
idiot

Modified Paths:
--
brlcad/trunk/src/librt/db5_scan.c

Modified: brlcad/trunk/src/librt/db5_scan.c
===
--- brlcad/trunk/src/librt/db5_scan.c   2011-01-19 16:19:37 UTC (rev 42451)
+++ brlcad/trunk/src/librt/db5_scan.c   2011-01-19 16:32:12 UTC (rev 42452)
@@ -453,7 +453,7 @@
 
 /* already calculated during an rt_dirbuild? */
 if (dbip-dbi_version  0)
-   return abs(dbi-dbi_version);
+   return abs(dbip-dbi_version);
 
 if (!dbip-dbi_fp) {
return -1;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42453] brlcad/trunk/src/librt/db5_io.c

2011-01-19 Thread brlcad
Revision: 42453
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42453view=rev
Author:   brlcad
Date: 2011-01-19 16:32:26 + (Wed, 19 Jan 2011)

Log Message:
---
can't call db_version because the dbip is const

Modified Paths:
--
brlcad/trunk/src/librt/db5_io.c

Modified: brlcad/trunk/src/librt/db5_io.c
===
--- brlcad/trunk/src/librt/db5_io.c 2011-01-19 16:32:12 UTC (rev 42452)
+++ brlcad/trunk/src/librt/db5_io.c 2011-01-19 16:32:26 UTC (rev 42453)
@@ -1166,7 +1166,7 @@
 
 RT_CK_DBI(dbip);
 
-if (db_version(dbip)  5)
+if (dbip-dbi_version  5)
return 0;   /* not an error, just no attributes */
 
 RT_CK_DIR(dp);


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42454] brlcad/trunk/src

2011-01-19 Thread brlcad
Revision: 42454
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42454view=rev
Author:   brlcad
Date: 2011-01-19 16:36:54 + (Wed, 19 Jan 2011)

Log Message:
---
improve consistency on how the version numbers are checked.  avoiding = and = 
where unnecessary.

Modified Paths:
--
brlcad/trunk/src/libged/importFg4Section.c
brlcad/trunk/src/libged/typein.c
brlcad/trunk/src/libged/wdb_importFg4Section.c
brlcad/trunk/src/librt/db_io.c
brlcad/trunk/src/librt/primitives/nmg/nmg_misc.c
brlcad/trunk/src/librt/wdb.c
brlcad/trunk/src/libwdb/bot.c
brlcad/trunk/src/libwdb/mater.c
brlcad/trunk/src/mged/mater.c
brlcad/trunk/src/mged/mged.c

Modified: brlcad/trunk/src/libged/importFg4Section.c
===
--- brlcad/trunk/src/libged/importFg4Section.c  2011-01-19 16:32:26 UTC (rev 
42453)
+++ brlcad/trunk/src/libged/importFg4Section.c  2011-01-19 16:36:54 UTC (rev 
42454)
@@ -162,7 +162,7 @@
botip-face_mode = (struct bu_bitv *)NULL;
 }
 
-if ( (num_normals  0)  (db_version(fp-dbip) = 5 ) ) {
+if ( (num_normals  0)  (db_version(fp-dbip)  4 ) ) {
botip-num_normals = num_normals;
botip-num_face_normals = botip-num_faces;
botip-normals = (fastf_t *)bu_calloc( botip-num_normals * 3, sizeof( 
fastf_t ), BOT normals );

Modified: brlcad/trunk/src/libged/typein.c
===
--- brlcad/trunk/src/libged/typein.c2011-01-19 16:32:26 UTC (rev 42453)
+++ brlcad/trunk/src/libged/typein.c2011-01-19 16:36:54 UTC (rev 42454)
@@ -2819,7 +2819,7 @@
bu_vls_printf(gedp-ged_result_str, %s: %s already exists, argv[0], 
argv[1]);
return GED_ERROR;
 }
-if (db_version(gedp-ged_wdbp-dbip) = 4  (int)strlen(argv[1])  
NAMESIZE) {
+if (db_version(gedp-ged_wdbp-dbip)  5  (int)strlen(argv[1])  
NAMESIZE) {
bu_vls_printf(gedp-ged_result_str, %s: ERROR, v4 names are limited 
to %d characters\n, argv[0], NAMESIZE);
return GED_ERROR;
 }
@@ -2872,7 +2872,7 @@
menu = p_vol;
fn_in = vol_in;
 } else if (BU_STR_EQUAL(argv[2], hf)) {
-   if (db_version(gedp-ged_wdbp-dbip) = 4) {
+   if (db_version(gedp-ged_wdbp-dbip)  5) {
nvals = 19;
menu = p_hf;
fn_in = hf_in;
@@ -2886,7 +2886,7 @@
bu_vls_printf(gedp-ged_result_str, %s: the polysolid is deprecated 
and not supported by this command.\nUse the bot primitive.\n, argv[0]);
return GED_ERROR;
 } else if (BU_STR_EQUAL(argv[2], dsp)) {
-   if (db_version(gedp-ged_wdbp-dbip) = 4) {
+   if (db_version(gedp-ged_wdbp-dbip)  5) {
nvals = 6;
menu = p_dsp_v4;
fn_in = dsp_in_v4;
@@ -3025,7 +3025,7 @@
menu = p_part;
fn_in = part_in;
 } else if (BU_STR_EQUAL(argv[2], binunif)) {
-   if (db_version(gedp-ged_wdbp-dbip) = 4) {
+   if (db_version(gedp-ged_wdbp-dbip)  5) {
bu_vls_printf(gedp-ged_result_str,
  %s: the binunif primitive is not supported by this 
command when using an old style database,
  argv[0]);

Modified: brlcad/trunk/src/libged/wdb_importFg4Section.c
===
--- brlcad/trunk/src/libged/wdb_importFg4Section.c  2011-01-19 16:32:26 UTC 
(rev 42453)
+++ brlcad/trunk/src/libged/wdb_importFg4Section.c  2011-01-19 16:36:54 UTC 
(rev 42454)
@@ -150,7 +150,7 @@
botip-face_mode = (struct bu_bitv *)NULL;
 }
 
-if ((num_normals  0)  (db_version(fp-dbip) = 5)) {
+if ((num_normals  0)  (db_version(fp-dbip)  4)) {
botip-num_normals = num_normals;
botip-num_face_normals = botip-num_faces;
botip-normals = (fastf_t *)bu_calloc(botip-num_normals * 3, 
sizeof(fastf_t), BOT normals);

Modified: brlcad/trunk/src/librt/db_io.c
===
--- brlcad/trunk/src/librt/db_io.c  2011-01-19 16:32:26 UTC (rev 42453)
+++ brlcad/trunk/src/librt/db_io.c  2011-01-19 16:36:54 UTC (rev 42454)
@@ -116,7 +116,7 @@
 RT_CK_DBI(dbip);
 RT_CK_DIR(dp);
 
-if (db_version(dbip) = 5) {
+if (db_version(dbip)  4) {
/* can't get an mrec on a v5 */
return (union record *)NULL;
 }
@@ -320,7 +320,7 @@
return -1;  /* was dummy DB entry */
 
 BU_INIT_EXTERNAL(ep);
-if (db_version(dbip) = 4)
+if (db_version(dbip)  5)
ep-ext_nbytes = dp-d_len * sizeof(union record);
 else
ep-ext_nbytes = dp-d_len;
@@ -381,7 +381,7 @@
 if (db_version(dbip) == 5)
return db_put_external5(ep, dp, dbip);
 
-if (db_version(dbip) = 4) {
+if (db_version(dbip)  5) {
size_t ngran;
 
ngran = (ep-ext_nbytes+sizeof(union record)-1)/sizeof(union record);

Modified: 

[brlcad-commits] SF.net SVN: brlcad:[42455] brlcad/trunk/src/librt

2011-01-19 Thread brlcad
Revision: 42455
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42455view=rev
Author:   brlcad
Date: 2011-01-19 16:51:51 + (Wed, 19 Jan 2011)

Log Message:
---
more const dbi pointers that need to be undone, access direct (fine for librt)

Modified Paths:
--
brlcad/trunk/src/librt/db_io.c
brlcad/trunk/src/librt/dir.c
brlcad/trunk/src/librt/primitives/obj_export.c
brlcad/trunk/src/librt/primitives/obj_import.c

Modified: brlcad/trunk/src/librt/db_io.c
===
--- brlcad/trunk/src/librt/db_io.c  2011-01-19 16:36:54 UTC (rev 42454)
+++ brlcad/trunk/src/librt/db_io.c  2011-01-19 16:51:51 UTC (rev 42455)
@@ -116,7 +116,7 @@
 RT_CK_DBI(dbip);
 RT_CK_DIR(dp);
 
-if (db_version(dbip)  4) {
+if (dbip-dbi_version  4) {
/* can't get an mrec on a v5 */
return (union record *)NULL;
 }
@@ -320,7 +320,7 @@
return -1;  /* was dummy DB entry */
 
 BU_INIT_EXTERNAL(ep);
-if (db_version(dbip)  5)
+if (dbip-dbi_version  5)
ep-ext_nbytes = dp-d_len * sizeof(union record);
 else
ep-ext_nbytes = dp-d_len;

Modified: brlcad/trunk/src/librt/dir.c
===
--- brlcad/trunk/src/librt/dir.c2011-01-19 16:36:54 UTC (rev 42454)
+++ brlcad/trunk/src/librt/dir.c2011-01-19 16:51:51 UTC (rev 42455)
@@ -99,7 +99,7 @@
 BU_INIT_EXTERNAL(ext);
 RT_INIT_DB_INTERNAL(ip);
 
-if ( db_version(dbip)  4 )
+if ( dbip-dbi_version  4 )
return  rt_db_get_internal5( ip, dp, dbip, mat, resp );
 
 if ( db_get_external( ext, dp, dbip )  0 )

Modified: brlcad/trunk/src/librt/primitives/obj_export.c
===
--- brlcad/trunk/src/librt/primitives/obj_export.c  2011-01-19 16:36:54 UTC 
(rev 42454)
+++ brlcad/trunk/src/librt/primitives/obj_export.c  2011-01-19 16:51:51 UTC 
(rev 42455)
@@ -47,7 +47,7 @@
 if (!ft)
return -3;
 
-if (db_version(dbip)  5) {
+if (dbip-dbi_version  5) {
export = ft-ft_export4;
 } else {
export = ft-ft_export5;

Modified: brlcad/trunk/src/librt/primitives/obj_import.c
===
--- brlcad/trunk/src/librt/primitives/obj_import.c  2011-01-19 16:36:54 UTC 
(rev 42454)
+++ brlcad/trunk/src/librt/primitives/obj_import.c  2011-01-19 16:51:51 UTC 
(rev 42455)
@@ -47,7 +47,7 @@
 if (!ft)
return -3;
 
-if (db_version(dbip)  5) {
+if (dbip-dbi_version  5) {
import = ft-ft_import4;
 } else {
import = ft-ft_import5;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42456] brlcad/trunk/src/mged

2011-01-19 Thread brlcad
Revision: 42456
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42456view=rev
Author:   brlcad
Date: 2011-01-19 17:26:22 + (Wed, 19 Jan 2011)

Log Message:
---
rename db_warn, db_upgrade, and db_version to have an mged_ prefix so they 
don't collide with librt db_*() functions (e.g., db_version())

Modified Paths:
--
brlcad/trunk/src/mged/cmd.c
brlcad/trunk/src/mged/mged.c

Modified: brlcad/trunk/src/mged/cmd.c
===
--- brlcad/trunk/src/mged/cmd.c 2011-01-19 16:51:51 UTC (rev 42455)
+++ brlcad/trunk/src/mged/cmd.c 2011-01-19 17:26:22 UTC (rev 42456)
@@ -68,9 +68,9 @@
 struct cmd_list head_cmd_list;
 struct cmd_list *curr_cmd_list;
 
-extern int db_warn;
-extern int db_upgrade;
-extern int db_version;
+extern int mged_db_warn;
+extern int mged_db_upgrade;
+extern int mged_db_version;
 
 int glob_compat_mode = 1;
 int output_as_return = 1;
@@ -1683,9 +1683,9 @@
 mged_global_variable_setup(Tcl_Interp *interpreter)
 {
 Tcl_LinkVar(interpreter, mged_default(dlist), (char 
*)mged_default_dlist, TCL_LINK_INT);
-Tcl_LinkVar(interpreter, mged_default(db_warn), (char *)db_warn, 
TCL_LINK_INT);
-Tcl_LinkVar(interpreter, mged_default(db_upgrade), (char *)db_upgrade, 
TCL_LINK_INT);
-Tcl_LinkVar(interpreter, mged_default(db_version), (char *)db_version, 
TCL_LINK_INT);
+Tcl_LinkVar(interpreter, mged_default(db_warn), (char *)mged_db_warn, 
TCL_LINK_INT);
+Tcl_LinkVar(interpreter, mged_default(db_upgrade), (char 
*)mged_db_upgrade, TCL_LINK_INT);
+Tcl_LinkVar(interpreter, mged_default(db_version), (char 
*)mged_db_version, TCL_LINK_INT);
 
 Tcl_LinkVar(interpreter, edit_class, (char *)es_edclass, TCL_LINK_INT);
 Tcl_LinkVar(interpreter, edit_solid_flag, (char *)es_edflag, 
TCL_LINK_INT);
@@ -1697,9 +1697,9 @@
 mged_global_variable_teardown(Tcl_Interp *interpreter)
 {
 Tcl_UnlinkVar(interpreter, mged_default(dlist));
-Tcl_UnlinkVar(interpreter, mged_default(db_warn));
-Tcl_UnlinkVar(interpreter, mged_default(db_upgrade));
-Tcl_UnlinkVar(interpreter, mged_default(db_version));
+Tcl_UnlinkVar(interpreter, mged_default(mged_db_warn));
+Tcl_UnlinkVar(interpreter, mged_default(mged_db_upgrade));
+Tcl_UnlinkVar(interpreter, mged_default(mged_db_version));
 
 Tcl_UnlinkVar(interpreter, edit_class);
 Tcl_UnlinkVar(interpreter, edit_solid_flag);

Modified: brlcad/trunk/src/mged/mged.c
===
--- brlcad/trunk/src/mged/mged.c2011-01-19 16:51:51 UTC (rev 42455)
+++ brlcad/trunk/src/mged/mged.c2011-01-19 17:26:22 UTC (rev 42456)
@@ -173,16 +173,16 @@
  * 0 - no warn
  * 1 - warn
  */
-int db_warn = 0;
+int mged_db_warn = 0;
 
 /*
  * 0 - no upgrade
  * 1 - upgrade
  */
-int db_upgrade = 0;
+int mged_db_upgrade = 0;
 
 /* force creation of specific database versions */
-int db_version = 5;
+int mged_db_version = 5;
 
 struct bn_tol mged_tol;/* calculation tolerance */
 struct rt_tess_tol mged_ttol;  /* XXX needs to replace mged_abs_tol, et.al. */
@@ -2721,7 +2721,7 @@
}
 
/* File does not exist, and should be created */
-   if ((dbip = db_create(argv[1], db_version)) == DBI_NULL) {
+   if ((dbip = db_create(argv[1], mged_db_version)) == DBI_NULL) {
gedp = save_gedp;
dbip = save_dbip; /* restore previous database */
rt_new_material_head(save_materp);
@@ -2853,13 +2853,13 @@
  * creating a new database.
  */
 if (db_version(dbip)  5  !created_new_db) {
-   if (db_upgrade) {
-   if (db_warn)
+   if (mged_db_upgrade) {
+   if (mged_db_warn)
bu_vls_printf(msg, Warning:\n\tDatabase version is 
old.\n\tConverting to the new format.\n);
 
(void)Tcl_Eval(interpreter, after idle dbupgrade -f y);
} else {
-   if (db_warn) {
+   if (mged_db_warn) {
if (classic_mged)
bu_vls_printf(msg, Warning:\n\tDatabase version is 
old.\n\tSee the dbupgrade command.);
else


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42457] brlcad/trunk/src/tclscripts/lib/TkTable.tcl

2011-01-19 Thread bob1961
Revision: 42457
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42457view=rev
Author:   bob1961
Date: 2011-01-19 18:00:09 + (Wed, 19 Jan 2011)

Log Message:
---
Tweaked cadwidgets::TkTable::toggleSelect to behave better after a Button-1 
event occurs in a different cell.

Modified Paths:
--
brlcad/trunk/src/tclscripts/lib/TkTable.tcl

Modified: brlcad/trunk/src/tclscripts/lib/TkTable.tcl
===
--- brlcad/trunk/src/tclscripts/lib/TkTable.tcl 2011-01-19 17:26:22 UTC (rev 
42456)
+++ brlcad/trunk/src/tclscripts/lib/TkTable.tcl 2011-01-19 18:00:09 UTC (rev 
42457)
@@ -529,6 +529,11 @@
if {$row == $arow  $col == $acol} {
setInsertMode 1
} else {
+   # This line causes the cell data to be
+   # retained even after the state is disable
+   # by the call to setInsertMode 0 below.
+   $itk_component(table) activate active
+
setInsertMode 0
}
}


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42458] brlcad/trunk/src/tclscripts/lib/RtControl.tcl

2011-01-19 Thread bob1961
Revision: 42458
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42458view=rev
Author:   bob1961
Date: 2011-01-19 18:01:03 + (Wed, 19 Jan 2011)

Log Message:
---
Added a configbody for the -color option.

Modified Paths:
--
brlcad/trunk/src/tclscripts/lib/RtControl.tcl

Modified: brlcad/trunk/src/tclscripts/lib/RtControl.tcl
===
--- brlcad/trunk/src/tclscripts/lib/RtControl.tcl   2011-01-19 18:00:09 UTC 
(rev 42457)
+++ brlcad/trunk/src/tclscripts/lib/RtControl.tcl   2011-01-19 18:01:03 UTC 
(rev 42458)
@@ -357,6 +357,12 @@
 
 ### Configuration Options 
###
 
+::itcl::configbody RtControl::color {\
+set rtColor $itk_option(-color)
+set bg [eval ::cadwidgets::Ged::rgb_to_tk $rtColor]
+$itk_component(bgcolorpatchL) configure -background $bg
+}
+
 ::itcl::configbody RtControl::nproc {
 if {![regexp ^\[0-9\]+$ $itk_option(-nproc)]} {
error Bad value - $itk_option(-nproc)


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42459] brlcad/trunk/src/tclscripts/archer

2011-01-19 Thread bob1961
Revision: 42459
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42459view=rev
Author:   bob1961
Date: 2011-01-19 18:02:22 + (Wed, 19 Jan 2011)

Log Message:
---
Added a preference for the framebuffer's background color.

Modified Paths:
--
brlcad/trunk/src/tclscripts/archer/Archer.tcl
brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl

Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl   2011-01-19 18:01:03 UTC 
(rev 42458)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl   2011-01-19 18:02:22 UTC 
(rev 42459)
@@ -3398,6 +3398,12 @@
mBackgroundColorPref \
Background Color: \
$mColorListNoTriple
+buildComboBox $itk_component(generalF) \
+   fbbackgroundColor \
+   fbbcolor \
+   mFBBackgroundColorPref \
+   FB Background Color: \
+   $mColorListNoTriple
 
 buildComboBox $itk_component(generalF) \
binding \
@@ -3504,6 +3510,9 @@
 grid $itk_component(backgroundColorL) -column 0 -row $i -sticky ne
 grid $itk_component(backgroundColorF) -column 1 -row $i -sticky ew
 incr i
+grid $itk_component(fbbackgroundColorL) -column 0 -row $i -sticky ne
+grid $itk_component(fbbackgroundColorF) -column 1 -row $i -sticky ew
+incr i
 grid $itk_component(measuringStickColorL) -column 0 -row $i -sticky e
 grid $itk_component(measuringStickColorF) -column 1 -row $i -sticky ew
 incr i
@@ -7955,6 +7964,7 @@
 }
 
 backgroundColor $mBackgroundColor
+$itk_component(rtcntrl) configure -color [cadwidgets::Ged::get_rgb_color 
$mFBBackgroundColor]
 gedCmd configure -measuringStickColor $mMeasuringStickColor
 gedCmd configure -measuringStickMode $mMeasuringStickMode
 gedCmd configure -primitiveLabelColor $mPrimitiveLabelColor
@@ -7983,7 +7993,12 @@
 if {$mBackgroundColor != $mBackgroundColorPref} {
set mBackgroundColor $mBackgroundColorPref
backgroundColor $mBackgroundColor
+
 }
+if {$mFBBackgroundColor != $mFBBackgroundColorPref} {
+   set mFBBackgroundColor $mFBBackgroundColorPref
+   $itk_component(rtcntrl) configure -color 
[cadwidgets::Ged::get_rgb_color $mFBBackgroundColor]
+}
 
 if {$mPrimitiveLabelColor != $mPrimitiveLabelColorPref} {
set mPrimitiveLabelColor $mPrimitiveLabelColorPref
@@ -8479,6 +8494,7 @@
 set mBackgroundColorPref $mBackgroundColor
 set mBindingModePref $mBindingMode
 set mEnableBigEPref $mEnableBigE
+set mFBBackgroundColorPref $mFBBackgroundColor
 set mMeasuringStickColorPref $mMeasuringStickColor
 set mMeasuringStickModePref $mMeasuringStickMode
 set mPrimitiveLabelColorPref $mPrimitiveLabelColor
@@ -8623,6 +8639,7 @@
 puts $_pfile set mBackgroundColor \$mBackgroundColor\
 puts $_pfile set mBindingMode $mBindingMode
 puts $_pfile set mEnableBigE $mEnableBigE
+puts $_pfile set mFBBackgroundColor \$mFBBackgroundColor\
 puts $_pfile set mMeasuringStickColor \$mMeasuringStickColor\
 puts $_pfile set mMeasuringStickMode $mMeasuringStickMode
 puts $_pfile set mPrimitiveLabelColor \$mPrimitiveLabelColor\

Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
===
--- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2011-01-19 18:01:03 UTC 
(rev 42458)
+++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2011-01-19 18:02:22 UTC 
(rev 42459)
@@ -343,6 +343,8 @@
variable mBackground 0 0 0
variable mBackgroundColor Black
variable mBackgroundColorPref 
+   variable mFBBackgroundColor Black
+   variable mFBBackgroundColorPref 
variable mPrimitiveLabelColor Yellow
variable mPrimitiveLabelColorPref
variable mViewingParamsColor Yellow
@@ -5691,6 +5693,9 @@
 
 ::itcl::body ArcherCore::watchVar {_name1 _name2 _op} {
 switch -- $_name1 {
+   mFBBackgroundColor {
+   $itk_component(rtcntrl) configure -color 
[cadwidgets::Ged::get_rgb_color $mFBBackgroundColor]
+   }
mMeasuringStickColor {
$itk_component(ged) configure -measuringStickColor 
$mMeasuringStickColor
}


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42460] brlcad/trunk

2011-01-19 Thread brlcad
Revision: 42460
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42460view=rev
Author:   brlcad
Date: 2011-01-19 18:33:28 + (Wed, 19 Jan 2011)

Log Message:
---
wow, now that I can finally reproduce and investigate ... FIX the 
several-year-old bug where compilation would fail on some Mac OS X systems 
(10.6+?) with a 'dyld: Library not loaded: 
/usr/brlcad/dev-7.18.1//lib/libwdb.19.dylib' message (and subsequent crash 
report).  the problem is actually due to a bug in libtool where their 
temp_rpath variable was getting appended to another path variable but without a 
: between the two path sets.  we patch libtool due to a separate -all_load bug 
where temp_rpath was getting set to 'TCL_PATH:' causing a bad DYLD_LIBRARY_PATH 
in the resulting libtool wrapper script for asc2g.  the fix could have been as 
simple as add a trailing colon manually, but instead I'm just going to remove 
the line since 1) TCL/TK path logic shouldn't be in this file and 2) the commit 
history nor file indicate why that line is patched, and most importantly 3) it 
works on 10.6 and libtool 2.2.4 without it.  long overdue.

Modified Paths:
--
brlcad/trunk/NEWS
brlcad/trunk/m4/patch.m4

Modified: brlcad/trunk/NEWS
===
--- brlcad/trunk/NEWS   2011-01-19 18:02:22 UTC (rev 42459)
+++ brlcad/trunk/NEWS   2011-01-19 18:33:28 UTC (rev 42460)
@@ -13,6 +13,7 @@
 --- 2010-12-XX  Release 7.18.2 ---
 --
 
+* fixed Mac build failure running asc2g before install - Sean Morrison
 * fixed g_diff color table difference false positive - Sean Morrison
 * fixed asc2g color table bug parsing 'color' lines - Sean Morrison
 * 'attr show' command displays attributes sorted by name - Tom Browder

Modified: brlcad/trunk/m4/patch.m4
===
--- brlcad/trunk/m4/patch.m42011-01-19 18:02:22 UTC (rev 42459)
+++ brlcad/trunk/m4/patch.m42011-01-19 18:33:28 UTC (rev 42460)
@@ -60,7 +60,6 @@
# provokes libtool linker bug with noinst libraries.
darwin*)
sed 's/-all_load.*convenience//g'  $libtoolscript  
${libtoolscript}.sed
-   sed s/temp_rpath=\$/temp_rpath=$TCL_PATH:$TK_PATH/g  
$libtoolscript.sed  ${libtoolscript}.sed2
if test ! x`cat ${libtoolscript}` = x`cat 
${libtoolscript}.sed2` ; then
AC_MSG_RESULT([Found -all_load in libtool script, 
removing])
cp ${libtoolscript}.sed2 ${libtoolscript}


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42461] brlcad/trunk/src/other/tkpng/Makefile.am

2011-01-19 Thread starseeker
Revision: 42461
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42461view=rev
Author:   starseeker
Date: 2011-01-19 21:30:38 + (Wed, 19 Jan 2011)

Log Message:
---
I doubt we need the -module flag here - CMake build doesn't need it, so try it 
without

Modified Paths:
--
brlcad/trunk/src/other/tkpng/Makefile.am

Modified: brlcad/trunk/src/other/tkpng/Makefile.am
===
--- brlcad/trunk/src/other/tkpng/Makefile.am2011-01-19 18:33:28 UTC (rev 
42460)
+++ brlcad/trunk/src/other/tkpng/Makefile.am2011-01-19 21:30:38 UTC (rev 
42461)
@@ -5,7 +5,6 @@
-DDM_TK -DIF_TK \
${NOWARN}
 
-tkpng_la_LDFLAGS = -module
 lib_LTLIBRARIES = tkpng.la
 
 brlcadscriptdir =  ${libdir}/tkpng${TKPNG_VERSION}


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42462] brlcad/trunk/src/other/tkpng/Makefile.am

2011-01-19 Thread erikgreenwald
Revision: 42462
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42462view=rev
Author:   erikgreenwald
Date: 2011-01-19 21:32:38 + (Wed, 19 Jan 2011)

Log Message:
---
tkpng - libtkpng

Modified Paths:
--
brlcad/trunk/src/other/tkpng/Makefile.am

Modified: brlcad/trunk/src/other/tkpng/Makefile.am
===
--- brlcad/trunk/src/other/tkpng/Makefile.am2011-01-19 21:30:38 UTC (rev 
42461)
+++ brlcad/trunk/src/other/tkpng/Makefile.am2011-01-19 21:32:38 UTC (rev 
42462)
@@ -1,20 +1,20 @@
-tkpng_la_CFLAGS = \
+libtkpng_la_CFLAGS = \
${LIBZ_CPPFLAGS} \
${TCL_CPPFLAGS} \
${TK_CPPFLAGS} \
-DDM_TK -DIF_TK \
${NOWARN}
 
-lib_LTLIBRARIES = tkpng.la
+lib_LTLIBRARIES = libtkpng.la
 
 brlcadscriptdir =  ${libdir}/tkpng${TKPNG_VERSION}
 brlcadscript_SCRIPTS = pkgIndex.tcl
 
-tkpng_la_SOURCES = \
+libtkpng_la_SOURCES = \
generic/tkImgPNG.c \
generic/tkImgPNGInit.c
 
-tkpng_la_LIBADD = \
+libtkpng_la_LIBADD = \
${LIBZ} \
${TCL} \
${TK} \


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42464] brlcad/trunk/src/libged/search.c

2011-01-19 Thread brlcad
Revision: 42464
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42464view=rev
Author:   brlcad
Date: 2011-01-19 21:52:24 + (Wed, 19 Jan 2011)

Log Message:
---
the typecompare() callback passed to bsearch() needs to return value 0, ==0, 
0 depending on the comparison, not just a boolean.  use bu_strcmp() instead of 
!BU_STR_EQUAL()

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

Modified: brlcad/trunk/src/libged/search.c
===
--- brlcad/trunk/src/libged/search.c2011-01-19 21:34:34 UTC (rev 42463)
+++ brlcad/trunk/src/libged/search.c2011-01-19 21:52:24 UTC (rev 42464)
@@ -1544,7 +1544,7 @@
 int
 typecompare(const void *a, const void *b)
 {
-return !BU_STR_EQUAL(((OPTION *)a)-name, ((OPTION *)b)-name);
+return bu_strcmp(((OPTION *)a)-name, ((OPTION *)b)-name);
 }
 
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42465] brlcad/trunk/src/burst/prnt.c

2011-01-19 Thread erikgreenwald
Revision: 42465
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42465view=rev
Author:   erikgreenwald
Date: 2011-01-19 22:01:20 + (Wed, 19 Jan 2011)

Log Message:
---
#ifdef, not #if DEBUG

Modified Paths:
--
brlcad/trunk/src/burst/prnt.c

Modified: brlcad/trunk/src/burst/prnt.c
===
--- brlcad/trunk/src/burst/prnt.c   2011-01-19 21:52:24 UTC (rev 42464)
+++ brlcad/trunk/src/burst/prnt.c   2011-01-19 22:01:20 UTC (rev 42465)
@@ -530,7 +530,7 @@
 /* calculate cosine of obliquity angle */
 cosobliquity = VDOT(ap-a_ray.r_dir, entrynorm);
 cosobliquity = -cosobliquity;
-#if DEBUG
+#ifdef DEBUG
 if (cosobliquity - COS_TOL  1.0) {
brst_log(cosobliquity=%12.8f\n, cosobliquity);
brst_log(normal=%g, %g, %g\n,


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42466] brlcad/trunk/src/libwdb/Makefile.am

2011-01-19 Thread brlcad
Revision: 42466
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42466view=rev
Author:   brlcad
Date: 2011-01-19 22:36:43 + (Wed, 19 Jan 2011)

Log Message:
---
libwdb seems to be compiling cleanly on mac and linux, so enable enforcement of 
strict build

Modified Paths:
--
brlcad/trunk/src/libwdb/Makefile.am

Modified: brlcad/trunk/src/libwdb/Makefile.am
===
--- brlcad/trunk/src/libwdb/Makefile.am 2011-01-19 22:01:20 UTC (rev 42465)
+++ brlcad/trunk/src/libwdb/Makefile.am 2011-01-19 22:36:43 UTC (rev 42466)
@@ -4,6 +4,7 @@
 
 BREP_CPPFLAGS=-DOBJ_BREP=1 $(OPENNURBS_CPPFLAGS)
 AM_CPPFLAGS = \
+   ${STRICT_FLAGS} \
${TCL_CPPFLAGS} \
${BREP_CPPFLAGS}
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42467] brlcad/trunk/src/libged/attr.c

2011-01-19 Thread brlcad
Revision: 42467
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42467view=rev
Author:   brlcad
Date: 2011-01-19 22:56:44 + (Wed, 19 Jan 2011)

Log Message:
---
er, so soon?  use the new bu_strcmp() function so we properly handle null 
strings.

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

Modified: brlcad/trunk/src/libged/attr.c
===
--- brlcad/trunk/src/libged/attr.c  2011-01-19 22:36:43 UTC (rev 42466)
+++ brlcad/trunk/src/libged/attr.c  2011-01-19 22:56:44 UTC (rev 42467)
@@ -36,8 +36,8 @@
 int
 _ged_cmpattr(const void *p1, const void *p2)
 {
-return strcmp((char * const)((struct bu_attribute_value_pair *)p1)-name,
-  (char * const)((struct bu_attribute_value_pair *)p2)-name);
+return bu_strcmp((char * const)((struct bu_attribute_value_pair 
*)p1)-name,
+   (char * const)((struct bu_attribute_value_pair *)p2)-name);
 }
 
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42468] brlcad/trunk/configure.ac

2011-01-19 Thread brlcad
Revision: 42468
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42468view=rev
Author:   brlcad
Date: 2011-01-19 23:03:14 + (Wed, 19 Jan 2011)

Log Message:
---
er, STRICT_FLAGS should match the flags we actually tested for.

Modified Paths:
--
brlcad/trunk/configure.ac

Modified: brlcad/trunk/configure.ac
===
--- brlcad/trunk/configure.ac   2011-01-19 22:56:44 UTC (rev 42467)
+++ brlcad/trunk/configure.ac   2011-01-19 23:03:14 UTC (rev 42468)
@@ -2159,7 +2159,7 @@
BC_COMPILER_AND_LINKER_RECOGNIZES([-w -pedantic -W -Wall -Wundef 
-Wfloat-equal -Wshadow -Winline -Wno-long-long -Werror], [strict], [no])
if test x$bc_strict_works = xyes ; then
# do not include -w as that was just to suppress any test warnings
-   STRICT_FLAGS=-pedantic -W -Wall -Werror -Wno-long-long
+   STRICT_FLAGS=-pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow 
-Winline -Wno-long-long  -Werror
AC_SUBST(STRICT_FLAGS)
AC_DEFINE([STRICT_FLAGS], [1], [Define to 1 if strict standards 
compliance compilation is enabled.])
fi


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42469] brlcad/trunk/src/libged/search.c

2011-01-19 Thread brlcad
Revision: 42469
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42469view=rev
Author:   brlcad
Date: 2011-01-19 23:24:55 + (Wed, 19 Jan 2011)

Log Message:
---
ws

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

Modified: brlcad/trunk/src/libged/search.c
===
--- brlcad/trunk/src/libged/search.c2011-01-19 23:03:14 UTC (rev 42468)
+++ brlcad/trunk/src/libged/search.c2011-01-19 23:24:55 UTC (rev 42469)
@@ -1536,8 +1536,7 @@
 OPTION tmp;
 
 tmp.name = name;
-return ((OPTION *)bsearch(tmp, options,
- sizeof(options)/sizeof(OPTION), sizeof(OPTION), 
typecompare));
+return ((OPTION *)bsearch(tmp, options, sizeof(options)/sizeof(OPTION), 
sizeof(OPTION), typecompare);)
 }
 
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42470] brlcad/trunk/src

2011-01-19 Thread brlcad
Revision: 42470
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42470view=rev
Author:   brlcad
Date: 2011-01-19 23:25:38 + (Wed, 19 Jan 2011)

Log Message:
---
more cases similiar to the search failure (affecting a bunch of commands 
including the likes of ls, the tedit commands, tops, and others) where we 
cannot use BU_STR_EQUAL since we actually need to use the real return value 
from bu_strcmp() instead of !BU_STR_EQUAL().  nice early catch.

Modified Paths:
--
brlcad/trunk/src/libbu/fnmatch.c
brlcad/trunk/src/libbu/vls.c
brlcad/trunk/src/libged/edcodes.c
brlcad/trunk/src/libged/ls.c
brlcad/trunk/src/libged/wdb_obj.c
brlcad/trunk/src/mged/columns.c
brlcad/trunk/src/mged/solids_on_ray.c
brlcad/trunk/src/vdeck/vdeck.c

Modified: brlcad/trunk/src/libbu/fnmatch.c
===
--- brlcad/trunk/src/libbu/fnmatch.c2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/libbu/fnmatch.c2011-01-19 23:25:38 UTC (rev 42470)
@@ -195,7 +195,7 @@
 static int
 classcompare(const void *a, const void *b)
 {
-return !BU_STR_EQUAL(((CHARCLASS *)a)-idstring, ((CHARCLASS 
*)b)-idstring);
+return bu_strcmp(((CHARCLASS *)a)-idstring, ((CHARCLASS *)b)-idstring);
 }
 
 

Modified: brlcad/trunk/src/libbu/vls.c
===
--- brlcad/trunk/src/libbu/vls.c2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/libbu/vls.c2011-01-19 23:25:38 UTC (rev 42470)
@@ -453,7 +453,7 @@
 }
 
 /* neither empty, straight up comparison */
-return !BU_STR_EQUAL(s1-vls_str+s1-vls_offset, 
s2-vls_str+s2-vls_offset);
+return bu_strcmp(s1-vls_str+s1-vls_offset, s2-vls_str+s2-vls_offset);
 }
 
 

Modified: brlcad/trunk/src/libged/edcodes.c
===
--- brlcad/trunk/src/libged/edcodes.c   2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/libged/edcodes.c   2011-01-19 23:25:38 UTC (rev 42470)
@@ -58,7 +58,7 @@
 reg1 = strchr(*(char **)p1, '/');
 reg2 = strchr(*(char **)p2, '/');
 
-return !BU_STR_EQUAL(reg1, reg2);
+return bu_strcmp(reg1, reg2);
 }
 
 

Modified: brlcad/trunk/src/libged/ls.c
===
--- brlcad/trunk/src/libged/ls.c2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/libged/ls.c2011-01-19 23:25:38 UTC (rev 42470)
@@ -68,14 +68,13 @@
  * compare on the respective names and return that value.
  */
 static int
-cmpdirname(const genptr_t a,
-  const genptr_t b)
+cmpdirname(const genptr_t a, const genptr_t b)
 {
 struct directory **dp1, **dp2;
 
 dp1 = (struct directory **)a;
 dp2 = (struct directory **)b;
-return !BU_STR_EQUAL((*dp1)-d_namep, (*dp2)-d_namep);
+return bu_strcmp((*dp1)-d_namep, (*dp2)-d_namep);
 }
 
 

Modified: brlcad/trunk/src/libged/wdb_obj.c
===
--- brlcad/trunk/src/libged/wdb_obj.c   2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/libged/wdb_obj.c   2011-01-19 23:25:38 UTC (rev 42470)
@@ -8920,14 +8920,13 @@
  * on the respective names and return that value.
  */
 int
-wdb_cmpdirname(const genptr_t a,
-  const genptr_t b)
+wdb_cmpdirname(const genptr_t a, const genptr_t b)
 {
 struct directory **dp1, **dp2;
 
 dp1 = (struct directory **)a;
 dp2 = (struct directory **)b;
-return !BU_STR_EQUAL((*dp1)-d_namep, (*dp2)-d_namep);
+return bu_strcmp((*dp1)-d_namep, (*dp2)-d_namep);
 }
 
 

Modified: brlcad/trunk/src/mged/columns.c
===
--- brlcad/trunk/src/mged/columns.c 2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/mged/columns.c 2011-01-19 23:25:38 UTC (rev 42470)
@@ -98,7 +98,7 @@
 
 dp1 = (struct directory **)a;
 dp2 = (struct directory **)b;
-return !BU_STR_EQUAL((*dp1)-d_namep, (*dp2)-d_namep);
+return bu_strcmp((*dp1)-d_namep, (*dp2)-d_namep);
 }
 
 

Modified: brlcad/trunk/src/mged/solids_on_ray.c
===
--- brlcad/trunk/src/mged/solids_on_ray.c   2011-01-19 23:24:55 UTC (rev 
42469)
+++ brlcad/trunk/src/mged/solids_on_ray.c   2011-01-19 23:25:38 UTC (rev 
42470)
@@ -75,7 +75,7 @@
 BU_CKMAG(s1, SOL_NAME_DIST_MAGIC, sol_name_dist structure);
 BU_CKMAG(s2, SOL_NAME_DIST_MAGIC, sol_name_dist structure);
 
-return !BU_STR_EQUAL(s1-name, s2-name);
+return bu_strcmp(s1-name, s2-name);
 }
 
 

Modified: brlcad/trunk/src/vdeck/vdeck.c
===
--- brlcad/trunk/src/vdeck/vdeck.c  2011-01-19 23:24:55 UTC (rev 42469)
+++ brlcad/trunk/src/vdeck/vdeck.c  2011-01-19 23:25:38 UTC (rev 42470)
@@ -211,7 +211,7 @@
 const char **lhs = (const char **)a;
 const char **rhs = 

[brlcad-commits] SF.net SVN: brlcad:[42472] brlcad/trunk/src/libanalyze/Makefile.am

2011-01-19 Thread brlcad
Revision: 42472
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42472view=rev
Author:   brlcad
Date: 2011-01-20 01:00:11 + (Thu, 20 Jan 2011)

Log Message:
---
another dir that compiles clean, strictify

Modified Paths:
--
brlcad/trunk/src/libanalyze/Makefile.am

Modified: brlcad/trunk/src/libanalyze/Makefile.am
===
--- brlcad/trunk/src/libanalyze/Makefile.am 2011-01-20 00:58:39 UTC (rev 
42471)
+++ brlcad/trunk/src/libanalyze/Makefile.am 2011-01-20 01:00:11 UTC (rev 
42472)
@@ -6,7 +6,9 @@
density.c \
overlaps.c
 
-AM_CPPFLAGS = ${TCL_CPPFLAGS}
+AM_CPPFLAGS = \
+   ${STRICT_FLAGS} \
+   ${TCL_CPPFLAGS}
 
 libanalyze_la_SOURCES =
 libanalyze_la_LDFLAGS = -version-info 19:1 -no-undefined -Wc,${FEXCEPTIONS}


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42478] brlcad/trunk/src/libged/dg_obj.c

2011-01-19 Thread brlcad
Revision: 42478
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42478view=rev
Author:   brlcad
Date: 2011-01-20 03:44:37 + (Thu, 20 Jan 2011)

Log Message:
---
stash the return value so we clean up properly

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

Modified: brlcad/trunk/src/libged/dg_obj.c
===
--- brlcad/trunk/src/libged/dg_obj.c2011-01-20 03:36:00 UTC (rev 42477)
+++ brlcad/trunk/src/libged/dg_obj.c2011-01-20 03:44:37 UTC (rev 42478)
@@ -3059,7 +3059,7 @@
 }
 
 if (dgcdp-nmg_triangulate) {
-   process_triangulation(tsp, pathp, dgcdp-interp);
+   failed = process_triangulation(tsp, pathp, dgcdp-interp);
if (failed) {
db_free_tree(curtree, tsp-ts_resp);
return (union tree *)NULL;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42479] brlcad/trunk/src/libged/draw.c

2011-01-19 Thread brlcad
Revision: 42479
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42479view=rev
Author:   brlcad
Date: 2011-01-20 03:47:53 + (Thu, 20 Jan 2011)

Log Message:
---
bom bom bom, and another one bites the dust.  quell warning about curtree 
getting clobbered due to longjmp by breaking jumping out into separate frames.

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

Modified: brlcad/trunk/src/libged/draw.c
===
--- brlcad/trunk/src/libged/draw.c  2011-01-20 03:44:37 UTC (rev 42478)
+++ brlcad/trunk/src/libged/draw.c  2011-01-20 03:47:53 UTC (rev 42479)
@@ -394,6 +394,53 @@
 }
 
 
+int
+process_boolean(union tree *curtree, struct db_tree_state *tsp, const struct 
db_full_path *pathp, struct _ged_client_data *dgcdp)
+{
+int result = 1;
+
+if (!BU_SETJUMP) {
+   /* try */
+
+   result = nmg_boolean(curtree, *tsp-ts_m, tsp-ts_tol, tsp-ts_resp);
+
+} else {
+   /* catch */
+   char  *sofar = db_path_to_string(pathp);
+
+   bu_vls_printf(dgcdp-gedp-ged_result_str, WARNING: Boolean 
evaluation of %s failed!!!\n, sofar);
+   bu_free((genptr_t)sofar, path string);
+} BU_UNSETJUMP;
+
+return result;
+}
+
+
+int
+process_triangulation(struct db_tree_state *tsp, const struct db_full_path 
*pathp, struct _ged_client_data *dgcdp)
+{
+int result = 1;
+
+if (!BU_SETJUMP) {
+   /* try */
+
+   nmg_triangulate_model(*tsp-ts_m, tsp-ts_tol);
+   result = 0;
+
+} else {
+   /* catch */
+
+   char  *sofar = db_path_to_string(pathp);
+
+   bu_vls_printf(dgcdp-gedp-ged_result_str, WARNING: Triangulation of 
%s failed!!!\n, sofar);
+   bu_free((genptr_t)sofar, path string);
+
+} BU_UNSETJUMP;
+
+return result;
+}
+
+
 /**
  * G E D _ N M G _ R E G I O N _ E N D
  *
@@ -428,23 +475,15 @@
 
 if (curtree-tr_op == OP_NOP) return curtree;
 
+failed = 1;
 if (!dgcdp-draw_nmg_only) {
-   if (BU_SETJUMP) {
-   char *sofar = db_path_to_string(pathp);
 
-   BU_UNSETJUMP;
-
-   bu_vls_printf(dgcdp-gedp-ged_result_str, WARNING: Boolean 
evaluation of %s failed!!!\n, sofar);
-   bu_free((genptr_t)sofar, path string);
-   db_free_tree(curtree, tsp-ts_resp);
-   return (union tree *)NULL;
-   }
-   failed = nmg_boolean(curtree, *tsp-ts_m, tsp-ts_tol, tsp-ts_resp);
-   BU_UNSETJUMP;
+   failed = process_boolean(curtree, tsp, pathp, dgcdp);
if (failed) {
db_free_tree(curtree, tsp-ts_resp);
return (union tree *)NULL;
}
+
 } else if (curtree-tr_op != OP_NMG_TESS) {
bu_vls_printf(dgcdp-gedp-ged_result_str, Cannot use '-d' option 
when Boolean evaluation is required\n);
db_free_tree(curtree, tsp-ts_resp);
@@ -459,18 +498,11 @@
 }
 
 if (dgcdp-nmg_triangulate) {
-   if (BU_SETJUMP) {
-   char *sofar = db_path_to_string(pathp);
-
-   BU_UNSETJUMP;
-
-   bu_vls_printf(dgcdp-gedp-ged_result_str, WARNING: Triangulation 
of %s failed!!!\n, sofar);
-   bu_free((genptr_t)sofar, path string);
+   failed = process_triangulation(tsp, pathp, dgcdp);
+   if (failed) {
db_free_tree(curtree, tsp-ts_resp);
return (union tree *)NULL;
}
-   nmg_triangulate_model(*tsp-ts_m, tsp-ts_tol);
-   BU_UNSETJUMP;
 }
 
 if (r != 0) {


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42480] brlcad/trunk/src/libged/facetize.c

2011-01-19 Thread brlcad
Revision: 42480
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42480view=rev
Author:   brlcad
Date: 2011-01-20 03:53:35 + (Thu, 20 Jan 2011)

Log Message:
---
sometimes the fix is simple.  making three vars static made the compiler 
sufficiently happy.

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

Modified: brlcad/trunk/src/libged/facetize.c
===
--- brlcad/trunk/src/libged/facetize.c  2011-01-20 03:47:53 UTC (rev 42479)
+++ brlcad/trunk/src/libged/facetize.c  2011-01-20 03:53:35 UTC (rev 42480)
@@ -75,20 +75,23 @@
 {
 int i;
 int c;
-int triangulate;
 char *newname;
 struct rt_db_internal intern;
 struct directory *dp;
 int failed;
 int nmg_use_tnurbs = 0;
-int make_bot;
-int marching_cube = 0;
 struct db_tree_state init_state;
 struct db_i *dbip;
 union tree *facetize_tree;
 struct model *nmg_model;
+
 static const char *usage = [-n] [-t] [-T] new_obj old_obj [old_obj2 
old_obj3 ...];
 
+/* static due to jumping */
+static int triangulate;
+static int make_bot;
+static int marching_cube;
+
 GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
 GED_CHECK_READ_ONLY(gedp, GED_ERROR);
 GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
@@ -117,6 +120,7 @@
 init_state.ts_tol = gedp-ged_wdbp-wdb_tol;
 
 /* Initial vaues for options, must be reset each time */
+marching_cube = 0;
 triangulate = 0;
 make_bot = 1;
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42481] brlcad/trunk/src/libged/human.c

2011-01-19 Thread brlcad
Revision: 42481
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42481view=rev
Author:   brlcad
Date: 2011-01-20 04:01:31 + (Thu, 20 Jan 2011)

Log Message:
---
heh, some seriously sketchy string initialization in here, but punt on cleaning 
it up.  keep the compiler happy, though, by making the initialization explicit 
with a strlcpy.  other %lf and 509 string limit quellage too.  untested.

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

Modified: brlcad/trunk/src/libged/human.c
===
--- brlcad/trunk/src/libged/human.c 2011-01-20 03:53:35 UTC (rev 42480)
+++ brlcad/trunk/src/libged/human.c 2011-01-20 04:01:31 UTC (rev 42481)
@@ -1541,26 +1541,25 @@
 }
 
 bu_log(usage: %s [%s]\n, name, bu_vls_addr(str));
-bu_log(options:\n
-  \t-h\t\tShow help\n
-  \t-?\t\tShow help\n
-  \t-A\t\tAutoMake defaults\n
-  \t-m\t\tManual sizing mode\n
-  \t-H\t\tSet Height in inches\n
-  \t-L\t\tSet Center Point in inches, at feet (default 0 0 0)\n
-/*\t-o\t\tSet output file name\n */
-  \t-b\t\tShow bounding Boxes\n
-  \t-n\t\tSet bounding region name, default Body.c\n
-  \t-N\t\tNumber to make (square)\n
-  \t-s\t\tStance to take 0-Stand 1-Sit 2-Drive 3-Arms out 4-Letterman 
5-Captain 999-Custom\n
-  \t-p\t\tSet Percentile (not implemented yet) 1-99\n
-  \t-t\t\tSave bounding box information to file Stats.txt\n
-  \t-T\t\tRead bounding box information from file Stats.txt\n
-  \t-v\t\tGenerate verbose output of all data used to build human 
model, to Verbose.txt\n
-  \t-V\t\tRead verbose input of all data and build a human model, 
using Verbose.txt\n
-  \t 1 - 9, 0, Q, and special characters are used for wizard 
purposes, ignore them.\n
-  \t Last word on command line is also top level object. No argument 
needed!\n
-   );
+bu_log(options:\n);
+bu_log(\t-h\t\tShow help\n);
+bu_log(\t-?\t\tShow help\n);
+bu_log(\t-A\t\tAutoMake defaults\n);
+bu_log(\t-m\t\tManual sizing mode\n);
+bu_log(\t-H\t\tSet Height in inches\n);
+bu_log(\t-L\t\tSet Center Point in inches, at feet (default 0 0 0)\n);
+/* bu_log(\t-o\t\tSet output file name\n */
+bu_log(\t-b\t\tShow bounding Boxes\n);
+bu_log(\t-n\t\tSet bounding region name, default Body.c\n);
+bu_log(\t-N\t\tNumber to make (square)\n);
+bu_log(\t-s\t\tStance to take 0-Stand 1-Sit 2-Drive 3-Arms out 
4-Letterman 5-Captain 999-Custom\n);
+bu_log(\t-p\t\tSet Percentile (not implemented yet) 1-99\n);
+bu_log(\t-t\t\tSave bounding box information to file Stats.txt\n);
+bu_log(\t-T\t\tRead bounding box information from file Stats.txt\n);
+bu_log(\t-v\t\tGenerate verbose output of all data used to build human 
model, to Verbose.txt\n);
+bu_log(\t-V\t\tRead verbose input of all data and build a human model, 
using Verbose.txt\n);
+bu_log(\t 1 - 9, 0, Q, and special characters are used for wizard 
purposes, ignore them.\n);
+bu_log(\t Last word on command line is also top level object. No argument 
needed!\n);
 
 bu_vls_free(str);
 return;
@@ -1910,13 +1909,13 @@
 x = dude-head.headSize;
 y = x;
 z = x;
-fprintf(dump, Head\t%lf\t%lf\t%lf\n, x, y, z);   
+fprintf(dump, Head\t%f\t%f\t%f\n, x, y, z);  
 
 /*Neck*/
 x = dude-head.neckWidth * 2;
 y = x;
 z = dude-head.neckLength;
-fprintf(dump, Neck\t%lf\t%lf\t%lf\n, x, y, z);   
+fprintf(dump, Neck\t%f\t%f\t%f\n, x, y, z);  
 
 /*Upper Torso*/
 if (dude-torso.shoulderDepth  dude-torso.abDepth)
@@ -1925,7 +1924,7 @@
x = dude-torso.abDepth;
 y = dude-torso.shoulderWidth;
 z = dude-torso.topTorsoLength;
-fprintf(dump, UpperTorso\t%lf\t%lf\t%lf\n, x, y, z); 
+fprintf(dump, UpperTorso\t%f\t%f\t%f\n, x, y, z);
 
 /*Lower Torso*/
 if (dude-torso.abDepth  dude-torso.pelvisDepth)
@@ -1934,82 +1933,82 @@
x = dude-torso.pelvisDepth;
 y = dude-torso.pelvisWidth;
 z = dude-torso.lowTorsoLength;
-fprintf(dump, LowerTorso\t%lf\t%lf\t%lf\n, x, y, z); 
+fprintf(dump, LowerTorso\t%f\t%f\t%f\n, x, y, z);
 
 /*Shoulder*/
 x = dude-arms.upperArmWidth *2;
 y = x;
 z = y;
-fprintf(dump, ShoulderJoint\t%lf\t%lf\t%lf\n, x, y, z);  
+fprintf(dump, ShoulderJoint\t%f\t%f\t%f\n, x, y, z); 
 
 /*Upper Arm*/
 x = dude-arms.upperArmWidth *2;
 y = x;
 z = dude-arms.upperArmLength;
-fprintf(dump, UpperArm\t%lf\t%lf\t%lf\n, x, y, z);   
+fprintf(dump, UpperArm\t%f\t%f\t%f\n, x, y, z);  
 
 /*Lower Arm*/
 x = dude-arms.elbowWidth * 2;
 y = x;
 z = dude-arms.lowerArmLength;
-fprintf(dump, LowerArm\t%lf\t%lf\t%lf\n, x, y, z);   
+fprintf(dump, LowerArm\t%f\t%f\t%f\n, x, y, z);  
 
 /*Elbow*/
 x = 

[brlcad-commits] SF.net SVN: brlcad:[42484] brlcad/trunk/src/libged/inside.c

2011-01-19 Thread brlcad
Revision: 42484
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42484view=rev
Author:   brlcad
Date: 2011-01-20 04:05:36 + (Thu, 20 Jan 2011)

Log Message:
---
make sure we init our vectors before using them.

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

Modified: brlcad/trunk/src/libged/inside.c
===
--- brlcad/trunk/src/libged/inside.c2011-01-20 04:05:08 UTC (rev 42483)
+++ brlcad/trunk/src/libged/inside.c2011-01-20 04:05:36 UTC (rev 42484)
@@ -387,6 +387,11 @@
 
 RT_TGC_CK_MAGIC(tgc);
 
+VSETALL(unit_a, 0);
+VSETALL(unit_b, 0);
+VSETALL(unit_c, 0);
+VSETALL(unit_d, 0);
+
 VCROSS(norm, tgc-a, tgc-b);
 VUNITIZE(norm);
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42485] brlcad/trunk/src/libged/select.c

2011-01-19 Thread brlcad
Revision: 42485
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42485view=rev
Author:   brlcad
Date: 2011-01-20 04:16:28 + (Thu, 20 Jan 2011)

Log Message:
---
more var init before use.

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

Modified: brlcad/trunk/src/libged/select.c
===
--- brlcad/trunk/src/libged/select.c2011-01-20 04:05:36 UTC (rev 42484)
+++ brlcad/trunk/src/libged/select.c2011-01-20 04:16:28 UTC (rev 42485)
@@ -34,11 +34,14 @@
 int
 _ged_select(struct ged *gedp, fastf_t vx, fastf_t vy, fastf_t vwidth, fastf_t 
vheight, int rflag)
 {
-struct ged_display_list *gdlp;
-struct ged_display_list *next_gdlp;
-struct solid   *sp;
-fastf_t vr;
-fastf_t vmin_x, vmin_y, vmax_x, vmax_y;
+struct ged_display_list *gdlp = NULL;
+struct ged_display_list *next_gdlp = NULL;
+struct solid *sp = NULL;
+fastf_t vr = 0.0;
+fastf_t vmin_x = 0.0;
+fastf_t vmin_y = 0.0;
+fastf_t vmax_x = 0.0;
+fastf_t vmax_y = 0.0;
 
 if (rflag) {
vr = vwidth;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42486] brlcad/trunk/src/libged

2011-01-19 Thread brlcad
Revision: 42486
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42486view=rev
Author:   brlcad
Date: 2011-01-20 04:24:15 + (Thu, 20 Jan 2011)

Log Message:
---
more quelling compilation woes due to string lengths exceeding c90's 509 char 
limit, break em up.

Modified Paths:
--
brlcad/trunk/src/libged/ps.c
brlcad/trunk/src/libged/qray.c
brlcad/trunk/src/libged/rect.c
brlcad/trunk/src/libged/tire.c
brlcad/trunk/src/libged/wdb_qray.c

Modified: brlcad/trunk/src/libged/ps.c
===
--- brlcad/trunk/src/libged/ps.c2011-01-20 04:16:28 UTC (rev 42485)
+++ brlcad/trunk/src/libged/ps.c2011-01-20 04:24:15 UTC (rev 42486)
@@ -68,13 +68,17 @@
 
 fprintf(fp, \
 %d setlinewidth\n\
-\n\
+\n, linewidth);
+
+fprintf(fp, \
 %% Sizes, made functions to avoid scaling if not needed\n\
 /FntH /%s findfont 80 scalefont def\n\
 /DFntL { /FntL /%s findfont 73.4 scalefont def } def\n\
 /DFntM { /FntM /%s findfont 50.2 scalefont def } def\n\
 /DFntS { /FntS /%s findfont 44 scalefont def } def\n\
-\n\
+\n, font, font, font, font);
+
+fprintf(fp, \
 %% line styles\n\
 /NV { [] 0 setdash } def   %% normal vectors\n\
 /DV { [8] 0 setdash } def  %% dotted vectors\n\
@@ -90,7 +94,7 @@
 FntH  setfont\n\
 NEWPG\n\
 ,
-   linewidth, font, font, font, font, xoffset, yoffset, scale, scale);
+   xoffset, yoffset, scale, scale);
 }
 
 static void

Modified: brlcad/trunk/src/libged/qray.c
===
--- brlcad/trunk/src/libged/qray.c  2011-01-20 04:16:28 UTC (rev 42485)
+++ brlcad/trunk/src/libged/qray.c  2011-01-20 04:24:15 UTC (rev 42486)
@@ -49,7 +49,7 @@
 
 static struct ged_qray_fmt_data def_qray_fmt_data[] = {
 {'r', \Origin (x y z) = (%.2f %.2f %.2f)  (h v d) = (%.2f %.2f 
%.2f)\\nDirection (x y z) = (%.4f %.4f %.4f)  (az el) = (%.2f %.2f)\\n\ x_orig 
y_orig z_orig h v d_orig x_dir y_dir z_dir a e},
-{'h', \Region Name   Entry (x y z)  LOS  
Obliq_in\\n\},
+{'h', \Region Name   Entry (x y z) LOS  Obliq_in\\n\},
 {'p', \%-20s (%9.3f %9.3f %9.3f) %8.2f %8.3f\\n\ reg_name x_in y_in 
z_in los obliq_in},
 {'f', \\},
 {'m', \You missed the target\\n\},
@@ -58,21 +58,26 @@
 {(char)0, (char *)NULL}
 };
 
-static char qray_syntax[] = \
- qray vars print a list of all variables (i.e. var = 
val)\n\
- qray basename [str]   set or get basename for query ray primitives\n\
- qray effects [t|g|b]  set or get effects (i.e. text, graphical or 
both)\n\
- qray echo [0|1]   set or get command echo\n\
- qray oddcolor [r g b] set or get color of odd partitions\n\
- qray evencolor [r g b]set or get color of even partitions\n\
- qray voidcolor [r g b]set or get color of void areas\n\
- qray overlapcolor [r g b] set or get color of overlap areas\n\
- qray fmt [r|h|p|f|m|o|g [str]]set or get format string(s)\n\
- qray script [str] set or get the nirt script string\n\
- qray [help]   print this help message\n\
-;
 
 static void
+usage(struct ged *gedp, const char *argv0)
+{
+bu_vls_printf(gedp-ged_result_str, Usage: %s\n, argv0);
+bu_vls_printf(gedp-ged_result_str,  qray vars   print a 
list of all variables (i.e. var = val)\n);
+bu_vls_printf(gedp-ged_result_str,  qray basename [str] set or 
get basename for query ray primitives\n);
+bu_vls_printf(gedp-ged_result_str,  qray effects [t|g|b]
set or get effects (i.e. text, graphical or both)\n);
+bu_vls_printf(gedp-ged_result_str,  qray echo [0|1] set or 
get command echo\n);
+bu_vls_printf(gedp-ged_result_str,  qray oddcolor [r g b]   
set or get color of odd partitions\n);
+bu_vls_printf(gedp-ged_result_str,  qray evencolor [r g b]  
set or get color of even partitions\n);
+bu_vls_printf(gedp-ged_result_str,  qray voidcolor [r g b]  
set or get color of void areas\n);
+bu_vls_printf(gedp-ged_result_str,  qray overlapcolor [r g b]   set or 
get color of overlap areas\n);
+bu_vls_printf(gedp-ged_result_str,  qray fmt [r|h|p|f|m|o|g [str]]  
set or get format string(s)\n);
+bu_vls_printf(gedp-ged_result_str,  qray script [str]   set or 
get the nirt script string\n);
+bu_vls_printf(gedp-ged_result_str,  qray [help] print 
this help message\n);
+}
+
+
+static void
 qray_print_fmts(struct ged *gedp)
 {
 int i;
@@ -81,6 +86,7 @@
bu_vls_printf(gedp-ged_result_str, %s\n, 
bu_vls_addr(gedp-ged_gdp-gd_qray_fmts[i].fmt));
 }
 
+
 static void
 qray_print_vars(struct ged *gedp)
 {
@@ -100,6 +106,7 @@
 qray_print_fmts(gedp);
 }
 
+
 static int
 qray_get_fmt_index(struct ged  *gedp,
   char c)
@@ -113,6 

[brlcad-commits] SF.net SVN: brlcad:[42487] brlcad/trunk/src/libged/wdb_obj.c

2011-01-19 Thread brlcad
Revision: 42487
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42487view=rev
Author:   brlcad
Date: 2011-01-20 04:26:51 + (Thu, 20 Jan 2011)

Log Message:
---
woo hoo, this makes for the last strict quellage in libged.  another longjmp 
protection, fortunately made very simple since they're just flags that get 
initialized every time and can just be made static.

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

Modified: brlcad/trunk/src/libged/wdb_obj.c
===
--- brlcad/trunk/src/libged/wdb_obj.c   2011-01-20 04:24:15 UTC (rev 42486)
+++ brlcad/trunk/src/libged/wdb_obj.c   2011-01-20 04:26:51 UTC (rev 42487)
@@ -4435,18 +4435,20 @@
 {
 int i;
 int c;
-int triangulate;
 char *newname;
 struct rt_db_internal intern;
 struct directory *dp;
 int failed;
 int nmg_use_tnurbs = 0;
-int make_bot;
 struct db_tree_state init_state;
 struct db_i *dbip;
 union tree *facetize_tree;
 struct model *nmg_model;
 
+/* static due to longjmp, keep gcc happy */
+static int triangulate;
+static int make_bot;
+
 if (argc  3) {
Tcl_AppendResult(interp,
 Usage: ,


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42488] brlcad/trunk/src/libged/Makefile.am

2011-01-19 Thread brlcad
Revision: 42488
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42488view=rev
Author:   brlcad
Date: 2011-01-20 04:27:05 + (Thu, 20 Jan 2011)

Log Message:
---
turn on ... STRICT!

Modified Paths:
--
brlcad/trunk/src/libged/Makefile.am

Modified: brlcad/trunk/src/libged/Makefile.am
===
--- brlcad/trunk/src/libged/Makefile.am 2011-01-20 04:26:51 UTC (rev 42487)
+++ brlcad/trunk/src/libged/Makefile.am 2011-01-20 04:27:05 UTC (rev 42488)
@@ -262,7 +262,7 @@
zap.c \
zoom.c
 
-# AM_CFLAGS = ${STRICT_FLAGS}
+AM_CFLAGS = ${STRICT_FLAGS}
 
 # cannot set per-target CPPFLAGS until automake 1.7+
 AM_CPPFLAGS = \


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42489] brlcad/trunk/src/libfb/fb_generic.c

2011-01-19 Thread brlcad
Revision: 42489
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42489view=rev
Author:   brlcad
Date: 2011-01-20 04:28:06 + (Thu, 20 Jan 2011)

Log Message:
---
need strings.h, not the older string.h for strcasecmp()

Modified Paths:
--
brlcad/trunk/src/libfb/fb_generic.c

Modified: brlcad/trunk/src/libfb/fb_generic.c
===
--- brlcad/trunk/src/libfb/fb_generic.c 2011-01-20 04:27:05 UTC (rev 42488)
+++ brlcad/trunk/src/libfb/fb_generic.c 2011-01-20 04:28:06 UTC (rev 42489)
@@ -33,7 +33,7 @@
 
 #include stdlib.h
 #include stdio.h
-#include string.h
+#include strings.h
 
 #include fb.h
 


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42490] brlcad/trunk/src/liboptical

2011-01-19 Thread brlcad
Revision: 42490
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42490view=rev
Author:   brlcad
Date: 2011-01-20 04:38:44 + (Thu, 20 Jan 2011)

Log Message:
---
remove two trailing unused parameters to IrradianceEstimate(), mark unused 
params, shine light onto the shadows.

Modified Paths:
--
brlcad/trunk/src/liboptical/photonmap.c
brlcad/trunk/src/liboptical/sh_plastic.c

Modified: brlcad/trunk/src/liboptical/photonmap.c
===
--- brlcad/trunk/src/liboptical/photonmap.c 2011-01-20 04:28:06 UTC (rev 
42489)
+++ brlcad/trunk/src/liboptical/photonmap.c 2011-01-20 04:38:44 UTC (rev 
42490)
@@ -26,7 +26,11 @@
 #include common.h
 
 #include stdlib.h
+#include time.h
 
+#ifdef HAVE_UNISTD_H
+#  include unistd.h
+#endif
 #ifdef HAVE_ALARM
 #  include signal.h
 #endif
@@ -170,12 +174,12 @@
 
 
 /* Places photon into flat array that wwill form the final kd-tree. */
-void Store(point_t Pos, vect_t Dir, vect_t Normal, int Map) {
+void Store(point_t Pos, vect_t Dir, vect_t Normal, int map) {
 struct PhotonSearch Search;
 int i;
 
 /* If Importance Mapping is enabled, Check to see if the Photon is in an 
area that is considered important, if not then disregard it */
-if (Map != PM_IMPORTANCE  PMap[PM_IMPORTANCE]-StoredPhotons) {
+if (map != PM_IMPORTANCE  PMap[PM_IMPORTANCE]-StoredPhotons) {
/* Do a KD-Tree lookup and if the photon is within a distance of 
sqrt(ScaleFactor) from the nearest importon then keep it, otherwise discard it 
*/
 
Search.RadSq = ScaleFactor;
@@ -199,30 +203,30 @@
 }
 
 
-if (PMap[Map]-StoredPhotons  PMap[Map]-MaxPhotons) {
+if (PMap[map]-StoredPhotons  PMap[map]-MaxPhotons) {
HitG++;
for (i = 0; i  3; i++) {
/* Store Position, Direction, and Power of Photon */
-   Emit[Map][PMap[Map]-StoredPhotons].Pos[i] = Pos[i];
-   Emit[Map][PMap[Map]-StoredPhotons].Dir[i] = Dir[i];
-   Emit[Map][PMap[Map]-StoredPhotons].Normal[i] = Normal[i];
-   Emit[Map][PMap[Map]-StoredPhotons].Power[i] = CurPh.Power[i];
+   Emit[map][PMap[map]-StoredPhotons].Pos[i] = Pos[i];
+   Emit[map][PMap[map]-StoredPhotons].Dir[i] = Dir[i];
+   Emit[map][PMap[map]-StoredPhotons].Normal[i] = Normal[i];
+   Emit[map][PMap[map]-StoredPhotons].Power[i] = CurPh.Power[i];
}
-   PMap[Map]-StoredPhotons++;
+   PMap[map]-StoredPhotons++;
/*
- if (Map != PM_IMPORTANCE  PMap[PM_IMPORTANCE]-StoredPhotons  
PMap[PM_IMPORTANCE]-MaxPhotons)
- bu_log(Map2: %d, Size: %d\n, Map, PMap[Map]-StoredPhotons);
+ if (map != PM_IMPORTANCE  PMap[PM_IMPORTANCE]-StoredPhotons  
PMap[PM_IMPORTANCE]-MaxPhotons)
+ bu_log(Map2: %d, Size: %d\n, map, PMap[map]-StoredPhotons);
*/
/*
- if (Map == PM_IMPORTANCE)
- bu_log(Map: %d, Size: %d, [%.3f, %.3f, %.3f] [%.3f, %.3f, %.3f]\n, 
Map, PMap[Map]-StoredPhotons, Pos[0], Pos[1], Pos[2], CurPh.Power[0], 
CurPh.Power[1], CurPh.Power[2]);
+ if (map == PM_IMPORTANCE)
+ bu_log(Map: %d, Size: %d, [%.3f, %.3f, %.3f] [%.3f, %.3f, %.3f]\n, 
map, PMap[map]-StoredPhotons, Pos[0], Pos[1], Pos[2], CurPh.Power[0], 
CurPh.Power[1], CurPh.Power[2]);
*/
 }
 
 /*
-  bu_log([%d][%d][%.3f, %.3f, %.3f]\n, Map, PMap[Map]-StoredPhotons, 
CurPh.Power[0], CurPh.Power[1], CurPh.Power[2]);
-  if (!(PMap[Map]-StoredPhotons % 64))
-  bu_log([%d][%d][%.3f, %.3f, %.3f]\n, Map, PMap[Map]-StoredPhotons, 
Pos[0], Pos[1], Pos[2]);
+  bu_log([%d][%d][%.3f, %.3f, %.3f]\n, map, PMap[map]-StoredPhotons, 
CurPh.Power[0], CurPh.Power[1], CurPh.Power[2]);
+  if (!(PMap[map]-StoredPhotons % 64))
+  bu_log([%d][%d][%.3f, %.3f, %.3f]\n, map, PMap[map]-StoredPhotons, 
Pos[0], Pos[1], Pos[2]);
 */
 }
 
@@ -387,7 +391,9 @@
 }
 
 
-int HitRef(struct application *ap, struct partition *PartHeadp, struct seg 
*finished_segs) {
+int
+HitRef(struct application *ap, struct partition *PartHeadp, struct seg 
*UNUSED(finished_segs))
+{
 struct partition *part;
 vect_t pt, normal, spec;
 fastf_t refi, transmit;
@@ -431,7 +437,9 @@
 
 
 /* Callback for Photon Hit, The 'current' photon is Emit[PMap-StoredPhotons] 
*/
-int PHit(struct application *ap, struct partition *PartHeadp, struct seg 
*finished_segs) {
+int
+PHit(struct application *ap, struct partition *PartHeadp, struct seg 
*UNUSED(finished_segs))
+{
 struct partition *part;
 vect_t pt, normal, color, spec, power;
 fastf_t refi, transmit, prob, prob_diff, prob_spec, prob_ref;
@@ -619,7 +627,9 @@
 
 
 /* Callback for Photon Miss */
-int PMiss(struct application *ap) {
+int
+PMiss(struct application *UNUSED(ap))
+{
 return 0;
 }
 
@@ -629,13 +639,13 @@
  * Call this function after each light source is processed.
  * This function also handles setting a default power for the photons based
  * on the 

[brlcad-commits] SF.net SVN: brlcad:[42491] brlcad/trunk/src/libfb

2011-01-19 Thread brlcad
Revision: 42491
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42491view=rev
Author:   brlcad
Date: 2011-01-20 05:23:19 + (Thu, 20 Jan 2011)

Log Message:
---
need string.h from some things, strings.h for others.  likely needs revisiting 
for windows

Modified Paths:
--
brlcad/trunk/src/libfb/fb_generic.c
brlcad/trunk/src/libfb/fb_obj.c
brlcad/trunk/src/libfb/tcl.c

Modified: brlcad/trunk/src/libfb/fb_generic.c
===
--- brlcad/trunk/src/libfb/fb_generic.c 2011-01-20 04:38:44 UTC (rev 42490)
+++ brlcad/trunk/src/libfb/fb_generic.c 2011-01-20 05:23:19 UTC (rev 42491)
@@ -33,6 +33,7 @@
 
 #include stdlib.h
 #include stdio.h
+#include string.h
 #include strings.h
 
 #include fb.h

Modified: brlcad/trunk/src/libfb/fb_obj.c
===
--- brlcad/trunk/src/libfb/fb_obj.c 2011-01-20 04:38:44 UTC (rev 42490)
+++ brlcad/trunk/src/libfb/fb_obj.c 2011-01-20 05:23:19 UTC (rev 42491)
@@ -30,7 +30,7 @@
 #include common.h
 
 #include stdlib.h
-#include string.h
+#include strings.h
 
 #include bio.h
 #include tcl.h

Modified: brlcad/trunk/src/libfb/tcl.c
===
--- brlcad/trunk/src/libfb/tcl.c2011-01-20 04:38:44 UTC (rev 42490)
+++ brlcad/trunk/src/libfb/tcl.c2011-01-20 05:23:19 UTC (rev 42491)
@@ -31,7 +31,7 @@
 #include stdlib.h
 #include stdio.h
 #include ctype.h
-#include string.h
+#include strings.h
 
 #include bio.h
 #include tcl.h


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42492] brlcad/trunk/src/libfb/if_X24.c

2011-01-19 Thread brlcad
Revision: 42492
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42492view=rev
Author:   brlcad
Date: 2011-01-20 05:24:28 + (Thu, 20 Jan 2011)

Log Message:
---
ftruncate is not available during posix-compliant complication, so just settle 
for (untested) lseeking.

Modified Paths:
--
brlcad/trunk/src/libfb/if_X24.c

Modified: brlcad/trunk/src/libfb/if_X24.c
===
--- brlcad/trunk/src/libfb/if_X24.c 2011-01-20 05:23:19 UTC (rev 42491)
+++ brlcad/trunk/src/libfb/if_X24.c 2011-01-20 05:24:28 UTC (rev 42492)
@@ -40,6 +40,9 @@
 #include time.h
 #include sys/types.h
 #include string.h
+#ifdef HAVE_UNISTD_H
+#  include unistd.h
+#endif
 #ifdef HAVE_SYS_TIME_H
 #  include sys/time.h
 #endif
@@ -2125,16 +2128,15 @@
 #ifdef HAVE_SYS_MMAN_H
int fd;
 
-   if ((fd = open(BS_NAME, O_RDWR | O_CREAT, 0666))  0)
-   fb_log(X24_getmem: can't create fb file, using \
-private memory instead, errno %d\n, errno);
-   else if (ftruncate(fd, size)  0)
-   fb_log(X24_getmem: can't ftruncate fb file, using \
-private memory instead, errno %d\n, errno);
-   else if ((mem = mmap(NULL, size, PROT_READ |
-PROT_WRITE, MAP_SHARED, fd, 0)) == (char 
*) -1)
-   fb_log(X24_getmem: can't mmap fb file, \
-using private memory instead, errno %d\n, errno);
+   fd = open(BS_NAME, O_RDWR | O_CREAT, 0666);
+   if (fd  0)
+   fb_log(X24_getmem: can't create fb file, using private 
memory instead, errno %d\n, errno);
+   else if (lseek(fd, size, SEEK_SET)  0)
+   fb_log(X24_getmem: can't seek fb file, using private 
memory instead, errno %d\n, errno);
+   else if (lseek(fd, 0, SEEK_SET)  0)
+   fb_log(X24_getmem: can't seek fb file, using private 
memory instead, errno %d\n, errno);
+   else if ((mem = mmap(NULL, size, PROT_READ | PROT_WRITE, 
MAP_SHARED, fd, 0)) == (char *) -1)
+   fb_log(X24_getmem: can't mmap fb file, using private 
memory instead, errno %d\n, errno);
else {
close(fd);
break;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42493] brlcad/trunk/src/libged

2011-01-19 Thread brlcad
Revision: 42493
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42493view=rev
Author:   brlcad
Date: 2011-01-20 05:29:59 + (Thu, 20 Jan 2011)

Log Message:
---
these are supposed to be static

Modified Paths:
--
brlcad/trunk/src/libged/dg_obj.c
brlcad/trunk/src/libged/draw.c

Modified: brlcad/trunk/src/libged/dg_obj.c
===
--- brlcad/trunk/src/libged/dg_obj.c2011-01-20 05:24:28 UTC (rev 42492)
+++ brlcad/trunk/src/libged/dg_obj.c2011-01-20 05:29:59 UTC (rev 42493)
@@ -2953,7 +2953,7 @@
 }
 
 
-int
+static int
 process_boolean(union tree *curtree, struct db_tree_state *tsp, const struct 
db_full_path *pathp, Tcl_Interp *interp)
 {
 int result = 1;
@@ -2976,7 +2976,7 @@
 }
 
 
-int
+static int
 process_triangulation(struct db_tree_state *tsp, const struct db_full_path 
*pathp, Tcl_Interp *interp)
 {
 int result = 1;

Modified: brlcad/trunk/src/libged/draw.c
===
--- brlcad/trunk/src/libged/draw.c  2011-01-20 05:24:28 UTC (rev 42492)
+++ brlcad/trunk/src/libged/draw.c  2011-01-20 05:29:59 UTC (rev 42493)
@@ -394,7 +394,7 @@
 }
 
 
-int
+static int
 process_boolean(union tree *curtree, struct db_tree_state *tsp, const struct 
db_full_path *pathp, struct _ged_client_data *dgcdp)
 {
 int result = 1;
@@ -416,7 +416,7 @@
 }
 
 
-int
+static int
 process_triangulation(struct db_tree_state *tsp, const struct db_full_path 
*pathp, struct _ged_client_data *dgcdp)
 {
 int result = 1;


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42494] brlcad/trunk/src/liboptical/Makefile.am

2011-01-19 Thread brlcad
Revision: 42494
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42494view=rev
Author:   brlcad
Date: 2011-01-20 05:31:22 + (Thu, 20 Jan 2011)

Log Message:
---
oops, didn't mean to enable strict here just yet

Modified Paths:
--
brlcad/trunk/src/liboptical/Makefile.am

Modified: brlcad/trunk/src/liboptical/Makefile.am
===
--- brlcad/trunk/src/liboptical/Makefile.am 2011-01-20 05:29:59 UTC (rev 
42493)
+++ brlcad/trunk/src/liboptical/Makefile.am 2011-01-20 05:31:22 UTC (rev 
42494)
@@ -2,7 +2,6 @@
 lib_LTLIBRARIES = liboptical.la
 
 AM_CPPFLAGS = \
-   ${STRICT_FLAGS} \
${TCL_CPPFLAGS}
 
 liboptical_la_SOURCES = \


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42495] brlcad/trunk/include/photonmap.h

2011-01-19 Thread brlcad
Revision: 42495
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42495view=rev
Author:   brlcad
Date: 2011-01-20 05:37:34 + (Thu, 20 Jan 2011)

Log Message:
---
sync missing update for liboptical

Modified Paths:
--
brlcad/trunk/include/photonmap.h

Modified: brlcad/trunk/include/photonmap.h
===
--- brlcad/trunk/include/photonmap.h2011-01-20 05:31:22 UTC (rev 42494)
+++ brlcad/trunk/include/photonmap.h2011-01-20 05:37:34 UTC (rev 42495)
@@ -147,9 +147,7 @@
 (struct application *ap,
  vect_t irrad,
  point_t pos,
- vect_t normal,
- fastf_t rad,
- int np));
+ vect_t normal));
 /** @} */
 /*
  * Local Variables:


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[42496] brlcad/trunk/src/libdm/dm-plot.c

2011-01-19 Thread brlcad
Revision: 42496
  http://brlcad.svn.sourceforge.net/brlcad/?rev=42496view=rev
Author:   brlcad
Date: 2011-01-20 05:54:49 + (Thu, 20 Jan 2011)

Log Message:
---
define __USE_POSIX2 so we get a declaration of popen() on Linux.

Modified Paths:
--
brlcad/trunk/src/libdm/dm-plot.c

Modified: brlcad/trunk/src/libdm/dm-plot.c
===
--- brlcad/trunk/src/libdm/dm-plot.c2011-01-20 05:37:34 UTC (rev 42495)
+++ brlcad/trunk/src/libdm/dm-plot.c2011-01-20 05:54:49 UTC (rev 42496)
@@ -30,14 +30,16 @@
  */
 
 #include common.h
-#include bio.h
 
-#include stdio.h
+#define __USE_POSIX2 1
 #include string.h
-
 #ifdef HAVE_SYS_TIME_H
 #  include sys/time.h/* for struct timeval */
 #endif
+#ifdef HAVE_UNISTED_H
+#  include unistd.h
+#endif
+#include bio.h
 
 #include tcl.h
 #include bu.h


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

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits