Compare commits

...
792 Commits
Author SHA1 Message Date
Clifford Yapp 48694feeea Nevermind, after discussion with Sean the idea is to baseline on C89 and then move forward, not continually maintain support for various standards. (svn branch delete)
svn:revision:58033
svn:branch:compiler-flags
svn:account:starseeker
2013-10-01 16:15:58 +00:00
Clifford Yapp c94f7271e9 Start working on a generalized mechanism for selecting and reporting C and C++ standards for compilation
svn:revision:58031
svn:branch:compiler-flags
svn:account:starseeker
2013-10-01 15:48:53 +00:00
Clifford Yapp 769bb9d26e Make a branch to try some compiler flag rework
svn:revision:58028
svn:branch:compiler-flags
svn:account:starseeker
2013-10-01 14:41:54 +00:00
Carl Moore d77c2a949a fix spellings
svn:revision:58027
svn:branch:trunk
svn:account:carlmoore
2013-10-01 13:31:25 +00:00
Thomas Browder 47aecc2fd5 move vars into reduced scope
svn:revision:58026
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 12:11:59 +00:00
Thomas Browder 2e68308d0b removed all references to the old C89
svn:revision:58025
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 11:53:21 +00:00
Thomas Browder a879990b07 use new define for assurance of a working non-C99 function
svn:revision:58024
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 11:32:43 +00:00
Thomas Browder ea8021afff eliminate the strict C89 option
svn:revision:58023
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 10:45:03 +00:00
Thomas Browder 928893513b add code to do more rigorous checks on non-C99 functions
svn:revision:58022
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 10:42:37 +00:00
Thomas Browder 3e7aa5954a set only when strict std compliance checking; expand comment
svn:revision:58021
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 10:23:58 +00:00
Thomas Browder ccc1b0a7d3 add var to indicate we are using a standards-constrained build; add def to ensure checking functions are using the same compiler settings as the constrained build
svn:revision:58020
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 10:19:50 +00:00
Thomas Browder 9602bc0c3a add test progs for the 7 C99 show stopper functions
svn:revision:58019
svn:branch:trunk
svn:account:tbrowder2
2013-10-01 09:58:05 +00:00
Christopher Sean Morrison e095365798 a few more refinements and add an 'auto' constraint command to auto-assign derivable relationships.
svn:revision:58018
svn:branch:trunk
svn:account:brlcad
2013-10-01 07:46:52 +00:00
Christopher Sean Morrison 6956d15aec stub in help command
svn:revision:58017
svn:branch:trunk
svn:account:brlcad
2013-10-01 06:20:23 +00:00
Daniel Rossberg f61eeff59e it looks like WIN32 isn't defined any more, use _WIN32 instead
svn:revision:58016
svn:branch:trunk
svn:account:d_rossberg
2013-10-01 06:18:24 +00:00
Christopher Sean Morrison 5ed8ca6959 few more examples, notes on functions
svn:revision:58015
svn:branch:trunk
svn:account:brlcad
2013-10-01 06:17:16 +00:00
Christopher Sean Morrison 676481b0f3 start documenting some specific types of constraints that are commonly available (only aiming for one or two to start), and change the signature to require a constraint name.
svn:revision:58014
svn:branch:trunk
svn:account:brlcad
2013-10-01 06:04:01 +00:00
Christopher Sean Morrison 2aa7b85b2c remove unnecesary double-semicolons
svn:revision:58013
svn:branch:trunk
svn:account:brlcad
2013-10-01 02:21:35 +00:00
Christopher Sean Morrison 69bbf87081 denote the particular detail of terminating a shell script case statment with a double semi
svn:revision:58012
svn:branch:trunk
svn:account:brlcad
2013-10-01 02:18:06 +00:00
Christopher Sean Morrison 0ea2854bcc propagate constness and consistent null callback pointer on the terminating cmdtab entry
svn:revision:58011
svn:branch:trunk
svn:account:brlcad
2013-10-01 02:05:58 +00:00
Christopher Sean Morrison 02a795832a ideas for two new ged commands, about and align.
svn:revision:58010
svn:branch:trunk
svn:account:brlcad
2013-10-01 02:04:48 +00:00
Christopher Sean Morrison b2db1f2d06 kill extra semi
svn:revision:58009
svn:branch:trunk
svn:account:brlcad
2013-10-01 01:55:17 +00:00
Christopher Sean Morrison 992d062c1d make the ct_name field const in struct bu_cmdtab. shouldn't need to be mutable and are usually a static string.
svn:revision:58008
svn:branch:trunk
svn:account:brlcad
2013-10-01 01:51:38 +00:00
Clifford Yapp 970e454362 Ignore all the files for distcheck
svn:revision:58007
svn:branch:trunk
svn:account:starseeker
2013-09-30 21:02:42 +00:00
Clifford Yapp b06f36eb8c Looks like tclcad needs cmd.h now.
svn:revision:58006
svn:branch:trunk
svn:account:starseeker
2013-09-30 20:53:05 +00:00
Carl Moore 1faf2006b4 add program exit for failed file-open
svn:revision:58005
svn:branch:trunk
svn:account:carlmoore
2013-09-30 20:18:18 +00:00
Thomas Browder 3999622b5a correct strchr signature to avoid C99 error--CMake tests may be causing problems
svn:revision:58004
svn:branch:trunk
svn:account:tbrowder2
2013-09-30 20:08:51 +00:00
Carl Moore 46a5fb749e implement h? (changing previous h to H), and provide a Usage statement
svn:revision:58003
svn:branch:trunk
svn:account:carlmoore
2013-09-30 19:50:11 +00:00
Christopher Sean Morrison 07d6128ac5 move bu_cmdtab from bu.h to cmd.h
svn:revision:58002
svn:branch:trunk
svn:account:brlcad
2013-09-30 19:09:08 +00:00
Clifford Yapp ff2071bc99 Set names for positioning objects.
svn:revision:58001
svn:branch:trunk
svn:account:starseeker
2013-09-30 18:56:47 +00:00
Christopher Sean Morrison 31fd883981 use a bu command table. provides a cleaner callback interface than using a data-driven type id method.
svn:revision:58000
svn:branch:trunk
svn:account:brlcad
2013-09-30 18:53:11 +00:00
Christopher Sean Morrison 974d760bb5 don't leave dead code lying around
svn:revision:57999
svn:branch:trunk
svn:account:brlcad
2013-09-30 18:48:40 +00:00
Carl Moore c92a8bcdad eliminate 'Command-line argument assistance' message and begin directly with 'Usage'
svn:revision:57998
svn:branch:trunk
svn:account:carlmoore
2013-09-30 18:39:53 +00:00
Clifford Yapp c3a71f92ac Write out nurbs form of unconverted surfaces
svn:revision:57997
svn:branch:trunk
svn:account:starseeker
2013-09-30 18:26:32 +00:00
Clifford Yapp 78e9853c58 Tone down the debugging output, use nurbs curves for a couple more curve types.
svn:revision:57996
svn:branch:trunk
svn:account:starseeker
2013-09-30 18:13:51 +00:00
Mohit Daga 67632f360c bu_getopt has integer return type.
svn:revision:57995
svn:branch:trunk
svn:account:mohitdaga
2013-09-30 17:55:05 +00:00
Clifford Yapp 4215718381 Fix option ordering for search - -bool wasn't being found by bsearch
svn:revision:57994
svn:branch:trunk
svn:account:starseeker
2013-09-30 17:40:22 +00:00
Christopher Sean Morrison ee3e2368cf start hashing out the primary commands and the user interface. this is roughly the approach of the attr command.
svn:revision:57993
svn:branch:trunk
svn:account:brlcad
2013-09-30 17:31:25 +00:00
Christopher Sean Morrison 29614dfbdb and here's the cost we can eliminate. no longer need _ged_cmpattr() published.
svn:revision:57992
svn:branch:trunk
svn:account:brlcad
2013-09-30 17:26:40 +00:00
Christopher Sean Morrison e59d2138b6 make all of the new sorting functions also hidden
svn:revision:57991
svn:branch:trunk
svn:account:brlcad
2013-09-30 17:24:41 +00:00
Christopher Sean Morrison 6c6638b6f4 applying refactoring rule-of-three (Ro3) instead of DRY for the attribute qsort() callback. it's only called twice and requires private API to make it span attr.c for little value and hinders encapsulation. this caller should probably be calling ged_attr() anyways but the format is slightly different, warrants testing.
svn:revision:57990
svn:branch:trunk
svn:account:brlcad
2013-09-30 17:23:55 +00:00
Christopher Sean Morrison 8c8df35246 ws indent cleanup
svn:revision:57989
svn:branch:trunk
svn:account:brlcad
2013-09-30 17:04:10 +00:00
Christopher Sean Morrison db92006232 more hiding of implementation functions, prefixing with the attr_ group name
svn:revision:57988
svn:branch:trunk
svn:account:brlcad
2013-09-30 17:00:26 +00:00
Christopher Sean Morrison b651b5ed4d the pretty print function need not be private API, mark HIDDEN and rename with attr_ prefix
svn:revision:57987
svn:branch:trunk
svn:account:brlcad
2013-09-30 16:54:23 +00:00
Christopher Sean Morrison 575e5558c3 by convention, the ged command API should be case-insensitive. make attr's subcommands insensitive.
svn:revision:57986
svn:branch:trunk
svn:account:brlcad
2013-09-30 16:52:16 +00:00
Christopher Sean Morrison 1f2bfb92d1 too many database open checks
svn:revision:57985
svn:branch:trunk
svn:account:brlcad
2013-09-30 16:06:47 +00:00
Christopher Sean Morrison 8b13102705 we don't need the database until we check the version
svn:revision:57984
svn:branch:trunk
svn:account:brlcad
2013-09-30 15:56:07 +00:00
Christopher Sean Morrison 3060104931 fix a bug introduced in the r57241 refactoring that broke the 'attr get' subcommand. the output format is not the same as attr show and max_attr_name/value_len are not yet computed (so attr get output nothing). lucky, caught in time.
svn:revision:57982
svn:branch:trunk
svn:account:brlcad
2013-09-30 15:32:47 +00:00
Clifford Yapp 664f828f07 remove obsolete comment
svn:revision:57981
svn:branch:trunk
svn:account:starseeker
2013-09-30 14:45:39 +00:00
Clifford Yapp 27c5a9a6fc Hook up the shape representations.
svn:revision:57980
svn:branch:trunk
svn:account:starseeker
2013-09-30 14:44:44 +00:00
Christopher Sean Morrison a12fe07dcd Add constraint to archer
svn:revision:57979
svn:branch:trunk
svn:account:brlcad
2013-09-30 13:49:57 +00:00
Christopher Sean Morrison 748d4a3cfb Add constraint stub to mged
svn:revision:57978
svn:branch:trunk
svn:account:brlcad
2013-09-30 13:47:48 +00:00
Christopher Sean Morrison 4363ac7195 start bringing this all together. stub in a new (empty) constraint command.
svn:revision:57977
svn:branch:trunk
svn:account:brlcad
2013-09-30 13:47:12 +00:00
Carl Moore ab113382eb remove trailing blanks
svn:revision:57976
svn:branch:trunk
svn:account:carlmoore
2013-09-30 13:25:42 +00:00
Thomas Browder 5ddfac5364 remove const specifier for proper later use
svn:revision:57975
svn:branch:trunk
svn:account:tbrowder2
2013-09-30 11:58:38 +00:00
Christopher Sean Morrison 3167412e05 classic bug, getopt returns an int. assuming it's a char because it usually stores a char will result in an infinite loop.
svn:revision:57974
svn:branch:trunk
svn:account:brlcad
2013-09-30 06:19:59 +00:00
Christopher Sean Morrison 2ccfc1fda5 ctype functions required unsigned chars on some bsd platforms (for safety)
svn:revision:57973
svn:branch:trunk
svn:account:brlcad
2013-09-30 06:14:22 +00:00
Christopher Sean Morrison 2a456993a9 use bu_sscanf() instead of sscanf() since it implements a %z size_t specifier. already have a patch that converts all instances, but am waiting to apply after release is posted
svn:revision:57972
svn:branch:trunk
svn:account:brlcad
2013-09-30 04:58:34 +00:00
Christopher Sean Morrison e93c30f2c6 should not be setting OR reading the __* compiler preprocessor symbols because they are private and compiler-specific. we'd need a test for that type.
svn:revision:57971
svn:branch:trunk
svn:account:brlcad
2013-09-30 04:45:13 +00:00
Christopher Sean Morrison 3f7b40333f should not be defining __* macro vars as they are paramount to invoking -std=gnu (and compiler-specific, they own that namespace). HAVE_SIG_T looks like the right fix, though. shouldn't be either/or: sigaction() can be an additional method (when signal() isn't available).
svn:revision:57970
svn:branch:trunk
svn:account:brlcad
2013-09-30 04:25:23 +00:00
Christopher Sean Morrison ad215827fa looks same false-positive as the other, HAVE_POSIX_MEMALIGN should be the only test needed. we definitely will not be implementing a wrapper like this as bu api... bu_alloc() could handle delivering aligned memory while still using malloc/calloc, but thusfar not necessary/significant.
svn:revision:57969
svn:branch:trunk
svn:account:brlcad
2013-09-30 03:56:01 +00:00
Christopher Sean Morrison 285b768193 didn't mean to rename this just yet
svn:revision:57968
svn:branch:trunk
svn:account:brlcad
2013-09-30 03:13:52 +00:00
Christopher Sean Morrison 0bbbed4192 also implement a simple strncasecmp.
svn:revision:57967
svn:branch:trunk
svn:account:brlcad
2013-09-30 02:51:07 +00:00
Christopher Sean Morrison c5c0f65807 check for strcasecmp/strncasecmp functions since they are not c89 or c99 (they're posix.1 and 4.4. bsd)
svn:revision:57966
svn:branch:trunk
svn:account:brlcad
2013-09-30 02:47:42 +00:00
Christopher Sean Morrison 0acc4b5471 implement strcasecmp functionality, but keep using system implementation when available
svn:revision:57965
svn:branch:trunk
svn:account:brlcad
2013-09-30 02:46:48 +00:00
Christopher Sean Morrison 675e12ca52 no longer need the WIN32 wrapping.
svn:revision:57964
svn:branch:trunk
svn:account:brlcad
2013-09-30 02:10:53 +00:00
Christopher Sean Morrison 9343c21e62 HAVE_REALPATH should not be defined if we're compiling in some mode/environment where it's not available. if it's a decalaration issue, yet available, we should declare it as-needed. there's already a fallback.
svn:revision:57963
svn:branch:trunk
svn:account:brlcad
2013-09-30 02:09:02 +00:00
Christopher Sean Morrison 241a5adec5 looks like the logic is assuming memory starts as zero? might need to be identity. needs testing.
svn:revision:57961
svn:branch:trunk
svn:account:brlcad
2013-09-30 01:31:38 +00:00
Christopher Sean Morrison b18e94a0f4 /* */ comment within a /* */ comment results in a syntax error, but I'm not convinced we should be introducing these as BU API. They don't fit the design and are not functions we can portably implement. while fileno() is also unlikely to NOT exist (similar to inline), there may be other options (like converting callers to FILE*'s or forcing it on as a low-level platform intrinsic)
svn:revision:57960
svn:branch:trunk
svn:account:brlcad
2013-09-30 01:13:04 +00:00
Christopher Sean Morrison e0823e20b2 should not be using WIN32, use the corresponding feature we care about, i.e., HAVE_WINSOCK_H, to initialize the networking library on windows. also should NOT be testing __STD_VERSION__ (and it was wrongly testing __STD_VERSION value). toggle instead on HAVE_GETHOSTNAME. this sig should probably change as this is not libbu's memory management style.
svn:revision:57959
svn:branch:trunk
svn:account:brlcad
2013-09-30 01:03:28 +00:00
Christopher Sean Morrison 280a44de08 Expand the documentation on bu_gethostname()
svn:revision:57958
svn:branch:trunk
svn:account:brlcad
2013-09-30 00:51:06 +00:00
Christopher Sean Morrison 96a3e52776 sprintf() is bad. bu_strlcpy() is good. ensures result is always null terminated and removes need for assert (case-insensitive cpp or just never tested?)
svn:revision:57957
svn:branch:trunk
svn:account:brlcad
2013-09-30 00:44:51 +00:00
Thomas Browder 6a65c85055 update info
svn:revision:57956
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 23:08:27 +00:00
Thomas Browder 5a2034dbe0 make a C-99 compatible version
svn:revision:57955
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 23:07:19 +00:00
Thomas Browder 12206c9386 use en_US spelling
svn:revision:57954
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:50:17 +00:00
Thomas Browder 2303e9b3a9 add FIXME for C99 compliance thats a little more complicated
svn:revision:57953
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:32:51 +00:00
Thomas Browder c0b261f4dc add FIXMEs for functions that are not C99-compliant
svn:revision:57952
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:28:23 +00:00
Thomas Browder b6d6d43d94 add placeholder for known needed functions for C99 compliance
svn:revision:57951
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:26:50 +00:00
Thomas Browder eecbd88597 use bu version of gethostname (which is not yet usable under strict C99 compliance checking
svn:revision:57950
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:24:56 +00:00
Thomas Browder 51e1a14a55 add FIXME for a function that is not C99-compliant
svn:revision:57949
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:23:38 +00:00
Thomas Browder 6c49e8113b add FIXME for a function that is not C99-compliant
svn:revision:57948
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:22:17 +00:00
Thomas Browder 093b3d9b95 add an undef'd path for a portable replacement for the BSD signal function
svn:revision:57947
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:21:15 +00:00
Thomas Browder 4f141a04e3 add placeholders for known needed functions for C99 compliance
svn:revision:57946
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:19:44 +00:00
Thomas Browder 3c63fe48cb add details of C99 compatibility needs
svn:revision:57945
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:17:27 +00:00
Thomas Browder 0b9050dfaf make C99 a 'pure' C99 compliance check; commant out XOPEN as part of a preliminary POSIX compliance check
svn:revision:57944
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:16:15 +00:00
Thomas Browder 7265b374c9 add info
svn:revision:57943
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 22:13:56 +00:00
Thomas Browder b858d5254a update info
svn:revision:57942
svn:branch:trunk
svn:account:tbrowder2
2013-09-29 12:42:25 +00:00
Thomas Browder 58f9f9af1e add more info
svn:revision:57941
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 22:16:19 +00:00
Thomas Browder 962a3a1f9c add new info
svn:revision:57940
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 14:24:06 +00:00
Thomas Browder 51ff350077 use current struct hostent var instead of obsolete, macro name for it
svn:revision:57939
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 14:23:37 +00:00
Thomas Browder 98a3ed59c7 add another compat file; improve doc
svn:revision:57938
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 13:00:32 +00:00
Thomas Browder 25c7f1ec16 ignore compat directory
svn:revision:57937
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 11:55:55 +00:00
Thomas Browder 3976647e7b add files for strict C89 compliance
svn:revision:57936
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 11:55:08 +00:00
Thomas Browder 62f71ccb47 ensure sig_t is available under C89
svn:revision:57935
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 10:16:50 +00:00
Thomas Browder a2ba7debb1 use current struct hostent var instead of obsolete, macro name for it
svn:revision:57934
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 10:15:37 +00:00
Thomas Browder 3477a81b69 provide for C89 use
svn:revision:57933
svn:branch:trunk
svn:account:tbrowder2
2013-09-28 10:13:57 +00:00
Thomas Browder 1bed17509c add FIXME for non-C89 code
svn:revision:57932
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 23:54:21 +00:00
Thomas Browder f7e1835428 change tmp var to avoid shadow warning in <string.h>
svn:revision:57931
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 23:43:00 +00:00
Thomas Browder 9c8f29b596 remove new def to eliminate shadowed var warning
svn:revision:57930
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 23:35:06 +00:00
Thomas Browder 53f7e00947 // comments not allowed in C89
svn:revision:57929
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 23:25:39 +00:00
Carl Moore 993cc35165 minor changes along with adding units mm
svn:revision:57928
svn:branch:trunk
svn:account:carlmoore
2013-09-27 21:42:45 +00:00
Clifford Yapp 05c435d08a Pass a container holding the maps, since we need more of them
svn:revision:57927
svn:branch:trunk
svn:account:starseeker
2013-09-27 21:01:07 +00:00
Carl Moore 0c905b9667 disable 'Nothing created' and implement the elsewhere-used 'Program continues running:'; simplify some brace usage
svn:revision:57926
svn:branch:trunk
svn:account:carlmoore
2013-09-27 20:47:17 +00:00
Clifford Yapp fea810bc3d Like the brep, we will need both the definition and the shape from combs.
svn:revision:57925
svn:branch:trunk
svn:account:starseeker
2013-09-27 20:33:20 +00:00
Thomas Browder 09d3c1a994 split compliance options into: POSIX, C99, and C89 for developer convenience during C99 and POSIX upgrade process
svn:revision:57924
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 19:39:00 +00:00
Clifford Yapp 0381d135e6 Add shape objects for comb.
svn:revision:57923
svn:branch:trunk
svn:account:starseeker
2013-09-27 19:16:12 +00:00
Carl Moore e1a02e7fa2 some simplification in libged/coil.c
svn:revision:57922
svn:branch:trunk
svn:account:carlmoore
2013-09-27 18:52:11 +00:00
Carl Moore f3431d6fd8 some tweaking of bolt.c
svn:revision:57921
svn:branch:trunk
svn:account:carlmoore
2013-09-27 18:33:46 +00:00
Carl Moore 357e639366 simplify what had been if-then-else, so that we now have 'if' followed by program exit
svn:revision:57920
svn:branch:trunk
svn:account:carlmoore
2013-09-27 17:19:51 +00:00
Thomas Browder 4eca7b16a2 reinsert missing header; correct 3rd defined argument
svn:revision:57919
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 15:52:18 +00:00
Thomas Browder 16801d730d delete aliases for POSIX checking in advance of aliases going away; remove comment
svn:revision:57918
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 11:16:22 +00:00
Thomas Browder 4ac5993bc1 whoops, correct new name for C89 enforcement
svn:revision:57917
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 11:13:42 +00:00
Thomas Browder 9fa2e5358d simplify; add note about C89 and gethostname
svn:revision:57916
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 10:32:13 +00:00
Thomas Browder d4c591e305 add code to check for errors
svn:revision:57915
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 01:57:26 +00:00
Thomas Browder 185387dc42 make more robust under strict C89 and -Werror builds
svn:revision:57914
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 01:56:28 +00:00
Thomas Browder d8240e01f1 make a bit more general
svn:revision:57913
svn:branch:trunk
svn:account:tbrowder2
2013-09-27 01:55:35 +00:00
Thomas Browder 7a76b072ef style; remove superfluous semicolon
svn:revision:57912
svn:branch:trunk
svn:account:tbrowder2
2013-09-26 20:06:34 +00:00
Clifford Yapp a2e9e60fad looks like we will need both shape and product from the breps.
svn:revision:57911
svn:branch:trunk
svn:account:starseeker
2013-09-26 19:44:17 +00:00
Carl Moore b7b0518057 more simplification involving coil; notice that 'h' option is picked up by 'default', so we don't need separate section for it
svn:revision:57910
svn:branch:trunk
svn:account:carlmoore
2013-09-26 18:09:56 +00:00
Carl Moore ccbf6db2a8 can remove 'else', because preceding stuff ended with 'return'
svn:revision:57909
svn:branch:trunk
svn:account:carlmoore
2013-09-26 17:40:12 +00:00
Clifford Yapp a7a608ebd6 Hook up the item transformation
svn:revision:57908
svn:branch:trunk
svn:account:starseeker
2013-09-26 17:39:57 +00:00
Carl Moore 481df7a4d7 remove 2 sets of braces, but had to leave 'wdb_close' duplication because that's affected by stuff going on INSIDE an 'if' statement
svn:revision:57907
svn:branch:trunk
svn:account:carlmoore
2013-09-26 17:36:21 +00:00
Clifford Yapp 7fc400ece7 Start working on representation relationship and context dependent shape for combs
svn:revision:57906
svn:branch:trunk
svn:account:starseeker
2013-09-26 17:15:52 +00:00
Carl Moore 23c30ec224 fix spellings
svn:revision:57905
svn:branch:trunk
svn:account:carlmoore
2013-09-26 16:31:50 +00:00
Clifford Yapp d340161c77 Look for breps when we need to, set name of wrapper comb if one is present.
svn:revision:57904
svn:branch:trunk
svn:account:starseeker
2013-09-26 15:25:42 +00:00
Thomas Browder 4a4227d3d1 make provision for a null user name
svn:revision:57903
svn:branch:trunk
svn:account:tbrowder2
2013-09-26 14:15:40 +00:00
Robert Parker 26ae7ee1fb This fixes a "path with spaces" issue on windows for rtwizard.
svn:revision:57902
svn:branch:trunk
svn:account:bob1961
2013-09-26 10:48:05 +00:00
Clifford Yapp 4990ba8af2 Have src/other/CMakeLists.txt wipe out all the pre-defined CMake build flags, the same way CompilerFlags.cmake did previously
svn:revision:57901
svn:branch:trunk
svn:account:starseeker
2013-09-26 00:12:54 +00:00
Nicholas Reed 4ba0467a2a add notional rt structs and functab entries to support selection of subcomponents of primitives
svn:revision:57900
svn:branch:trunk
svn:account:n_reed
2013-09-25 22:19:23 +00:00
Daniel Rossberg a526a518ec for MSVS 2008: moved variable declarations to the beginning of the block
svn:revision:57899
svn:branch:trunk
svn:account:d_rossberg
2013-09-25 14:48:23 +00:00
Carl Moore 8ad26519b5 auto-updated configure file
svn:revision:57898
svn:branch:trunk
svn:account:carlmoore
2013-09-25 14:27:06 +00:00
Clifford Yapp 4f2cb1df84 Add newlines to end of files
svn:revision:57897
svn:branch:trunk
svn:account:starseeker
2013-09-25 14:06:54 +00:00
Clifford Yapp ef28b2f44c Add newlines at end of files
svn:revision:57896
svn:branch:trunk
svn:account:starseeker
2013-09-25 13:59:40 +00:00
Carl Moore 6dce1771da remove trailing blanks/tabs; fix spellings
svn:revision:57895
svn:branch:trunk
svn:account:carlmoore
2013-09-25 13:37:13 +00:00
Thomas Browder 7fb358e1be reformat and rename TOC titles so sections can be
found easily in a search

svn:revision:57894
svn:branch:trunk
svn:account:tbrowder2
2013-09-25 11:36:38 +00:00
Christopher Sean Morrison 80044bda13 document the new release steps and how they pertain to the new RELEASE branch. make progress on turning the release steps into a proper shell script that is partially automatable, imminently copy-pasteable. still more work needed, but checkpointing.
svn:revision:57892
svn:branch:trunk
svn:account:brlcad
2013-09-24 23:59:48 +00:00
Clifford Yapp c89de8ef58 if -> ifdef, fix comment in comment
svn:revision:57891
svn:branch:trunk
svn:account:starseeker
2013-09-24 21:40:19 +00:00
Clifford Yapp 39bc300543 if -> ifdef
svn:revision:57890
svn:branch:trunk
svn:account:starseeker
2013-09-24 21:30:11 +00:00
Clifford Yapp cb4739ab6b Tweak Tcl/Tk build logic - probably need to check these more carefully to see if we would ever want to enable them...
svn:revision:57889
svn:branch:trunk
svn:account:starseeker
2013-09-24 21:28:46 +00:00
Clifford Yapp 128b248427 if->ifdef and fix typo
svn:revision:57888
svn:branch:trunk
svn:account:starseeker
2013-09-24 21:11:15 +00:00
Thomas Browder 16e410a900 document the ENABLE_POSIX_COMPLIANCE option
svn:revision:57886
svn:branch:trunk
svn:account:tbrowder2
2013-09-24 20:57:17 +00:00
Christopher Sean Morrison 8bc24b0c61 technically, former logic was true for any positive value
svn:revision:57885
svn:branch:trunk
svn:account:brlcad
2013-09-24 20:31:08 +00:00
Christopher Sean Morrison fef61e0b38 pedantic is not necessarily defined
svn:revision:57884
svn:branch:trunk
svn:account:brlcad
2013-09-24 20:30:11 +00:00
Thomas Browder 74fa8e5211 rename *STRICT_C89* to *POSIX_COMPLIANCE* for more generality and future-proofness per Sean's suggestion
svn:revision:57882
svn:branch:trunk
svn:account:tbrowder2
2013-09-24 20:01:12 +00:00
Carl Moore 956f75e622 change h to H as h? is implemented for help; expand use of the already-provideded explanation
svn:revision:57881
svn:branch:trunk
svn:account:carlmoore
2013-09-24 19:39:05 +00:00
Thomas Browder 981fea0212 add tcl check for hypot; provide subsitute for strict C89 check
svn:revision:57880
svn:branch:trunk
svn:account:tbrowder2
2013-09-24 19:36:13 +00:00
Christopher Sean Morrison 4aaa3e93ce no longer have CheckCInline.cmake
svn:revision:57879
svn:branch:trunk
svn:account:brlcad
2013-09-24 18:24:23 +00:00
Christopher Sean Morrison 3809e8e542 erhm! libregex does not even seem to use the inline keyword, so why are we testing for it here? removed.
svn:revision:57878
svn:branch:trunk
svn:account:brlcad
2013-09-24 18:23:17 +00:00
Christopher Sean Morrison ecaab9b978 indent ws
svn:revision:57877
svn:branch:trunk
svn:account:brlcad
2013-09-24 18:17:33 +00:00
Christopher Sean Morrison 9222636ad5 indent ws
svn:revision:57876
svn:branch:trunk
svn:account:brlcad
2013-09-24 18:13:21 +00:00
Christopher Sean Morrison ef938a8d96 not just macros, don't test low-level build flags on msvc
svn:revision:57875
svn:branch:trunk
svn:account:brlcad
2013-09-24 18:10:49 +00:00
Christopher Sean Morrison a10e1c5077 looks like much of this is not ordered right. src/other is not a compiler characteristic. it should either be loaded after command-line options, or after all checks.. WIP: includes should be treated like template headers, but presently are not.
svn:revision:57874
svn:branch:trunk
svn:account:brlcad
2013-09-24 17:35:32 +00:00
Christopher Sean Morrison a4b74cb19c include the C inline check module when we include the rest
svn:revision:57873
svn:branch:trunk
svn:account:brlcad
2013-09-24 17:26:18 +00:00
Christopher Sean Morrison 42752095d9 be sure to use argc/argv so we don't get strict compilation warnings causing all tests to fail.
svn:revision:57872
svn:branch:trunk
svn:account:brlcad
2013-09-24 17:25:43 +00:00
Christopher Sean Morrison 2e0039565d ugh, syn src other shite. this smells bad.
svn:revision:57871
svn:branch:trunk
svn:account:brlcad
2013-09-24 17:10:58 +00:00
Christopher Sean Morrison 8004644939 simplify the logic, remove the unnecessary iterations of the foreach() loop by breaking when we're done.
svn:revision:57870
svn:branch:trunk
svn:account:brlcad
2013-09-24 16:58:43 +00:00
Christopher Sean Morrison e794a18785 reverting r57867 for a variety of reasons: this module should not rely on BRLCAD_* logic (it's implemented as a proper CMake extension), should be testing 'inline' first or we can end up with different inline behavior on c99 compilers, and this change didn't update the documentation that was specific on the ordering and reasoning. the problem is that this needs to be tested *after* any std flags are set to ensure 'inline' will correctly fail the test.
svn:revision:57869
svn:branch:trunk
svn:account:brlcad
2013-09-24 16:51:08 +00:00
Christopher Sean Morrison 5d779ed9bf also run the unit tests during distcheck-full now that they should all be passing.
svn:revision:57868
svn:branch:trunk
svn:account:brlcad
2013-09-24 16:45:11 +00:00
Thomas Browder 58292b96f6 fix 'inline' check for strict C89 checking
svn:revision:57867
svn:branch:trunk
svn:account:tbrowder2
2013-09-24 16:19:17 +00:00
Carl Moore 201f4dabb7 fix spelling
svn:revision:57866
svn:branch:trunk
svn:account:carlmoore
2013-09-24 13:22:57 +00:00
Clifford Yapp 95074343ff Apply patch #233 from Nyah Check (sets up pull interface)
svn:revision:57865
svn:branch:trunk
svn:account:starseeker
2013-09-24 12:04:06 +00:00
Clifford Yapp 0eb6152248 Apply patch #215 from Nyah Check (changes made for ws and unused variables)
svn:revision:57864
svn:branch:trunk
svn:account:starseeker
2013-09-24 11:53:42 +00:00
Christopher Sean Morrison ed24088af8 remove the vls_vprintf regression test, it's part of make test now
svn:revision:57863
svn:branch:trunk
svn:account:brlcad
2013-09-24 06:17:52 +00:00
Christopher Sean Morrison 589fb9ce88 point to the updated test exec name
svn:revision:57862
svn:branch:trunk
svn:account:brlcad
2013-09-24 06:16:34 +00:00
Christopher Sean Morrison ff628cc8ee merge RELEASE branch from r57448 through r57860 to pick up the bu_progname fix
svn:revision:57861
svn:branch:trunk
svn:account:brlcad
2013-09-24 06:11:56 +00:00
Christopher Sean Morrison a5192b3e9d 'tyle
svn:revision:57860
svn:branch:trunk
svn:account:brlcad
2013-09-24 05:28:08 +00:00
Christopher Sean Morrison 76cb7c8cba bu_progname tests should be fixed, passing now. heap doesn't need to pass for release.
svn:revision:57859
svn:branch:RELEASE
svn:account:brlcad
2013-09-24 05:11:42 +00:00
Christopher Sean Morrison 2b5fd863b8 if basename is a relative path, we need to attach it to the cwd. this fixes bu_argv0_full_path() if/when bu_setprogname() is set or we have access to program_invocation_name (glibc)
svn:revision:57858
svn:branch:RELEASE
svn:account:brlcad
2013-09-24 05:05:58 +00:00
Christopher Sean Morrison 14b851b76e add one more test to make sure bu_argv0_full_path() is actually returning a full path
svn:revision:57857
svn:branch:RELEASE
svn:account:brlcad
2013-09-24 05:04:22 +00:00
Christopher Sean Morrison 0775911cb8 bu_argv0_full_path() is not thread safe
svn:revision:57856
svn:branch:trunk
svn:account:brlcad
2013-09-24 03:33:03 +00:00
Christopher Sean Morrison b6b91c7ff3 simplify a little further, so there's just one basename free and one semaphore section
svn:revision:57855
svn:branch:RELEASE
svn:account:brlcad
2013-09-24 01:31:20 +00:00
Christopher Sean Morrison 85205ad99d rewrite bu_setprogname()+bu_getprogname() to be far more simple. this eliminates the double-roundabout method that was being used to track the full argv0 and the basename separately. new method simply stashes any set values into a container and returns that or one of any system-available intrinsic methods.
svn:revision:57854
svn:branch:RELEASE
svn:account:brlcad
2013-09-24 01:19:22 +00:00
Christopher Sean Morrison 27feff8be6 test for program_invocation_name global, which glibc uses to stash the program execution name. no longer need to check for setprogname() with the new implementation too.
svn:revision:57853
svn:branch:RELEASE
svn:account:brlcad
2013-09-24 01:14:39 +00:00
Christopher Sean Morrison 59744d6476 expand the docs on bu_getprogname() and bu_setprogname(), noting recent thread-safety changes
svn:revision:57852
svn:branch:trunk
svn:account:brlcad
2013-09-24 01:03:22 +00:00
Clifford Yapp a28d9b81d1 This keeps tripping unused variable errors... is work supposed to be assigned to something?
svn:revision:57851
svn:branch:trunk
svn:account:starseeker
2013-09-24 00:42:10 +00:00
Clifford Yapp 92af231796 typo?
svn:revision:57850
svn:branch:trunk
svn:account:starseeker
2013-09-24 00:39:28 +00:00
Clifford Yapp bc41a3abdd Begin working on the core of comb support. Need to pass in more info, or something isn't being build correctly with the maps, but getting there.
svn:revision:57849
svn:branch:trunk
svn:account:starseeker
2013-09-23 22:41:50 +00:00
Christopher Sean Morrison ab790b3226 case fix
svn:revision:57848
svn:branch:trunk
svn:account:brlcad
2013-09-23 22:14:43 +00:00
Clifford Yapp 66f55ae90a Break matrix handling into a function
svn:revision:57847
svn:branch:trunk
svn:account:starseeker
2013-09-23 21:51:15 +00:00
Clifford Yapp df7190e81d Make generic axis2_placement_3d function and make identity a special case that calls it.
svn:revision:57846
svn:branch:trunk
svn:account:starseeker
2013-09-23 19:59:44 +00:00
Clifford Yapp 8d61e29f8a Move bits related to comb structure assembly into Assembly_Product.
svn:revision:57845
svn:branch:trunk
svn:account:starseeker
2013-09-23 19:53:31 +00:00
Carl Moore 4fed1d5d7f remove trailing blanks/tabs; fix spellings
svn:revision:57844
svn:branch:trunk
svn:account:carlmoore
2013-09-23 19:47:59 +00:00
Mohit Daga 121379e253 Use already defined MACRO for avoiding zero divide.
svn:revision:57843
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 19:25:13 +00:00
Mohit Daga f42809f5d4 Trailing WS
svn:revision:57842
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 19:00:06 +00:00
Mohit Daga 3e0620afdb Add test utility for operations.c
svn:revision:57841
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 18:56:13 +00:00
Mohit Daga b46f30b451 Correct validation process.
svn:revision:57840
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 18:43:18 +00:00
Clifford Yapp 6285102b01 Quote comb names
svn:revision:57839
svn:branch:trunk
svn:account:starseeker
2013-09-23 18:40:50 +00:00
Isacc Kamga 0a3aae8287 Some corrections to rt_hrt_norm() function
svn:revision:57838
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-23 18:07:28 +00:00
Mohit Daga 8ed10b1255 Add tester functions for icv_saturate api
svn:revision:57837
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 17:23:05 +00:00
Mohit Daga d84b5b6b7c Sanitize divide operations by adding EPS.
svn:revision:57836
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 17:17:57 +00:00
Christopher Sean Morrison 03663ae2b7 fix the fixme's, no worse for the wear, by removing progname_ipwd()
svn:revision:57835
svn:branch:RELEASE
svn:account:brlcad
2013-09-23 16:48:06 +00:00
Christopher Sean Morrison 613151cf07 they return (BRL-CAD), not (unknown)
svn:revision:57834
svn:branch:RELEASE
svn:account:brlcad
2013-09-23 16:31:56 +00:00
Clifford Yapp 08f464a836 Add design context
svn:revision:57833
svn:branch:trunk
svn:account:starseeker
2013-09-23 15:54:53 +00:00
Clifford Yapp e166c7a48f This string comes from the standard and is expected to be this particular domain.
svn:revision:57832
svn:branch:trunk
svn:account:starseeker
2013-09-23 15:46:06 +00:00
Clifford Yapp 54eb90d659 Add function to create an identity AXIS2_PLACEMENT_3D
svn:revision:57831
svn:branch:trunk
svn:account:starseeker
2013-09-23 15:33:24 +00:00
Clifford Yapp c382f611c8 More work on figuring out how to break matricies down for AP203.
svn:revision:57830
svn:branch:trunk
svn:account:starseeker
2013-09-23 15:19:12 +00:00
Nicholas Reed 355dc868ab Revert rt_hrt_norm to previous revision. Latest suffered from non-standard signature and set-but-unused.
svn:revision:57829
svn:branch:trunk
svn:account:n_reed
2013-09-23 15:15:18 +00:00
Vlad Bogolin 5c38e97ee2 Removed some log calls.
svn:revision:57828
svn:branch:trunk
svn:account:vladbogo
2013-09-23 14:21:37 +00:00
Thomas Browder 850a30dd11 add label for c89 checking option
svn:revision:57827
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 13:13:02 +00:00
Thomas Browder 5245666791 add an option to do strict C89 checking
svn:revision:57826
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 11:47:58 +00:00
Thomas Browder 4ce1a19c44 add missing 'a'
svn:revision:57825
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 11:13:37 +00:00
Thomas Browder d47cf7e774 narrow too-wide comment; indent a link in a comment for highlighting
svn:revision:57824
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 11:10:29 +00:00
Thomas Browder 7028f84a68 improve grammar (remove superflous 'got'); end sentences wih a period
svn:revision:57823
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 11:08:45 +00:00
Thomas Browder beeaf1b4fc format some comments to narrower width for ease of reading
svn:revision:57822
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 10:52:01 +00:00
Thomas Browder a6d65b4192 remove 'the'
svn:revision:57821
svn:branch:trunk
svn:account:tbrowder2
2013-09-23 10:49:19 +00:00
Mohit Daga 4e25d7d2d6 Add tester function for icv_resize [methods dealing in to decrease the size] api.
svn:revision:57820
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 01:54:51 +00:00
Mohit Daga 4546678889 Few sanitizers.
svn:revision:57819
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 01:53:04 +00:00
Mohit Daga 13c7600264 remove debug flags.
svn:revision:57818
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 01:15:30 +00:00
Mohit Daga 593f784285 TYPO
svn:revision:57817
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 01:12:05 +00:00
Mohit Daga 783c668571 Add tester function for icv_resize [methods dealing in to increase the size] api.
svn:revision:57816
svn:branch:trunk
svn:account:mohitdaga
2013-09-23 01:10:46 +00:00
Thomas Browder cac8c2ac76 try for better type safety with enums vs. defines; add BU_FALSE and BU_TRUE defs; add more constness for magic
svn:revision:57815
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 23:47:39 +00:00
Vlad Bogolin 9540f6baf8 More cleanups.
svn:revision:57814
svn:branch:trunk
svn:account:vladbogo
2013-09-22 20:23:52 +00:00
Thomas Browder 89c9dbbda7 don't need void casts for arg pointer array; add to and tidy some comments; builds okay; no-args tests look good; whole thing still needs work for prime time but 3rd arg parse API ready for critique
svn:revision:57813
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 20:04:33 +00:00
Vlad Bogolin c99aa6f07c Implemented/Removed some trivial functions.
svn:revision:57812
svn:branch:trunk
svn:account:vladbogo
2013-09-22 19:31:35 +00:00
Thomas Browder 38e4a0bad8 mods to handle new struct types
svn:revision:57811
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 19:25:33 +00:00
Thomas Browder e9024e0400 add local func for 'RTTI'; change func sigs to handle new API structs
svn:revision:57810
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 19:24:42 +00:00
Thomas Browder cbf3f3899c change to void to handle multiple type struct pointers; swith type needs a default bool var (always false for our purposes at the moment)
svn:revision:57809
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 19:23:05 +00:00
Thomas Browder 4b3bcb3c3e use the correct arg type enum value
svn:revision:57808
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 18:38:24 +00:00
Thomas Browder 05103c66ce rename (and document adding) the arg init macros
svn:revision:57807
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 18:31:16 +00:00
Thomas Browder d6f02edeab add boolean macros; add magic for arg structs; add new, specialized arg structs
svn:revision:57806
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 18:28:47 +00:00
Thomas Browder 4c2680940b add static specifier to file scope funcs
svn:revision:57805
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 15:50:57 +00:00
Thomas Browder e73154ad0d add underscore to file scope var
svn:revision:57804
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 15:49:09 +00:00
Thomas Browder 38362ae25c define a second, static API; change file scope func and var names to have leading undercsore
svn:revision:57803
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 15:44:29 +00:00
Thomas Browder 155ebe15e9 add ws
svn:revision:57802
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 15:43:12 +00:00
Thomas Browder bb529cb538 remove invalid code--pointers aren't accessed properly
svn:revision:57801
svn:branch:trunk
svn:account:tbrowder2
2013-09-22 15:42:26 +00:00
Mohit Daga 64d96caa46 Add tester function for icv_fade api.
svn:revision:57800
svn:branch:trunk
svn:account:mohitdaga
2013-09-22 12:58:34 +00:00
Mohit Daga bafc2262c8 Correct templete heading for icv_filter.c
svn:revision:57799
svn:branch:trunk
svn:account:mohitdaga
2013-09-22 11:34:04 +00:00
Christopher Sean Morrison b2dc6c7f20 LOCAL is no longer used/necessary. NO_INSTALL implies keeping the binary in the corresponding build directory.
svn:revision:57798
svn:branch:trunk
svn:account:brlcad
2013-09-22 03:28:07 +00:00
Mohit Daga 60d6190789 Add tester utility for icv_filter
svn:revision:57797
svn:branch:trunk
svn:account:mohitdaga
2013-09-21 23:32:34 +00:00
Mohit Daga 7b65d28b90 Missing typo in icv_filter. Also move the cursor for output data.
svn:revision:57796
svn:branch:trunk
svn:account:mohitdaga
2013-09-21 23:22:16 +00:00
Vlad Bogolin 83fac85a2d Added new events + comments and small fixes
svn:revision:57795
svn:branch:trunk
svn:account:vladbogo
2013-09-21 19:59:07 +00:00
Mohit Daga 5b89202bf7 Free image after working on it.
svn:revision:57794
svn:branch:trunk
svn:account:mohitdaga
2013-09-21 13:37:32 +00:00
Mohit Daga 538e91404a Add tester utility for icv_crop api.
svn:revision:57793
svn:branch:trunk
svn:account:mohitdaga
2013-09-21 13:23:17 +00:00
Mohit Daga 32644e2b6f Add tester function for icv_rect.
svn:revision:57792
svn:branch:trunk
svn:account:mohitdaga
2013-09-21 03:29:29 +00:00
Thomas Browder 1edc204fc7 use tmp names for disambiguation while two methods (APIs) in use
svn:revision:57791
svn:branch:trunk
svn:account:tbrowder2
2013-09-20 22:47:49 +00:00
Thomas Browder 3a5e597c44 add structs and funcs for static init use
svn:revision:57790
svn:branch:trunk
svn:account:tbrowder2
2013-09-20 22:45:36 +00:00
Thomas Browder 771d130ca0 add another file for testing static structs for arg parsing
svn:revision:57789
svn:branch:trunk
svn:account:tbrowder2
2013-09-20 22:35:31 +00:00
Carl Moore 6c531c77ad remove set of unneeded braces; ensure that numtnk is handled the same way either as answer-to-question or as -n argument
svn:revision:57788
svn:branch:trunk
svn:account:carlmoore
2013-09-20 21:12:06 +00:00
Christopher Sean Morrison cd395ed672 dykstra's oct. 1987 brl-cad overview paper mentions the existence of a brl internal publication (brl report?) in june 1987.
svn:revision:57787
svn:branch:trunk
svn:account:brlcad
2013-09-20 20:57:10 +00:00
Christopher Sean Morrison 2b6580b90c author cleanup
svn:revision:57786
svn:branch:trunk
svn:account:brlcad
2013-09-20 20:52:17 +00:00
Christopher Sean Morrison 525fb0c9cd consistency, most do not have commas separating the multiple authors
svn:revision:57785
svn:branch:trunk
svn:account:brlcad
2013-09-20 20:43:35 +00:00
Christopher Sean Morrison 8c9368a2f7 sort the publications by year so it's easier to find if things are listed in here. probably an automatic way availlable, but did this manually.
svn:revision:57784
svn:branch:trunk
svn:account:brlcad
2013-09-20 20:38:08 +00:00
Carl Moore 4ecf34c9f9 remove unneeded braces (however, lack of storage of file name makes me doubt this program is in use)
svn:revision:57782
svn:branch:trunk
svn:account:carlmoore
2013-09-20 18:49:53 +00:00
Carl Moore 44dddc8b46 fix spellings (this includes CHANGES file)
svn:revision:57781
svn:branch:trunk
svn:account:carlmoore
2013-09-20 14:34:39 +00:00
Isacc Kamga d84e0f1629 Some fixes to rt_hrt_norm, multiplying the transposed rotation matrix by the normal causes the bumps in the middle of the heart.After running the rt command on a heart object, I realised that unitizing is useless
svn:revision:57780
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-20 12:59:15 +00:00
Wu Jianbang 9de23cb952 Add more comment.
svn:revision:57779
svn:branch:trunk
svn:account:phoenixyjll
2013-09-20 10:36:41 +00:00
Christopher Sean Morrison a72127a937 style fixes
svn:revision:57777
svn:branch:trunk
svn:account:brlcad
2013-09-20 03:15:06 +00:00
Christopher Sean Morrison fc3579bb88 remove newbie dev start scope comments.
svn:revision:57776
svn:branch:trunk
svn:account:brlcad
2013-09-20 03:12:41 +00:00
Christopher Sean Morrison a5c59f2128 remove the newbie dev end scope markers. remove the dead code else case (i > 99).
svn:revision:57775
svn:branch:trunk
svn:account:brlcad
2013-09-20 03:11:52 +00:00
Christopher Sean Morrison 9355b08feb ws indent cleanup
svn:revision:57774
svn:branch:trunk
svn:account:brlcad
2013-09-20 02:51:51 +00:00
Christopher Sean Morrison 21f8a7fc2e use snprintf instead of sprintf for safety printing into the fixed-size buffer. can probably switch to bu_vls_printf now and fix the FIXMEs.
svn:revision:57773
svn:branch:trunk
svn:account:brlcad
2013-09-20 02:50:28 +00:00
Thomas Browder 6a2e7e8b0f change switch arg func to return int instead of long per Sean's suggestion
svn:revision:57772
svn:branch:trunk
svn:account:tbrowder2
2013-09-19 22:51:36 +00:00
Thomas Browder 239c34b19f rename arg constructor functions per Sean's suggestion
svn:revision:57771
svn:branch:trunk
svn:account:tbrowder2
2013-09-19 22:48:35 +00:00
Clifford Yapp 8c26685602 Add more thoughts about AXIS2_PLACEMENT_3D and CARTESIAN_TRANSFORMATION_OPERATOR_3D
svn:revision:57770
svn:branch:trunk
svn:account:starseeker
2013-09-19 22:07:34 +00:00
Richard Weiss e99e24b90b Fixed a bug in libbrep function curve_fitting where the bounds of the knots array was exceeded.
svn:revision:57769
svn:branch:trunk
svn:account:r_weiss
2013-09-19 21:53:48 +00:00
Carl Moore 142d5c8b87 implement h?; remove unneded break & set of braces
svn:revision:57768
svn:branch:trunk
svn:account:carlmoore
2013-09-19 21:39:18 +00:00
Mohit Daga a5505ff4ef Add tests folder in libicv. Primary aim of these files will be to do performance analysis of libicv api calls. Also it will be helpful in checking memory leaks. In the long run this will demonstrate the usage of libicv.
svn:revision:57767
svn:branch:trunk
svn:account:mohitdaga
2013-09-19 21:24:19 +00:00
Clifford Yapp 4a118ad23d May be able to generate inputs for AXIS2_PLACEMENT_3D components...
svn:revision:57766
svn:branch:trunk
svn:account:starseeker
2013-09-19 21:12:24 +00:00
Clifford Yapp 4a18d634ab Add -Wdocumentation to the list of warnings to look into adding
svn:revision:57765
svn:branch:trunk
svn:account:starseeker
2013-09-19 20:42:47 +00:00
Christopher Sean Morrison e2902e9d23 do or do not, there is no try
svn:revision:57764
svn:branch:RELEASE
svn:account:brlcad
2013-09-19 20:16:30 +00:00
Christopher Sean Morrison ea062d0d1c sorting priorities needed to release, pushing others back onto the backlog
svn:revision:57763
svn:branch:RELEASE
svn:account:brlcad
2013-09-19 20:15:35 +00:00
Christopher Sean Morrison 6543cd12bf syncing missing file from trunk
svn:revision:57762
svn:branch:RELEASE
svn:account:brlcad
2013-09-19 20:14:57 +00:00
Christopher Sean Morrison d4a46eecd4 no longer below
svn:revision:57760
svn:branch:trunk
svn:account:brlcad
2013-09-19 18:44:02 +00:00
Carl Moore f46bd5e3f7 implement h?; remove some unneeded braces; simplify usage of 'units' variable
svn:revision:57759
svn:branch:trunk
svn:account:carlmoore
2013-09-19 18:41:47 +00:00
Christopher Sean Morrison a2d53a9aa5 not just API, all interfaces, and not just a log. it's our policy.
svn:revision:57758
svn:branch:trunk
svn:account:brlcad
2013-09-19 18:39:53 +00:00
Christopher Sean Morrison 9af850745e clarify and reorganize change policy comments so that it's clear that we characterize interface changes into one of three categories. this affords a place to mention our policy on allowing NEW api to change as needed while it's being actively developed, as well as clarifying minimally impacting changes to any release, and being then more strict about our deprecation policy requirement.
svn:revision:57757
svn:branch:trunk
svn:account:brlcad
2013-09-19 18:24:38 +00:00
Carl Moore 9bf3242d74 remove a space
svn:revision:57756
svn:branch:trunk
svn:account:carlmoore
2013-09-19 18:17:21 +00:00
Clifford Yapp 224b180058 Having some success now seeing matrix over object instances.
svn:revision:57755
svn:branch:trunk
svn:account:starseeker
2013-09-19 17:57:02 +00:00
Clifford Yapp e5fdc358c6 Check for non-identity matricies over breps in possible wrapper combs.
svn:revision:57754
svn:branch:trunk
svn:account:starseeker
2013-09-19 16:56:19 +00:00
Carl Moore 8a0c758e70 remove trailing blanks and fix spellings
svn:revision:57753
svn:branch:trunk
svn:account:carlmoore
2013-09-19 15:59:46 +00:00
Clifford Yapp df78ebdd4d start working on how to extract matricies from combs
svn:revision:57752
svn:branch:trunk
svn:account:starseeker
2013-09-19 14:16:27 +00:00
Keith Boman 578c64a14b "HIDDEN static" -> "HIDDEN".
svn:revision:57751
svn:branch:trunk
svn:account:indianlarry
2013-09-19 14:05:35 +00:00
Clifford Yapp 4c7ffc817b No contents yet, but start writing out comb product definitions.
svn:revision:57750
svn:branch:trunk
svn:account:starseeker
2013-09-19 14:00:17 +00:00
Keith Boman 8da4307ae7 The typedef "Tcl_Obj" not declared at top of block causing problems under windows.
svn:revision:57749
svn:branch:trunk
svn:account:indianlarry
2013-09-19 13:32:04 +00:00
Thomas Browder c33839bd61 drop '_value' from getter funcs
svn:revision:57745
svn:branch:trunk
svn:account:tbrowder2
2013-09-19 11:22:35 +00:00
Thomas Browder 6d7afb66e9 remove atexit function; use new bu_arg_exit function
svn:revision:57744
svn:branch:trunk
svn:account:tbrowder2
2013-09-19 11:19:19 +00:00
Daniel Rossberg 22c1193541 reverted r57742
this revision needs some additional considerations: it breaks the build and putting additional brackets around the macros doesn't solve all issues, e.g.:
brlcad/src/librt/bool.c:1998:14: error: the address of ‘open_parts’ will always evaluate as ‘true’ [-Werror=address]

svn:revision:57743
svn:branch:trunk
svn:account:d_rossberg
2013-09-19 09:33:59 +00:00
Christopher Sean Morrison 0bca857d7e provide sane behavior if we happen to pass a null pointer to a BU_PTBL_ macro.
svn:revision:57742
svn:branch:trunk
svn:account:brlcad
2013-09-19 04:32:30 +00:00
Christopher Sean Morrison 5f47728332 check function args so we don't have an opportunity to dereference NULL
svn:revision:57741
svn:branch:trunk
svn:account:brlcad
2013-09-19 04:31:31 +00:00
Christopher Sean Morrison dcd52c441f ws style cleanup, move struct to top
svn:revision:57740
svn:branch:trunk
svn:account:brlcad
2013-09-19 04:23:25 +00:00
Wu Jianbang fa9f1fe8d6 Correct the comments.
svn:revision:57739
svn:branch:trunk
svn:account:phoenixyjll
2013-09-19 03:29:17 +00:00
Wu Jianbang ea2874aa00 At most one element would be in the pending array. Just use a single ON_X_EVENT rather than an array.
svn:revision:57738
svn:branch:trunk
svn:account:phoenixyjll
2013-09-19 03:17:30 +00:00
Mohit Daga 30c70888b9 Sanitize the comments in icv.h
svn:revision:57737
svn:branch:trunk
svn:account:mohitdaga
2013-09-18 23:10:14 +00:00
Clifford Yapp f6ac4eed5b Start collecting geometric sets we will need for comb step export.
svn:revision:57736
svn:branch:trunk
svn:account:starseeker
2013-09-18 22:26:55 +00:00
Thomas Browder 25a6a06a4c add some asserts for error paths
svn:revision:57735
svn:branch:trunk
svn:account:tbrowder2
2013-09-18 21:19:44 +00:00
Clifford Yapp 45b937ef31 We don't want -below to trigger if we're doing a true iterative flat search.
svn:revision:57734
svn:branch:trunk
svn:account:starseeker
2013-09-18 20:48:55 +00:00
Clifford Yapp 62cf2caa78 Update search man page for new path option.
svn:revision:57733
svn:branch:trunk
svn:account:starseeker
2013-09-18 20:30:18 +00:00
Thomas Browder b9d3e7a1d3 remove FIXME; add some blank lines
svn:revision:57731
svn:branch:trunk
svn:account:tbrowder2
2013-09-18 20:21:59 +00:00
Thomas Browder 0c561d734e reclaim some memory; delete unintentional duplicat line
svn:revision:57730
svn:branch:trunk
svn:account:tbrowder2
2013-09-18 20:20:14 +00:00
Clifford Yapp cd70254540 Carry the 'flat' search concept to its logical limit. If the flat modifier is passed without either a local top level search path, a full path toplevel search path, or a specific object it runs a search that iterates over the database objects without walking any trees. This search has the potential to be a great deal faster when doing type or name filtering searches for objects where full paths aren't needed, but will result in depth aware options not functioning.
svn:revision:57729
svn:branch:trunk
svn:account:starseeker
2013-09-18 20:10:33 +00:00
Isacc Kamga 5823300947 Corrections to rt_hrt_norm() and adding flesh to rt_hrt_plot() and its helper function rt_hrt_24pts()
svn:revision:57728
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-18 19:33:32 +00:00
Carl Moore 95223352b3 remove trailing blanks from fprintf statements; detected on file output, which is user-readable
svn:revision:57727
svn:branch:trunk
svn:account:carlmoore
2013-09-18 18:34:05 +00:00
Carl Moore 36fc2bfb40 remove unneeded braces; note that default units are mm; initialize units to 'mm' and they stay that way if we don't otherwise specify units
svn:revision:57726
svn:branch:trunk
svn:account:carlmoore
2013-09-18 17:55:34 +00:00
Thomas Browder bf9b805f93 new API that incorporates severak of Sean's and Cliff's ideas; uses pointers but cleans up automatically upon exit; builds and gives same no-arg response as before; still needs work but ready for comment on new approach; note that TCLAP C++ memory use is not clean yet
svn:revision:57725
svn:branch:trunk
svn:account:tbrowder2
2013-09-18 16:50:28 +00:00
Thomas Browder 1885e569b3 for now ignore the interface test file; change 'c' to 'C'
svn:revision:57724
svn:branch:trunk
svn:account:tbrowder2
2013-09-18 16:46:13 +00:00
Clifford Yapp b8bec9ed11 Stub in some files for comb trees.
svn:revision:57723
svn:branch:trunk
svn:account:starseeker
2013-09-18 16:26:15 +00:00
Thomas Browder 52d9b83f36 clarify bu_ptbl comments; neaten Doxygen var comments
svn:revision:57722
svn:branch:trunk
svn:account:tbrowder2
2013-09-18 15:29:43 +00:00
Clifford Yapp 09b6af1e31 The container we are using to hold data for the brep->step process is Brep specific, so name it accordingly.
svn:revision:57721
svn:branch:trunk
svn:account:starseeker
2013-09-18 15:08:48 +00:00
Clifford Yapp de5ab4d9ec Simplify the toplevel structure automatically generated by the brep routine, unless/until it is clear it needs to provide something else...
svn:revision:57720
svn:branch:trunk
svn:account:starseeker
2013-09-18 14:56:47 +00:00
Clifford Yapp b3f4faf520 Use the brep shape respresentation when we are making the shape definition.
svn:revision:57719
svn:branch:trunk
svn:account:starseeker
2013-09-18 14:46:22 +00:00
Clifford Yapp 4e4df33d17 Pass directory pointer so we can use actual object name instead of hardcoded 'brep.s' name
svn:revision:57718
svn:branch:trunk
svn:account:starseeker
2013-09-18 14:28:58 +00:00
Clifford Yapp d1b0e65fb0 get the STEP BRep writing function ready to be called by another function, as a precursor to walking a comb tree instead of specifying a single brep directly.
svn:revision:57717
svn:branch:trunk
svn:account:starseeker
2013-09-18 14:09:57 +00:00
Clifford Yapp ab63b9e8b4 Make a note that there is a little more work to do to reach the final form of the comb command's region lifting abilities.
svn:revision:57716
svn:branch:trunk
svn:account:starseeker
2013-09-18 13:53:36 +00:00
Clifford Yapp 373b18f444 Go back to the original dpv to/from argv style, use Sean's suggestion of creating an empty struct directory instead of NULL for db_argv_to_dpv
svn:revision:57715
svn:branch:trunk
svn:account:starseeker
2013-09-18 13:50:25 +00:00
Carl Moore cb14f2ec01 remove trailing blanks/tabs; fix spellings
svn:revision:57714
svn:branch:trunk
svn:account:carlmoore
2013-09-18 13:47:10 +00:00
Christopher Sean Morrison c30252f273 new doesn't return NULL, it throws an exception (there needs to be an exception handler)
svn:revision:57712
svn:branch:trunk
svn:account:brlcad
2013-09-18 11:41:43 +00:00
Christopher Sean Morrison af57049319 if clients[sub] can be null, don't derefence it right before the check
svn:revision:57711
svn:branch:trunk
svn:account:brlcad
2013-09-18 11:37:10 +00:00
Christopher Sean Morrison 3c63da864f add a few nullity checks
svn:revision:57710
svn:branch:trunk
svn:account:brlcad
2013-09-18 11:36:08 +00:00
Wu Jianbang 793c0b8ed0 Scrub code and add comment.
svn:revision:57709
svn:branch:trunk
svn:account:phoenixyjll
2013-09-18 09:19:27 +00:00
Christopher Sean Morrison cdb6c6214e another sanity check for null
svn:revision:57708
svn:branch:trunk
svn:account:brlcad
2013-09-18 03:44:33 +00:00
Wu Jianbang 41837ccb68 Correct the comments.
svn:revision:57707
svn:branch:trunk
svn:account:phoenixyjll
2013-09-18 03:43:32 +00:00
Christopher Sean Morrison deeb5be723 step could be NULL if default constructor, so should check for it
svn:revision:57706
svn:branch:trunk
svn:account:brlcad
2013-09-18 03:36:44 +00:00
Christopher Sean Morrison e6f8f24ec5 checking for p implies it could be null, so stack complained about the potential null pointer dereferences that followed. we do bu_bomb() earlier, but it doesn't know that routine doesn't return.
svn:revision:57705
svn:branch:trunk
svn:account:brlcad
2013-09-18 03:32:20 +00:00
Wu Jianbang 495b751f28 Scrub the code - reuse sub_curve() and sub_surface().
svn:revision:57704
svn:branch:trunk
svn:account:phoenixyjll
2013-09-18 03:27:20 +00:00
Clifford Yapp ca2905a341 Reindent, add note about constraint options to -above and -below
svn:revision:57703
svn:branch:trunk
svn:account:starseeker
2013-09-18 03:12:10 +00:00
Christopher Sean Morrison 1bfecc6436 (reword r56478 and expand name for post-processing) Cliff added -l option to comb command that 'lifts' the region flag to the top level (specified) comb and clears all region flags in the tree below that comb. Has some advanced features, like automatically wrapping regions that are used elsewhere in the .g file and referencing the comb created by the wrap, and refusing to perform the operation if it cannot be done without changing assembly definitions used elsewhere in the tree (see the comb man page for examples.)
svn:revision:57702
svn:branch:trunk
svn:account:brlcad
2013-09-17 22:41:14 +00:00
Clifford Yapp b69500569e Remove the additive version of the db_ls flags - per Sean's suggestion, keep the function logic simple and focused.
svn:revision:57701
svn:branch:trunk
svn:account:starseeker
2013-09-17 22:40:49 +00:00
Clifford Yapp 48c69aebbc Add a -depth command to search that allow specification of either absolute or relative depth limits.
svn:revision:57700
svn:branch:trunk
svn:account:starseeker
2013-09-17 22:37:34 +00:00
Clifford Yapp b2813639c8 Add the ability for either a generic toplevel search specifier or a specific object path supplied to the search command to specify it wishes to be treated as a 'flat' object - in other words, every object in the database (or, for specific objects, every object below that object) is added as a top level search starting point.
svn:revision:57699
svn:branch:trunk
svn:account:starseeker
2013-09-17 22:35:09 +00:00
Clifford Yapp 0009dccf94 Update search man page to document -depth
svn:revision:57698
svn:branch:trunk
svn:account:starseeker
2013-09-17 22:30:35 +00:00
Clifford Yapp 8c97488d7a MUCH simpler way to do the min and max depth tests.
svn:revision:57697
svn:branch:trunk
svn:account:starseeker
2013-09-17 22:22:00 +00:00
Clifford Yapp 8df816f5b0 Add a -depth option to search that supports ><= modifiers to a numerical depth.
svn:revision:57696
svn:branch:trunk
svn:account:starseeker
2013-09-17 22:17:40 +00:00
Carl Moore 866097a82b remove some unneeded braces and 1 'break'; implement h?
svn:revision:57695
svn:branch:trunk
svn:account:carlmoore
2013-09-17 21:56:26 +00:00
Clifford Yapp 1eeaffc56a Add example using results from search with tcl, explain new path syntax.
svn:revision:57694
svn:branch:trunk
svn:account:starseeker
2013-09-17 21:42:10 +00:00
Clifford Yapp 5385584b4f Also get -above working with the >=, <= and = optional addtions to limit returns.
svn:revision:57693
svn:branch:trunk
svn:account:starseeker
2013-09-17 21:37:15 +00:00
Christopher Sean Morrison a0f2155c35 cliff improved the search command so that you can now specify >= <= and = depth options
svn:revision:57692
svn:branch:trunk
svn:account:brlcad
2013-09-17 21:36:53 +00:00
Clifford Yapp 8db08e8d69 OK, don't have the performance optimizations in yet but this looks like it gets -below working with the >=, <= and = optional addtions to limit returns.
svn:revision:57691
svn:branch:trunk
svn:account:starseeker
2013-09-17 20:51:58 +00:00
Carl Moore 48b633f1b9 add P to the usage, which was split in 2 due to warning about string length
svn:revision:57690
svn:branch:trunk
svn:account:carlmoore
2013-09-17 15:56:57 +00:00
Carl Moore 97254eb5aa remove trailing blanks/tabs
svn:revision:57689
svn:branch:trunk
svn:account:carlmoore
2013-09-17 14:05:42 +00:00
Christopher Sean Morrison db3a246d83 mirror command needs some tlc. the offset value looks like a translation after mirror instead of before.
svn:revision:57688
svn:branch:trunk
svn:account:brlcad
2013-09-17 13:59:34 +00:00
Thomas Browder de32d3ae88 correct glob expression
svn:revision:57686
svn:branch:trunk
svn:account:tbrowder2
2013-09-17 10:14:46 +00:00
Thomas Browder 16cdf98712 not sure what was intended, but this should suffice until something better appears
svn:revision:57685
svn:branch:trunk
svn:account:tbrowder2
2013-09-17 09:58:57 +00:00
Wu Jianbang afd26e229d Mark conv_tree() with HIDDEN.
svn:revision:57684
svn:branch:trunk
svn:account:phoenixyjll
2013-09-17 04:36:38 +00:00
Wu Jianbang 49e4f75df5 Add an "--no-evaluation" option, using the old routine of converting comb without NURBS evaluations (CSG tree + brep).
svn:revision:57683
svn:branch:trunk
svn:account:phoenixyjll
2013-09-17 04:35:56 +00:00
Christopher Sean Morrison 2960d8c1e7 handle ppm files a little more gracefully, supporting mac, unix, windows line ending headers just in case. since we don't do anything with them, just add a function that skips to the next line.
svn:revision:57682
svn:branch:trunk
svn:account:brlcad
2013-09-17 04:15:44 +00:00
Christopher Sean Morrison d5c0af1936 make no-statement while loops more obvious
svn:revision:57681
svn:branch:trunk
svn:account:brlcad
2013-09-17 04:03:05 +00:00
Clifford Yapp b522885592 revert 57663
svn:revision:57680
svn:branch:trunk
svn:account:starseeker
2013-09-17 02:55:27 +00:00
Clifford Yapp 155adb0d5f This approach isn't going to fly without a lot more careful thought and design - back out for now.
svn:revision:57679
svn:branch:trunk
svn:account:starseeker
2013-09-16 22:44:06 +00:00
Clifford Yapp 6a2c13f80c Hmm. Bit tricky figuring out what values need to be where...
svn:revision:57678
svn:branch:trunk
svn:account:starseeker
2013-09-16 22:26:04 +00:00
Clifford Yapp 0e5701a304 Start working on adding support for specifying limits to above and below in the search command. Making some progress with below.
svn:revision:57677
svn:branch:trunk
svn:account:starseeker
2013-09-16 20:03:29 +00:00
Mohit Daga c1fbd682c2 Add doxygen comments for functions in icv.
svn:revision:57676
svn:branch:trunk
svn:account:mohitdaga
2013-09-16 19:20:19 +00:00
Thomas Browder 7e2b9db6c4 style
svn:revision:57675
svn:branch:trunk
svn:account:tbrowder2
2013-09-16 17:08:11 +00:00
Clifford Yapp 7aebfca23e Break out the logic that splits the attribute name, the equality specification, and the value into its own function.
svn:revision:57674
svn:branch:trunk
svn:account:starseeker
2013-09-16 15:49:19 +00:00
Carl Moore d6489232e7 implement h?, remove unneeded 'break' (due to control passing into bu_exit), and remove a pair of braces (only 1 statement
svn:revision:57673
svn:branch:trunk
svn:account:carlmoore
2013-09-16 14:02:42 +00:00
Carl Moore 6bf2b296ee remove trailing blanks/tabs; fix usage,spelling (including function name appearing in a comment)
svn:revision:57672
svn:branch:trunk
svn:account:carlmoore
2013-09-16 13:39:46 +00:00
Wu Jianbang 341ba7a9ff single_conversion() should be used for ON_Brep*. And check the pointers before free the memory.
svn:revision:57671
svn:branch:trunk
svn:account:phoenixyjll
2013-09-16 03:03:30 +00:00
Wu Jianbang 64059f80d7 Tweak the code - use rt_db_internal instead of ON_Brep for the interface between libged and librt.
svn:revision:57670
svn:branch:trunk
svn:account:phoenixyjll
2013-09-16 01:49:08 +00:00
Vlad Bogolin e6df5e74b2 Removed dm_processEvents from struct dm since it's no longer necessary.
svn:revision:57668
svn:branch:trunk
svn:account:vladbogo
2013-09-15 18:08:49 +00:00
Vlad Bogolin 0d5cf4ba01 Comments + print logs only if debugLevel is set.
svn:revision:57667
svn:branch:trunk
svn:account:vladbogo
2013-09-15 17:58:33 +00:00
Vlad Bogolin 8eabc71f7b Stop processing mged events when Qt enabled non-blocking since it's not necessary anymore. Also removed the setlocale to UNIX since it's already set in dm-qt and it was only enabled because of Qt.
svn:revision:57666
svn:branch:trunk
svn:account:vladbogo
2013-09-15 17:40:21 +00:00
Vlad Bogolin e4609d8b54 Removed qt-tk process events function since it's not being used anymore.
svn:revision:57665
svn:branch:trunk
svn:account:vladbogo
2013-09-15 17:35:00 +00:00
Vlad Bogolin ec785768b5 Mention Qt in the cmake report.
svn:revision:57664
svn:branch:trunk
svn:account:vladbogo
2013-09-15 17:18:52 +00:00
Clifford Yapp ac4c02ef17 Clang error - 'while loop has empty body'
svn:revision:57663
svn:branch:trunk
svn:account:starseeker
2013-09-15 15:59:49 +00:00
Clifford Yapp 0899715398 Add the -Q option to search, which uses a new db_search_plan_validate function to silently make sure the plan string is valid before doing a search. Lets archer start up without spewing warnings.
svn:revision:57662
svn:branch:trunk
svn:account:starseeker
2013-09-15 15:49:12 +00:00
Clifford Yapp 83f1e3ae6e Don't crash when we hit an invalid search. Not sure how we're getting here yet, but should get Archer working
svn:revision:57661
svn:branch:trunk
svn:account:starseeker
2013-09-15 14:39:07 +00:00
Thomas Browder 4b57be7258 put const in correct position
svn:revision:57660
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 17:56:55 +00:00
Clifford Yapp 88b9580770 Rework search to use directory pointers instead of char ** arrays. Use db_ls, remove db_tops
svn:revision:57659
svn:branch:trunk
svn:account:starseeker
2013-09-14 17:36:19 +00:00
Clifford Yapp 6a753f0614 Only return after all the flags are checked - additive flags may change the final result.
svn:revision:57658
svn:branch:trunk
svn:account:starseeker
2013-09-14 15:41:56 +00:00
Clifford Yapp 400e16987f The previous flags allowed filtering but not the additive building of objects that matched one or more flags. Add a second set of flags to allow for that scenario.
svn:revision:57657
svn:branch:trunk
svn:account:starseeker
2013-09-14 15:36:32 +00:00
Clifford Yapp 7935bd9442 ws
svn:revision:57656
svn:branch:trunk
svn:account:starseeker
2013-09-14 15:13:18 +00:00
Clifford Yapp ccb0e6641e whoops, copy paste issue
svn:revision:57655
svn:branch:trunk
svn:account:starseeker
2013-09-14 15:12:52 +00:00
Clifford Yapp b4168be2ef Make a second stab at ls.c
svn:revision:57654
svn:branch:trunk
svn:account:starseeker
2013-09-14 15:07:31 +00:00
Isacc Kamga 4b30b924ed Correcting rt_hrt_bbox(): Stretching the xdir vector to accomodate the heart, rt_hrt_norm():Correcting Z component of the normal vector.
svn:revision:57653
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-14 14:20:34 +00:00
Thomas Browder b4515bb986 clean out unneeded code
svn:revision:57652
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 11:20:50 +00:00
Thomas Browder ec46a458c9 free bu_arg_vars memory
svn:revision:57651
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 10:42:09 +00:00
Thomas Browder f3bfc3ac11 rename files for consistency to bu_arg* instead of bu_opt; add bu_arg_free function for bulk heap memory recovery
svn:revision:57650
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 10:39:42 +00:00
Thomas Browder d8d774a32c rename files for consistency to bu_arg* instead of bu_opt; add bu_arg_free function for bulk heap memory recovery (preliminary file move commit) 2013-09-14 10:39:42 +00:00
Thomas Browder 5dadf142e4 fill data extraction for rest of types for UnlabeledValueArg
svn:revision:57649
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 01:21:34 +00:00
Thomas Browder 2eef3c7847 remove unused char type
svn:revision:57648
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 01:20:28 +00:00
Thomas Browder 0b72579ac8 zero the pointer in the container after deletion (for OCD programmers)
svn:revision:57647
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 01:08:12 +00:00
Thomas Browder 7f9ab71f65 refactor cmd.add to follow the switch
svn:revision:57646
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 01:05:46 +00:00
Thomas Browder a136be598b finish the phrase
svn:revision:57645
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 00:55:05 +00:00
Thomas Browder 7ee291832a add another test file for TCLAP
svn:revision:57644
svn:branch:trunk
svn:account:tbrowder2
2013-09-14 00:48:06 +00:00
Mohit Daga f96ce3a215 Ignore HIDDEN
svn:revision:57643
svn:branch:trunk
svn:account:mohitdaga
2013-09-13 23:02:32 +00:00
Mohit Daga ac88f7c25d Ignore HIDDEN
svn:revision:57642
svn:branch:trunk
svn:account:mohitdaga
2013-09-13 23:00:22 +00:00
Clifford Yapp b8684901d0 Add db_ls and related functions - comples, but not hooked up or tested - this is just initial code to drive discussion.
svn:revision:57641
svn:branch:trunk
svn:account:starseeker
2013-09-13 22:23:35 +00:00
Thomas Browder c2cfb160af change int handling to long; eliminate unneeded val types; start handling data mapping from TCLAP back to bu_args after successful parsing
svn:revision:57640
svn:branch:trunk
svn:account:tbrowder2
2013-09-13 21:55:18 +00:00
Thomas Browder 5d8da19430 change int to long; set char* values to 0
svn:revision:57639
svn:branch:trunk
svn:account:tbrowder2
2013-09-13 21:53:27 +00:00
Thomas Browder 6fdaa311fa don't need char type either
svn:revision:57638
svn:branch:trunk
svn:account:tbrowder2
2013-09-13 21:48:48 +00:00
Thomas Browder 47012ea4da reduce and modify possible arg value types
svn:revision:57637
svn:branch:trunk
svn:account:tbrowder2
2013-09-13 21:47:05 +00:00
Clifford Yapp a3dd7a5633 Mark some functions as HIDDEN
svn:revision:57636
svn:branch:trunk
svn:account:starseeker
2013-09-13 21:46:26 +00:00
Clifford Yapp 904be596fe Actually, that's not necessarily true when the hidden flag is involved - play safe and do what's requested
svn:revision:57635
svn:branch:trunk
svn:account:starseeker
2013-09-13 20:27:02 +00:00
Clifford Yapp c6428eb615 Just do the smart thing under the hood and avoid the full flat search unless we need full paths.
svn:revision:57634
svn:branch:trunk
svn:account:starseeker
2013-09-13 20:23:59 +00:00
Clifford Yapp 72d183001e Add the ability to search to do a 'flat' search where every object in the .g file is a toplevel starting point for search. As long as we are at it, add the same ability to specific paths as well. Right now, the | symbol is added to the beginning of the search path to identify it as a flat search. For non-full-path searches the results will be the same (for more processing overhead) but it does make a difference for the results if full path output is of interest.
svn:revision:57633
svn:branch:trunk
svn:account:starseeker
2013-09-13 20:17:09 +00:00
Clifford Yapp 557850c9af Add the search.c file tag to the comments at the new API
svn:revision:57632
svn:branch:trunk
svn:account:starseeker
2013-09-13 20:13:03 +00:00
Clifford Yapp f3042e3f43 Clean up the header - compact the deprecated calls, update API comments
svn:revision:57630
svn:branch:trunk
svn:account:starseeker
2013-09-13 16:01:43 +00:00
Clifford Yapp 7af24f8f79 Mark the old search API and db_full_path_list structure as deprecated.
svn:revision:57629
svn:branch:trunk
svn:account:starseeker
2013-09-13 15:51:51 +00:00
Clifford Yapp 7ee6c9d9ee These were never in a released version of BRL-CAD, so just yank them.
svn:revision:57628
svn:branch:trunk
svn:account:starseeker
2013-09-13 15:25:09 +00:00
Clifford Yapp 2728af1d43 Add missing blank line
svn:revision:57627
svn:branch:trunk
svn:account:starseeker
2013-09-13 15:20:19 +00:00
Clifford Yapp f693092140 Fix typos
svn:revision:57626
svn:branch:trunk
svn:account:starseeker
2013-09-13 15:18:30 +00:00
Clifford Yapp 46e0facac6 More search API work. The comb example makes the case for making it trivially easy to handle either lists or individual paths, so structure the API that way - db_search_path, db_search_paths, etc. comb.c builds but is currently untested - need to test. Should be just about ready to start marking functions deprecated for the old search API.
svn:revision:57625
svn:branch:trunk
svn:account:starseeker
2013-09-13 15:07:33 +00:00
Carl Moore 943f7d0486 fix spelling, and remove trailing blanks/tabs
svn:revision:57624
svn:branch:trunk
svn:account:carlmoore
2013-09-13 15:00:12 +00:00
Clifford Yapp 19c8c02832 I don't know if this is the 'proper' final form of the db_tops command, but as possible uses of db_search expand the costs of duplicating this logic will get high very quickly. Make a stab at a librt db_tops.
svn:revision:57623
svn:branch:trunk
svn:account:starseeker
2013-09-13 13:55:44 +00:00
Wu Jianbang 7d348f6622 Free the two original breps...
svn:revision:57622
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 13:51:28 +00:00
Wu Jianbang ccd4f31afa Call rt_db_free_internal().
svn:revision:57621
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 13:45:09 +00:00
Wu Jianbang ff82c1eb7a Free the internals.
svn:revision:57620
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 13:34:31 +00:00
Wu Jianbang 45dc58b2f1 Still memory leak...
svn:revision:57619
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 13:25:42 +00:00
Wu Jianbang 6c8fb6d6c5 Delete the curves in newloop if it's not valid (so not added to the final geometry)
svn:revision:57618
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 13:01:54 +00:00
Wu Jianbang 7dbdff3b8a Delete the input curve by default.
svn:revision:57617
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 12:30:41 +00:00
Wu Jianbang 7b24c4c3a4 Free the result internal.
svn:revision:57616
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 12:24:26 +00:00
Vlad Bogolin 6d8035e367 Implemented qt_draw + comments.
svn:revision:57615
svn:branch:trunk
svn:account:vladbogo
2013-09-13 07:52:08 +00:00
Vlad Bogolin f06a021ba0 Print log calls only if debug level is enabled.
svn:revision:57614
svn:branch:trunk
svn:account:vladbogo
2013-09-13 07:40:56 +00:00
Wu Jianbang b145a0dbce Delete the generated m_curve. And overload the operator= to avoid sharing of m_curve.
svn:revision:57613
svn:branch:trunk
svn:account:phoenixyjll
2013-09-13 05:05:37 +00:00
Clifford Yapp a3b6989fde comment explaining why we're re-assembling plan argv elements into a string
svn:revision:57612
svn:branch:trunk
svn:account:starseeker
2013-09-13 03:04:49 +00:00
Clifford Yapp 444927d9ba Don't crash if search results are null.
svn:revision:57611
svn:branch:trunk
svn:account:starseeker
2013-09-13 03:00:18 +00:00
Clifford Yapp abb839c26a Needing a unique list of directory pointers back from a search is probably going to be common - at least, comb already uses that style in several calls - so duplicating that logic multiple times is a no-go. Wrap up the logic into another simple function, since most of the 'search types' under contemplation earlier actually end up being toplevel path list generator options and the return table type for this scenario is a table of pointers instead of a table of full paths (latter has a non-standard freeing obligation).
svn:revision:57610
svn:branch:trunk
svn:account:starseeker
2013-09-13 02:47:22 +00:00
Clifford Yapp 185e4ec5fb Clear up memory leaks in the search code.
svn:revision:57609
svn:branch:trunk
svn:account:starseeker
2013-09-13 01:50:28 +00:00
Clifford Yapp 24d3681dc9 Activate the db_search function and adapt src/libged/search.c to use it. Undoubtably needs more shaking out, but the core ability seems to be present.
svn:revision:57608
svn:branch:trunk
svn:account:starseeker
2013-09-12 23:19:03 +00:00
Carl Moore 3fc5d232e8 fix Usage and getopt (adding h, ?), simplify what had been if-then-else for 'output' file name
svn:revision:57607
svn:branch:trunk
svn:account:carlmoore
2013-09-12 21:16:13 +00:00
Vlad Bogolin 2322e0bec8 Use Tcl_DoWhenIdle and Tcl_CreateTimerHandler to simulate non-blocking behaviour.
svn:revision:57606
svn:branch:trunk
svn:account:vladbogo
2013-09-12 21:10:49 +00:00
Clifford Yapp 9882b24fea make sure we print help if the only options specified don't involve a search plan or paths. add comment out code from earlier search work - some of this should be the responsibility of the libged cmd, so need it handy as the rework begins
svn:revision:57605
svn:branch:trunk
svn:account:starseeker
2013-09-12 17:47:10 +00:00
Thomas Browder 4b3ef4460e format
svn:revision:57604
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 13:55:06 +00:00
Carl Moore b263d41a56 fix spellings; remove trailing blanks/tabs
svn:revision:57603
svn:branch:trunk
svn:account:carlmoore
2013-09-12 13:22:10 +00:00
Thomas Browder 6a3947dbb9 add some notes
svn:revision:57602
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 13:19:37 +00:00
Thomas Browder 1fc33edd85 delete heap vars at end
svn:revision:57601
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 13:06:16 +00:00
Christopher Sean Morrison 96e5db1705 the cpp files still need to be NO_STRICT because of signed overflow warnings in the opennurbs headers
svn:revision:57600
svn:branch:trunk
svn:account:brlcad
2013-09-12 12:41:34 +00:00
Thomas Browder 252c6e616e now using arg pointers; looks like success--need cleanup; memory handling; and filling out remaining handlers
svn:revision:57599
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 11:44:41 +00:00
Thomas Browder fd46b962b4 move changes out of orginal TCLAP into our customization header
svn:revision:57598
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 11:35:36 +00:00
Thomas Browder da7d28944f modified handling of progname: removed path
svn:revision:57597
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 11:19:33 +00:00
Thomas Browder b43e40037c titdy output format
svn:revision:57596
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 11:06:45 +00:00
Thomas Browder d4873b1e6d enhance comment
svn:revision:57595
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 11:05:54 +00:00
Thomas Browder 0bdf284e18 remove unneeded code
svn:revision:57594
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 10:59:15 +00:00
Thomas Browder b7c2b092b6 formalize error handling a bit; consider TCLAP error message satisfactory so we don't get in the way; but note TCLAP handling still needs work
svn:revision:57593
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 10:58:05 +00:00
Thomas Browder d873a21a92 change flag to be string as TCLAP uses it; simpifies TCLAP arg handlers
svn:revision:57592
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 10:44:27 +00:00
Wu Jianbang b24f795d86 Free the memory.
svn:revision:57591
svn:branch:trunk
svn:account:phoenixyjll
2013-09-12 09:46:02 +00:00
Wu Jianbang 6a135e890b Continue working on memory leaks.
svn:revision:57590
svn:branch:trunk
svn:account:phoenixyjll
2013-09-12 08:58:25 +00:00
Wu Jianbang 25c1080989 Delete the unused curves.
svn:revision:57589
svn:branch:trunk
svn:account:phoenixyjll
2013-09-12 08:31:34 +00:00
Wu Jianbang b4b41038ab Delete the 3D curve for singular trims (no edges are added), and remove dead code.
svn:revision:57588
svn:branch:trunk
svn:account:phoenixyjll
2013-09-12 08:07:35 +00:00
Wu Jianbang b13c52abc7 Fix memory leaks.
svn:revision:57587
svn:branch:trunk
svn:account:phoenixyjll
2013-09-12 07:12:47 +00:00
Clifford Yapp 64143b8ba9 edging closer to a fleshed-out design for db_search
svn:revision:57586
svn:branch:trunk
svn:account:starseeker
2013-09-12 04:17:47 +00:00
Clifford Yapp 197e1aeb49 C90 wants declaration at the top.
svn:revision:57585
svn:branch:trunk
svn:account:starseeker
2013-09-12 03:48:15 +00:00
Thomas Browder 2c7f218329 add comment; reorder some code in more logical order
svn:revision:57584
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 02:22:06 +00:00
Thomas Browder 8cd2161474 filled in func parts needed for dsp_add2.c; builds, but doesn't work correctly; more work needed; also need cleanup and memory reclaing bits; may need to use pointers to TCLAP objects
svn:revision:57583
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 01:57:50 +00:00
Thomas Browder 485aad383b added double to union; reordered vars in union
svn:revision:57582
svn:branch:trunk
svn:account:tbrowder2
2013-09-12 01:55:19 +00:00
Clifford Yapp 02cf7228d0 worry about making the argv array elsewhere - not db_search's job to worry about it.
svn:revision:57581
svn:branch:trunk
svn:account:starseeker
2013-09-12 01:28:27 +00:00
Clifford Yapp 89f6b55768 More search notes.
svn:revision:57580
svn:branch:trunk
svn:account:starseeker
2013-09-12 01:14:31 +00:00
Clifford Yapp c34e282479 More preliminary design for the final db_search function.
svn:revision:57579
svn:branch:trunk
svn:account:starseeker
2013-09-12 00:59:14 +00:00
Clifford Yapp 630a2ed796 Switch the core search logic from using struct db_full_path_list to struct bu_ptbl, which is what should have been done originally since it would have avoided introducing a specialized type just for search. This will allow the new API to be defined without using db_full_path_list, and allow both the struct and the functions using it to be gradually replaced and deprecated.
svn:revision:57578
svn:branch:trunk
svn:account:starseeker
2013-09-12 00:38:45 +00:00
Mohit Daga 0ce1a8e04e Dont need image validation in pix_write. Image is validated in icv_write instead.
svn:revision:57577
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:59:27 +00:00
Mohit Daga ae65bdaf4e TYPO
svn:revision:57576
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:53:37 +00:00
Mohit Daga 425a9462b8 Input Argument Validation
svn:revision:57575
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:50:05 +00:00
Mohit Daga 27dcca8bf3 remove double checking of image.
svn:revision:57574
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:47:12 +00:00
Thomas Browder 88684fcab4 move non-TCLAP code out of try block
svn:revision:57573
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:45:43 +00:00
Mohit Daga 42d5033a80 Trailing WS
svn:revision:57572
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:42:41 +00:00
Mohit Daga a8f246dedb Add case for ppm in icv_read
svn:revision:57571
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:39:13 +00:00
Mohit Daga eadaacc254 Add ppm read function. This function also posses special power to read from stdin.
svn:revision:57570
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 22:37:36 +00:00
Thomas Browder ce417948f3 add comment; build is good; still need to work on guts of wrapped function
svn:revision:57569
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:20:29 +00:00
Thomas Browder 7f15ebc8b5 add arg defs same as dsp_add_t; remove old code; change to C90 comments
svn:revision:57568
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:17:42 +00:00
Thomas Browder 0ad9305081 correct func signature
svn:revision:57567
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:16:14 +00:00
Thomas Browder be3f82f2d6 remove two unneeded decls
svn:revision:57566
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:15:24 +00:00
Thomas Browder 67a98c35dc rearrange struct; add union; neaten
svn:revision:57565
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:14:40 +00:00
Thomas Browder 2f0a5511f8 move TCLAP customization into file bu_opt_parse_private.h
svn:revision:57564
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 22:12:25 +00:00
Mohit Daga e1ab25ae00 FIX fixed size buffer.
svn:revision:57563
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:54:17 +00:00
Mohit Daga db1bf12436 use fopen instead of open. Also remove unwanted headers and macros.
svn:revision:57562
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:50:49 +00:00
Mohit Daga ec85f9e2e9 Move ppm_write and image_flip function to ppm.c
svn:revision:57561
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:45:44 +00:00
Mohit Daga 250a13c3b8 Remove unwanted macros and headers. These are not needed due to usage fopen instead of open.
svn:revision:57560
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:44:06 +00:00
Mohit Daga 92581b2dd5 TYPO
svn:revision:57559
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:36:10 +00:00
Mohit Daga 8049c182d2 WS
svn:revision:57558
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:30:00 +00:00
Mohit Daga 4b1e6c5337 Input argument validation in icv_fade(). Also API function should not exit an app instead show a log message and return Error.
svn:revision:57557
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:28:34 +00:00
Mohit Daga d45d2eba95 Adding ppm.c This file will contain reading and writting ppm formats.
svn:revision:57556
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:13:44 +00:00
Mohit Daga 81b3b66fbe Add input argument validation. Also reduce a variable.
svn:revision:57555
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 21:06:39 +00:00
Clifford Yapp 73ee65c804 Make some notes on what we need to look for when dealing with combs.
svn:revision:57554
svn:branch:trunk
svn:account:starseeker
2013-09-11 21:03:57 +00:00
Mohit Daga 93a4c112cf Rename decimate.c to size.c. Originally decimate.c was supposed to contain rountines to scale down image size. Later enlarging routines were also added to create a single icv_resize api.
svn:revision:57553
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 20:37:14 +00:00
Mohit Daga 072478b02d Rename decimate.c to size.c. Originally decimate.c was supposed to contain rountines to scale down image size. Later enlarging routines were also added to create a single icv_resize api. (preliminary file move commit) 2013-09-11 20:37:14 +00:00
Mohit Daga f09a42a103 Validation and Log messages for color_space utilities.
svn:revision:57552
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 20:27:05 +00:00
Mohit Daga 513e7a718a Trailing WS
svn:revision:57551
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 19:17:38 +00:00
Thomas Browder 5945457c68 have a buildable wrapper for TCLAP; more work needed for a working demo
svn:revision:57550
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 19:15:29 +00:00
Mohit Daga 2bece33c46 Add macros for image validation. These reduces code repetetion.
svn:revision:57549
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 19:00:39 +00:00
Clifford Yapp b797aa6144 Require object name rather than hardcoding brep.s - not much to argument handling at the moment, hopefully will be able to use the advanced argument parsing setup currently being developed later.
svn:revision:57548
svn:branch:trunk
svn:account:starseeker
2013-09-11 18:29:37 +00:00
Clifford Yapp f8f2fc3b2b Use the output file name in the step header
svn:revision:57547
svn:branch:trunk
svn:account:starseeker
2013-09-11 18:22:53 +00:00
Mohit Daga 82ac2f5aef Convert all void return functions to int return. This is done in a process to have better error contralability and to bring a unison.
svn:revision:57546
svn:branch:trunk
svn:account:mohitdaga
2013-09-11 16:52:53 +00:00
Wu Jianbang 2ee4c769d3 Fix memory leak.
svn:revision:57545
svn:branch:trunk
svn:account:phoenixyjll
2013-09-11 09:43:30 +00:00
Wu Jianbang c349614856 Fix memory leak.
svn:revision:57544
svn:branch:trunk
svn:account:phoenixyjll
2013-09-11 09:39:20 +00:00
Vlad Bogolin ac307ad029 Use Tcl_CreateEventSource to call QApplication::processEvents instead of calling it by hand.
svn:revision:57543
svn:branch:trunk
svn:account:vladbogo
2013-09-11 08:03:44 +00:00
Vlad Bogolin 75a8f10a1e Release dm resources when close called.
svn:revision:57542
svn:branch:trunk
svn:account:vladbogo
2013-09-11 07:39:24 +00:00
Wu Jianbang d0256d9d4c Enlarge the bounding boxes with INTERSECTION_TOL.
svn:revision:57541
svn:branch:trunk
svn:account:phoenixyjll
2013-09-11 03:25:47 +00:00
Wu Jianbang ede265851a IsFaceInsideBrep() returns -1 for unknown inside/outside status.
svn:revision:57540
svn:branch:trunk
svn:account:phoenixyjll
2013-09-11 03:20:09 +00:00
Wu Jianbang 4de38674ba The number of surfaces should be used for the surf_tree.
svn:revision:57539
svn:branch:trunk
svn:account:phoenixyjll
2013-09-11 03:02:30 +00:00
Christopher Sean Morrison 89a1021ea4 the keyword is NO_INSTALL
svn:revision:57538
svn:branch:trunk
svn:account:brlcad
2013-09-11 00:44:57 +00:00
Thomas Browder dc54ffb8b6 add more tmp files (NOINSTALL) for testing TCLAP implementation
svn:revision:57537
svn:branch:trunk
svn:account:tbrowder2
2013-09-11 00:43:22 +00:00
Isacc Kamga 81f2a419e2 More corrections to the implicit equation
svn:revision:57536
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-10 23:50:03 +00:00
Isacc Kamga f627bed234 Correcting rt_hrt_norm to reflect the right implicit heart equation
svn:revision:57535
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-10 23:40:14 +00:00
Carl Moore e350974ed9 fix spelling; remove trailing blanks/tabs
svn:revision:57534
svn:branch:trunk
svn:account:carlmoore
2013-09-10 22:02:44 +00:00
Isacc Kamga bbf2a9ab7f Correcting the implicit equation of the heart in rt_hrt_shot()
svn:revision:57533
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-10 21:29:44 +00:00
Clifford Yapp 8ccc1cfc10 Start figuring out what to do about combs.
svn:revision:57532
svn:branch:trunk
svn:account:starseeker
2013-09-10 21:08:56 +00:00
Clifford Yapp 8a11061cfa Add brep_cobb back in
svn:revision:57531
svn:branch:trunk
svn:account:starseeker
2013-09-10 20:38:47 +00:00
Thomas Browder 53b6854be1 rename section
svn:revision:57530
svn:branch:trunk
svn:account:tbrowder2
2013-09-10 18:34:46 +00:00
Thomas Browder 2b24f7ea17 add initial bin opt arg analysis per Sean's idea
svn:revision:57529
svn:branch:trunk
svn:account:tbrowder2
2013-09-10 17:49:48 +00:00
Christopher Sean Morrison dc7a608d53 mark which proc-db seem to be developmental test programs and which actually create some geometry, something potentially useful to a non-developer. don't install the development apps.
svn:revision:57528
svn:branch:trunk
svn:account:brlcad
2013-09-10 16:57:59 +00:00
Christopher Sean Morrison b845af7256 more 'may be used unitialized' warnings due to try/catch block, reordered/separated for readability
svn:revision:57527
svn:branch:trunk
svn:account:brlcad
2013-09-10 16:45:28 +00:00
Christopher Sean Morrison 7544be9371 review proc-db for promotion to src/shapes
svn:revision:57526
svn:branch:trunk
svn:account:brlcad
2013-09-10 16:25:11 +00:00
Wu Jianbang 4406d5a341 Improve inside/outside test for the cases with overlap surfaces.
svn:revision:57525
svn:branch:trunk
svn:account:phoenixyjll
2013-09-10 09:32:26 +00:00
Wu Jianbang 91428ce24e Also check degree (order) and knots for NURBS surface equality.
svn:revision:57524
svn:branch:trunk
svn:account:phoenixyjll
2013-09-10 03:11:56 +00:00
Clifford Yapp 056c86fadf Adapt the Ayam implementation of the Cobb NURBS sphere to OpenNURBS and BRL-CAD. Creates a sphere (right now, only a unit sphere) using six NURBS patches rather than a revolved arc.
svn:revision:57523
svn:branch:trunk
svn:account:starseeker
2013-09-10 02:54:15 +00:00
Clifford Yapp a1842e1545 Free some memory - not properly freeing the STEPcomplex entities, but it's a start
svn:revision:57522
svn:branch:trunk
svn:account:starseeker
2013-09-09 22:15:58 +00:00
Clifford Yapp 8cea6d9545 Make a note to look into assigning b_spline_surface_form types when possible.
svn:revision:57521
svn:branch:trunk
svn:account:starseeker
2013-09-09 22:02:06 +00:00
Mohit Daga e60f48574b Remove TODO items.
svn:revision:57520
svn:branch:trunk
svn:account:mohitdaga
2013-09-09 21:34:00 +00:00
Mohit Daga 387f3741fc Structure the declarations of public apis in libicv.
svn:revision:57519
svn:branch:trunk
svn:account:mohitdaga
2013-09-09 20:54:30 +00:00
Vlad Bogolin 93b3f05c27 Send mouse coordinates when generating Tk click events.
svn:revision:57518
svn:branch:trunk
svn:account:vladbogo
2013-09-09 20:34:53 +00:00
Clifford Yapp 3366eda965 Flip loops when we flip the face (Keith's suggestion, seems to improve raytracing results for test rcc
svn:revision:57517
svn:branch:trunk
svn:account:starseeker
2013-09-09 20:31:02 +00:00
Clifford Yapp 7ffef8cd2c Break out Shape_Representation and Shape_Representation_Relationship
svn:revision:57516
svn:branch:trunk
svn:account:starseeker
2013-09-09 19:50:47 +00:00
Clifford Yapp 9d220b0b7e Break out the building of the geometric context stepcomplex object
svn:revision:57515
svn:branch:trunk
svn:account:starseeker
2013-09-09 19:43:30 +00:00
Clifford Yapp 674c4840bd Break out shape_definition_representation
svn:revision:57514
svn:branch:trunk
svn:account:starseeker
2013-09-09 19:32:50 +00:00
Mohit Daga fb317ffe7f Convert open to fopen in bw_write, pix_write
svn:revision:57513
svn:branch:trunk
svn:account:mohitdaga
2013-09-09 18:42:33 +00:00
Clifford Yapp e53c84660d Add knots to rational surfaces.
svn:revision:57512
svn:branch:trunk
svn:account:starseeker
2013-09-09 18:41:48 +00:00
Mohit Daga 4c2d0d24cb Use fopen in instead of open.
svn:revision:57511
svn:branch:trunk
svn:account:mohitdaga
2013-09-09 17:59:11 +00:00
Clifford Yapp c13b96832b Need to be able to get at the generic aggregate in the stepcomplex surface case - add a map to simplify getting at all aggregates.
svn:revision:57510
svn:branch:trunk
svn:account:starseeker
2013-09-09 17:37:45 +00:00
Clifford Yapp 362a0444ac print entity name too
svn:revision:57509
svn:branch:trunk
svn:account:starseeker
2013-09-09 17:00:49 +00:00
Mohit Daga 24093564fc Initialize the pointers to NULL. (An error in with [-Werror=uninitialized])
svn:revision:57508
svn:branch:trunk
svn:account:mohitdaga
2013-09-09 16:16:56 +00:00
Clifford Yapp aafe044300 Get a look at the attribute list for the rational surface aggregate
svn:revision:57507
svn:branch:trunk
svn:account:starseeker
2013-09-09 15:36:44 +00:00
Clifford Yapp d0c2db8a70 Add ON_NurbsSurface.cpp
svn:revision:57506
svn:branch:trunk
svn:account:starseeker
2013-09-09 15:31:59 +00:00
Clifford Yapp f40a649611 Break out surfaces into their own file.
svn:revision:57505
svn:branch:trunk
svn:account:starseeker
2013-09-09 15:31:25 +00:00
Clifford Yapp ece6730832 Simplify code, re-use functions
svn:revision:57504
svn:branch:trunk
svn:account:starseeker
2013-09-09 14:24:06 +00:00
Clifford Yapp f431b4f409 Add ON_NurbsCurve.cpp
svn:revision:57503
svn:branch:trunk
svn:account:starseeker
2013-09-09 13:59:47 +00:00
Clifford Yapp 78ba742ef0 Break out NurbsCurve handling.
svn:revision:57502
svn:branch:trunk
svn:account:starseeker
2013-09-09 13:59:04 +00:00
Clifford Yapp 6f10041596 Start breaking out pieces of ON_Brep.cpp into individual files.
svn:revision:57501
svn:branch:trunk
svn:account:starseeker
2013-09-09 13:45:39 +00:00
Clifford Yapp 242f85f1e7 Ah - just as we have to do something different for rational curves, we'll need to do something for rational surfaces.
svn:revision:57500
svn:branch:trunk
svn:account:starseeker
2013-09-09 13:22:10 +00:00
Wu Jianbang 3c7db8c27c Detect whether the surfaces are the same - don't need SSI if they are the same.
svn:revision:57498
svn:branch:trunk
svn:account:phoenixyjll
2013-09-09 07:21:42 +00:00
Wu Jianbang 48a94b6b13 Not always the last vertex. We should compare all vertexes and find the right one.
svn:revision:57497
svn:branch:trunk
svn:account:phoenixyjll
2013-09-09 05:54:56 +00:00
Wu Jianbang a26e99d70b Use the same surface if they are split from the same face.
svn:revision:57496
svn:branch:trunk
svn:account:phoenixyjll
2013-09-09 04:51:55 +00:00
Mohit Daga 6781faf3b5 Validate the input images in the public APIs of libicv.
svn:revision:57495
svn:branch:trunk
svn:account:mohitdaga
2013-09-08 19:33:06 +00:00
Vlad Bogolin f761a656e2 Process Qt events in archer.
svn:revision:57494
svn:branch:trunk
svn:account:vladbogo
2013-09-08 18:56:31 +00:00
Vlad Bogolin 9fec0e1a38 Removed comma in order to solve "comma at end of numerator list".
svn:revision:57493
svn:branch:trunk
svn:account:vladbogo
2013-09-08 18:11:40 +00:00
Thomas Browder c0b15cc7aa add comment; close up related lines
svn:revision:57491
svn:branch:trunk
svn:account:tbrowder2
2013-09-08 16:26:35 +00:00
Mohit Daga 6689fbfaae Avoid mixup of two types of filters in icv. This now has adaptibility to handle error related to passing of filer parameters.
svn:revision:57490
svn:branch:trunk
svn:account:mohitdaga
2013-09-08 12:49:21 +00:00
Mohit Daga f927e45f41 Remove TODO item
svn:revision:57489
svn:branch:trunk
svn:account:mohitdaga
2013-09-08 09:53:50 +00:00
Mohit Daga a69b9e5360 WS
svn:revision:57488
svn:branch:trunk
svn:account:mohitdaga
2013-09-08 09:52:32 +00:00
Mohit Daga 9c932b4126 Brought Stylistic Sanity.
svn:revision:57487
svn:branch:trunk
svn:account:mohitdaga
2013-09-08 09:48:41 +00:00
Isacc Kamga 9cef24a933 Removing the constant 320 from polynomial S's coefficients because it does yield different images after running rt on a heart object.
svn:revision:57486
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-07 08:54:42 +00:00
Isacc Kamga 5ff4cb4e05 rt_hrt_shot: Coefficients of heart equation have been revisited. Sextic equatino built gradually by combining different polynomials
svn:revision:57485
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-07 08:45:56 +00:00
Christopher Sean Morrison 0df73b5b48 m_adj_face_index is unused, removing
svn:revision:57484
svn:branch:trunk
svn:account:brlcad
2013-09-07 01:46:28 +00:00
Clifford Yapp 042bea47b4 Add the weights. Not quite correct yet, but definitely closer.
svn:revision:57483
svn:branch:trunk
svn:account:starseeker
2013-09-06 22:49:42 +00:00
Clifford Yapp a85bd9417e Add knots
svn:revision:57482
svn:branch:trunk
svn:account:starseeker
2013-09-06 22:42:27 +00:00
Clifford Yapp 0f6a069ca2 Set closed_curve and self_intersect flags
svn:revision:57481
svn:branch:trunk
svn:account:starseeker
2013-09-06 22:27:59 +00:00
Clifford Yapp 2cd39baec5 Add control point lists and curve types.
svn:revision:57480
svn:branch:trunk
svn:account:starseeker
2013-09-06 22:16:22 +00:00
Vlad Bogolin 45cc7e8826 Set locale to POSIX after open is called + use a single QPainter instead of creating one everytime a drawing is made.
svn:revision:57478
svn:branch:trunk
svn:account:vladbogo
2013-09-06 19:27:26 +00:00
Vlad Bogolin e6c46be17e Default for framebuffer interface - handle unsupported display manager and framebuffer combinations by D.Rossberg
svn:revision:57477
svn:branch:trunk
svn:account:vladbogo
2013-09-06 19:25:54 +00:00
Clifford Yapp dbea802f85 Appending is taken care of elsewhere.
svn:revision:57476
svn:branch:trunk
svn:account:starseeker
2013-09-06 18:49:52 +00:00
Clifford Yapp 1c80b70057 Gah. Looks like we will need an aggregate to 'properly' define rational bspline curves.
svn:revision:57475
svn:branch:trunk
svn:account:starseeker
2013-09-06 18:49:19 +00:00
Thomas Browder d9a9a1b26b move fnames up to main scope for later use; bail on errors earlier; improve error messages
svn:revision:57474
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 17:28:49 +00:00
Thomas Browder b3f2caba32 add ERROR to error exit message
svn:revision:57473
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 17:07:01 +00:00
Thomas Browder 040dd54bce rearrange file open order; standardize format of exit messages
svn:revision:57472
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 17:05:18 +00:00
Thomas Browder 22e36e7167 use std exit macros for portability and ease of parsing
svn:revision:57471
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 16:51:05 +00:00
Thomas Browder a21dd2212c improve help output format
svn:revision:57470
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 14:59:16 +00:00
Isacc Kamga 7a21d6cc25 A roots example of a sextic equation. Changed 4 to BN_MAX_POLY_DEGREE
svn:revision:57469
svn:branch:trunk
svn:account:iiizzzaaakkk
2013-09-06 14:57:01 +00:00
Thomas Browder bef080b979 modify arg description for output file
svn:revision:57468
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 14:52:51 +00:00
Thomas Browder 2f37160798 check for zero-length files
svn:revision:57467
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 13:49:07 +00:00
Thomas Browder 9f4d93b4b9 protect from overwriting existing files; add -f option; improve error message
svn:revision:57466
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 13:33:18 +00:00
Thomas Browder 33042240bd change from stdout redirect to a named file as third mandatory arg (gives better opt handling)
svn:revision:57465
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 11:58:22 +00:00
Thomas Browder cbcd6a518f remove commented-out code
svn:revision:57464
svn:branch:trunk
svn:account:tbrowder2
2013-09-06 11:12:27 +00:00
Wu Jianbang 57707df9f3 Should use m_b for the polyline's domain...
svn:revision:57462
svn:branch:trunk
svn:account:phoenixyjll
2013-09-06 05:34:40 +00:00
Wu Jianbang 9c2ac97c00 IsPointOnLoop() and IsPointInsideLoop() may return -1. And there might be no intersections (e.g. for an innerloop)
svn:revision:57461
svn:branch:trunk
svn:account:phoenixyjll
2013-09-06 05:04:50 +00:00
Wu Jianbang 7bf80be774 It should be the intersection of the two merged intervals, not union.
svn:revision:57460
svn:branch:trunk
svn:account:phoenixyjll
2013-09-06 04:24:17 +00:00
Christopher Sean Morrison e84cbc6e5b if we're building in place, we also need to ignore the lexer output source files that inject system headers before our common.h header
svn:revision:57459
svn:branch:trunk
svn:account:brlcad
2013-09-06 03:51:41 +00:00
Christopher Sean Morrison 7374e2293f add some notes on the various implicit primitive constraints
svn:revision:57458
svn:branch:trunk
svn:account:brlcad
2013-09-06 02:33:17 +00:00
Christopher Sean Morrison d251f22985 simple first step for making some progress on ray bundling
svn:revision:57457
svn:branch:trunk
svn:account:brlcad
2013-09-06 02:06:51 +00:00
Christopher Sean Morrison b45bb4cd81 this has come up several times recently and probably something we can predominantly automate. provide a model reduction capability.
svn:revision:57456
svn:branch:trunk
svn:account:brlcad
2013-09-06 01:38:34 +00:00
Thomas Browder db825f4a35 TCLAP takes care of no-arg situation
svn:revision:57455
svn:branch:trunk
svn:account:tbrowder2
2013-09-05 23:17:24 +00:00
Thomas Browder a1ee4dd786 demo '?' arg when we have no long help (same as '-h')
svn:revision:57454
svn:branch:trunk
svn:account:tbrowder2
2013-09-05 23:09:26 +00:00
Thomas Browder 9298f4d1aa eliminate showing '--' or '--version' args
svn:revision:57453
svn:branch:trunk
svn:account:tbrowder2
2013-09-05 22:43:58 +00:00
Clifford Yapp 47e4d9b905 Multiplicity (at a minimum) isn't right.
svn:revision:57452
svn:branch:trunk
svn:account:starseeker
2013-09-05 22:32:43 +00:00
Clifford Yapp 412fad78c1 Add ability to print specific 3D curve info
svn:revision:57451
svn:branch:trunk
svn:account:starseeker
2013-09-05 22:30:50 +00:00
Thomas Browder d5756387f4 add more of TCLAP code to customize
svn:revision:57450
svn:branch:trunk
svn:account:tbrowder2
2013-09-05 22:18:57 +00:00
Clifford Yapp 44be3ba119 Work on figuring out how to properly export a rational curve
svn:revision:57449
svn:branch:trunk
svn:account:starseeker
2013-09-05 22:07:36 +00:00
Jordi Sayol 56e1b6b45f update debian changelog
svn:revision:57448
svn:branch:trunk
svn:account:jordisayol
2013-09-05 21:46:35 +00:00
Christopher Sean Morrison f5e29fceee merge trunk from r55755 through r57446 into the release branch, beginning preparations and testing for release 7.24.2
svn:revision:57447
svn:branch:RELEASE
svn:account:brlcad
2013-09-05 21:10:55 +00:00
Christopher Sean Morrison 518eada858 since it's all within a try/catch block now, count is used potentially uninitialized
svn:revision:57446
svn:branch:trunk
svn:account:brlcad
2013-09-05 18:30:49 +00:00
Thomas Browder 5e306572e5 initial subclass experiment
svn:revision:57445
svn:branch:trunk
svn:account:tbrowder2
2013-09-05 18:22:39 +00:00
Clifford Yapp d7cdb95dfb Get NURBS form of rev surface for export.
svn:revision:57444
svn:branch:trunk
svn:account:starseeker
2013-09-05 13:58:06 +00:00
Thomas Browder a25df03d65 initial implementation of tclap arg parsing
svn:revision:57443
svn:branch:trunk
svn:account:tbrowder2
2013-09-05 12:21:36 +00:00
Wu Jianbang 37930f2645 Don't append to intersect[] directly, because the pointers in pts_on_curves[] may be invalid if the capacity of intersect[] is enlarged. And use ON_ClassArray instead of dynamic allocated pointers.
svn:revision:57442
svn:branch:trunk
svn:account:phoenixyjll
2013-09-05 08:15:31 +00:00
Wu Jianbang 3843ca8958 It seem that FilpFace() has no effect... Change vnormal directly.
svn:revision:57441
svn:branch:trunk
svn:account:phoenixyjll
2013-09-05 06:15:21 +00:00
Wu Jianbang 2a4b703bf0 Flip the face if necessary.
svn:revision:57440
svn:branch:trunk
svn:account:phoenixyjll
2013-09-05 05:58:50 +00:00
Christopher Sean Morrison 68556bda0a Begin a new branch intended to sit as an intermediary between unstable trunk development and STABLE point releases. As a release window nears, trunk will be merged to this new branch, documented, tested, fixed/reverted, stabilized, and finally merged to STABLE when complete. for now, intentionally using just this one branch (not one per release). Here's a pictorial view:
trunk -o-o-o-o-o--o-o--o-o--o-o--o--o--o-o--...
          \   \           \          \
RELEASE    \   \       o---o-o-o------o-o---...
            \   \     /         \        \
STABLE       o---o---o-----------o--------o-...
              \   \   \           \        \
tags           o   o   o           o        o

svn:revision:57439
svn:branch:RELEASE
svn:account:brlcad
2013-09-05 05:29:59 +00:00
Clifford Yapp 94d8480438 Take a stab at arc curve conversion.
svn:revision:57438
svn:branch:trunk
svn:account:starseeker
2013-09-04 22:24:02 +00:00
Mohit Daga c2099ad8f1 Add TODO item for stylistic measures
svn:revision:57436
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 19:06:44 +00:00
Clifford Yapp 8e8f5a6ef8 Testing with simple planar breps seems to suggest that this flag needs to be reversed...
svn:revision:57435
svn:branch:trunk
svn:account:starseeker
2013-09-04 18:49:04 +00:00
Mohit Daga 51da5a8d33 icv_filter3 returns a NULL.
svn:revision:57434
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 18:38:38 +00:00
Mohit Daga ed891d0952 Change the name of icv_get_kernel -> get_kernel (private function)
svn:revision:57433
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 18:37:42 +00:00
Mohit Daga db1ef54fd7 Add a TODO item to check for the mixup of two types of filters in filter.c
svn:revision:57432
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 18:29:44 +00:00
Mohit Daga 0c9448550a Remove debug flag.
svn:revision:57431
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 18:28:06 +00:00
Clifford Yapp 8881259edc Get dsp_add_t working for testing purposes - the util inclusions of tclap header directories will go away once libbu wraps it.
svn:revision:57430
svn:branch:trunk
svn:account:starseeker
2013-09-04 18:18:44 +00:00
Mohit Daga a5b2e812ec If the filter specified is not present in the library, we should not consider filtering the image. Instead return with an error.
svn:revision:57429
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 18:14:58 +00:00
Mohit Daga 20026322fe Add a TODO item for validation of input arguments.
svn:revision:57428
svn:branch:trunk
svn:account:mohitdaga
2013-09-04 17:36:00 +00:00
Clifford Yapp c7b20b6d2c Move the headers into the subdirectory
svn:revision:57427
svn:branch:trunk
svn:account:starseeker
2013-09-04 17:35:22 +00:00
Nicholas Reed 2578f20592 const param type should remove need to cast string literal arguments. Can skip printing both NULL and empty string args. Make exit behavior more consistent, using bu_exit where convienent.
svn:revision:57425
svn:branch:trunk
svn:account:n_reed
2013-09-04 16:38:46 +00:00
Thomas Browder 09425bc01e comment out tclap header due to problems with tclap config--needs work
svn:revision:57424
svn:branch:trunk
svn:account:tbrowder2
2013-09-04 16:10:50 +00:00
Thomas Browder d7ba29ff04 add casts to avoid errors: deprecated conversion from string constant to 'char*'; last of C++ fixes for good build
svn:revision:57423
svn:branch:trunk
svn:account:tbrowder2
2013-09-04 15:54:21 +00:00
Thomas Browder 3f2719dff2 add casts to avoid invalid conversion errors
svn:revision:57422
svn:branch:trunk
svn:account:tbrowder2
2013-09-04 15:49:39 +00:00
Thomas Browder e00215a710 add copy of dsp_add.c for conversion to C++ and using tclap arg processing
svn:revision:57421
svn:branch:trunk
svn:account:tbrowder2
2013-09-04 15:41:37 +00:00
Thomas Browder e000bb64f4 add info; remove unneeded semicolon
svn:revision:57420
svn:branch:trunk
svn:account:tbrowder2
2013-09-04 15:21:39 +00:00
Clifford Yapp cad2ed73aa Add minimal file set from tclap 1.2.1 to support experiments in improvements to option parsing. There is a config.h file, so we may need to add CMake logic for a few system tests if long long and/or strstream detection prove necessary.
svn:revision:57419
svn:branch:trunk
svn:account:starseeker
2013-09-04 14:29:06 +00:00
Thomas Browder e4032880eb remove 3rd party doc from our doc tree
svn:revision:57417
svn:branch:trunk
svn:account:tbrowder2
2013-09-04 11:27:04 +00:00
Wu Jianbang 21eaf072d2 Generate the connectivity graph for the new solid (after evaluation)
svn:revision:57416
svn:branch:trunk
svn:account:phoenixyjll
2013-09-04 09:45:31 +00:00
Wu Jianbang 85718607f3 Perform Xform for the leaf.
svn:revision:57415
svn:branch:trunk
svn:account:phoenixyjll
2013-09-04 06:31:52 +00:00
Wu Jianbang cb5d4c46a0 Check 3D distance (not included in ON_Brep::IsValid()) when looking for seam trims.
svn:revision:57414
svn:branch:trunk
svn:account:phoenixyjll
2013-09-04 05:53:32 +00:00
Wu Jianbang d38caf2624 db => dbip, and mark const for some variables.
svn:revision:57413
svn:branch:trunk
svn:account:phoenixyjll
2013-09-04 05:02:05 +00:00
Wu Jianbang c40e40d14e Some renaming - ip => dbip; brep_conversion => single_conversion
svn:revision:57412
svn:branch:trunk
svn:account:phoenixyjll
2013-09-04 04:45:48 +00:00
Wu Jianbang ed80a6cc68 Check the db_i pointer.
svn:revision:57411
svn:branch:trunk
svn:account:phoenixyjll
2013-09-04 04:09:33 +00:00
Clifford Yapp 5e052017ac merging trunk to STABLE from r55609 to HEAD r55755
svn:revision:55757
svn:branch:STABLE
svn:account:starseeker
2013-06-13 18:37:31 +00:00
Clifford Yapp 533dea84fc Update STABLE to match trunk r55605. This is the big merge (but not the final merge) before tagging the next release.
svn:revision:55609
svn:branch:STABLE
svn:account:starseeker
2013-05-30 18:55:16 +00:00
Christopher Sean Morrison ac085a264d manually copy ChangeLog from trunk so we can merge forward later. final steps for 7.22.0 release.
svn:revision:51319
svn:branch:STABLE
svn:account:brlcad
2012-06-25 03:20:52 +00:00
Christopher Sean Morrison f52852d717 bump to 7.22.0 for release
svn:revision:51317
svn:branch:STABLE
svn:account:brlcad
2012-06-25 02:54:40 +00:00
Christopher Sean Morrison e6806d95cd manually copy NEWS from trunk in preparation for release 7.22.0, treating STABLE as a release branch instead of trunk.
svn:revision:51316
svn:branch:STABLE
svn:account:brlcad
2012-06-25 02:54:04 +00:00
Christopher Sean Morrison 1b5444f3de manually merge a few last-minute changes from trunk. fix install docs, few mged scripting robustness checks, and command blather.
svn:revision:51292
svn:branch:STABLE
svn:account:brlcad
2012-06-22 20:49:00 +00:00
Clifford Yapp cddf93fa80 Synce trunk and STABLE - trunk r51214
svn:revision:51215
svn:branch:STABLE
svn:account:starseeker
2012-06-18 19:38:59 +00:00
Clifford Yapp 80044db0b1 Sync trunk and STABLE up to trunk r50908. Reverted previous workaround of vls issues - should be back to STABLE matching a particular revision of trunk. Will double check due to complexity of this merge process, but after this syncing should be more straightforward again.
svn:revision:50914
svn:branch:STABLE
svn:account:starseeker
2012-06-06 01:26:06 +00:00
Clifford Yapp 62b063d463 Hmm - stray files left in STABLE after syncing somehow.
svn:revision:50776
svn:branch:STABLE
svn:account:starseeker
2012-05-31 03:02:14 +00:00
Clifford Yapp 4ed789a6c7 Back up the libbu vls work to 50646 - regressions appear to be breaking.
svn:revision:50775
svn:branch:STABLE
svn:account:starseeker
2012-05-31 02:11:54 +00:00
Clifford Yapp 3ef859d283 Merge trunk into STABLE - synced as of r50772.
svn:revision:50773
svn:branch:STABLE
svn:account:starseeker
2012-05-30 22:23:17 +00:00
Clifford Yapp 8a164b654c Apply the red changes from r50520-50522 to STABLE
svn:revision:50524
svn:branch:STABLE
svn:account:starseeker
2012-05-11 21:38:32 +00:00
Keith Boman 8ebe88c7e1 Added UV pushback routine that keeps the newton iterate method from walking out of the UV domain of the SBV versus the current version that keeps it within the surface UV. Also added code to make sure iterate does not step back past previous point along iteration. Matches SVN trunk 50494
svn:revision:50495
svn:branch:STABLE
svn:account:indianlarry
2012-05-10 19:18:35 +00:00
Keith Boman 15589c6a1d Changed flatness test back to to running product of the normal vector of the frenet frame projected onto each other normal in the frame set. Also added early bail once flatness criteria fails. Added straightness test in a similar manner using the tangent from the frenet frame. Changed getCurveEstimateOfV()/getCurveEstimateOfU() to solve using subdivision. Added tolerence value of BREP_EDGE_MISS_TOLERANCE so we can get NEAR misses from isTrimmed(). Matches SVn revision 50490 in trunk.
svn:revision:50491
svn:branch:STABLE
svn:account:indianlarry
2012-05-10 18:00:39 +00:00
Clifford Yapp 5c49adccd9 Whoops, add getopt.tcl
svn:revision:50488
svn:branch:STABLE
svn:account:starseeker
2012-05-10 16:19:26 +00:00
Clifford Yapp d85998d908 sync rtwizard
svn:revision:50487
svn:branch:STABLE
svn:account:starseeker
2012-05-10 16:18:29 +00:00
Clifford Yapp 661cd3f449 Apply fix from trunk r50445
svn:revision:50485
svn:branch:STABLE
svn:account:starseeker
2012-05-10 15:44:39 +00:00
Clifford Yapp 33bb71be73 Tack on the other changes to ChangeLog
svn:revision:50373
svn:branch:STABLE
svn:account:starseeker
2012-04-30 19:07:07 +00:00
Clifford Yapp e562b640be Add workaround for MSVC2010 64 bit and zlib from trunk r49887
svn:revision:50370
svn:branch:STABLE
svn:account:starseeker
2012-04-30 15:10:47 +00:00
Clifford Yapp 13e42e8cc5 Remove this file - removed in trunk, not needed, causing build issue on mac for release build.
svn:revision:50369
svn:branch:STABLE
svn:account:starseeker
2012-04-30 15:06:35 +00:00
Clifford Yapp 15ca9a449f Don't use numbers for bools
svn:revision:50368
svn:branch:STABLE
svn:account:starseeker
2012-04-30 14:35:41 +00:00
Clifford Yapp d9cff96eb7 Correct typo.
svn:revision:50367
svn:branch:STABLE
svn:account:starseeker
2012-04-30 14:08:17 +00:00
Clifford Yapp f90cf25dc9 Merge rtwizard fix to STABLE
svn:revision:50354
svn:branch:STABLE
svn:account:starseeker
2012-04-28 16:32:58 +00:00
Clifford Yapp db3126e970 Up version numbers, cleanup NEWS, put relevant portion of STABLE changlog in place. Not sure this will ever actually get tagged for a release, but this revision of STABLE is exhibiting the desired behavior on Linux.
svn:revision:50349
svn:branch:STABLE
svn:account:starseeker
2012-04-27 16:53:36 +00:00
Clifford Yapp d09215a1b9 Merge NURBS tweak from trunk r50343
svn:revision:50345
svn:branch:STABLE
svn:account:starseeker
2012-04-27 15:39:17 +00:00
Clifford Yapp d6e10d6642 Don't build docbook with autotools - current docbook methods have changed significantly, not worth retrofitting.
svn:revision:50336
svn:branch:STABLE
svn:account:starseeker
2012-04-26 23:00:30 +00:00
Clifford Yapp 2808d04146 whoops, typo
svn:revision:50333
svn:branch:STABLE
svn:account:starseeker
2012-04-26 21:23:33 +00:00
Clifford Yapp dba4dcdd72 nevermind pdf building with autotools
svn:revision:50332
svn:branch:STABLE
svn:account:starseeker
2012-04-26 20:39:00 +00:00
Clifford Yapp 30aad8d272 Add relos to the hardcoded tclIndex file
svn:revision:50329
svn:branch:STABLE
svn:account:starseeker
2012-04-26 19:57:47 +00:00
Clifford Yapp b2863bdd4d break up line for C90
svn:revision:50327
svn:branch:STABLE
svn:account:starseeker
2012-04-26 18:56:44 +00:00
Clifford Yapp 1e072c374e pull the OGL wrapping from trunk for axes.c
svn:revision:50326
svn:branch:STABLE
svn:account:starseeker
2012-04-26 18:36:39 +00:00
Clifford Yapp c5a65644a2 use C commenting
svn:revision:50325
svn:branch:STABLE
svn:account:starseeker
2012-04-26 18:07:17 +00:00
Clifford Yapp 43fe761a14 another C++ style comments
svn:revision:50324
svn:branch:STABLE
svn:account:starseeker
2012-04-26 17:54:43 +00:00
Clifford Yapp 8374689ce8 remove C++ style comments
svn:revision:50323
svn:branch:STABLE
svn:account:starseeker
2012-04-26 17:49:24 +00:00
Clifford Yapp b41cd9f4b5 Update libpng in STABLE to version 1.5.10 (same change as trunk r50319)
svn:revision:50320
svn:branch:STABLE
svn:account:starseeker
2012-04-26 13:56:46 +00:00
Clifford Yapp 2b8e92447d Start working up a 7.20.6 NEWS file - will be tagging off of STABLE this time, since trunk still needs more work to be release ready. Eventually we'll need to sync the main trunk NEWS file back up with this one, but for now just work on getting the release out. For now attaching revision numbers associated with each change to the news line covering it - those will be taken out before release is tagged, but for now they help keep straight what has and has not been merged in from trunk.
svn:revision:50312
svn:branch:STABLE
svn:account:starseeker
2012-04-25 23:53:15 +00:00
Clifford Yapp f26f90d9f0 Grab the coil crash fix from 48470
svn:revision:50311
svn:branch:STABLE
svn:account:starseeker
2012-04-25 23:24:06 +00:00
Clifford Yapp 03a2f3b470 Add d2-c fix from r48233
svn:revision:50310
svn:branch:STABLE
svn:account:starseeker
2012-04-25 23:11:49 +00:00
Clifford Yapp 01c9630123 Merge MUVEStoORCA translation matrix update to librtserver from trunk r50300
svn:revision:50305
svn:branch:STABLE
svn:account:starseeker
2012-04-25 20:54:48 +00:00
Clifford Yapp 47c9507e32 remove explicit java libs from stable too
svn:revision:50297
svn:branch:STABLE
svn:account:starseeker
2012-04-25 18:33:40 +00:00
Clifford Yapp b5df13b2f6 Add the Wno-variadic-macros check to STABLE
svn:revision:50200
svn:branch:STABLE
svn:account:starseeker
2012-04-23 15:18:09 +00:00
Clifford Yapp 87477c11df Apply r50164 and r50167 fixes from trunk to STABLE
svn:revision:50170
svn:branch:STABLE
svn:account:starseeker
2012-04-18 15:09:10 +00:00
Clifford Yapp 1bf0d488f6 Backport another MSVC fix from trunk
svn:revision:49993
svn:branch:STABLE
svn:account:starseeker
2012-04-13 02:12:50 +00:00
Clifford Yapp 971150c6c1 Backport fix for MSVC from trunk
svn:revision:49992
svn:branch:STABLE
svn:account:starseeker
2012-04-13 02:04:22 +00:00
Clifford Yapp 1c6ac3c056 Pull in bu_log statement change from trunk
svn:revision:49991
svn:branch:STABLE
svn:account:starseeker
2012-04-13 01:46:04 +00:00
Clifford Yapp 9f38119343 Turn off the ARS custom bbox routine - restore old behavior until we get ARS bbox routine to produce the correct bbox
svn:revision:49980
svn:branch:STABLE
svn:account:starseeker
2012-04-11 20:01:22 +00:00
Clifford Yapp d11362c9f9 Add changes from trunk revisions 49519, 49524, 49532, 49540, 49562, 49563, 49568, 49572, 49600-49602, 49604-49605, 49607-49614, 49616, 49617, 49648, 49666, 49711, 49753, 49768, 49769, 49782
svn:revision:49789
svn:branch:STABLE
svn:account:starseeker
2012-03-22 16:41:11 +00:00
Clifford Yapp 4ecb987709 Apply 49150
svn:revision:49742
svn:branch:STABLE
svn:account:starseeker
2012-03-19 16:18:34 +00:00
Clifford Yapp 822951725c merge bugfix from trunk r49516
svn:revision:49522
svn:branch:STABLE
svn:account:starseeker
2012-02-23 20:39:48 +00:00
Clifford Yapp f7ed07601f put rtwizard tweak in stable too.
svn:revision:49521
svn:branch:STABLE
svn:account:starseeker
2012-02-23 20:15:35 +00:00
Clifford Yapp 65d94e82b8 Same fix for stable logic - this may necessitate manual intervention for this file in a future merge.
svn:revision:49496
svn:branch:STABLE
svn:account:starseeker
2012-02-22 19:41:20 +00:00
Clifford Yapp 05c14523ed Fix form, not just name...
svn:revision:49490
svn:branch:STABLE
svn:account:starseeker
2012-02-21 18:10:23 +00:00
Clifford Yapp 5eb8e18313 Ah, right - too early for that version of the INCLUDE_DIRS macro
svn:revision:49489
svn:branch:STABLE
svn:account:starseeker
2012-02-21 18:08:56 +00:00
Clifford Yapp db7f22edb4 Add the librtserver build tweaks to STABLE
svn:revision:49488
svn:branch:STABLE
svn:account:starseeker
2012-02-21 17:57:30 +00:00
Clifford Yapp ce2634e377 initialize val
svn:revision:49475
svn:branch:STABLE
svn:account:starseeker
2012-02-17 21:14:16 +00:00
Clifford Yapp 817230455e Sync a variety of fixes to the STABLE branch. Tried to select a 'safe' subset of the changes from trunk - hopefully these should be viable as a patch to 7.20.4 without introducing major breakage. CMake regress and distcheck pass. svn revisions: 47458, 47473, 47483-47484, 47656-47659, 47677-46678, 47687, 47695, 47698, 47700, 47723, 47769, 47971, 48195, 48837-48845, 48853-48884, 48887, 48889, 48900-48904, 48907-48909, 49007, 49012, 49014-49015, 49066, 49078-49079, 49081, 49083, 49086, 49092, 49095, 49134, 49136-49138 49202, 49253-49254, 49262, 49414, 49433
svn:revision:49438
svn:branch:STABLE
svn:account:starseeker
2012-02-16 01:27:52 +00:00
Christopher Sean Morrison 5aa559851f merging trunk to STABLE from r47367 to HEAD r47369
svn:revision:47370
svn:branch:STABLE
svn:account:brlcad
2011-10-30 16:02:19 +00:00
Christopher Sean Morrison d3fa91fe25 again merging trunk to STABLE from r47343 to HEAD r47367, in prep for retagging release 7.20.4
svn:revision:47368
svn:branch:STABLE
svn:account:brlcad
2011-10-30 15:31:42 +00:00
Christopher Sean Morrison 42678b1d96 changes from trunk slipped through merging somehow. sync.
svn:revision:47344
svn:branch:STABLE
svn:account:brlcad
2011-10-28 08:49:23 +00:00
Christopher Sean Morrison 843ff616ca merging trunk to STABLE from r45378 to HEAD r47342 for release 7.20.4
svn:revision:47343
svn:branch:STABLE
svn:account:brlcad
2011-10-28 08:17:30 +00:00
Christopher Sean Morrison e41152af6a mergeinfo
svn:revision:47248
svn:branch:STABLE
svn:account:brlcad
2011-10-14 14:13:34 +00:00
Clifford Yapp 4790196a34 Add the nurbs wireframe fix from 45532 and 45533 - prevents an infinite loop.
svn:revision:46395
svn:branch:STABLE
svn:account:starseeker
2011-08-25 01:51:19 +00:00
Clifford Yapp 87e71aeb2e Add r45544 to stable - restores rt and rtarea output to mged.
svn:revision:46394
svn:branch:STABLE
svn:account:starseeker
2011-08-25 01:41:47 +00:00
Clifford Yapp ad4c41f6c7 Add the libfft CMakeLists.txt tweak to STABLE.
svn:revision:45754
svn:branch:STABLE
svn:account:starseeker
2011-08-02 11:57:12 +00:00
Clifford Yapp fbd1b98ada Add a few bugfix patches to STABLE.
svn:revision:45747
svn:branch:STABLE
svn:account:starseeker
2011-08-01 20:29:27 +00:00
Christopher Sean Morrison 598ea0762c merge r45377 from trunk to stable
svn:revision:45378
svn:branch:STABLE
svn:account:brlcad
2011-07-01 21:51:14 +00:00
Clifford Yapp 450a67e955 Sync STABLE to trunk r45373
svn:revision:45374
svn:branch:STABLE
svn:account:starseeker
2011-07-01 20:10:55 +00:00
Clifford Yapp 5befd8050b Sync STABLE to trunk r45358
svn:revision:45373
svn:branch:STABLE
svn:account:starseeker
2011-07-01 20:06:18 +00:00
Clifford Yapp 3a379cea0b Merge trunk r44709 to STABLE
svn:revision:44710
svn:branch:STABLE
svn:account:starseeker
2011-05-27 22:29:28 +00:00
Christopher Sean Morrison 9d1849117a merge trunk to STABLE from r44325 to HEAD r44385 -- pulls in the spatial partitioning change to cut.c for XYZXYZXYZ split planes
svn:revision:44386
svn:branch:STABLE
svn:account:brlcad
2011-04-14 20:10:44 +00:00
Christopher Sean Morrison 62c07f8fcf merge trunk to STABLE from r44240 to HEAD r44324 ... not really, but previous branch commit had bad log message. should be up-to-date wrt r44324
svn:revision:44325
svn:branch:STABLE
svn:account:brlcad
2011-04-12 18:15:16 +00:00
Christopher Sean Morrison 329cdab8c6 merge trunk to STABLE from r to HEAD r
svn:revision:44323
svn:branch:STABLE
svn:account:brlcad
2011-04-12 17:57:40 +00:00
Clifford Yapp 61b21852e8 sync STABLE to trunk r44240
svn:revision:44244
svn:branch:STABLE
svn:account:starseeker
2011-04-06 21:48:56 +00:00
Christopher Sean Morrison 9457c8f281 merge trunk to STABLE from r43921 to HEAD r44237
svn:revision:44238
svn:branch:STABLE
svn:account:brlcad
2011-04-06 15:43:44 +00:00
Clifford Yapp 4f2ed0a5a7 Sync STABLE to trunk r43921
svn:revision:43923
svn:branch:STABLE
svn:account:starseeker
2011-03-22 18:17:32 +00:00
Clifford Yapp b1b060c437 Sync STABLE to trunk r43916
svn:revision:43917
svn:branch:STABLE
svn:account:starseeker
2011-03-22 17:50:30 +00:00
Clifford Yapp e34d63b6b4 Sync STABLE to trunk r43908
svn:revision:43909
svn:branch:STABLE
svn:account:starseeker
2011-03-22 13:27:09 +00:00
Clifford Yapp a8784c0f5e Sync STABLE to trunk r43816
svn:revision:43817
svn:branch:STABLE
svn:account:starseeker
2011-03-09 14:06:07 +00:00
Christopher Sean Morrison 0cff7ddb95 merge r43183 from trunk for the getpagesize() fix when compiling with ogl enabled on linux
svn:revision:43186
svn:branch:STABLE
svn:account:brlcad
2011-02-09 20:21:30 +00:00
Christopher Sean Morrison a21334220b merge r43181 from trunk
svn:revision:43183
svn:branch:STABLE
svn:account:brlcad
2011-02-09 20:01:06 +00:00
Christopher Sean Morrison ab6b092cf5 merge trunk to STABLE from r41558 to HEAD r43158
svn:revision:43163
svn:branch:STABLE
svn:account:brlcad
2011-02-09 15:07:48 +00:00
Clifford Yapp 3e7f1d9631 Hmm, missed a few of the Tcl_DoOneEvent removals somehow.
svn:revision:41561
svn:branch:STABLE
svn:account:starseeker
2010-12-08 00:51:18 +00:00
Clifford Yapp 44c9771633 Sync STABLE to trunk r41558
svn:revision:41560
svn:branch:STABLE
svn:account:starseeker
2010-12-08 00:23:42 +00:00
Clifford Yapp b14f8bbbf8 Sync STABLE to trunk r41530
svn:revision:41531
svn:branch:STABLE
svn:account:starseeker
2010-12-07 13:09:44 +00:00
Clifford Yapp 15dc606bde Update STABLE to trunk r41527
svn:revision:41529
svn:branch:STABLE
svn:account:starseeker
2010-12-07 01:05:58 +00:00
Clifford Yapp 872c2935de Update STABLE branch to r41498
svn:revision:41499
svn:branch:STABLE
svn:account:starseeker
2010-12-03 23:24:01 +00:00
Clifford Yapp 182ec1f73d Update STABLE to r41359 (I think, need to diff to confirm)
svn:revision:41365
svn:branch:STABLE
svn:account:starseeker
2010-11-15 23:27:58 +00:00
Clifford Yapp f8d96de9b8 Sync STABLE branch to trunk r41297.
svn:revision:41301
svn:branch:STABLE
svn:account:starseeker
2010-11-09 14:16:05 +00:00
Clifford Yapp c76bd6f66c Merge trunk into STABLE branch up through r41256. Need to confirm this manually to ensure nothing slipped through the cracks - was a long merge.
svn:revision:41269
svn:branch:STABLE
svn:account:starseeker
2010-11-08 14:52:13 +00:00
Christopher Sean Morrison c80b1e54c6 merge trunk to STABLE from r39997 to r40005. apparently the first sync done in r40000 was wrong or at least woefully incomplete.. HACKING instruction may be insufficient. this is a heavy sync performed manually.
svn:revision:40006
svn:branch:STABLE
svn:account:brlcad
2010-08-04 16:32:25 +00:00
Christopher Sean Morrison 6cc2ea4f39 file missed during sync? BrlcadConfig.tmpl was missing from dist
svn:revision:40001
svn:branch:STABLE
svn:account:brlcad
2010-08-04 11:34:39 +00:00
Christopher Sean Morrison f690401962 merge trunk to STABLE from r38876 to HEAD r39997, plus a lot of manual merging and tree diffs to get both in sync (rev range must have been missed at some point)
svn:revision:40000
svn:branch:STABLE
svn:account:brlcad
2010-08-04 02:35:35 +00:00
Christopher Sean Morrison 0e5d89d5f9 let's not mention the red command.
svn:revision:39149
svn:branch:STABLE
svn:account:brlcad
2010-05-12 18:10:29 +00:00
Clifford Yapp 20aa4d31ee Update STABLE to r38876 and merge in the fixes applied to the tag rel-7-16-8 as of r39057. STABLE should now match the rel-7-16-8 tag
svn:revision:39058
svn:branch:STABLE
svn:account:starseeker
2010-05-06 19:14:44 +00:00
Clifford Yapp 5a10687aa7 Update rel-7-16-8 with the critical fixes for release.
svn:revision:39057
svn:tag:rel-7-16-8
svn:account:starseeker
2010-05-06 19:02:41 +00:00
Christopher Sean Morrison 193d5d9b4d bah, asterisk, not pound
svn:revision:38993
svn:tag:rel-7-16-8
svn:account:brlcad
2010-05-05 18:29:47 +00:00
Christopher Sean Morrison 059f486db7 tagging release 7.16.8 after passing all *nix testing. clean windows build was noticably neglected, but nothing major to resolve.
svn:revision:38876
svn:tag:rel-7-16-8
svn:account:brlcad
2010-04-29 03:48:51 +00:00
Christopher Sean Morrison e1832b9c16 somehow, this file is out of sync with head revision. manually sync.
svn:revision:38872
svn:branch:STABLE
svn:account:brlcad
2010-04-28 21:24:56 +00:00
Christopher Sean Morrison 405630bca1 merge trunk to STABLE from r38867 to HEAD r38869
svn:revision:38870
svn:branch:STABLE
svn:account:brlcad
2010-04-28 21:02:27 +00:00
Christopher Sean Morrison b43080aabd merge trunk to STABLE from r38845 to HEAD r
svn:revision:38867
svn:branch:STABLE
svn:account:brlcad
2010-04-28 20:20:12 +00:00
Clifford Yapp 8ef3deb066 Sync STABLE to r38845
svn:revision:38846
svn:branch:STABLE
svn:account:starseeker
2010-04-28 04:10:47 +00:00
Clifford Yapp 44538b0334 Update STABLE to trunk revision 38776
svn:revision:38777
svn:branch:STABLE
svn:account:starseeker
2010-04-23 20:40:15 +00:00
Clifford Yapp 65c4916847 Update doc/docbook/Makefile.am
svn:revision:38776
svn:branch:STABLE
svn:account:starseeker
2010-04-23 20:29:07 +00:00
Clifford Yapp 0c3bcfe536 Add the new mann man pages.
svn:revision:38770
svn:branch:STABLE
svn:account:starseeker
2010-04-23 18:57:49 +00:00
Clifford Yapp d8fb1e4f57 Clear out man1 files that will be moved to mann
svn:revision:38768
svn:branch:STABLE
svn:account:starseeker
2010-04-23 18:42:17 +00:00
Clifford Yapp f45da35764 Get articles, books and lessons...
svn:revision:38767
svn:branch:STABLE
svn:account:starseeker
2010-04-23 18:37:05 +00:00
Clifford Yapp d3821beebc Sync to r38764, except for doc/docbook which will take a little more work.
svn:revision:38766
svn:branch:STABLE
svn:account:starseeker
2010-04-23 18:23:59 +00:00
Keith Boman 935abf6855 synced single line change from truck revision 38177 which removes the -gstabs+ and replaces with the -ggdb3 option. Should allow the MUVES S2 folk to test successfully on host 'hera'.
svn:revision:38232
svn:branch:STABLE
svn:account:indianlarry
2010-03-30 15:08:25 +00:00
Keith Boman 5f4c3d9f3c Merge changes to 'edcodes.c' from main trunk that fixes a forward function declaration needed to compile brlcad with debug disabled. This merge represents two small related revisions to the main trunk, 37579 and 38171, since release 7.16.6.
svn:revision:38174
svn:branch:STABLE
svn:account:indianlarry
2010-03-25 19:17:54 +00:00
Christopher Sean Morrison a63e44b422 merge trunk to STABLE from r37570 to HEAD r37571, last minute addition
svn:revision:37573
svn:branch:STABLE
svn:account:brlcad
2010-02-05 14:34:57 +00:00
Christopher Sean Morrison 6dbb97ce1d merge trunk to STABLE from r37287 to HEAD r37570
svn:revision:37572
svn:branch:STABLE
svn:account:brlcad
2010-02-05 13:58:19 +00:00
Clifford Yapp 611be72982 Sync STABLE to trunk r37285 - release 7.16.4
svn:revision:37287
svn:branch:STABLE
svn:account:starseeker
2010-01-16 02:33:33 +00:00
Clifford Yapp 99f7751032 Re-create STABLE from trunk
svn:revision:36843
svn:branch:STABLE
svn:account:starseeker
2009-12-09 14:34:18 +00:00
Clifford Yapp bf754899c4 OK, stable sync got royally messed up somehow. Clear it out - next commit will recreate STABLE from trunk. (svn branch delete)
svn:revision:36842
svn:branch:STABLE
svn:account:starseeker
2009-12-09 14:32:29 +00:00
Clifford Yapp 17571047fc Hmm, somehow fop.xconf.in didn't make it into STABLE.
svn:revision:36837
svn:branch:STABLE
svn:account:starseeker
2009-12-08 17:29:08 +00:00
Clifford Yapp 820f0267cc sync STABLE to trunk r36810
svn:revision:36813
svn:branch:STABLE
svn:account:starseeker
2009-12-05 19:38:12 +00:00
Christopher Sean Morrison d26fcc7357 workaround patch for a gcc 4.0.1 optimization bug where it ends up outputting bad assembly causing a relocation linker failure. (local recloation for address 0x00... in section __text does not target section __const) this avoids getting a const wchar_t* directly from a wide string literal, instead going through the ON_wString class.
svn:revision:36509
svn:branch:STABLE
svn:account:brlcad
2009-11-17 19:39:54 +00:00
Christopher Sean Morrison fddd7fd08c apply the initialization fix so 'keep' isn't broken. change should merge cleanly with the previous trunk sync revision. slipping in to the release only because it's not been tagged yet (and is a one-liner safe initialization).
svn:revision:36465
svn:branch:STABLE
svn:account:brlcad
2009-11-10 22:15:16 +00:00
Christopher Sean Morrison 48d5115859 merge trunk to STABLE from r36450 to HEAD r36456
svn:revision:36457
svn:branch:STABLE
svn:account:brlcad
2009-11-10 13:59:30 +00:00
Clifford Yapp 2934a786fd merge trunk to STABLE from r36077 to HEAD r36450
svn:revision:36452
svn:branch:STABLE
svn:account:starseeker
2009-11-07 04:30:29 +00:00
Christopher Sean Morrison 3005a471b7 merge trunk to STABLE from r34507 through HEAD r36075 for release 7.16.0
svn:revision:36077
svn:branch:STABLE
svn:account:brlcad
2009-09-29 15:22:45 +00:00
Christopher Sean Morrison 3c1c2e519d merge trunk to STABLE from r34501 through HEAD r34507 for release 7.14.8 (again, wanted CMakeLists.txt update and hadn't posted yet)
svn:revision:34508
svn:branch:STABLE
svn:account:brlcad
2009-05-12 12:00:25 +00:00
Christopher Sean Morrison 99323d2779 merge trunk to STABLE from r34151 through HEAD r34501 for release 7.14.8
svn:revision:34502
svn:branch:STABLE
svn:account:brlcad
2009-05-12 01:50:22 +00:00
Clifford Yapp 7b77887f5c Add the key pipe fix to stable - looks like trunk has some of the ifree tweaks in it so wait for a proper merge to sync pipe.c with the trunk pipe.c
svn:revision:34440
svn:branch:STABLE
svn:account:starseeker
2009-05-07 13:45:01 +00:00
Christopher Sean Morrison 40f0e51157 merge trunk to STABLE from r33968 through HEAD r34151 for release 7.14.6
svn:revision:34152
svn:branch:STABLE
svn:account:brlcad
2009-04-03 21:45:37 +00:00
Clifford Yapp 143287e658 Add fix for tk unix Makefile.in from trunk rev 33974 to STABLE branch
svn:revision:33976
svn:branch:STABLE
svn:account:starseeker
2009-03-10 16:47:10 +00:00
Christopher Sean Morrison 0f5ae59e03 merge trunk to STABLE from r33711 to HEAD r33968, syncs rel-7-14-4 candidate
svn:revision:33969
svn:branch:STABLE
svn:account:brlcad
2009-03-10 00:30:45 +00:00
Christopher Sean Morrison 0eb9c7ba65 sync with trunk from 33207 through 33711
svn:revision:33713
svn:branch:STABLE
svn:account:brlcad
2009-02-08 17:36:15 +00:00
Christopher Sean Morrison b4164457e4 this makefile.in is completely wrong, somehow a built version from automake (yet tkhtml3 doesn't use automake)
svn:revision:33710
svn:branch:STABLE
svn:account:brlcad
2009-02-07 19:59:23 +00:00
Clifford Yapp 8f36c12b40 Merge 7.14.2 into STABLE branch - part 8
svn:revision:33700
svn:branch:STABLE
svn:account:starseeker
2009-02-06 22:32:23 +00:00
Clifford Yapp 7003e89a46 Merge 7.14.2 into STABLE branch - part 7
svn:revision:33699
svn:branch:STABLE
svn:account:starseeker
2009-02-06 22:30:42 +00:00
Clifford Yapp 3de1ac8882 Merge 7.14.2 into STABLE branch - part 6
svn:revision:33698
svn:branch:STABLE
svn:account:starseeker
2009-02-06 22:23:08 +00:00
Clifford Yapp 14766238b8 Merge 7.14.2 into STABLE branch - part 5
svn:revision:33697
svn:branch:STABLE
svn:account:starseeker
2009-02-06 22:15:33 +00:00
Clifford Yapp f7efbfa735 Merge 7.14.2 into STABLE branch - part 4
svn:revision:33696
svn:branch:STABLE
svn:account:starseeker
2009-02-06 22:02:45 +00:00
Clifford Yapp fefe5fdabe Merge 7.14.2 into STABLE branch - part 3
svn:revision:33695
svn:branch:STABLE
svn:account:starseeker
2009-02-06 21:58:20 +00:00
Clifford Yapp b0fbf033d4 Merge 7.14.2 into STABLE branch - part 2
svn:revision:33694
svn:branch:STABLE
svn:account:starseeker
2009-02-06 21:55:46 +00:00
Clifford Yapp 298e52d4c5 Merge 7.14.2 into STABLE branch - part 1
svn:revision:33693
svn:branch:STABLE
svn:account:starseeker
2009-02-06 21:53:38 +00:00
Christopher Sean Morrison fef943f32d the problem WAS fixed.. just not merged successfully. merge the other half of r33137 from trunk that was missing that adds cssprop.o to the linkage. this should fix the mac compilation regression woes.
svn:revision:33207
svn:branch:STABLE
svn:account:brlcad
2008-11-18 21:53:50 +00:00
Christopher Sean Morrison 8327f72d18 merge 33145 from trunk to get the cssprop.c fix for tkhtml3
svn:revision:33146
svn:branch:STABLE
svn:account:brlcad
2008-11-05 08:04:55 +00:00
Christopher Sean Morrison 87ffc081ad merge 33143 from trunk, can't set xsltproc and apachefop to : until after we test the configuration functionality.
svn:revision:33144
svn:branch:STABLE
svn:account:brlcad
2008-11-05 07:59:22 +00:00
Christopher Sean Morrison b8806c3b21 hopefully the last merge of all changes on trunk to the branch for the 7.14.0 release. this syncs changes from 33137 to HEAD revision 33141
svn:revision:33142
svn:branch:STABLE
svn:account:brlcad
2008-11-05 05:10:54 +00:00
Christopher Sean Morrison 0a437f1e84 more (manual) syncing with trunk, add missing ax_boost_base.m4 and remove the moved VolumeII.xml
svn:revision:33139
svn:branch:STABLE
svn:account:brlcad
2008-11-05 04:41:00 +00:00
Christopher Sean Morrison ddf60ce89b merge from head through 33137
svn:revision:33138
svn:branch:STABLE
svn:account:brlcad
2008-11-05 03:43:09 +00:00
Christopher Sean Morrison c7f682bb1a merge 33129:HEAD (33134) from trunk to stable. these are a few build repairs that need to make it into the 7.14.0 release.
svn:revision:33135
svn:branch:STABLE
svn:account:brlcad
2008-11-05 02:01:45 +00:00
Christopher Sean Morrison 5cd938d30f look for libgcv files too
svn:revision:33125
svn:branch:STABLE
svn:account:brlcad
2008-11-04 09:44:14 +00:00
Christopher Sean Morrison 6f22a131a6 minimerge
svn:revision:33124
svn:branch:STABLE
svn:account:brlcad
2008-11-04 09:35:30 +00:00
Christopher Sean Morrison eb291ad1bf merge 33114:33121 from trunk, preparing for release
svn:revision:33122
svn:branch:STABLE
svn:account:brlcad
2008-11-04 09:30:52 +00:00
Christopher Sean Morrison eef57addea big ultra mega merge from r32275 to r33114 (HEAD on trunk) in preparation for the pending 7.14.0 source release. that was absurdly painful to merge, diff, and repair by hand. this is untested (compilation-wise) but it should sync it with 33114 which has been tested.
svn:revision:33115
svn:branch:STABLE
svn:account:brlcad
2008-11-04 08:28:07 +00:00
Clifford Yapp cb613e035b Copy 7.12.6 release to become new STABLE branch
svn:revision:32314
svn:branch:STABLE
svn:account:starseeker
2008-08-07 03:25:32 +00:00
Clifford Yapp c1d3375567 Updating STABLE isn't going well - wipe it out in prep to move in new copy (svn branch delete)
svn:revision:32313
svn:branch:STABLE
svn:account:starseeker
2008-08-07 03:24:25 +00:00
Clifford Yapp 8b6d383d06 Add r31220 from trunk - brlcad's better release tagging example.
svn:revision:32015
svn:branch:STABLE
svn:account:starseeker
2008-07-29 01:27:11 +00:00
Clifford Yapp 9142505e24 Remove from STABLE misc files that aren't in rel-7-12-4
svn:revision:32014
svn:branch:STABLE
svn:account:starseeker
2008-07-29 00:59:15 +00:00
Clifford Yapp 8585ffb56b Update src of STABLE to rel-7-12-4
svn:revision:32013
svn:branch:STABLE
svn:account:starseeker
2008-07-29 00:50:26 +00:00
Clifford Yapp 8df65cb0df Update sh in STABLE to rel-7-12-4
svn:revision:32011
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:40:59 +00:00
Clifford Yapp b951d20802 Update regress in STABLE to rel-7-12-4
svn:revision:32010
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:39:59 +00:00
Clifford Yapp c1c5b5bdf6 Update misc/win32-msvc* in STABLE to rel-7-12-4
svn:revision:32009
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:33:01 +00:00
Clifford Yapp d6207f0759 Update misc/pkgconfig in STABLE to rel-7-12-4
svn:revision:32008
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:29:12 +00:00
Clifford Yapp c28c0db07c Update misc/nsis in STABLE to rel-7-12-4
svn:revision:32007
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:28:41 +00:00
Clifford Yapp 82d3bf8ab1 Update misc/macosx in STABLE to rel-7-12-4
svn:revision:32006
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:28:09 +00:00
Clifford Yapp 292f1b94a1 Update misc/enigma in STABLE to rel-7-12-4
svn:revision:32005
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:27:29 +00:00
Clifford Yapp 542ec29e69 Update misc/debian in STABLE to rel-7-12-4
svn:revision:32004
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:26:59 +00:00
Clifford Yapp b0444505af Update misc/archlinux in STABLE to rel-7-12-4
svn:revision:32003
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:26:25 +00:00
Clifford Yapp 87b5e7f72e Update misc in STABLE to rel-7-12-4
svn:revision:32002
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:25:33 +00:00
Clifford Yapp ee8fcea415 Update include in STABLE to rel-7-12-4
svn:revision:32001
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:03:32 +00:00
Clifford Yapp 4315f4ea2f Finish updating docs in STABLE to rel-7-12-4
svn:revision:32000
svn:branch:STABLE
svn:account:starseeker
2008-07-28 22:02:00 +00:00
Clifford Yapp de793a1552 Update STABLE doc dir to rel-7-12-4
svn:revision:31999
svn:branch:STABLE
svn:account:starseeker
2008-07-28 21:52:30 +00:00
Clifford Yapp d2b8bbb6c4 Begin update of STABLE to rel-7-12-4 tag from trunk.
svn:revision:31998
svn:branch:STABLE
svn:account:starseeker
2008-07-28 21:50:16 +00:00
Clifford Yapp e362d98183 Update TODO file to 7-12-4 - testing commit ability to STABLE branch
svn:revision:31995
svn:branch:STABLE
svn:account:starseeker
2008-07-28 19:32:51 +00:00
Christopher Sean Morrison 7645534ca0 re-add STABLE branch, using the last fully-tested 7-12-2 as the starting point
svn:revision:31039
svn:branch:STABLE
svn:account:brlcad
2008-05-08 22:24:23 +00:00
Christopher Sean Morrison dcd26fa229 kill the old STABLE branch, going to copy from last release (easier than merging)
(svn branch delete)

svn:revision:31020
svn:branch:STABLE
svn:account:brlcad
2008-05-08 18:18:21 +00:00
Christopher Sean Morrison 1dc5122691 massive merge of HEAD to STABLE, syncing changes through revision 28909 to 30747 in preparation for 7.12.2 release.
svn:revision:30756
svn:branch:STABLE
svn:account:brlcad
2008-04-22 10:35:00 +00:00
Christopher Sean Morrison 55a5426dbe set svn:executable on all scripts (particularly so ./autogen.sh will work on checkout)
svn:revision:29982
svn:branch:STABLE
svn:account:brlcad
2008-01-18 03:25:20 +00:00
Erik Greenwald ccd4ba7564 move socket and nsl lib stuff to PKG_LIBS (fix for solaris)
svn:revision:29322
cvs:account:erikgreenwald
cvs:branch:STABLE
2007-11-13 17:32:36 +00:00
Erik Greenwald 04776d4d49 libfb needs libsocket and libnsl on solaris
svn:revision:29291
cvs:account:erikgreenwald
cvs:branch:STABLE
2007-11-08 21:56:45 +00:00
Christopher Sean Morrison 0881eccb02 merge from head, need built_sources for all-am
svn:revision:29220
cvs:account:brlcad
cvs:branch:STABLE
2007-11-01 15:01:41 +00:00
Christopher Sean Morrison 4d630de3b2 partial merge from head, need x11
svn:revision:29197
cvs:account:brlcad
cvs:branch:STABLE
2007-10-29 03:52:30 +00:00
Christopher Sean Morrison dd78a09c2d gah, merge from head .. need TCLSTUB to be included else there be unresolved symbols on Mac and now also seen on Linux too
svn:revision:29193
cvs:account:brlcad
cvs:branch:STABLE
2007-10-29 02:37:59 +00:00
Christopher Sean Morrison 0e6325726c released on the 24th
svn:revision:29177
cvs:account:brlcad
cvs:branch:STABLE
2007-10-24 22:57:12 +00:00
Christopher Sean Morrison 188235de8e needs SHLIB_SUFFIX just like tcl's Makefile.in so we can have/know the suffix independent of the lib name
svn:revision:29176
cvs:account:brlcad
cvs:branch:STABLE
2007-10-24 22:49:21 +00:00
Christopher Sean Morrison 1d2229d794 massive changelog update from 2007-05-16 to today, preparing for the big 7.10.4 release
svn:revision:29173
cvs:account:brlcad
cvs:branch:STABLE
2007-10-23 20:41:08 +00:00
Erik Greenwald ad27242afc back out the bu_vls_strcmp() macro as STABLE bu.h trails... a lot...
svn:revision:29172
cvs:account:erikgreenwald
cvs:branch:STABLE
2007-10-23 20:40:31 +00:00
Christopher Sean Morrison 51598822fa update to final 7.10.4 version
svn:revision:29171
cvs:account:brlcad
cvs:branch:STABLE
2007-10-23 20:35:35 +00:00
Christopher Sean Morrison e11244a844 added release notes and updated version for 7.10.4, beginning of final release preparations
svn:revision:29170
cvs:account:brlcad
cvs:branch:STABLE
2007-10-23 20:35:07 +00:00
Erik Greenwald 806ecac00d MFC
svn:revision:29169
cvs:account:erikgreenwald
cvs:branch:STABLE
2007-10-23 20:05:15 +00:00
Christopher Sean Morrison 6b7aa33ff8 fix a nasty startup delay in a particular viewer app that uses the Mged megawidget (which in turn uses the Display megawidget, which uses Dm, which had a :0 hard-coded). this fixes the bug by making it use the DISPLAY environment variable.
svn:revision:29119
cvs:account:brlcad
cvs:branch:STABLE
2007-10-17 17:58:27 +00:00
Christopher Sean Morrison f9ba9ac06c merge dm_bestXType fix in from head, this should quell the failure warnings that the m2 folks are seeing.
svn:revision:29095
cvs:account:brlcad
cvs:branch:STABLE
2007-10-15 15:51:33 +00:00
Christopher Sean Morrison 520678cac1 merge the tcl/tk symlink checks in from head so that -ltcl and -ltk work for external users
svn:revision:29076
cvs:account:brlcad
cvs:branch:STABLE
2007-10-12 07:38:50 +00:00
Christopher Sean Morrison d48807c1a8 merged from head was lingering framebuffer windows, red command, and .mgedrc editor setting
svn:revision:29020
cvs:account:brlcad
cvs:branch:STABLE
2007-09-28 14:15:40 +00:00
Christopher Sean Morrison 7f3192a797 merge from head, make linger the default framebuffer action instead of transient for all windowing framebuffer interfaces.
svn:revision:29018
cvs:account:brlcad
cvs:branch:STABLE
2007-09-28 14:07:48 +00:00
Christopher Sean Morrison d2401a3583 more merging from HEAD. bring in build system tweakage updates that should fix some library symbol problems from croping up post-release.
svn:revision:29017
cvs:account:brlcad
cvs:branch:STABLE
2007-09-28 14:04:36 +00:00
Christopher Sean Morrison 367648fdb0 partial merge from head for the xno fix
svn:revision:29016
cvs:account:brlcad
cvs:branch:STABLE
2007-09-28 09:59:37 +00:00
Christopher Sean Morrison 99374e4c27 merge from head, tab completion and .mgedrc fix
svn:revision:29014
cvs:account:brlcad
cvs:branch:STABLE
2007-09-28 09:12:54 +00:00
Erik Greenwald a81d078815 merge of V5 implementation from HEAD
svn:revision:29011
cvs:account:erikgreenwald
cvs:branch:STABLE
2007-09-27 21:12:28 +00:00
325 changed files with 28369 additions and 6815 deletions
+95 -48
View File
@@ -1,12 +1,56 @@
-*- coding: utf-8 -*-
BRL-CAD Deprecation Log
=======================
BRL-CAD Interface Change Policy
===============================
Included below is a deprecation log and notes for BRL-CAD public
interface changes that potentially impact external developers and
users. Public interfaces include developer application programming
interface (API) calls as well as user application command-line
interface (CLI) and graphical user interface (GUI) behaviors.
Included below are details of BRL-CAD public interface changes that
potentially impact external developers and users. Public interfaces
include developer application programming interface (API) calls as
well as user application command-line interface (CLI) and graphical
user interface (GUI) behaviors. Changes are characterized as:
1) changing a new interface,
2) being minimally impacting, or
3) requiring adherence to deprecation policy.
This policy is intentionally designed to balance developer agility,
helping accelerate development, with interface stability, helping
preserve application developer and user investments.
All changes to BRL-CAD are expected to conform to this change policy.
NEW INTERFACE
-------------
Changes to interfaces that have been recently introduced are often
subject to change and should not yet be relied upon by application
developers or users. They may be changed as needed from release to
release and are not subject to change policy restrictions until they
have been included in at least TWO releases without change.
MINIMALLY IMPACTING
-------------------
If a change to an interface has a suitable and completely equivalent
alternative, the change is deemed to be "minimally impacting" and can
be made during any release. Examples of such changes include renaming
an interface, reordering parameters, adding additional parameters for
previously implicit behavior, and removing unused parameters.
Basically, the impact can usually be considered minimally impacting if
a static regular expression search-and-replace is all that is needed
to update calling code, and no change is imposed on the user.
DEPRECATION POLICY
------------------
If a change will intentionally change, replace, or remove
functionality that has been documented and published in at least TWO
releases should be first marked as DEPRECATED. Otherwise, changes to
interfaces that have not been publicly announced or are not publicly
documented for at least two releases may be changed without notice.
The general practice is that public interface changes may go from
deprecated to obsolete, whereby previous behavior is removed or
@@ -16,59 +60,67 @@ a) during a major release (e.g. going from 7.*.* to 8.*.*)
b) during a minor release provided the change was publicly announced
as deprecated beforehand AND sufficient deprecation warning was
given via i) two minor releases included the deprecation notice,
and ii) at least three months (90 days) have passed since the
given via i) TWO minor releases included the deprecation notice,
and ii) at least THREE months (90 days) have passed since the
deprecation was announced
c) during a minor release provided there still exists an equivalent
alternative interface that will not impose an undue burden on users
or developers (see "MINIMALLY IMPACTING API CHANGES" below)
c) during any release provided there still exists an EQUIVALENT
alternative interface that does not impose an undue burden on users
or developers (see "MINIMALLY IMPACTING")
d) during a patch release provided you can correctly prove P = NP
Public interfaces scheduled for removal should be visibly marked as
deprecated during compilation with the DEPRECATED keyword on function
declarations, with #warning "DEPRECATED ..." pre-processor statements,
and with @DEPRECATED in source code comments. Where users are not
adversely affected, a run-time DEPRECATION statement may be printed.
If a change will intentionally replace or remove functionality, then
they should be then marked as deprecated first. Otherwise, changes to
interfaces that are never publicly announced, not installed, or are
not part of publicly available documentation are fair game to change
as needed.
Whenever published functionality is finally removed, move its entry
from the DEPRECATED section below to the OBSOLETE section for the
version in which it was removed. Make sure the entry retains a
reference to the version in which the item was marked as deprecated.
Where feasible, interfaces should be visibly marked as deprecated
either during compile-time with #warning pre-processor declarations or
during run-time with print statements.
Example: Say we decided during 7.50.3 development to remove
rt_shootray() from our API without a replacement that would qualify as
"minimally impacting". We'd annotate the deprecation here, mark the
EXAMPLES
--------
Example #1: Say we decided during 7.50.3 development to remove
rt_shootray() from the API without a replacement. That does NOT
qualify as "minimally impacting" because there's no replacement and
rt_shootray() has been published and documented in more than two
releases. We'd annotate the deprecation in the CHANGES file, mark the
function as DEPRECATED in the API header, and post the 7.50.4 release.
The soonest that function could be removed would be in the 7.54.0
release during 7.53 development. It could NOT be removed in 7.54.2
since it's a patch version, prior to the 7.54 release line, nor even
during 7.54.0 if less than 90 days had passed since 7.50.6 was posted.
When it is finally removed, remove its entry in the DEPRECATED section
and move it to the OBSOLETE section under the version entry in which
it was removed. Make sure the entry has a reference to the version
in which the item was first classified as deprecated. See the %S
entry for an example.
DEPRECATED/OBSOLETE Items
-------------------------
The items listed below are interfaces that are deprecated or obsolete,
categorized by the release in which the change was made. If the
change involved a rename/removal of a routine, both the original and
new names should be listed for reference.
Example #2: Say we decide during 7.48.0 development to modify bu_log()
by adding a new additional enum parameter denoting a message type.
This change is considered minimally impacting because it can be
characterized by a simple regular expression (e.g.,
s/bu_log(/bu_log(PRINT, /g). Updates to calling codes are considered
trivial. The change would get documented in the CHANGES file and all
calls that can be updated must be updated at that time.
**************
* DEPRECATED *
**************
The items listed below are interfaces that are deprecated. They are
categorized by the release in which the change was made. If the
change involved a removal of a command or function, both the original
and new names should be listed for reference.
7.24
----
include/raytrace librt
db_full_path_list_add(), db_free_full_path_list() [deprecated 7.24]
db_search_formplan(), db_search_freeplan(), db_search_full_paths() [deprecated 7.24]
db_search_unique_objects(), struct db_full_path_list [deprecated 7.24]
src/irprep
all_sf, firpass, ir-X, irdisp, pictx, secpass, shapefact, showterm [deprecated 7.24]
all_sf, firpass, ir-X, irdisp, pictx, secpass, shapefact, showterm [deprecated 7.24]
include/raytrace.h librt
RT_DBHASH and RT_DBNHASH [deprecation 7.24]
@@ -247,6 +299,10 @@ include/raytrace.h
* OBSOLETE *
************
Below are the interfaces that have followed deprecation policy and are
now no longer a part of BRL-CAD.
7.24.2
------
.pl file suffix
@@ -412,15 +468,6 @@ include/[library].h (several)
* MINIMALLY IMPACTING API CHANGES *
***********************************
If a change to an interface has a suitable and completely equivalent
alternative, the change is deemed to be "minimally impacting" and can
be made during any minor release. Examples of such changes include
renaming an interface, reordering parameters, adding new parameters to
an interface for previously implicit or restricted behavior, and
removing unused parameters.
Basically, the impact can usually be considered minor if a static
regular expression search-and-replace is all that is needed to update.
Included in following are various minimally impacting API changes that
have been identified in chronological order. As expressions are not
extensively tested, use with caution.
@@ -902,4 +949,4 @@ s/redraw_vlist/draw/g
removed redraw_vlist mged command, just call draw or refresh [7.24]
s/RT_BADNUM/INVALID/g
s/RT_BADVAL/VINVALID/g
moved RT_BADNUM and RT_BADVEC to vmath.h as INVALID and VINVALID [7.24]
moved RT_BADNUM and RT_BADVEC to vmath.h as INVALID and VINVALID [7.24]
+134 -40
View File
@@ -49,18 +49,19 @@
# As best as is reasonably possible, proper ordering and
# separation of tests and settings should be maintained per the
# recommended standard layout. The tests should be added to the
# labeled sections below so that they are organized as follows:
# labeled sections below so that they are organized in stages as
# follows:
#
# 0) information on the package and toplevel CMake settings
# 1) define top level options
# 2) check programs
# 3) check compiler characteristics
# 4) check libraries
# 5) check headers
# 6) check types/structures
# 7) check functions
# 8) check system services
# 9) output a summary
# Stage 0 - information on the package and toplevel CMake settings
# Stage 1 - define top level options
# Stage 2 - check programs
# Stage 3 - check compiler characteristics
# Stage 4 - check libraries
# Stage 5 - check headers
# Stage 6 - check types/structures
# Stage 7 - check functions
# Stage 8 - check system services
# Stage 9 - output a summary
#
# The output summary should report key information about the final
# configuration of the build. Comprehensive information is available
@@ -628,10 +629,10 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
set(BRLCAD_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "BRL-CAD install prefix")
mark_as_advanced(BRLCAD_PREFIX)
# If we've got a Release build with a Debug path or vice versa, warn about it
# A "make install" of a Release build into a dev install directory or vice
# versa is going to result in an install that doesn't respect BRL-CAD standard
# naming conventions
# If we've a Release build with a Debug path or vice versa, warn about
# it. A "make install" of a Release build into a dev install
# directory or vice versa is going to result in an install that
# doesn't respect BRL-CAD standard naming conventions.
if("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set to /usr/brlcad/dev-${BRLCAD_VERSION}, but build type is set to Release!\n")
endif("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
@@ -644,7 +645,7 @@ endif("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND ${CMAKE_INSTALL_PREFIX} STREQUAL
# the build directory AND install directory. Thanks to plplot for
# identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX.
# Documentation of these options is available at
# http://www.cmake.org/Wiki/CMake_RPATH_handling
# http://www.cmake.org/Wiki/CMake_RPATH_handling
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
@@ -744,7 +745,7 @@ endif(NOT CMAKE_CONFIGURATION_TYPES)
# changes would not automatically propagate back up.
#
# We also allow for multiple projects with this macro, in case
# subprojects are also managing a config.h.in file of their own.
# subprojects are also managing a config.h.in a file of their own.
set(CONFIG_H_FILE "${BRLCAD_BINARY_DIR}/include/brlcad_config.h.in")
set_source_files_properties(${CONFIG_H_FILE} PROPERTIES GENERATED TRUE)
@@ -1215,6 +1216,47 @@ endif(BRLCAD_ENABLE_VERBOSE_PROGRESS)
option(BRLCAD_ENABLE_PROFILING "Build with profiling support" OFF)
mark_as_advanced(BRLCAD_ENABLE_PROFILING)
#====== POSIX, C99 ===================
# Build with strict POSIX compliance checking
set(ENABLE_POSIX_COMPLIANCE_ALIASES "ENABLE_POSIX")
set(ENABLE_POSIX_COMPLIANCE_DESCRIPTION "
Build with strict POSIX compliance checking. Defaults to OFF.
Causes compiler options to be set for strict compliance with the
minimum C and C++ standards acceptable according to current BRL-CAD
policy. The current minimum C standard is POSIX 200112 plus C99.
There is no currently defined minimum C++ standard.
")
BRLCAD_OPTION(OFF ENABLE_POSIX_COMPLIANCE
ENABLE_POSIX_COMPLIANCE_ALIASES
ENABLE_POSIX_COMPLIANCE_DESCRIPTION)
mark_as_advanced(ENABLE_POSIX_COMPLIANCE)
#== C99 ==
set(ENABLE_C99_COMPLIANCE_ALIASES "ENABLE_C99")
set(ENABLE_C99_COMPLIANCE_DESCRIPTION "
Build with strict C99 compliance checking. Defaults to OFF.
Causes C compiler options to be set for strict compliance with the C99
standard.
")
BRLCAD_OPTION(OFF ENABLE_C99_COMPLIANCE
ENABLE_C99_COMPLIANCE_ALIASES
ENABLE_C99_COMPLIANCE_DESCRIPTION)
mark_as_advanced(ENABLE_C99_COMPLIANCE)
# only one of the two C std options is allowed
set(STD_COMPLIANCE OFF)
if (ENABLE_POSIX_COMPLIANCE)
set(ENABLE_C99_COMPLIANCE OFF)
set(STD_COMPLIANCE ON)
elseif(ENABLE_C99_COMPLIANCE)
set(ENABLE_POSIX_COMPLIANCE OFF)
set(STD_COMPLIANCE ON)
endif()
#====== POSIX, C99 ===================
# Build with dtrace support
option(BRLCAD_ENABLE_DTRACE "Build with dtrace support" OFF)
mark_as_advanced(BRLCAD_ENABLE_DTRACE)
@@ -1339,6 +1381,17 @@ CMAKE_DEPENDENT_OPTION(BRLCAD_EXTRADOCS_PDF_MAN "Build PDF output from DocBook d
CMAKE_DEPENDENT_OPTION(BRLCAD_EXTRADOCS_VALIDATE "Perform validation for DocBook documentation" ON "BRLCAD_EXTRADOCS;BRLCAD_ENABLE_STRICT" OFF)
mark_as_advanced(BRLCAD_EXTRADOCS_VALIDATE)
# Load various wrapper macros for checking libraries, headers and
# functions, some in use by src/other build logic
include(${BRLCAD_CMAKE_DIR}/BRLCAD_CheckFunctions.cmake)
# The src/other subdirectory does not share (at least, not universally)
# certain definitions common to all other directories in BRL-CAD. Also,
# we don't want flags that are otherwise global to BRL-CAD to be passed
# to the src/other directory (particularly things like strict compiler
# flags) so add src/other before any of that setup occurs.
add_subdirectory(src/other)
# *******************************************************************
# *** Check for Programs - Stage 2 of 9 ***
@@ -1356,47 +1409,38 @@ include(${BRLCAD_CMAKE_DIR}/FindShellDeps.cmake)
include(${BRLCAD_CMAKE_DIR}/FindLEX.cmake)
include(${BRLCAD_CMAKE_DIR}/FindYACC.cmake)
# If using dtrace, we will need to find it
if(BRLCAD_ENABLE_DTRACE)
find_program(DTRACE_EXEC NAMES dtrace DOC "path to dtrace executable")
endif(BRLCAD_ENABLE_DTRACE)
# Load various wrapper macros for checking libraries, headers and
# functions
include(${BRLCAD_CMAKE_DIR}/BRLCAD_CheckFunctions.cmake)
# *******************************************************************
# *** Check for Compiler Characteristics - Stage 3 of 9 ***
# *******************************************************************
# at this stage only the gcc compiler is supported
# load our compiler testing macro definitions
if(NOT MSVC)
# alas, we heavily assume and test for gcc-style flags in both
include(${BRLCAD_CMAKE_DIR}/CompilerFlags.cmake)
include(${BRLCAD_CMAKE_DIR}/BRLCAD_CompilerFlags.cmake)
endif(NOT MSVC)
# The src/other subdirectory does not share (at least, not universally)
# certain definitions common to all other directories in BRL-CAD. Also,
# we don't want flags that are otherwise global to BRL-CAD to be passed
# to the src/other directory (particularly things like strict compiler
# flags) so add src/other before any of that setup occurs.
add_subdirectory(src/other)
# when strict standards compliance is in effect, we need to ensure
# all checks use the same compiler settings (but it doesn't seem to
# work in wrapped CMake checking functions as it is documented to do)
if(STD_COMPLIANCE)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS}")
endif()
# Most of the src/other projects have their own logic for handling
# the C inline issue - BRL-CAD needs a fine-grained approach. Mixed
# C and C++ sources require different treatment for the same build
# target, since C++11 doesn't allow inline to be re-defined. See
# misc/CMake/BRLCAD_Targets.cmake for handling of C_INLINE.
include(${BRLCAD_CMAKE_DIR}/CheckCInline.cmake)
CHECK_C_INLINE(C_INLINE)
# Requires that CompilerFlags.cmake already be loaded
if(NOT MSVC)
include(${BRLCAD_CMAKE_DIR}/BRLCAD_CompilerFlags.cmake)
endif(NOT MSVC)
# If doing an optimized build, set _FORTIFY_SOURCE to 2. Provides
# compile-time best-practice error checking on certain libc functions
# (e.g., memcpy), and provides run-time checks on buffer lengths and
@@ -1702,7 +1746,7 @@ BRLCAD_FUNCTION_EXISTS(geteuid HAVE_GETEUID)
BRLCAD_FUNCTION_EXISTS(gethostname HAVE_GETHOSTNAME)
BRLCAD_FUNCTION_EXISTS(getloadavg HAVE_GETLOADAVG)
BRLCAD_FUNCTION_EXISTS(getopt_long HAVE_GETOPT_LONG)
BRLCAD_FUNCTION_EXISTS(getprogname HAVE_GETPROGNAME)
BRLCAD_FUNCTION_EXISTS(getprogname HAVE_GETPROGNAME) # bsd
BRLCAD_FUNCTION_EXISTS(kill HAVE_KILL)
BRLCAD_FUNCTION_EXISTS(lrand48 HAVE_LRAND48)
BRLCAD_FUNCTION_EXISTS(memset HAVE_MEMSET)
@@ -1715,8 +1759,9 @@ BRLCAD_FUNCTION_EXISTS(realpath HAVE_REALPATH)
BRLCAD_FUNCTION_EXISTS(setenv HAVE_SETENV)
BRLCAD_FUNCTION_EXISTS(setpgid HAVE_SETPGID)
BRLCAD_FUNCTION_EXISTS(setpriority HAVE_SETPRIORITY)
BRLCAD_FUNCTION_EXISTS(setprogname HAVE_SETPROGNAME)
BRLCAD_FUNCTION_EXISTS(srand48 HAVE_SRAND48)
BRLCAD_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
BRLCAD_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
BRLCAD_FUNCTION_EXISTS(strchr HAVE_STRCHR)
BRLCAD_FUNCTION_EXISTS(strdup HAVE_STRDUP)
BRLCAD_FUNCTION_EXISTS(strlcat HAVE_STRLCAT)
@@ -1755,8 +1800,47 @@ if("${HAVE_DECL_FILENO}" MATCHES "^${HAVE_DECL_FILENO}$")
endif(HAVE_DECL_FILENO)
endif("${HAVE_DECL_FILENO}" MATCHES "^${HAVE_DECL_FILENO}$")
# test for program_invocation_name global variable
if("${HAVE_PROGRAM_INVOCATION_NAME}" MATCHES "^${HAVE_PROGRAM_INVOCATION_NAME}$")
check_c_source_compiles("#define _GNU_SOURCE\n#include <errno.h>\nint main() { return (program_invocation_name)?0:1; }" HAVE_PROGRAM_INVOCATION_NAME)
if(HAVE_PROGRAM_INVOCATION_NAME)
CONFIG_H_APPEND(BRLCAD "#cmakedefine HAVE_PROGRAM_INVOCATION_NAME 1\n")
endif(HAVE_PROGRAM_INVOCATION_NAME)
endif("${HAVE_PROGRAM_INVOCATION_NAME}" MATCHES "^${HAVE_PROGRAM_INVOCATION_NAME}$")
# On Windows, we need to check for hypot etc.. This test pertains
#-----------------------------------------------------------------------
# check C99 missing functions with a more rigourously-controlled compiler envirinment
if(STD_COMPLIANCE)
set(needed_FUNCS
test_fdopen
test_fileno
test_realpath
test_gethostname
test_posix_memalign
test_strcasecmp
test_strncasecmp
)
foreach(tprog ${needed_FUNCS})
# remove "test_" from tprog
STRING(REGEX REPLACE "test_" "" func ${tprog})
STRING(TOUPPER "${prog}" func)
try_compile(success
"${CMAKE_BINARY_DIR}/test_funcs"
"${CMAKE_SOURCE_DIR}/src/compat/${tprog}.c"
CMAKE_FLAGS "${CMAKE_C_FLAGS}"
OUTPUT_VARIABLE log
)
if(success)
CONFIG_H_APPEND(BRLCAD "#cmakedefine HAVE_WORKING_${func}_FUNCTION 1\n")
endif()
endforeach()
endif()
#-----------------------------------------------------------------------
# On Windows, we need to check for hypot etc. This test pertains
# to the windows specific config file, not CONFIG_H_FILE - hence,
# just run the test and it will be handled by configure_file later.
include(CheckSymbolExists)
@@ -1986,13 +2070,23 @@ endif(NOT BRLCAD_IS_SUBBUILD)
# Generate the include/conf files
# HOST
# HOST (note gethostname is NOT a c89 function)
configure_file(${BRLCAD_CMAKE_DIR}/test_srcs/report_hostname.c.in ${CMAKE_BINARY_DIR}/CMakeTmp/report_hostname.c)
if(NOT MSVC)
TRY_RUN(TIME_RESULT TIME_COMPILED
${CMAKE_BINARY_DIR}/CMakeTmp
${CMAKE_BINARY_DIR}/CMakeTmp/report_hostname.c
OUTPUT_VARIABLE COMPILEMESSAGES)
OUTPUT_VARIABLE COMPILEMESSAGES
)
# test results
if(NOT TIME_COMPILED)
message(INFO ${COMPILEMESSAGES})
message(FATAL_ERROR "CMakeTmp/report_hostname.c failed to compile")
endif()
if(TIME_RESULT)
message(INFO ${COMPILEMESSAGES})
message(FATAL_ERROR "CMakeTmp/report_hostname.c failed to run")
endif()
else(NOT MSVC)
set(CMAKE_REQUIRED_LIBRARIES ws2_32.lib)
TRY_RUN(TIME_RESULT TIME_COMPILED
+152 -111
View File
@@ -1189,108 +1189,163 @@ necessary convention by a binary package management system. Examples:
zip
PATCHING A RELEASE
------------------
Should it become necessary to patch a release that has already been
posted and announced, the mechanism is to post patch files for the
source release and update the uploaded release notes README file.
Example: stop_rt_crashing-0.patch and fix_fbserv-1.patch
It's expected that all patch files are independent and will be applied
sequentially. They should be consistently and incrementally numbered.
Users should be instructed in the release notes README to download and
apply all available patch files.
For binary releases, it's recommended to just "move on" and let issues
become resolved in the next release unless there's a critical security
or significant data corruption issue involved. If it becomes
necessary to repost a release, use the RELEASE_COUNT file name
convention described in VERSION NUMBERS & COMPATIBILITY.
Example: BRL-CAD-7.12.2.dmg is superseded by BRL-CAD-7.12.2-1.dmg
Patched binary releases may be moved to the hidden attic folder if
critical, though not necessary or recommended. They are preserved for
historic record and should never be deleted once announced. Releases
not yet been announced may be updated within two days of being posted
without involving a patch.
MAKING A RELEASE
----------------
BRL-CAD is developed on a monthly iteration development schedule with
a release planned (not always actualized) at the end of every month.
In order to make a release, the sources need to be appropriately
verified, validated, documented, synchronized, and tagged:
documented, tested, synchronized, and tagged. BRL-CAD releases must
pass strict verification and validation testing.
* Required verification and validation actions include compiling
successfully, passing regression tests, a successful benchmark,
and passing distcheck on at least two different platforms.
Compile with both default settings and all dependencies enabled.
Any developer may cause a release to be made provided testing passes
and the appropriate release steps are taken.
* All user-visible changes should be documented in the NEWS file;
all API changes should be noted in the CHANGES file (or reverted).
The release number should appropriately reflect the type of
changes being released. See the more specific release steps noted
below and VERSION NUMBERS & COMPATIBILITY.
When a release intention is announced, it is recommended to sync the
trunk sources to the RELEASE branch so appropriate review testing,
repairs, and release steps can occur without being impacted by other
development activity.
* After successfully compiling and passing tests on at least two
platforms, the sources get merged to the STABLE branch and tagged
as tags/rel-MAJOR-MINOR-PATCH allowing for minor changes until
sources are posted and an announcement is posted.
Release steps are as follows:
Any developer may cause a release to be made provided all of the
appropriate steps are taken.
#####################################################################
# 00: Notify developer mailing list of intention to release.
When a release intention is announced, contributors are expected to
"settle down" for two days (at most) so that the source code may be
verified, tested, and released. As BRL-CAD strives for a monthly
iteration development cycle, this is often done at the end of a month.
echo "Release preparations are under way. Trunk sources merged to the RELEASE branch will be reviewed for sync to STABLE and release tagging. Please help test by compiling distcheck-full and running benchmark, mged, and archer." | mail -s "Release preparations commencing" brlcad-devel@lists.sourceforge.net -r "your@subscribed.address"
Only minor bug fixes, documentation changes, and build system fixes
should be performed after release intention is announced. Major
changes to the source code and documentation should not occur while
release testing is being performed.
#####################################################################
# 01: Sync trunk to RELEASE branch.
Steps to take for performing an appropriately verified, validated,
documented, synchronized, and tagged release are as follows:
# NON-AUTO: Review the log and obtain the last trunk merge
# revision number from comments.
svn log --stop-on-copy https://svn.code.sf.net/p/brlcad/code/brlcad/branches/RELEASE | grep -E 'r[0-9]{5}'
PREV=[[last_trunk_rev]]
echo "PREV=$PREV"
0) All code is committed to SVN. All commits have been reviewed.
Notify developer mailing list of intention to release.
svn co svn://svn.code.sf.net/p/brlcad/code/brlcad/branches/RELEASE brlcad.RELEASE
cd brlcad.RELEASE
svn merge https://svn.code.sf.net/p/brlcad/code/brlcad/trunk@$PREV https://svn.code.sf.net/p/brlcad/code/brlcad/trunk@HEAD .
echo "Release preparations have begun. Please refrain from disruptive commits until the release is tagged or 24-hours have passed, whichever first. Ensure API changes are in CHANGES, user-visible changes are in NEWS, and help with release testing." | mail -s "Release preparations commencing" brlcad-devel@lists.sourceforge.net -r "your@subscribed.address"
#####################################################################
# 02: Test the merge.
1) Update TODO and BUGS. Verify all user-visible changes are in NEWS.
Verify CHANGES reflects all API and application changes. Make sure
changes to usage/options are reflected in manual pages.
mkdir -p .build && cd .build
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make
2) Update or verify the version numbers in the include/conf version
files, NEWS, and README. Commit the changes to the source repository.
See VERSION NUMBERS & COMPATIBILITY for versioning requirements.
# Manually check rt, mged, and archer.
bin/rt # should report usage with correct library versions
bin/mged -c test.g "make sph sph ; rt" # pops up a sphere
bin/mged # displays gui, run: opendb test.g ; draw sph ; rt
bin/archer # displays gui, run: opendb test.g ; draw sph ; rt
3) Update the ChangeLog with entries since the last release; commit
the updated ChangeLog. Use the YYYY-MM-DD of the previous release.
Get the date from the NEWS file.
# clean up
cd .. && rm -rf .build
#####################################################################
# 03: Commit the merge.
CURR=`svn log --xml https://svn.code.sf.net/p/brlcad/code/brlcad/trunk | grep 'revision=' | head -n 1 | sed 's/.*="\([0-9][0-9]*\)".*/\1/g'`
echo "CURR=$CURR"
svn commit -m "merge of trunk to RELEASE branch, r$PREV through r$CURR"
#####################################################################
# 04: Reprioritize or address remaining TODO items.
# NON-AUTO: Do what's necessary to release, update priorities.
#####################################################################
# 05: Review all commits.
# NON-AUTO: Verify all user-visible changes are in NEWS.
# NON-AUTO: Verify all interface changes are in CHANGES.
# NON-AUTO: Verify usage/options are documented in doc/.
#####################################################################
# 06: Update the version numbers.
# NON-AUTO: NEWS
# NON-AUTO: README
# NON-AUTO: include/conf/PATCH
# NON-AUTO: include/conv/MINOR (See VERSION NUMBERS & COMPATIBILITY section.)
# NON-AUTO: misc/debian/changelog
# NON-AUTO: misc/macosx/Resources/ReadMe.rtfd/TXT.rtf
# NON-AUTO: misc/macosx/Resources/Welcome.rtfd/TXT.rtf
#####################################################################
# 07: Update ChangeLog. Use the YYYY-MM-DD of previous NEWS entry.
LAST=`grep -E "\--- [0-9]{4}-[0-9]{2}-[0-9]{2}" NEWS | head -n 2 | tail -n 1 | awk '{print $2}'`
echo "LAST=$LAST"
svn2cl --break-before-msg --include-rev --stdout -r HEAD:{$LAST} > ChangeLog
svn commit -m "update log with commits through $LAST" ChangeLog
4) Verify a successful build and distcheck ON AT LEAST TWO PLATFORMS.
Passing regression tests, benchmark, and two build configurations are
required for syncing to STABLE. Manually test mged and archer.
#####################################################################
# 08: Run distcheck-full on at least two platforms.
mkdir -p .verify && cd .verify
cmake .. && make distcheck && rm -rf ../.verify/*
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck && make
mkdir -p .build && cd .build && cmake .. && make distcheck-full
# manually test
bin/rt # should report usage with correct library versions
bin/benchmark run TIMEFRAME=1 # completes without ERROR
bin/mged -c test.g "make sph sph ; rt" # pops up a sphere
bin/rtwizard # displays gui
bin/mged # displays gui, run: opendb test2.g ; make sph sph ; rt
#####################################################################
# 09: Sync RELEASE to STABLE branch:
# clean up
cd .. && rm -rf .verify
5) Sync trunk onto the STABLE branch. Make sure all changes since the
previous sync are included and that STABLE matches trunk.
# review the log and obtain the last trunk merge revision number from comments
svn log --stop-on-copy https://svn.code.sf.net/p/brlcad/code/brlcad/branches/STABLE . | more
# NON-AUTO: Review the log and obtain the last merge revision
# number from comments.
svn log --stop-on-copy https://svn.code.sf.net/p/brlcad/code/brlcad/branches/STABLE | less
PREV=[[last_trunk_rev]]
*** OR ***
### OR ###
PREV=`svn log --xml --stop-on-copy https://svn.code.sf.net/p/brlcad/code/brlcad/branches/STABLE | grep 'revision=' | head -n 1 | sed 's/.*revision="\([0-9][0-9]*\)".*/\1/g'`
echo "PREV=$PREV"
# merge that range of changes into STABLE and make sure it works
# merge that range of changes into STABLE
svn co https://svn.code.sf.net/p/brlcad/code/brlcad/branches/STABLE brlcad.STABLE && cd brlcad.STABLE
svn merge https://svn.code.sf.net/p/brlcad/code/brlcad/trunk@$PREV https://svn.code.sf.net/p/brlcad/code/brlcad/trunk@HEAD .
svn merge https://svn.code.sf.net/p/brlcad/code/brlcad/branches/RELEASE@$PREV https://svn.code.sf.net/p/brlcad/code/brlcad/branches/RELEASE@HEAD .
#####################################################################
# 10: Test the merge.
# compile the merge
mkdir .merge && cd .merge
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make && cd .. && rm -rf .merge
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck-full && cd .. && rm -rf .merge
# commit the merge
CURR=`svn log --xml https://svn.code.sf.net/p/brlcad/code/brlcad/trunk | grep 'revision=' | head -n 1 | sed 's/.*="\([0-9][0-9]*\)".*/\1/g'`
#####################################################################
# 11: Commit the merge.
CURR=`svn log --xml https://svn.code.sf.net/p/brlcad/code/brlcad/branches/RELEASE | grep 'revision=' | head -n 1 | sed 's/.*="\([0-9][0-9]*\)".*/\1/g'`
echo "CURR=$CURR"
svn commit -m "merging trunk to STABLE from r$PREV to HEAD r$CURR"
6) Tag the release using "rel-MAJOR-MINOR-PATCH" format:
svn commit -m "merging RELEASE branch to STABLE branch, r$PREV through r$CURR"
#####################################################################
# 12: Tag the release using "rel-MAJOR-MINOR-PATCH" format:
MAJOR=`awk '{print $1}' include/conf/MAJOR`
MINOR=`awk '{print $1}' include/conf/MINOR`
@@ -1298,11 +1353,13 @@ previous sync are included and that STABLE matches trunk.
echo "Tagging rel-$MAJOR-$MINOR-$PATCH"
svn cp https://svn.code.sf.net/p/brlcad/code/brlcad/branches/STABLE https://svn.code.sf.net/p/brlcad/code/brlcad/tags/rel-$MAJOR-$MINOR-$PATCH
7) Increment and commit the next BRL-CAD release numbers to SVN.
Update the include/conf/(MAJOR|MINOR|PATCH) version files immediately
to an odd-numbered minor version or a new patch developer version
(e.g. 7.11.0 or 7.4.1). Update README and NEWS version to next
_expected_ release number (e.g. 7.12.0 or 7.4.2).
#####################################################################
# 13: Increment and commit the next BRL-CAD release numbers to SVN.
# Update the include/conf/(MAJOR|MINOR|PATCH) version files
# immediately to odd-numbered minor version or new patch developer
# version (e.g. 7.11.0 or 7.34.1). Update README and NEWS version
# to next *expected* release number (e.g. 7.12.0 or 7.34.2).
echo "`expr $PATCH + 1`" > include/conf/PATCH
NEXT="`expr $PATCH + 2`"
@@ -1311,16 +1368,22 @@ _expected_ release number (e.g. 7.12.0 or 7.4.2).
cat NEWS | tr '\n' '@' | perl -pi -e "$EXPR" | tr '@' '\n' > NEWS
svn commit -m "bump to next development revision after tagging the $MAJOR.$MINOR.$PATCH release" ../include/conf/PATCH
8) Obtain a tagged version of the sources from the repository, make
final distribution tarballs:
#####################################################################
# 14: Sync RELEASE changes back to trunk.
# Work-in-progress
#####################################################################
# 15: Obtain a tagged version of the sources from the repository, make
# final distribution tarballs:
svn checkout https://svn.code.sf.net/p/brlcad/code/brlcad/tags/rel-$MAJOR-$MINOR-$PATCH brlcad-$MAJOR.$MINOR.$PATCH
cd brlcad-$MAJOR.$MINOR.$PATCH-build && mkdir .build && cd .build
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release && make distcheck-full
9) Upload the source distributions and release notes. Use source
tarballs to create binaries. Use the NAMING A BINARY RELEASE section
above to name them.
#####################################################################
# 16: Upload the source distributions and release notes. Use source
# tarballs to create binaries.
# create a shell session and source dir
SFUSERNAME=`ls ~/.subversion/auth/svn.simple/* | xargs -n 1 grep -A4 sourceforge | tail -1`
@@ -1344,17 +1407,21 @@ above to name them.
cat README-$MAJOR-$MINOR-$PATCH.txt && echo "==="
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ Source/$MAJOR.$MINOR.$PATCH/."
# upload release notes to binary dirs (as needed)
# NON-AUTO: Following the NAMING A BINARY RELEASE convention,
# upload any release binaries and platform-specific release notes.
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ Runtime\ Libraries/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ BSD/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Linux/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Mac\ OS\ X/$MAJOR.$MINOR.$PATCH/."
scp README-$MAJOR-$MINOR-$PATCH.txt "$SFUSERNAME,brlcad@shell.sf.net:/home/frs/project/b/br/brlcad/BRL-CAD\ for\ Windows/$MAJOR.$MINOR.$PATCH/."
# be sure to mark binaries as default download, then close shell session
# NON-AUTO: Be sure to mark binaries as default download, then
# close shell session
ssh -v $SFUSERNAME,brlcad@shell.sf.net shutdown
10) Notify binary platform maintainers:
#####################################################################
# 17: Notify binary platform maintainers:
T2 package maintainer
http://t2-project.org/packages/brlcad.html
@@ -1377,7 +1444,8 @@ above to name them.
Slackware maintainer
http://slackbuilds.org/result/?search=brlcad
11) Announce the new release.
#####################################################################
# 18: Announce the new release.
The NEWS file should generally be used as a basis for making release
announcements though the announcements almost always require
@@ -1463,37 +1531,10 @@ Multiple platform major release and announcements:
http://cadcam-insider.com/index.php/News-submission-guidelines.html
copyboy@cadcam-insider.com
12) Sit back and enjoy a beverage for a job well done.
#####################################################################
# 19: Sit back and enjoy a beverage for a job well done.
PATCHING A RELEASE
------------------
Should it become necessary to patch a release that has already been
posted and announced, the mechanism is to post patch files for the
source release and update the uploaded release notes README file.
Example: stop_rt_crashing-0.patch and fix_fbserv-1.patch
It's expected that all patch files are independent and will be applied
sequentially. They should be consistently and incrementally numbered.
Users should be instructed in the release notes README to download and
apply all available patch files.
For binary releases, it's recommended to just "move on" and let issues
become resolved in the next release unless there's a critical security
or significant data corruption issue involved. If it becomes
necessary to repost a release, use the RELEASE_COUNT file name
convention described in VERSION NUMBERS & COMPATIBILITY.
Example: BRL-CAD-7.12.2.dmg is superseded by BRL-CAD-7.12.2-1.dmg
Patched binary releases may be moved to the hidden attic folder if
critical, though not necessary or recommended. They are preserved for
historic record and should never be deleted once announced. Releases
not yet been announced may be updated within two days of being posted
without involving a patch.
GETTING HELP
------------
+22
View File
@@ -405,6 +405,28 @@ mode.
Aliases: ENABLE_STRICT, ENABLE_STRICT_COMPILE, ENABLE_STRICT_COMPILE_FLAGS
--- ENABLE_POSIX_COMPLIANCE ---
Build with strict POSIX compliance checking. Defaults to OFF.
Causes compiler options to be set for strict compliance with the
minimum C and C++ standards acceptable according to current BRL-CAD
policy. The current minimum C standard is POSIX 200112 plus C99.
There is no currently defined minimum C++ standard.
Aliases: ENABLE_POSIX
--- ENABLE_C99_COMPLIANCE ---
Build with strict C99 compliance checking. Defaults to OFF.
Causes C compiler options to be set for strict compliance with the C99
standard.
Aliases: ENABLE_C99
--- BRLCAD_EXTRADOCS ---
The core option that enables and disables building of BRL-CAD's DocBook
+4 -1
View File
@@ -13,6 +13,9 @@ changes made. See document footer for additional details.
--- 2013-0X-XX Release 7.24.2 ---
----------------------------------------------------------------------
* added -depth option to MGED 'search' command - Cliff Yapp
* improved 'search' with 'flat' search path modifier - Cliff Yapp
* improved 'search' with above/equal/below depth limits - Cliff Yapp
* added attribute sorting option to the 'attr' command - Tom Browder
* changed 'bwfilter' tool offset option from -o to -O - Mohit Daga
* gattributes section 5 man page renamed to attributes - Tom Browder
@@ -24,7 +27,7 @@ changes made. See document footer for additional details.
* fixed fast4-g importer parsing of blank input lines - Richard Weiss
* added -o flag to 'bb' command for oriented bounding box - Cliff Yapp
* allow search to see hidden combs with the -a flag - Cliff Yapp
* added comb -l option - 'lifts' R flag to top of comb tree - C. Yapp
* added comb -l lift option to change region designation - Cliff Yapp
* print current grid information in gqa output - Cliff Yapp
* added -f option for flattening combs to 'comb' command - Cliff Yapp
* added support for boolean op filtering in search - Cliff Yapp
+55 -26
View File
@@ -18,29 +18,26 @@ tasks as they are completed.
THESE TASKS SHOULD HAPPEN BEFORE THE NEXT RELEASE
-------------------------------------------------
* Archer GUI needs to remember the last size of the command
window when it is in detached (2 window) mode
* address the ctest failure of bu_progname_tests (seen on ia64 linux)
* address the ctest failure of bu_heap_test_1 (seen on ia32 fbsd)
* heap unit test needs to actually compare performance against system
allocation, not just do some work
* re-do the sh/enumerate.sh script for CMake
* attempt to replicate the GTK+ ISST interface in TCL
* provide a viable FindBRLCAD.cmake
* investigate thread affinity locking on Linux
* nada.
THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
-------------------------------------------------------
* fix the bu_sempahore unit test
* address the ctest failure of bu_heap_test_1 (seen on ia32 fbsd)
* investigate thread affinity locking on Linux
* re-do the sh/enumerate.sh script for CMake
* heap unit test needs to actually compare performance against system
allocation, not just do some work
* bundle primary rays in rt front end into postage stamps, shoot via
rt_shootrays(), modify to pass all rays down through the spatial
partitioning simultaneously
* fix the bu_semaphore unit test
* fix the bn_poly_sub unit test
@@ -80,6 +77,46 @@ THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
THESE ARE UNSCHEDULED BACKLOG TASKS
-----------------------------------
* 'about' command to display version, contents of various doc files,
customizable brlcad.msg file
* 'align' command taking a from 3d pt and a to 3d pt target.
moves/rotates the source object into alignment.
* Update the comb "region lift" capability to handle automatic duplication
and substitution of the duplicate into the tree of combs who can't have
their definitions changed without impacting other geometry in the .g file.
* change 'mirror' command offset to be prior to mirror instead of
after, so that you can mirror intuitively over a specified point
along a given axis.
* refactor rt_mirror (src/librt/primitives/mirror.c) into the functab
* refactor rt_functab accessors to go through an api call or calls so
that the array is not accessed directly. either an rt_eval() style
interface with data-driven keys to tell it with function(s) to call,
or simply have an rt_*() for each function (e.g., rt_mirror(),
rt_shot(), rt_describe(), etc.).
* review proc-db for promotion to src/shapes
* implement new 'reduce' command to perform model reduction. should
perform automatic simplification of geometry to reduce complexity by
(potentially) orders of magnitude. this is level of detail for
non-viewing purposes, for export. possibly automatable by replacing
leave-node geometry with bounding box (arb8s), but collapsing and
combining up the hierarchy to a prescribed tree depth. however, it
model includes BoTs/NURBS, more advanced spatial logic will be
needed.
* provide a viable FindBRLCAD.cmake
* replicate the GTK+ ISST interface in TCL
* Archer GUI needs to remember the last size of the command
window when it is in detached (2 window) mode
* fix nurbs_ssi and nurbs_tester unit tests
* get rid of the -P#processors user option (except rt* tools) common
@@ -387,14 +424,6 @@ comp.r4 ID 5678 material code 5 LOS 75
* vls name wrapping (reversible argv-to-vls, vls-to-argv). look at
src/libged/glob.c code, very similar.
* refactor rt_mirror (src/librt/primitives/mirror.c) into the functab
* refactor rt_functab accessors to go through an api call or calls so
that the array is not accessed directly. either an rt_eval() style
interface with data-driven keys to tell it with function(s) to call,
or simply have an rt_*() for each function (e.g., rt_mirror(),
rt_shot(), rt_describe(), etc.).
* release dm X get_color() memory
* update g-xxx_facets to use libgcv
Vendored
+8
View File
@@ -66,6 +66,14 @@ do
shift;;
--disable-strict-compile-flags) options="$options -DBRLCAD_ENABLE_STRICT=OFF";
shift;;
--enable-posix) options="$options -DENABLE_POSIX_COMPLIANCE=ON";
shift;;
--disable-posix) options="$options -DENABLE_POSIX_COMPLIANCE=OFF";
shift;;
--enable-c99) options="$options -DENABLE_C99_COMPLIANCE=ON";
shift;;
--disable-c99) options="$options -DENABLE_C99_COMPLIANCE=OFF";
shift;;
--enable-docs) options="$options -DBRLCAD_EXTRADOCS=ON";
shift;;
--disable-docs) options="$options -DBRLCAD_EXTRADOCS=OFF";
+1373 -1363
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -219,8 +219,12 @@ ADD_DOC(documentation_mged_old_DATA mged_old)
configure_file(pad_file.xml.in ${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pad_file.xml DESTINATION ${DOC_DIR})
CMAKEFILES(pad_file.xml.in STARTERS)
CMAKEFILES(burst)
CMAKEFILES(
STARTERS
burst
implicit_constraints.txt
pad_file.xml.in
)
# Local Variables:
# tab-width: 8
@@ -457,7 +457,7 @@ should be opened, else 0.</para>
<programlisting>void view_pixel(struct application *ap);</programlisting>
<para>Called by worker() after the end of proccessing for each
<para>Called by worker() after the end of processing for each
pixel.</para>
<programlisting>void view_end(struct application *ap);</programlisting>
@@ -879,7 +879,7 @@ memcpy(wm_hd->wm_mat, trans_matrix, sizeof(mat_t));
<listitem>
<para><itemizedlist>
<listitem>
<para>Note: use mk_lcomb/mk_comb for inital creation only!</para>
<para>Note: use mk_lcomb/mk_comb for initial creation only!</para>
<itemizedlist>
<listitem>
<para>caveat: can use to update boolean tree under special conditions</para>
@@ -60,16 +60,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -60,16 +60,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -60,16 +60,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -60,16 +60,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -60,16 +60,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -63,16 +63,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<!-- set verbatim blocks off from normal text -->
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -60,16 +60,16 @@
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="shade.verbatim" select="1"/>
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
<xsl:attribute name="background-color">#E0E0E0</xsl:attribute>
<xsl:attribute name="padding-top">0.25em</xsl:attribute>
<xsl:attribute name="padding-bottom">0.25em</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">8.0pt</xsl:attribute>
</xsl:attribute-set>
@@ -68,7 +68,7 @@
</xsl:attribute-set>
<!-- center table titles, thanks to Dean Nelson <deannelson@aol.com>,
2010-11-09, from the docbook-apps mailing list>
2010-11-09, from the docbook-apps mailing list>
-->
<xsl:attribute-set name="formal.title.properties">
<xsl:attribute name="text-align">
+1 -1
View File
@@ -21,7 +21,7 @@
<arg choice='opt'>-s <replaceable>squaresize</replaceable></arg>
<arg choice='opt'>-w <replaceable>width</replaceable></arg>
<arg choice='opt'>-n <replaceable>height</replaceable></arg>
</arg>
</arg>
<arg choice='opt'>-o <replaceable>out.pix</replaceable></arg>
<arg choice='opt'><replaceable>in.bw</replaceable></arg>
<arg choice='plain'><replaceable>&gt;</replaceable></arg>
+5 -5
View File
@@ -17,9 +17,9 @@
<refsynopsisdiv xml:id='synopsis'>
<cmdsynopsis>
<command>pix-bw</command>
<arg choice='opt'>
<arg choice='opt'>
<arg choice='opt'>-s <replaceable>squaresize</replaceable></arg>
<arg choice='opt'>
<arg choice='opt'>
<arg choice='opt'>-w <replaceable>width</replaceable></arg>
<arg choice='opt'>-n <replaceable>height</replaceable></arg></arg></arg>
<arg choice='opt'>
@@ -44,7 +44,7 @@ file from its standard input
and produce a black and white
<citerefentry><refentrytitle>bw</refentrytitle><manvolnum>5</manvolnum></citerefentry>
file on its standard output.
By default all three colors are weighted equally.
By default all three colors are weighted equally.
The
<option>-e </option><replaceable>type</replaceable>
flag can be used to specify a standard weighting scheme</para>
@@ -56,7 +56,7 @@ choices include:</para>
<varlistentry>
<term><emphasis remap='B'>ntsc</emphasis></term>
<listitem>
<para> weighting used is based on the NTSC primaries and the
<para> weighting used is based on the NTSC primaries and the
D6500 alignment white.</para>
</listitem>
</varlistentry>
@@ -79,7 +79,7 @@ the value will be treated as a weight
to be applied to that color.
</para>
<para>
If 0 is supplied by the user for weights, then the weights assigned
If 0 is supplied by the user for weights, then the weights assigned
are 1.0 divided by the number of colors selected.</para>
</refsect1>
@@ -5,7 +5,6 @@ set(docbook_man3_EN
libplot3.xml
librt.xml
libwdb.xml
popt.xml
redblack.xml
)
-954
View File
@@ -1,954 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- the original file had an entity '&bsol;' which is the backslash; it was
replaced by the equivalent unicode character reference '&#92;'
-->
<!-- lifted from man+troff by doclifter -->
<refentry xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en' xml:id='popt3'>
<refmeta>
<refentrytitle>POPT</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo class='source'>June 30, 1998</refmiscinfo>
</refmeta>
<refnamediv>
<refname>popt</refname>
<refpurpose>Parse command line options</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id='synopsis'>
<funcsynopsis>
<funcsynopsisinfo>
#include &lt;popt.h&gt;
</funcsynopsisinfo>
<funcprototype>
<funcdef>poptContext <function>poptGetContext</function></funcdef>
<paramdef>const char * <parameter>name</parameter></paramdef>
<paramdef>int <parameter>argc</parameter></paramdef>
<paramdef>const char ** <parameter>argv</parameter></paramdef>
<paramdef>const struct poptOption * <parameter>options</parameter></paramdef>
<paramdef>int <parameter>flags</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>poptFreeContext</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>void <function>poptResetContext</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptGetNextOpt</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>const char *<function>poptGetOptArg</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>const char *<function>poptGetArg</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>const char *<function>poptPeekArg</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>const char **<function>poptGetArgs</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>const char *const <function>poptStrerror</function></funcdef>
<paramdef>const int <parameter>error</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>const char *<function>poptBadOption</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
<paramdef>int <parameter>flags</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptReadDefaultConfig</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
<paramdef>int <parameter>flags</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptReadConfigFile</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
<paramdef>char * <parameter>fn</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptAddAlias</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
<paramdef>struct poptAlias <parameter>alias</parameter></paramdef>
<paramdef>int <parameter>flags</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptParseArgvString</function></funcdef>
<paramdef>char * <parameter>s</parameter></paramdef>
<paramdef>int * <parameter>argcPtr</parameter></paramdef>
<paramdef>const char *** <parameter>argvPtr</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptDupArgv</function></funcdef>
<paramdef>int <parameter>argc</parameter></paramdef>
<paramdef>const char ** <parameter>argv</parameter></paramdef>
<paramdef>int * <parameter>argcPtr</parameter></paramdef>
<paramdef>const char *** <parameter>argvPtr</parameter></paramdef>
</funcprototype>
<funcprototype>
<funcdef>int <function>poptStuffArgs</function></funcdef>
<paramdef>poptContext <parameter>con</parameter></paramdef>
<paramdef>const char ** <parameter>argv</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 xml:id='description'><title>DESCRIPTION</title>
<para>The popt library exists essentially for parsing command-line
options. It is found superior in many ways when compared to
parsing the argv array by hand or using the getopt functions
<function>getopt()</function>
and
<function>getopt_long()</function>
[see
<citerefentry><refentrytitle>getopt</refentrytitle><manvolnum>3</manvolnum></citerefentry>].
Some specific advantages of popt are: it does not utilize global
variables, thus enabling multiple passes in parsing <varname role='parameter'>argv</varname>
; it can parse an arbitrary array of <varname role='parameter'>argv</varname>-style elements,
allowing parsing of command-line-strings from any source;
it provides a standard method of option aliasing (to be
discussed at length below.); it can exec external option filters; and,
finally, it can automatically generate help and usage messages for
the application.</para>
<para>Like
<function>getopt_long()</function>,
the popt library supports short and long style options. Recall
that a
<emphasis remap='B'>short option</emphasis>
consists of a - character followed by a single alphanumeric character.
A
<emphasis remap='B'>long option</emphasis>,
common in GNU utilities, consists of two - characters followed by a
string made up of letters, numbers and hyphens. Long options are
optionally allowed to begin with a single -, primarily to allow command-line
compatibility between popt applications and X toolkit applications.
Either type of option may be followed by an argument. A space separates a
short option from its arguments; either a space or an = separates a long
option from an argument.</para>
<para>The popt library is highly portable and should work on any POSIX
platform. The latest version is distributed with rpm and is always available
from: ftp://ftp.rpm.org/pub/rpm/dist.</para>
<para>It may be redistributed under the X consortium license, see the file COPYING
in the popt source distribution for details.</para>
</refsect1>
<refsect1 xml:id='basic_popt_usage'><title>BASIC POPT USAGE</title>
<refsect2 xml:id='x1_the_option_table'><title>1. THE OPTION TABLE</title>
<para>Applications provide popt with information on their command-line
options by means of an "option table," i.e., an array of
<emphasis remap='B'>struct poptOption</emphasis>
structures:</para>
<para>#include &lt;popt.h&gt;</para>
<programlisting remap='.nf'>
struct poptOption {
const char * longName; /* may be NULL */
char shortName; /* may be '&#92;0' */
int argInfo;
void * arg; /* depends on argInfo */
int val; /* 0 means don't return, just update flag */
char * descrip; /* description for autohelp -- may be NULL */
char * argDescrip; /* argument description for autohelp */
};
</programlisting> <!-- .fi -->
<para>Each member of the table defines a single option that may be
passed to the program. Long and short options are considered
a single option that may occur in two different forms. The
first two members,
<emphasis remap='I'>longName</emphasis> and <emphasis remap='I'>shortName</emphasis>, define the names of the option;
the first is a long name, while the latter is a single character.</para>
<para>The
<emphasis remap='I'>argInfo</emphasis> member tells popt what type of argument is expected
after the option. If no argument is expected,
<emphasis remap='B'>POPT_ARG_NONE</emphasis>
should be used.
The rest of the valid values are shown in the following table:</para>
<informaltable pgwide='0' frame='none'>
<tgroup cols='3' align='center'>
<colspec colname='c1'/>
<colspec colname='c2'/>
<colspec colname='c3'/>
<thead>
<row>
<entry align='left'>Value</entry>
<entry align='left'>Description</entry>
<entry align='left'>arg Type</entry>
</row>
</thead>
<tbody>
<row>
<entry align='left'>POPT_ARG_NONE</entry>
<entry align='left'>No argument expected</entry>
<entry align='left'>int</entry>
</row>
<row>
<entry align='left'>POPT_ARG_STRING</entry>
<entry align='left'>No type checking to be performed</entry>
<entry align='left'>char *</entry>
</row>
<row>
<entry align='left'>POPT_ARG_ARGV</entry>
<entry align='left'>No type checking to be performed</entry>
<entry align='left'>char **</entry>
</row>
<row>
<entry align='left'>POPT_ARG_SHORT</entry>
<entry align='left'>An short argument is expected</entry>
<entry align='left'>short</entry>
</row>
<row>
<entry align='left'>POPT_ARG_INT</entry>
<entry align='left'>An integer argument is expected</entry>
<entry align='left'>int</entry>
</row>
<row>
<entry align='left'>POPT_ARG_LONG</entry>
<entry align='left'>A long integer is expected</entry>
<entry align='left'>long</entry>
</row>
<row>
<entry align='left'>POPT_ARG_LONGLONG</entry>
<entry align='left'>A long long integer is expected</entry>
<entry align='left'>long long</entry>
</row>
<row>
<entry align='left'>POPT_ARG_VAL</entry>
<entry align='left'>Integer value taken from <emphasis remap='CW'>val</emphasis></entry>
<entry align='left'>int</entry>
</row>
<row>
<entry align='left'>POPT_ARG_FLOAT</entry>
<entry align='left'>An float argument is expected</entry>
<entry align='left'>float</entry>
</row>
<row>
<entry align='left'>POPT_ARG_DOUBLE</entry>
<entry align='left'>A double argument is expected</entry>
<entry align='left'>double</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>For numeric values, if the <emphasis remap='I'>argInfo</emphasis> value is bitwise or'd with one of
<emphasis remap='B'>POPT_ARGFLAG_OR</emphasis>, <emphasis remap='B'>POPT_ARGFLAG_AND</emphasis>, or <emphasis remap='B'>POPT_ARGFLAG_XOR</emphasis>,
the value is saved by performing an OR, AND, or XOR.
If the <emphasis remap='I'>argInfo</emphasis> value is bitwise or'd with <emphasis remap='B'>POPT_ARGFLAG_NOT</emphasis>,
the value will be negated before saving. For the common operations of
setting and/or clearing bits, <emphasis remap='B'>POPT_BIT_SET</emphasis> and <emphasis remap='B'>POPT_BIT_CLR</emphasis>
have the appropriate flags set to perform bit operations.</para>
<para>If the <emphasis remap='I'>argInfo</emphasis> value is bitwise or'd with <emphasis remap='B'>POPT_ARGFLAG_ONEDASH</emphasis>,
the long argument may be given with a single - instead of two. For example,
if <option>--longopt</option> is an option with <emphasis remap='B'>POPT_ARGFLAG_ONEDASH</emphasis>, is
specified, <option>-longopt</option> is accepted as well.</para>
<para>The next element, <emphasis remap='I'>arg</emphasis>, allows popt to automatically update
program variables when the option is used. If <emphasis remap='I'>arg</emphasis> is
<emphasis remap='B'>NULL</emphasis>, it is ignored and popt takes no special action.
Otherwise it should point to a variable of the type indicated in the
right-most column of the table above. A <emphasis remap='B'>POPT_ARG_ARGV</emphasis> arg will
(re-)allocate an array of char * string pointers, append the string argument, and add a
<emphasis remap='B'>NULL</emphasis> sentinel at the end of the array as needed.
The target char ** address of a <emphasis remap='B'>POPT_ARG_ARGV</emphasis> arg should be initialized to <emphasis remap='B'>NULL</emphasis>.</para>
<para>If the option takes no argument (<emphasis remap='I'>argInfo</emphasis> is
<emphasis remap='B'>POPT_ARG_NONE</emphasis>), the variable pointed to by
<emphasis remap='I'>arg</emphasis> is set to 1 when the option is used. (Incidentally, it
will perhaps not escape the attention of hunt-and-peck typists that
the value of <emphasis remap='B'>POPT_ARG_NONE</emphasis> is 0.) If the option does take
an argument, the variable that
<emphasis remap='I'>arg</emphasis> points to is updated to reflect the value of the argument.
Any string is acceptable for <emphasis remap='B'>POPT_ARG_STRING</emphasis> and <emphasis remap='B'>POPT_ARG_ARGV</emphasis> arguments, but
<emphasis remap='B'>POPT_ARG_INT</emphasis>, <emphasis remap='B'>POPT_ARG_SHORT</emphasis>, <emphasis remap='B'>POPT_ARG_LONG</emphasis>, <emphasis remap='B'>POPT_ARG_LONGLONG</emphasis>, <emphasis remap='B'>POPT_ARG_FLOAT</emphasis>, and
<emphasis remap='B'>POPT_ARG_DOUBLE</emphasis> are converted to the appropriate type, and an
error returned if the conversion fails.</para>
<para><emphasis remap='B'>POPT_ARG_VAL</emphasis> causes <emphasis remap='I'>arg</emphasis> to be set to the (integer) value of
<emphasis remap='I'>val</emphasis> when the argument is found. This is most often useful for
mutually-exclusive arguments in cases where it is not an error for
multiple arguments to occur and where you want the last argument
specified to win; for example, "rm -i -f". <emphasis remap='B'>POPT_ARG_VAL</emphasis> causes
the parsing function not to return a value, since the value of <emphasis remap='I'>val</emphasis>
has already been used.</para>
<para>If the <emphasis remap='I'>argInfo</emphasis> value is bitwise or'd with <emphasis remap='B'>POPT_ARGFLAG_OPTIONAL</emphasis>,
the argument to the long option may be omitted. If the long option
is used without an argument, a default value of zero or NULL will be saved
(if the arg pointer is present), otherwise behavior will be identical to
a long option with argument.</para>
<para>The next option, <emphasis remap='I'>val</emphasis>, is the value popt's parsing function
should return when the option is encountered. If it is 0, the parsing
function does not return a value, instead parsing the next
command-line argument.</para>
<para>The last two options, <emphasis remap='I'>descrip</emphasis> and <emphasis remap='I'>argDescrip</emphasis> are only required
if automatic help messages are desired (automatic usage messages can
be generated without them). <emphasis remap='I'>descrip</emphasis> is a text description of the
argument and <emphasis remap='I'>argdescrip</emphasis> is a short summary of the type of arguments
the option expects, or NULL if the option doesn't require any
arguments.</para>
<para>If popt should automatically provide <option>--usage</option> and <option>--help</option> (<option>-?</option>)
options, one line in the table should be the macro <emphasis remap='B'>POPT_AUTOHELP</emphasis>.
This macro includes another option table (via <emphasis remap='B'>POPT_ARG_INCLUDE_TABLE</emphasis>
; see below) in the main one which provides the table entries for these
arguments. When <option>--usage</option> or <option>--help</option> are passed to programs which
use popt's automatical help, popt displays the appropriate message on
stderr as soon as it finds the option, and exits the program with a
return code of 0. If you want to use popt's automatic help generation in
a different way, you need to explicitly add the option entries to your programs
option table instead of using <emphasis remap='B'>POPT_AUTOHELP</emphasis>.</para>
<para>If the <emphasis remap='I'>argInfo</emphasis> value is bitwise or'd with <emphasis remap='B'>POPT_ARGFLAG_DOC_HIDDEN</emphasis>,
the argument will not be shown in help output.</para>
<para>If the <emphasis remap='I'>argInfo</emphasis> value is bitwise or'd with <emphasis remap='B'>POPT_ARGFLAG_SHOW_DEFAULT</emphasis>,
the inital value of the arg will be shown in help output.</para>
<para>The final structure in the table should have all the pointer values set
to <emphasis remap='B'>NULL</emphasis> and all the arithmetic values set to 0, marking the
end of the table. The macro <emphasis remap='B'>POPT_TABLEEND</emphasis> is provided to do that.</para>
<para>There are two types of option table entries which do not specify command
line options. When either of these types of entries are used, the
<emphasis remap='I'>longName</emphasis> element must be <emphasis remap='B'>NULL</emphasis> and the <emphasis remap='B'>shortName</emphasis> element
must be <emphasis remap='B'>'&#92;0'</emphasis>.</para>
<para>The first of these special entry types allows the application to nest
another option table in the current one; such nesting may extend quite
deeply (the actual depth is limited by the program's stack). Including
other option tables allows a library to provide a standard set of
command-line options to every program which uses it (this is often done
in graphical programming toolkits, for example). To do this, set
the <emphasis remap='I'>argInfo</emphasis> field to <emphasis remap='B'>POPT_ARG_INCLUDE_TABLE</emphasis> and the
arg field to point to the table which is being included. If
automatic help generation is being used, the <emphasis remap='I'>descrip</emphasis> field should
contain a overall description of the option table being included.</para>
<para>The other special option table entry type tells popt to call a function (a
callback) when any option in that table is found. This is especially usefull
when included option tables are being used, as the program which provides
the top-level option table doesn't need to be aware of the other options
which are provided by the included table. When a callback is set for
a table, the parsing function never returns information on an option in
the table. Instead, options information must be retained via the callback
or by having popt set a variable through the option's <emphasis remap='I'>arg</emphasis> field.
Option callbacks should match the following prototype:</para>
<literallayout remap='.nf'>
<emphasis remap='B'>void poptCallbackType(poptContext con, </emphasis>
<emphasis remap='B'> const struct poptOption * opt, </emphasis>
<emphasis remap='B'> const char * arg, void * data);</emphasis>
</literallayout> <!-- .fi -->
<para>The first parameter is the context which is being parsed (see the next
section for information on contexts), <emphasis remap='I'>opt</emphasis> points to the option
which triggered this callback, and <emphasis remap='I'>arg</emphasis> is the option's argument.
If the option does not take an argument, <emphasis remap='I'>arg</emphasis> is <emphasis remap='B'>NULL</emphasis>. The
final parameter, <emphasis remap='I'>data</emphasis> is taken from the <emphasis remap='I'>descrip</emphasis> field
of the option table entry which defined the callback. As <emphasis remap='I'>descrip</emphasis>
is a pointer, this allows callback functions to be passed an arbitrary
set of data (though a typecast will have to be used).</para>
<para>The option table entry which defines a callback has an <emphasis remap='I'>argInfo</emphasis> of
<emphasis remap='B'>POPT_ARG_CALLBACK</emphasis>, an <emphasis remap='I'>arg</emphasis> which points to the callback
function, and a <emphasis remap='I'>descrip</emphasis> field which specifies an arbitrary pointer
to be passed to the callback.</para>
</refsect2>
<refsect2 xml:id='x2_creating_a_context'><title>2. CREATING A CONTEXT</title>
<para>popt can interleave the parsing of multiple command-line sets. It allows
this by keeping all the state information for a particular set of
command-line arguments in a
<type>poptContext</type> data structure, an opaque type that should not be
modified outside the popt library.</para>
<para>New popt contexts are created by <emphasis remap='B'>poptGetContext()</emphasis>:</para>
<literallayout remap='.nf'>
<emphasis remap='B'>poptContext poptGetContext(const char * </emphasis><varname role='parameter'>name</varname><emphasis remap='B'>, int </emphasis><varname role='parameter'>argc</varname><emphasis remap='B'>,</emphasis>
<emphasis remap='B'> const char ** </emphasis><varname role='parameter'>argv</varname><emphasis remap='B'>,</emphasis>
<emphasis remap='B'> const struct poptOption * </emphasis><varname role='parameter'>options</varname><emphasis remap='B'>,</emphasis>
<emphasis remap='B'> int </emphasis><varname role='parameter'>flags</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>The first parameter,
<varname role='parameter'>name</varname>, is used only for alias handling (discussed later). It
should be the name of the application whose options are being parsed,
or should be <emphasis remap='B'>NULL</emphasis> if no option aliasing is desired. The next
two arguments specify the command-line arguments to parse. These are
generally passed to <emphasis remap='B'>poptGetContext()</emphasis> exactly as they were
passed to the program's <function>main()</function> function. The
<varname role='parameter'>options</varname> parameter points to the table of command-line options,
which was described in the previous section. The final parameter,
<varname role='parameter'>flags</varname>,
can take one of three values:</para>
<!-- br -->
<informaltable pgwide='0' frame='none'>
<tgroup cols='2' align='center'>
<colspec colname='c1'/>
<colspec colname='c2'/>
<thead>
<row>
<entry align='left'>Value</entry>
<entry align='left'>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry align='left'>POPT_CONTEXT_NO_EXEC</entry>
<entry align='left'>Ignore exec expansions</entry>
</row>
<row>
<entry align='left'>POPT_CONTEXT_KEEP_FIRST</entry>
<entry align='left'>Do not ignore argv[0]</entry>
</row>
<row>
<entry align='left'>POPT_CONTEXT_POSIXMEHARDER</entry>
<entry align='left'>Options cannot follow arguments</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>A <type>poptContext</type> keeps track of which options have already been
parsed and which remain, among other things. If a program wishes to
restart option processing of a set of arguments, it can reset the
<type>poptContext</type> by passing the context as the sole argument to
<emphasis remap='B'>poptResetContext()</emphasis>.</para>
<para>When argument processing is complete, the process should free the
<type>poptContext</type> as it contains dynamically allocated components. The
<emphasis remap='B'>poptFreeContext()</emphasis> function takes a
<type>poptContext</type> as its sole argument and frees the resources the
context is using.</para>
<para>Here are the prototypes of both <emphasis remap='B'>poptResetContext()</emphasis> and
<emphasis remap='B'>poptFreeContext()</emphasis>:</para>
<literallayout remap='.nf'>
<emphasis remap='B'>#include &lt;popt.h&gt;</emphasis>
<emphasis remap='B'>void poptFreeContext(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
<emphasis remap='B'>void poptResetContext(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
</refsect2>
<refsect2 xml:id='x3_parsing_the_command_line'><title>3. PARSING THE COMMAND LINE</title>
<para>After an application has created a <type>poptContext</type>, it may begin
parsing arguments. <emphasis remap='B'>poptGetNextOpt()</emphasis> performs the actual
argument parsing.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>#include &lt;popt.h&gt;</emphasis>
<emphasis remap='B'>int poptGetNextOpt(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>Taking the context as its sole argument, this function parses the next
command-line argument found. After finding the next argument in the
option table, the function fills in the object pointed to by the option
table entry's <emphasis remap='I'>arg</emphasis>
pointer if it is not <emphasis remap='B'>NULL</emphasis>. If the val entry for the option is
non-0, the function then returns that value. Otherwise,
<emphasis remap='B'>poptGetNextOpt()</emphasis> continues on to the next argument.</para>
<para><emphasis remap='B'>poptGetNextOpt()</emphasis> returns -1 when the final argument has been
parsed, and other negative values when errors occur. This makes it a
good idea to
keep the <emphasis remap='I'>val</emphasis> elements in the options table greater than 0.</para>
<para>If all of the command-line options are handled through <emphasis remap='I'>arg</emphasis>
pointers, command-line parsing is reduced to the following line of code:</para>
<literallayout remap='.nf'>
rc = poptGetNextOpt(poptcon);
</literallayout> <!-- .fi -->
<para>Many applications require more complex command-line parsing than this,
however, and use the following structure:</para>
<literallayout remap='.nf'>
while ((rc = poptGetNextOpt(poptcon)) &gt; 0) {
switch (rc) {
/* specific arguments are handled here */
}
}
</literallayout> <!-- .fi -->
<para>When returned options are handled, the application needs to know the
value of any arguments that were specified after the option. There are two
ways to discover them. One is to ask popt to fill in a variable with the
value of the option through the option table's <emphasis remap='I'>arg</emphasis> elements. The
other is to use <emphasis remap='B'>poptGetOptArg()</emphasis>:</para>
<literallayout remap='.nf'>
<emphasis remap='B'>#include &lt;popt.h&gt;</emphasis>
<emphasis remap='B'>char * poptGetOptArg(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>This function returns the argument given for the final option returned by
<emphasis remap='B'>poptGetNextOpt()</emphasis>, or it returns <emphasis remap='B'>NULL</emphasis> if no argument was specified.
The calling function is responsible for deallocating this string.</para>
</refsect2>
<refsect2 xml:id='x4_leftover_arguments'><title>4. LEFTOVER ARGUMENTS</title>
<para>Many applications take an arbitrary number of command-line arguments,
such as a list of file names. When popt encounters an argument that does
not begin with a -, it assumes it is such an argument and adds it to a list
of leftover arguments. Three functions allow applications to access such
arguments:</para>
<para><emphasis remap='B'>const char * poptGetArg(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
This function returns the next leftover argument and marks it as
processed.</para>
<para><emphasis remap='B'>const char * poptPeekArg(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
The next leftover argument is returned but not marked as processed.
This allows an application to look ahead into the argument list,
without modifying the list.</para>
<para><emphasis remap='B'>const char ** poptGetArgs(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>);</emphasis>
All the leftover arguments are returned in a manner identical to
<varname role='parameter'>argv</varname>. The final element in the returned array points to
<emphasis remap='B'>NULL</emphasis>, indicating the end of the arguments.</para>
</refsect2>
<refsect2 xml:id='x5_automatic_help_messages'><title>5. AUTOMATIC HELP MESSAGES</title>
<para>The <emphasis remap='B'>popt</emphasis> library can automatically generate help messages which
describe the options a program accepts. There are two types of help
messages which can be generated. Usage messages are a short messages
which lists valid options, but does not describe them. Help messages
describe each option on one (or more) lines, resulting in a longer, but
more useful, message. Whenever automatic help messages are used, the
<emphasis remap='B'>descrip</emphasis> and <emphasis remap='B'>argDescrip</emphasis> fields <emphasis remap='B'>struct poptOption</emphasis> members
should be filled in for each option.</para>
<para>The <emphasis remap='B'>POPT_AUTOHELP</emphasis> macro makes it easy to add <option>--usage</option> and
<option>--help</option> messages to your program, and is described in part 1
of this man page. If more control is needed over your help messages,
the following two functions are available:</para>
<literallayout remap='.nf'>
<emphasis remap='B'>#include &lt;popt.h&gt;</emphasis>
<emphasis remap='B'>void poptPrintHelp(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, FILE * </emphasis><emphasis remap='I'>f</emphasis><emphasis remap='B'>, int </emphasis><varname role='parameter'>flags</varname><emphasis remap='B'>);</emphasis>
<emphasis remap='B'>void poptPrintUsage(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, FILE * </emphasis><emphasis remap='I'>f</emphasis><emphasis remap='B'>, int </emphasis><varname role='parameter'>flags</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para><emphasis remap='B'>poptPrintHelp()</emphasis> displays the standard help message to the stdio file
descriptor f, while <emphasis remap='B'>poptPrintUsage()</emphasis> displays the shorter usage
message. Both functions currently ignore the <varname role='parameter'>flags</varname> argument; it is
there to allow future changes.</para>
</refsect2>
</refsect1>
<refsect1 xml:id='error_handling'><title>ERROR HANDLING</title>
<para>All of the popt functions that can return errors return integers.
When an error occurs, a negative error code is returned. The
following table summarizes the error codes that occur:</para>
<literallayout remap='.nf'>
<emphasis remap='B'> Error Description</emphasis>
<emphasis remap='B'>POPT_ERROR_NOARG </emphasis>Argument missing for an option.
<emphasis remap='B'>POPT_ERROR_BADOPT </emphasis>Option's argument couldn't be parsed.
<emphasis remap='B'>POPT_ERROR_OPTSTOODEEP </emphasis>Option aliasing nested too deeply.
<emphasis remap='B'>POPT_ERROR_BADQUOTE </emphasis>Quotations do not match.
<emphasis remap='B'>POPT_ERROR_BADNUMBER </emphasis>Option couldn't be converted to number.
<emphasis remap='B'>POPT_ERROR_OVERFLOW </emphasis>A given number was too big or small.
</literallayout> <!-- .fi -->
<para>Here is a more detailed discussion of each error:</para>
<variablelist remap='TP'>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_NOARG</emphasis></term>
<listitem>
<para>An option that requires an argument was specified on the command
line, but no argument was given. This can be returned only by
<emphasis remap='B'>poptGetNextOpt()</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_BADOPT</emphasis></term>
<listitem>
<para>An option was specified in <varname role='parameter'>argv</varname> but is not in the option
table. This error can be returned only from <emphasis remap='B'>poptGetNextOpt()</emphasis>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_OPTSTOODEEP</emphasis></term>
<listitem>
<para>A set of option aliases is nested too deeply. Currently, popt
follows options only 10 levels to prevent infinite recursion. Only
<emphasis remap='B'>poptGetNextOpt()</emphasis> can return this error.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_BADQUOTE</emphasis></term>
<listitem>
<para>A parsed string has a quotation mismatch (such as a single quotation
mark). <emphasis remap='B'>poptParseArgvString()</emphasis>, <emphasis remap='B'>poptReadConfigFile()</emphasis>, or
<emphasis remap='B'>poptReadDefaultConfig()</emphasis> can return this error.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_BADNUMBER</emphasis></term>
<listitem>
<para>A conversion from a string to a number (int or long) failed due
to the string containing nonnumeric characters. This occurs when
<emphasis remap='B'>poptGetNextOpt()</emphasis> is processing an argument of type
<emphasis remap='B'>POPT_ARG_INT</emphasis>, <emphasis remap='B'>POPT_ARG_SHORT</emphasis>, <emphasis remap='B'>POPT_ARG_LONG</emphasis>, <emphasis remap='B'>POPT_ARG_LONGLONG</emphasis>,
POPT_ARG_FLOAT<emphasis remap='B'>, or </emphasis>POPT_ARG_DOUBLE<literal>.</literal></para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_OVERFLOW</emphasis></term>
<listitem>
<para>A string-to-number conversion failed because the number was too
large or too small. Like <emphasis remap='B'>POPT_ERROR_BADNUMBER</emphasis>, this error
can occur only when <emphasis remap='B'>poptGetNextOpt()</emphasis> is processing an
argument of type <emphasis remap='B'>POPT_ARG_INT</emphasis>, <emphasis remap='B'>POPT_ARG_SHORT</emphasis>, <emphasis remap='B'>POPT_ARG_LONG</emphasis>, <emphasis remap='B'>POPT_ARG_LONGLONG</emphasis>,
POPT_ARG_FLOAT<emphasis remap='B'>, or </emphasis>POPT_ARG_DOUBLE<literal>.</literal></para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis remap='B'>POPT_ERROR_ERRNO</emphasis></term>
<listitem>
<para>A system call returned with an error, and <varname>errno</varname> still
contains the error from the system call. Both
<emphasis remap='B'>poptReadConfigFile()</emphasis> and <emphasis remap='B'>poptReadDefaultConfig()</emphasis> can
return this error.</para>
<para>Two functions are available to make it easy for applications to provide
good error messages.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>const char *const poptStrerror(const int </emphasis><varname role='parameter'>error</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>This function takes a popt error code and returns a string describing
the error, just as with the standard <function>strerror()</function> function.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>const char * poptBadOption(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, int </emphasis><varname role='parameter'>flags</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>If an error occurred during <emphasis remap='B'>poptGetNextOpt()</emphasis>, this function
returns the option that caused the error. If the <varname role='parameter'>flags</varname> argument
is set to <emphasis remap='B'>POPT_BADOPTION_NOALIAS</emphasis>, the outermost option is
returned. Otherwise, <varname role='parameter'>flags</varname> should be 0, and the option that is
returned may have been specified through an alias.</para>
<para>These two functions make popt error handling trivial for most
applications. When an error is detected from most of the functions,
an error message is printed along with the error string from
<emphasis remap='B'>poptStrerror()</emphasis>. When an error occurs during argument parsing,
code similiar to the following displays a useful error message:</para>
<programlisting remap='.nf'>
fprintf(stderr, "%s: %s&#92;n",
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(rc));
</programlisting> <!-- .fi -->
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 xml:id='option_aliasing'><title>OPTION ALIASING</title>
<para>One of the primary benefits of using popt over <function>getopt()</function> is the
ability to use option aliasing. This lets the user specify options that
popt expands into other options when they are specified. If the standard
grep program made use of popt, users could add a <option>--text</option> option
that expanded to <option>-i -n -E -2</option> to let them more easily find
information in text files.</para>
<refsect2 xml:id='x1_specifying_aliases'><title>1. SPECIFYING ALIASES</title>
<para>Aliases are normally specified in two places: <filename>/etc/popt</filename>
and the <markup>.popt</markup> file in the user's home directory (found through
the <envar>HOME</envar> environment variable). Both files have the same format,
an arbitrary number of lines formatted like this:</para>
<para><emphasis remap='I'>appname</emphasis><emphasis remap='B'> alias </emphasis><emphasis remap='I'>newoption</emphasis><emphasis remap='I'> expansion</emphasis></para>
<para>The <emphasis remap='I'>appname</emphasis> is the name of the application, which must be the
same as the <varname role='parameter'>name</varname> parameter passed to
<emphasis remap='B'>poptGetContext()</emphasis>. This allows each file to specify aliases for
multiple programs. The <varname role='parameter'>alias</varname> keyword specifies that an alias is
being defined; currently popt configuration files support only aliases, but
other abilities may be added in the future. The next option is the option
that should be aliased, and it may be either a short or a long option. The
rest of the line specifies the expansion for the alias. It is parsed
similarly to a shell command, which allows &#92;, ", and ' to be used for
quoting. If a backslash is the final character on a line, the next line
in the file is assumed to be a logical continuation of the line containing
the backslash, just as in shell.</para>
<para>The following entry would add a <option>--text</option> option to the grep command,
as suggested at the beginning of this section.</para>
<para><emphasis remap='B'>grep alias --text -i -n -E -2</emphasis></para>
</refsect2>
<refsect2 xml:id='x2_enabling_aliases'><title>2. ENABLING ALIASES</title>
<para>An application must enable alias expansion for a <type>poptContext</type>
before calling <emphasis remap='B'>poptGetNextArg()</emphasis> for the first time. There are
three functions that define aliases for a context:</para>
<literallayout remap='.nf'>
<emphasis remap='B'>int poptReadDefaultConfig(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, int </emphasis><varname role='parameter'>flags</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>This function reads aliases from <filename>/etc/popt</filename> and the
<markup>.popt</markup> file in the user's home directory. Currently,
<varname role='parameter'>flags</varname> should be
<emphasis remap='B'>NULL</emphasis>, as it is provided only for future expansion.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>int poptReadConfigFile(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, char * </emphasis><varname role='parameter'>fn</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>The file specified by <varname role='parameter'>fn</varname> is opened and parsed as a popt
configuration file. This allows programs to use program-specific
configuration files.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>int poptAddAlias(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, struct poptAlias </emphasis><varname role='parameter'>alias</varname><emphasis remap='B'>,</emphasis>
<emphasis remap='B'> int </emphasis><varname role='parameter'>flags</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>Occasionally, processes want to specify aliases without having to
read them from a configuration file. This function adds a new alias
to a context. The <varname role='parameter'>flags</varname> argument should be 0, as it is
currently reserved for future expansion. The new alias is specified
as a <emphasis remap='B'>struct poptAlias</emphasis>, which is defined as:</para>
<programlisting remap='.nf'>
struct poptAlias {
const char * longName; /* may be NULL */
char shortName; /* may be '&#92;0' */
int argc;
const char ** argv; /* must be free()able */
};
</programlisting> <!-- .fi -->
<para>The first two elements, <emphasis remap='I'>longName</emphasis> and <emphasis remap='I'>shortName</emphasis>, specify
the option that is aliased. The final two, <varname role='parameter'>argc</varname> and <varname role='parameter'>argv</varname>,
define the expansion to use when the aliases option is encountered.</para>
</refsect2>
</refsect1>
<refsect1 xml:id='parsing_argument_strings'><title>PARSING ARGUMENT STRINGS</title>
<para>Although popt is usually used for parsing arguments already divided into
an <varname role='parameter'>argv</varname>-style array, some programs need to parse strings that
are formatted identically to command lines. To facilitate this, popt
provides a function that parses a string into an array of strings,
using rules similiar to normal shell parsing.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>#include &lt;popt.h&gt;</emphasis>
<emphasis remap='B'>int poptParseArgvString(char * </emphasis><varname role='parameter'>s</varname><emphasis remap='B'>, int * </emphasis><varname role='parameter'>argcPtr</varname><emphasis remap='B'>,</emphasis>
<emphasis remap='B'> char *** </emphasis><varname role='parameter'>argvPtr</varname><emphasis remap='B'>);</emphasis>
<emphasis remap='B'>int poptDupArgv(int </emphasis><varname role='parameter'>argc</varname><emphasis remap='B'>, const char ** </emphasis><varname role='parameter'>argv</varname><emphasis remap='B'>, int * </emphasis><varname role='parameter'>argcPtr</varname><emphasis remap='B'>,</emphasis>
<emphasis remap='B'> const char *** </emphasis><varname role='parameter'>argvPtr</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>The string s is parsed into an <varname role='parameter'>argv</varname>-style array. The integer
pointed to by the <varname role='parameter'>argcPtr</varname> parameter contains the number of elements
parsed, and the final <varname role='parameter'>argvPtr</varname> parameter contains the address of the
newly created array.
The routine <emphasis remap='B'>poptDupArgv()</emphasis> can be used to make a copy of an existing
argument array.</para>
<para>The <varname role='parameter'>argvPtr</varname>
created by <emphasis remap='B'>poptParseArgvString()</emphasis> or <emphasis remap='B'>poptDupArgv()</emphasis> is suitable to pass directly
to <emphasis remap='B'>poptGetContext()</emphasis>.
Both routines return a single dynamically allocated contiguous
block of storage and should be <function>free()</function>ed when the application is
finished with the storage.</para>
</refsect1>
<refsect1 xml:id='handling_extra_arguments'><title>HANDLING EXTRA ARGUMENTS</title>
<para>Some applications implement the equivalent of option aliasing but need
to do so through special logic. The <emphasis remap='B'>poptStuffArgs()</emphasis> function
allows an application to insert new arguments into the current
<type>poptContext</type>.</para>
<literallayout remap='.nf'>
<emphasis remap='B'>#include &lt;popt.h&gt;</emphasis>
<emphasis remap='B'>int poptStuffArgs(poptContext </emphasis><varname role='parameter'>con</varname><emphasis remap='B'>, const char ** </emphasis><varname role='parameter'>argv</varname><emphasis remap='B'>);</emphasis>
</literallayout> <!-- .fi -->
<para>The passed <varname role='parameter'>argv</varname>
must have a <emphasis remap='B'>NULL</emphasis> pointer as its final element. When
<emphasis remap='B'>poptGetNextOpt()</emphasis> is next called, the
"stuffed" arguments are the first to be parsed. popt returns to the
normal arguments once all the stuffed arguments have been exhausted.</para>
</refsect1>
<refsect1 xml:id='example'><title>EXAMPLE</title>
<para>The following example is a simplified version of the program "robin"
which appears in Chapter 15 of the text cited below. Robin has
been stripped of everything but its argument-parsing logic, slightly
reworked, and renamed "parse." It may prove useful in illustrating
at least some of the features of the extremely rich popt library.</para>
<programlisting remap='.nf'>
#include &lt;popt.h&gt;
#include &lt;stdio.h&gt;
void usage(poptContext optCon, int exitcode, char *error, char *addl) {
poptPrintUsage(optCon, stderr, 0);
if (error) fprintf(stderr, "%s: %s0, error, addl);
exit(exitcode);
}
int main(int argc, char *argv[]) {
char c; /* used for argument parsing */
int i = 0; /* used for tracking options */
char *portname;
int speed = 0; /* used in argument parsing to set speed */
int raw = 0; /* raw mode? */
int j;
char buf[BUFSIZ+1];
poptContext optCon; /* context for parsing command-line options */
struct poptOption optionsTable[] = {
{ "bps", 'b', POPT_ARG_INT, &amp;speed, 0,
"signaling rate in bits-per-second", "BPS" },
{ "crnl", 'c', 0, 0, 'c',
"expand cr characters to cr/lf sequences", NULL },
{ "hwflow", 'h', 0, 0, 'h',
"use hardware (RTS/CTS) flow control", NULL },
{ "noflow", 'n', 0, 0, 'n',
"use no flow control", NULL },
{ "raw", 'r', 0, &amp;raw, 0,
"don't perform any character conversions", NULL },
{ "swflow", 's', 0, 0, 's',
"use software (XON/XOF) flow control", NULL } ,
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
poptSetOtherOptionHelp(optCon, "[OPTIONS]* &lt;port&gt;");
if (argc &lt; 2) {
poptPrintUsage(optCon, stderr, 0);
exit(1);
}
/* Now do options processing, get portname */
while ((c = poptGetNextOpt(optCon)) &gt;= 0) {
switch (c) {
case 'c':
buf[i++] = 'c';
break;
case 'h':
buf[i++] = 'h';
break;
case 's':
buf[i++] = 's';
break;
case 'n':
buf[i++] = 'n';
break;
}
}
portname = poptGetArg(optCon);
if((portname == NULL) || !(poptPeekArg(optCon) == NULL))
usage(optCon, 1, "Specify a single port", ".e.g., /dev/cua0");
if (c &lt; -1) {
/* an error occurred during option processing */
fprintf(stderr, "%s: %s&#92;n",
poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
poptStrerror(c));
return 1;
}
/* Print out options, portname chosen */
printf("Options chosen: ");
for(j = 0; j &lt; i ; j++)
printf("-%c ", buf[j]);
if(raw) printf("-r ");
if(speed) printf("-b %d ", speed);
printf("&#92;nPortname chosen: %s&#92;n", portname);
poptFreeContext(optCon);
exit(0);
}
</programlisting> <!-- .fi -->
<para>RPM, a popular Linux package management program, makes heavy use
of popt's features. Many of its command-line arguments are implemented
through popt aliases, which makes RPM an excellent example of how to
take advantage of the popt library. For more information on RPM, see
http://www.rpm.org. The popt source code distribution includes test
program(s) which use all of the features of the popt libraries in
various ways. If a feature isn't working for you, the popt test code
is the first place to look.</para>
</refsect1>
<refsect1 xml:id='bugs'><title>BUGS</title>
<para>None presently known.</para>
</refsect1>
<refsect1 xml:id='author'><title>AUTHOR</title>
<para>Erik W. Troan &lt;ewt@redhat.com&gt;</para>
<para>This man page is derived in part from
<emphasis remap='I'>Linux Application Development</emphasis>
by Michael K. Johnson and Erik W. Troan, Copyright (c) 1998 by Addison
Wesley Longman, Inc., and included in the popt documentation with the
permission of the Publisher and the appreciation of the Authors.</para>
<para>Thanks to Robert Lynch for his extensive work on this man page.</para>
</refsect1>
<refsect1 xml:id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>getopt</refentrytitle><manvolnum>3</manvolnum></citerefentry></para>
<para><emphasis remap='I'>Linux Application Development</emphasis>, by Michael K. Johnson and
Erik W. Troan (Addison-Wesley, 1998; ISBN 0-201-30821-5), Chapter 24.</para>
<para><emphasis remap='B'>popt.ps</emphasis> is a Postscript version of the above cited book
chapter. It can be found in the source archive for popt available at:
ftp://ftp.rpm.org/pub/rpm.</para>
</refsect1>
</refentry>
@@ -159,6 +159,7 @@ set(docbook_mann_EN
preview.xml
prj_add.xml
ps.xml
pull.xml
push.xml
put_comb.xml
putmat.xml
+1 -1
View File
@@ -58,7 +58,7 @@ mat_ae_vec mat_aet_vec mat_angles mat_arb_rot mat_eigen2x2 mat_fromto mat_inv
mat_lookat mat_mul mat_scale_about_pt mat_trn mat_vec_ortho mat_vec_perp
mat_xform_about_pt mat_xrot mat_yrot mat_zrot quat_mat2quat quat_quat2mat
vo_model2view vo_pmat vo_pmodel2view vo_rmat vo_view2model wdb_attr wdb_bot_decimate
wdb_list wdb_match wdb_nmg_collapse wdb_paths wdb_push wdb_search wdb_showmats
wdb_list wdb_match wdb_nmg_collapse wdb_paths wdb_pull wdb_push wdb_search wdb_showmats
wdb_xpush
</literallayout>
</para>
+2 -2
View File
@@ -185,7 +185,7 @@
<prompt>mged&gt;</prompt> <userinput>tree region1.r</userinput>
region1.r/R
u region2.r/R
u sph.s
u sph.s
u comb.c/
u arb.s
</computeroutput>
@@ -461,7 +461,7 @@ r3/R
<literallayout>
<computeroutput>
<prompt>mged&gt;</prompt> <userinput>comb -l spheres.c</userinput>
<prompt>mged&gt;</prompt> <userinput>comb -l r3</userinput>
Comb region lift failed - the following combs in the tree contain
regions and are also used outside the tree of r3:
+59
View File
@@ -0,0 +1,59 @@
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="pull">
<refmeta>
<refentrytitle>PULL</refentrytitle>
<manvolnum>nged</manvolnum>
<refmiscinfo class="source">BRL-CAD</refmiscinfo>
<refmiscinfo class="manual">BRL-CAD User Commands</refmiscinfo>
</refmeta>
<refnamediv xml:id="name">
<refname>pull</refname>
<refpurpose>Pulls the effects of all transformation matrices that appear in
any combinations or primitives in the trees from the leaves up to the specified <emphasis>objects</emphasis> or node.
</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>pull</command>
<arg choice="opt" rep="norepeat"><replaceable>objects</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection xml:id="description"><title>DESCRIPTION</title>
<para>Pulls the effects of all matrix transformations that appear in
any combinations or primitives in the tree from the leaves up to the specified <emphasis>objects</emphasis>. This will restore the parameters of the <emphasis>primitive shapes</emphasis> if any of the transformation matrices were not identity matrices. All the transformation matrices visited will be set to the current transformation matrix as it moves up the tree. This command will fail, and no changes will be made, if the specified <emphasis>object</emphasis> is a primitive shape referenced by the list of <emphasis>objects</emphasis>.
</para>
</refsection>
<refsection xml:id="examples"><title>EXAMPLES</title>
<para>The example shows the use of the <command>pull</command> command to pull the effects of any transformation matrices from leaves(primitive shapes) of a tree up to the specified head objects.
</para>
<example><title>Pull the effects of any transformation matrices from the leaves(primitive shapes) of the tree up to the specified head nodes(objects).</title>
<para>
<prompt>mged&gt;</prompt><userinput>pull group1 regiona</userinput>
</para>
<para>Pulls the effects of any transformation matrices from the primitive shapes in the tree up to the root nodes specified by <emphasis>group1</emphasis> and <emphasis>regiona</emphasis>.
</para>
</example>
</refsection>
<refsection xml:id="author"><title>AUTHOR</title><para>BRL-CAD Team</para></refsection>
<refsection xml:id="bug_reports"><title>BUG REPORTS</title>
<para>
Reports of bugs or problems should be submitted via electronic
mail to &lt;devs@brlcad.org&gt;, or via the "cadbug.sh" script.
</para>
</refsection>
</refentry>
File diff suppressed because it is too large Load Diff
+12
View File
@@ -364,6 +364,18 @@ its entries will override any color assigned using the <a href="#mater">mater</a
when drawing wireframe.
</DD>
<P>
<DT><I>dbName</I> <A NAME="pull"><B>pull</B></A> &lt;<I>objects</I>&gt</DT>
<DD>Pulls the effects of all transformation
matrices that appear in the
<a href="../mged/brlcad_glossary.html#SOLID">primitive solids</a> in the trees
to the specified <I>objects</I> head up the tree. This will restore
the parameters of the <I>primitive solids</I> if any of the
transformation matrices are present. All the transformation
matrices visited will correspond to the current matrix transformation for that node. This command will fail,
and no changes will be made, if any <I>primitive solid</I> referenced as
the list of <I>objects</I>.
</DD>
<P>
<DT><I>dbName</I> <A NAME="push"><B>push</B></A> &lt;<I>objects</I>&gt</DT>
<DD>Force the effects of all transformation
matrices that appear in any
+13
View File
@@ -331,6 +331,8 @@
<TD WIDTH="19%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#ps"><FONT SIZE=2>ps</FONT></A></TD>
<TD WIDTH="20%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#pull"><FONT SIZE=2>pull</FONT></A></TD>
<TD WIDTH="21%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#push"><FONT SIZE=2>push</FONT></A></TD>
<TD WIDTH="22%" VALIGN="MIDDLE">
<FONT SIZE=2><P></FONT><A HREF="#putmat"><FONT SIZE=2>putmat</FONT></A></TD>
@@ -2516,6 +2518,17 @@ foo.r_xpand/R
</FONT><TT>mged&gt;</TT><FONT SIZE=2> <B>ps -l 10 -t "Test Fat Lines" fat_lines.ps</B> <BR>
-- This time use fat lines. </P></DIR>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="pull"></A>pull</B> &lt;<I>objects</I>&gt;</DT>
<DD>The &quot;pull&quot; command pulls the effects of all transformation matrices that appear in any <A HREF="#SOLID">primitive shapes</A> or <A HREF="#COMBINATION">combinations</A> in the trees up to the specified <I>objects</I> heading the tree. This will restore the original the parameters of the <I>primitive shapes</I> if any of the transformation matrices are not identity matrices. All the transformation matrices visited up the tree will be set to the current transformation matrix. This command will fail, and no changes will be made, if the head is referenced by a <I>primitive shape</I>.</DD>
<FONT SIZE=4><DT>Examples:</DT>
</FONT><TT><DD>mged&gt;</TT> <B>pull group1 regiona</DD>
</DL><DIR>
</B><FONT SIZE=2><P>-- Pull the effects of any transformation matrices from the <I>primitive shapes.</I> in the trees up to the heads indicated by <I>group1</I> and <I>regiona</I> </P>
</DIR>
<P><HR ALIGN="RIGHT"></P>
</FONT><B><DL>
<DT><A NAME="push"></A>push</B> &lt;<I>objects</I>&gt;</DT>
+396
View File
@@ -0,0 +1,396 @@
Arbitrary Regular Polyhedron with up to 8 vertices : arb8 {
point p1
point p2
point p3
point p4
point p5
point p6
point p7
point p8
p1 != p2 && p2 != p3 && p3 != p4 && p4 != p5 && p5 != p6 && p6 != p7 && p7 != p8
}
Bounding Box (ARB8) : box {
point V => corner vertex
vector H => height vector
vector W => width vector
vector D => depth vector
magnitude(H) > 0.0
magnitude(W) > 0.0
magnitude(D) > 0.0
perpendicular(H, W) && perpendicular(W, D) && perpendicular(H, D)
}
Right Parallelepiped (ARB8) : rpp {
point min
point max
distance(min, max) > 0.0
}
Arbitrary Regular Polyhedron with N faces : arbn {
integer n => number of planes
array planes {
plane p => plane equation
}
for i in planes { magnitude(planes[i].p) > 0.0 }
}
Arbitrary Faceted Solid : ars {
integer p => number of points per waterline
integer w => number of waterlines
array points {
point V => vertex position
}
p > 0
w > 0
}
Bag of Triangles : bot {
integer c => number of vertices
integer t => number of triangles
enum orientation {unoriented, counter-clockwise, clockwise} => triangle orientation
point V => vertex position
enum facemode {center, appended}
float t => face thickness
c > 0 && 3 mod c == 0
t > 0
!(t < 0.0)
}
Boundary Representation NURBS : brep
FASTGEN CLINE Cylinder : cline
Displacement Map : dsp {
enum source {file, object} => data source
string name => name of the data source
float w => map width
float n => map height
boolean interpolate => surface normal interpolation
float s => square cell size
float e => cell height
w > 0.0
n > 0.0
s > 0.0
e > 0.0
(source==file && file_exists(name)) || (source==object && object_exists(name))
}
Extruded Bitmap : ebm {
string name => name of the data source
float w => width of bitmap
float n => height of bitmap
float d => extrusion distance
file_exists(name)
w > 0.0
n > 0.0
d > 0.0
}
Elliptical Hyperboloid : ehy
point V => vertex
vector H => height vector
vector A => ellipse base width vector
float b => magnitude of ellipse base depth vector
float c => apex to asymptotes distance
magnitude(H) > 0.0
magnitude(A) > 0.0
perpendicular(H, A)
b > 0.0
c > 0.0
}
Ellipsoid : ell {
point V => vertex point
vector A
vector B
vector C
perpendicular(A, B)
perpendicular(B, C)
}
Elliptical Paraboloid : epa {
point V => vertex
vector H => height vector
vector A => ellipse base width vector
float b => magnitude of ellipse base depth vector
magnitude(H) > 0.0
magnitude(A) > 0.0
perpendicular(H, A)
b > 0.0
}
Elliptical Torus : eto {
point V => center point
vector H => normal height vector
float r => radius of revolution
vector C => perpendicular ellipse orientation
float d => magnitude of elliptical semi-minor axis
magnitude(H) > 0.0
r > 0.0
d > 0.0
}
Solid of Extrusion : extrude {
point V => vertex position
vector H => height vector
vector A => sketch plane primary vector
vector B => sketch plane secondary vector
string name => name of the sketch object
magnitude(H) > 0.0
magnitude(A) > 0.0
magnitude(B) > 0.0
object_exists(name)
}
Pseudo Solid Grip : grip {
point V => vertex point
vector H => height vector
float m => magnitude
magnitude(H) > 0.0
m > 0.0
}
Halfspace : half {
vector H => outward pointing normal vector
float d => distance from the origin
magnitude(H) > 0.0
}
Hyperboloid of One Sheet : hyp {
point V => center vertex
vector H => height vector
vector A => ellipse base vector
float b => magnitude of ellipse base depth vector
float c => neck to base ratio
magnitude(H) > 0.0
magnitude(A) > 0.0
perpendicular(H, A)
b > 0.0
c > 0.0
!(c > 1.0)
}
Metaball : metaball {
enum method {0, 1, 2} => render method
float t => threshold
integer c => number of points
array points {
vector F => field strength vector
float f => field strength
}
t > 0.0
c > 0
for i in points { magnitude(points[i].F) > 0.0 && points[i].f > 0.0 }
}
n-Manifold Geometry : nmg
Particle System : part {
point V => center point
vector H => height vector
float rV => V end radius
float rH => H end radius
magnitude(H) > 0.0
rV > 0.0
rH > 0.0
!(rV + rH > magnitude(H))
}
Pipe (wire) Solid : pipe {
integer n => number of pipe points
array points {
point V => vertex point
float i => inner diameter
float o => outer diameter
float r => bend radius
}
n > 1
for i in points { points[i].o > 0.0 && points[i].i < points[i].o && !(points[i].r < 0.0) }
// Bend section bends through more than 180 degrees
for i in points { acos(vdot(points[i].V, points[i+1].V)) > 0.0 }
}
Point Cloud : pnts {
boolean file => points stored in a file
integer n => number of points
boolean oriented => points have orientation
boolean color => points have color
boolean size => points have size
array points {
point V => point position
vector N => point normal vector
integer C[3] => point color
float s => point size
}
string pathname => name to source file data
enum format { px, py, pz, cr, cg, cb, s, nx, ny, nz }
enum units { mm, cm, m, in, ft }
for i in points { oriented && magnitude(points[i].N) > 0.0 }
for i in points { color && !(points[i].C[R] < 0 || points[i].C[R] > 255) && !(points[i].C[G] < 0 && points[i].C[G] > 255) && !(points[i].C[B] < 0 && points[i].C[B] > 255) }
for i in points { size && !(points[i].s < 0.0) }
file_exists(pathname)
}
Right Elliptical Cylinder (TGC) : rec {
point V => base center point
vector H => height vector
vector A => base ellipse primary axis
vector B => base ellipse secondary axis
magnitude(H) > 0.0
magnitude(A) > 0.0
magnitude(B) > 0.0
perpendicular(H, A) && perpendicular(H, B) && perpendicular(A, B)
}
Right Circular Cylinder (TGC) : rcc {
point V => base center point
vector H => height vector
float r => cylinder radius
magnitude(H) > 0.0
r > 0
}
Tapered Elliptical Cone (TGC) : tec {
point V => base center point
vector H => height vector
vector A => base ellipse primary axis
vector B => base ellipse secondary axis
float r => ratio of base to top ellipse
magnitude(H) > 0.0
magnitude(A) > 0.0
magnitude(B) > 0.0
perpendicular(H, A) && perpendicular(H, B) && perpendicular(A, B)
r > 0.0 || r < 0.0
}
Tapered Right Cone (TGC) : trc {
point V => base center point
vector H => height vector
float b => radius of base
float t => radius of top
magnitude(H) > 0.0
b > 0.0
t > 0.0
}
Solid of Revolution : revolve {
point V => vertex position
vector R => axis of revolution
vector S => vector in start plane
float a => angle
string name => name of 2D sketch
magnitude(R) > 0.0
magnitude(S) > 0.0
a > 0.0
object_exists(name)
}
Right Hyperbolic Cone : rhc {
point V => vertex
vector H => height vector
vector B => width vector
float r => rectangular half-width
float c => apex to asymptotes distance
magnitude(H) > 0.0
magnitude(B) > 0.0
perpendicular(H, B)
r > 0.0
c > 0.0
!(magnitude(B) < c)
}
Right Parabolic Cone : rpc {
point V => vertex
vector H => height vector
vector B => width vector
float r => rectangular half-width
magnitude(H) > 0.0
magnitude(B) > 0.0
perpendicular(H, B)
r > 0.0
}
2D Sketch : sketch {
}
Sphere (ELL) : sph {
point V => vertex point
float r => radius
r > 0.0
}
Superquadratic Ellipsoid : superell {
point V => center vertex point
vector A => height vector
vector B => width vector
vector C => depth vector
float n => north-south power
float e => east-west power
magnitude(A) > 0.0
magnitude(B) > 0.0
magnitude(C) > 0.0
n > 0.0
e > 0.0
}
Generalized Truncated General Cone : tgc {
point V => base center point
vector H => height vector
vector A => base ellipse primary axis
vector B => base ellipse secondary axis
float c => ratio of base A vector to top ellipse
float d => ratio of base B vector to top ellipse
magnitude(H) > 0.0
magnitude(A) > 0.0
magnitude(B) > 0.0
perpendicular(A, B)
c > 0.0
d > 0.0
}
Torus : tor {
point V => center point
vector H => normal height vector
float r1 => outer radius from V to centerline
float r2 => inner radius in direction of H
r1 > 0.0
r2 > 0.0
!(r1 < r2)
magnitude(H) > 0.0
}
3D Volume : vol {
string name => name of data source file
integer f[3] => dimensions of file (number of cells)
float l => lower threshold value
float u => upper threshold value
vector c => cell dimensions (width, height, depth)
file_exists(name)
f[X] > 0 && f[Y] > 0 && f[Z] > 0
c[X] > 0.0 && c[Y] > 0.0 && c[Z] > 0.0
l > 0.0
u > 0.0
u > l
}
DEPRECATED:
// Bezier Spline : bspline
// Height Field : hf
// Polygonal Facets : poly
// Instanced Submodel : submodel
NON-PARAMETRIC:
Uniform Binary Array : binunif {
enum type {f, d, c, s, i, L, C, S, I, L} => minor type
string name => source data file
integer n => number of values to read
file_exists(name)
n > 0 || n == -1
}
// joint
// combination
// constraint
// annotation
+13 -1
View File
@@ -873,7 +873,6 @@ private:
BRNode* initialLoopBBox();
const ON_BrepFace* m_face;
int m_adj_face_index;
BRNode* m_root;
std::list<BRNode*> m_sortedX;
std::list<BRNode*> m_sortedY;
@@ -2286,6 +2285,19 @@ ON_Boolean(ON_Brep* brepO, const ON_Brep* brepA, const ON_Brep* brepB, op_type o
extern BREP_EXPORT ON_Curve*
sub_curve(const ON_Curve* in, double a, double b);
/**
* Get the sub-surface whose u \in [a,b] or v \in [a, b]
*
* @param in [in] the surface to split
* @param dir [in] 0: u-split, 1: v-split
* @param a, b [in] either of them can be the larger one
*
* @return the result sub-surface. NULL for error.
*/
extern BREP_EXPORT ON_Surface*
sub_surface(const ON_Surface* in, int dir, double a, double b);
} /* extern C++ */
#endif
+31 -34
View File
@@ -1678,9 +1678,9 @@ typedef struct bu_hist bu_hist_t;
* dynamic array.
*
* The table is currently un-ordered, and is merely an array of
* pointers. The support routine nmg_tbl manipulates the array for
* you. Pointers to be operated on (inserted, deleted, searched for)
* are passed as a "pointer to long".
* pointers. The support routines BU_*PTBL* and bu_ptbl* manipulate the
* array for you. Pointers to be operated on (inserted, deleted, searched
* for) are passed as a "pointer to long".
*
*/
@@ -1690,15 +1690,15 @@ typedef struct bu_hist bu_hist_t;
*/
struct bu_ptbl {
struct bu_list l; /**< linked list for caller's use */
off_t end; /**< index into buffer of first available location */
size_t blen; /**< # of (long *)'s worth of storage at *buffer */
long **buffer; /**< data storage area */
off_t end; /**< index into buffer of first available location */
size_t blen; /**< # of (long *)'s worth of storage at *buffer */
long **buffer; /**< data storage area */
};
typedef struct bu_ptbl bu_ptbl_t;
#define BU_PTBL_NULL ((struct bu_ptbl *)0)
/**
* assert the integrity of a non-head node bu_ptbl struct.
* assert the integrity of a bu_ptbl struct pointer.
*/
#define BU_CK_PTBL(_p) BU_CKMAG(_p, BU_PTBL_MAGIC, "bu_ptbl")
@@ -2651,17 +2651,6 @@ typedef struct bu_observer bu_observer_t;
#define BU_OBSERVER_IS_INITIALIZED(_op) (((struct bu_observer *)(_op) != BU_OBSERVER_NULL) && LIKELY((_op)->magic == BU_OBSERVER_MAGIC))
/**
* DEPRECATED.
*
* Usage not recommended due to k&r callback (provides no type
* checking)
*/
struct bu_cmdtab {
char *ct_name;
int (*ct_func)(void *data, int argc, const char *argv[]);
};
/**@}*/
@@ -3179,7 +3168,7 @@ BU_EXPORT extern char * bu_realpath(const char *path, char *resolved_path);
* routine will set argv0 if path is provided and should generally be
* set early on by bu_setprogname().
*
* this routine will return "(unknown)" if argv[0] cannot be
* this routine will return "(BRL-CAD)" if argv[0] cannot be
* identified but should never return NULL.
*/
DEPRECATED BU_EXPORT extern const char *bu_argv0(void);
@@ -3191,29 +3180,36 @@ DEPRECATED BU_EXPORT extern const char *bu_argv0(void);
* returns the full path to argv0, regardless of how the application
* was invoked.
*
* this routine will return "(unknown)" if argv[0] cannot be
* identified but should never return NULL.
*
* this routine will return "(BRL-CAD)" if argv[0] cannot be
* identified but should never return NULL. this routine is not
* thread-safe.
*/
BU_EXPORT extern const char *bu_argv0_full_path(void);
/**
* get the name of the running application if they ran
* bu_setprogname() first or if we know what it's supposed to be
* anyways.
* Get the name of the running application. application codes should
* call bu_setprogname() first to ensure that the program name is
* stored appropriately on platforms that do not have an intrinsic
* method for tracking the program name automatically.
*
* while this routine is thread-safe and reentrant, the static string
* returned is shared amongst all threads.
*/
BU_EXPORT extern const char *bu_getprogname(void);
/**
* Set the name of the running application. This isn't necessary on
* modern systems that support getprogname() and call setprogname()
* before main() for you, but necessary otherwise for portability.
* Set the name of the running application. This isn't strictly
* necessary on platforms that have an intrinsic method for tracking
* the program name automatically, but is still recommended for
* portability and is necessary on some strict modes of compilation.
*
* while the implementation relies on a static string shared across
* all threads, this routine is thread-safe and reentrant.
*/
BU_EXPORT extern void bu_setprogname(const char *path);
/**
* returns the pathname for the current working directory.
*
*/
BU_EXPORT extern char *bu_getcwd(char *buf, size_t size);
@@ -6238,12 +6234,13 @@ BU_EXPORT extern off_t bu_ftell(FILE *stream);
*/
BU_EXPORT extern int bu_str_isprint(const char *cp);
/** @file libbu/gethostname.c
*
* Portable gethostname()
*
/**
* Get the current operating host's name. This is usually also the
* network name of the current host. The name is written into the
* provided hostname buffer of at least len size. The hostname is
* always null-terminated and should be sized accordingly.
*/
BU_EXPORT extern int bu_gethostname(char *, size_t);
BU_EXPORT extern int bu_gethostname(char *hostname, size_t len);
__END_DECLS
+10
View File
@@ -55,6 +55,16 @@
#define BU_CMD_NULL (int (*)(void *, int, const char **))NULL
/**
* Generic keyword-to-command callback interface intended for use with
* bu_cmd().
*/
struct bu_cmdtab {
const char *ct_name;
int (*ct_func)(void *data, int argc, const char *argv[]);
};
struct bu_cmdhist {
struct bu_list l;
struct bu_vls h_command;
+4
View File
@@ -26,6 +26,8 @@
#define __DM_NULL__
#include "dm.h"
__BEGIN_DECLS
DM_EXPORT extern struct dm dm_null;
@@ -180,6 +182,8 @@ null_makeCurrent(struct dm *dmp);
DM_EXPORT extern void
null_processEvents(struct dm *dmp);
__END_DECLS
#endif /* __DM_NULL__ */
/** @} */
+2
View File
@@ -39,6 +39,7 @@ class QTkMainWindow: public QWindow {
public:
QTkMainWindow(QPixmap *p, QWindow *parent = 0, struct dm *d = NULL);
~QTkMainWindow();
virtual void render(QPainter *painter);
public slots:
@@ -60,6 +61,7 @@ private:
struct qt_vars {
QApplication *qapp;
QWindow *parent;
QTkMainWindow *win;
QColor fg, bg;
QPixmap *pix;
+1 -2
View File
@@ -256,7 +256,6 @@ struct dm {
int (*dm_getDisplayImage)(struct dm *dmp, unsigned char **image);
void (*dm_reshape)(struct dm *dmp, int width, int height);
int (*dm_makeCurrent)(struct dm *dmp);
void (*dm_processEvents)(struct dm *dmp);
unsigned long dm_id; /**< @brief window id */
int dm_displaylist; /**< @brief !0 means device has displaylist */
int dm_stereo; /**< @brief stereo flag */
@@ -329,7 +328,6 @@ struct dm {
#define DM_GEN_DLISTS(_dmp, _range) _dmp->dm_genDLists(_dmp, _range)
#define DM_GET_DISPLAY_IMAGE(_dmp, _image) _dmp->dm_getDisplayImage(_dmp, _image)
#define DM_MAKE_CURRENT(_dmp) _dmp->dm_makeCurrent(_dmp)
#define DM_PROCESS_EVENTS(_dmp) _dmp->dm_processEvents(_dmp)
__BEGIN_DECLS
@@ -422,6 +420,7 @@ DM_EXPORT extern void dm_draw_scale(struct dm *dmp,
/* vers.c */
DM_EXPORT extern const char *dm_version(void);
__END_DECLS
+5
View File
@@ -930,6 +930,11 @@ GED_EXPORT extern int ged_comb_std(struct ged *gedp, int argc, const char *argv[
*/
GED_EXPORT extern int ged_combmem(struct ged *gedp, int argc, const char *argv[]);
/**
* create, update, remove, and list geometric and dimensional constraints.
*/
GED_EXPORT extern int ged_constraint(struct ged *gedp, int argc, const char *argv[]);
/**
* Import a database into the current database using an auto-incrementing or custom affix
*/
+134 -53
View File
@@ -40,26 +40,9 @@ __BEGIN_DECLS
# endif
#endif
/**
* I C V _ R O T
*
* Rotate an image.
* %s [-rifb | -a angle] [-# bytes] [-s squaresize] [-w width] [-n height] [-o outputfile] inputfile [> outputfile]
*
*/
ICV_EXPORT extern int icv_rot(int argv, char **argc);
/** @addtogroup image */
/** @ingroup data */
/** @{ */
/** @file libicv/fileformat.c
*
* image read/write routines
*
* read/write images in a variety of formats.
*
*/
typedef enum {
ICV_IMAGE_AUTO,
@@ -130,19 +113,39 @@ typedef struct icv_image icv_image_t;
*/
#define ICV_IMAGE_IS_INITIALIZED(_i) (((struct icv_image *)(_i) != ICV_IMAGE_NULL) && LIKELY((_i)->magic == ICV_IMAGE_MAGIC))
/* Validation Macros */
/**
* Validates input icv_struct, if failure (in validation) returns -1
*/
#define ICV_IMAGE_VAL_INT(_i) if (!ICV_IMAGE_IS_INITIALIZED(_i)) return -1
/**
* Validates input icv_struct, if failure (in validation) returns NULL
*/
#define ICV_IMAGE_VAL_PTR(_i) if (!ICV_IMAGE_IS_INITIALIZED(_i)) return NULL
/* Data conversion MACROS */
/**
* Converts to double (icv data) type from unsigned char(8bit).
*/
#define ICV_CONV_8BIT(data) ((double)(data))/255.0
/** @file libicv/fileformat.c
*
* image read/write routines
*
* read/write images in a variety of formats.
*
*/
/**
* Finds the Image format based on heuristics depending on the file
* name. @param filename Filename of the image whose format is to be
* know. @param trimmedname Buffer for storing filename after
* removing extensions @return File Format
* name.
* @param filename Filename of the image whose format is to be know
* @param trimmedname Buffer for storing filename after removing
* extensions
* @return File Format
*/
ICV_EXPORT extern int icv_guess_file_format(const char *filename, char *trimmedname);
@@ -174,7 +177,8 @@ ICV_EXPORT extern icv_image_t *icv_create(int width, int height, ICV_COLOR_SPACE
ICV_EXPORT int icv_writeline(icv_image_t *bif, int y, void *data, ICV_DATA type);
/**
* Writes a pixel to the specified coordinates in the data of ICV struct.
* Writes a pixel to the specified coordinates in the data of ICV
* struct.
*
* @param bif ICV struct where data is to be written
* @param x x-dir coordinate of the pixel
@@ -199,14 +203,10 @@ ICV_EXPORT extern int icv_write(icv_image_t *bif, const char*filename, ICV_IMAGE
/**
* Load a file into an ICV struct. For most formats, this will be
* called with format=ICV_IMAGE_AUTO, hint_format=0, hint_width=0,
* hint_height=0 and hint_depth=0 for default values. At the moment,
* the data is packed into the data field as rgb24 (raw pix style).
* called with format=ICV_IMAGE_AUTO.
*
* For pix and bw files, having width and height set to 0 will trigger
* a heuristic sizing algorithm based on file size, assuming that the
* image is square at first, then looking through a set of common
* sizes, finally assuming 512x512.
* The data is packed in icv_image struct in double format with varied
* channels as per the specification of image to be loaded.
*
* To read stream from stdin pass NULL pointer for filename.
*
@@ -216,7 +216,6 @@ ICV_EXPORT extern int icv_write(icv_image_t *bif, const char*filename, ICV_IMAGE
* size = total bytes read
*
* @param filename File to read
* @param hint_format Probable format of the file, typically
* ICV_IMAGE_AUTO
* @param hint_width Width when passed as parameter from calling
@@ -237,7 +236,7 @@ ICV_EXPORT extern icv_image_t *icv_zero(icv_image_t *bif);
* This function frees the allocated memory for a ICV Structure and
* data.
*/
ICV_EXPORT extern void icv_destroy(icv_image_t *bif);
ICV_EXPORT extern int icv_destroy(icv_image_t *bif);
/** @file libicv/color_space.c
*
@@ -277,12 +276,12 @@ typedef enum {
#define icv_rgb2gray_crt(_a) icv_rgb2gray(_a, ICV_COLOR_RGB, 0.26, 0.66, 0.08)
/**
* converts a three plane image to single plane image. This function
* will combine or select planes of the image based on the input
* arguments
* converts a three channel rgb image to single channel gray-image.
* This function will combine or select planes of the image based on
* the input arguments.
*
* A normal calling of this functions is as follows:
* icv_image_rgb2gray(bif, 0 ,0 ,0 ,0 ,0); where bif is the rgb image
* icv_image_rgb2gray(bif, 0, 0, 0, 0); where bif is the rgb image
* to be converted.
*
* @param color Chooses color planes to be selected for combination.
@@ -371,11 +370,11 @@ ICV_EXPORT extern int icv_crop(icv_image_t *img,
* All the pixels higher than the max range are set to MAX (1.0).
* All the pixels lower than the min range are set to MIN (0.0).
*
* Note if an image(bif) is sanitized then, (bif->flags&&ICV_SANITIZED)
* is true.
* Note if an image(bif) is sanitized then,
* (bif->flags&&ICV_SANITIZED) is true.
*
*/
ICV_EXPORT void icv_sanitize(icv_image_t* img);
ICV_EXPORT int icv_sanitize(icv_image_t* img);
/**
* This adds a constant value to all the pixels of the image. Also if
@@ -384,29 +383,30 @@ ICV_EXPORT void icv_sanitize(icv_image_t* img);
*
* Note to set the flag for a bif (icv_image struct);
* bif->flags |= ICV_OPERATIONS_MODE;
*
*/
ICV_EXPORT void icv_add_val(icv_image_t* img, double val);
ICV_EXPORT int icv_add_val(icv_image_t* img, double val);
/**
* This multiplies all the pixels of the image with a constant Value.
* Also if the flag ICV_OPERATIONS_MODE is set this doesn't sanitize
* the image.
*/
ICV_EXPORT void icv_multiply_val(icv_image_t* img, double val);
ICV_EXPORT int icv_multiply_val(icv_image_t* img, double val);
/**
* This divides all the pixels of the image with a constant Value.
* Also if the flag ICV_OPERATIONS_MODE is set this doesn't sanitize
* the image.
*/
ICV_EXPORT void icv_divide_val(icv_image_t* img, double val);
ICV_EXPORT int icv_divide_val(icv_image_t* img, double val);
/**
* This raises all the pixels of the image to a constant exponential
* power. Also if the flag ICV_OPERATIONS_MODE is set this doesn't
* sanitize the image.
*/
ICV_EXPORT void icv_pow_val(icv_image_t* img, double val);
ICV_EXPORT int icv_pow_val(icv_image_t* img, double val);
/**
* This routine adds pixel value of one image to pixel value of other
@@ -422,6 +422,11 @@ ICV_EXPORT icv_image_t *icv_add(icv_image_t *img1, icv_image_t *img2);
* image.
*
* Also it sanitizes the image.
*
* @param img1 First Image.
* @param img2 Second Image.
* @return New icv_image (img1 - img2)
*
*/
ICV_EXPORT icv_image_t *icv_sub(icv_image_t *img1, icv_image_t *img2);
@@ -431,6 +436,11 @@ ICV_EXPORT icv_image_t *icv_sub(icv_image_t *img1, icv_image_t *img2);
* image.
*
* Also it sanitizes the image.
*
* @param img1 First Image.
* @param img2 Second Image.
* @return New icv_image (img1 * img2)
*
*/
ICV_EXPORT icv_image_t *icv_multiply(icv_image_t *img1, icv_image_t *img2);
@@ -440,8 +450,13 @@ ICV_EXPORT icv_image_t *icv_multiply(icv_image_t *img1, icv_image_t *img2);
* image.
*
* Also it sanitizes the image.
*
* @param img1 First Image.
* @param img2 Second Image.
* @return New icv_image (img1 / img2)
*
*/
ICV_EXPORT icv_image_t *icv_divides(icv_image_t *img1, icv_image_t *img2);
ICV_EXPORT icv_image_t *icv_divide(icv_image_t *img1, icv_image_t *img2);
/**
* Change the saturation of image pixels. If sat is set to 0.0 the
@@ -471,14 +486,16 @@ typedef enum {
ICV_FILTER_VERTICAL_GRAD,
ICV_FILTER_HIGH_PASS,
ICV_FILTER_NULL,
ICV_FILTER_BOXCAR_AVERAGE,
ICV_FILTER_3_LOW_PASS,
ICV_FILTER_3_HIGH_PASS,
ICV_FILTER_3_BOXCAR_AVERAGE,
ICV_FILTER_3_ANIMATION_SMEAR,
ICV_FILTER_3_NULL
ICV_FILTER_BOXCAR_AVERAGE
} ICV_FILTER;
typedef enum {
ICV_FILTER3_LOW_PASS,
ICV_FILTER3_HIGH_PASS,
ICV_FILTER3_BOXCAR_AVERAGE,
ICV_FILTER3_ANIMATION_SMEAR,
ICV_FILTER3_NULL
} ICV_FILTER3;
/**
* Filters an image with the specified filter type. Basically
@@ -497,13 +514,14 @@ ICV_EXPORT extern int icv_filter(icv_image_t *img, ICV_FILTER filter_type);
* zero_padding for outbound pixels. Finds the resultant pixel with
* the help of neighbouring pixels in all the three images.
*
*
* @return Resultant image.
*
*/
ICV_EXPORT extern icv_image_t *icv_filter3(icv_image_t *old_img,
icv_image_t *curr_img,
icv_image_t *new_img,
ICV_FILTER filter_type);
ICV_FILTER3 filter_type);
/**
@@ -588,16 +606,63 @@ ICV_EXPORT double *icv_sum(icv_image_t* img);
*/
ICV_EXPORT double *icv_max(icv_image_t* img);
/**
* Calculates mode of the values of each channel.
* Mode value are calculated for quantified data which is sent as
* bins(histogram Information). For any image mode is a 'c' length
* array where c is the number of channels.
*
* To calculate the mode of an icv_image, a default call is as follows
* icv_mode(img, icv_hist(img, n_bins), n_bins);
*
* This call first calculates the histogram of the image. then finds
* the mode values from histogram of each channel.
*
*/
ICV_EXPORT int *icv_mode(icv_image_t* img, size_t** bins, int n_bins);
/**
* Calculates median of the values of each channel.
* Median value are calculated for quantified data which is sent as
* bins(histogram information). For any image mode is a 'c' length
* array, where c is the number of channels.
*
* To calculate the median of an icv_image, a default call is as
* follows :
* icv_median(img, icv_hist(img, n_bins), n_bins);
*
* This call first calculates the histogram of the image. then finds
* the mode values from histogram of each channel.
*
*/
ICV_EXPORT int *icv_median(icv_image_t* img, size_t** bins, int n_bins);
/**
* Calculates the skewness in data.
*
* To calculate the skewness in an icv_image, a default call is as
* follows :
* icv_skew(img, icv_hist(img, n_bins), n_bins);
*
* @return c length double array where c is the number of channels in
* the img
*/
ICV_EXPORT double *icv_skew(icv_image_t* img, size_t** bins, int n_bins);
/**
* Calculates the variance in data.
*
* To calculate the variance in an icv_image, a default call is as
* follows :
* icv_variance(img, icv_hist(img, n_bins), n_bins);
*
* @return c length double array where c is the number of channels in
* the img
*/
ICV_EXPORT double *icv_var(icv_image_t* img, size_t** bins, int n_bins);
/** @file decimate.c
/** @file size.c
*
* This file contains routines to scale down an image to a lower
* resolution or scale up an image to an higher Resolution.
@@ -633,14 +698,30 @@ typedef enum {
* e.g. icv_resize(bif, ICV_RESIZE_BINTERP,1024,1024,0);
* interpolates the output image to have the size of 1024X1024.
*
* resizes the image inplace.
*
* @param bif Image (packed in icv_image struct)
* @param method One of the modes.
* @param out_width Out Width.
* @param out_height Out Height.
* @param factor Integer type data representing the factor to be
* shrunken
* @return 0 on success and -1 on failure.
*/
ICV_EXPORT int icv_resize(icv_image_t *bif, ICV_RESIZE_METHOD method, unsigned int out_width, unsigned int out_height, unsigned int factor);
/** @} */
/* end image utilities */
/**
* I C V _ R O T
*
* Rotate an image.
* %s [-rifb | -a angle] [-# bytes] [-s squaresize] [-w width] [-n height] [-o outputfile] inputfile [> outputfile]
*
*/
ICV_EXPORT extern int icv_rot(int argv, char **argc);
__END_DECLS
#endif /* __ICV_H__ */
+222 -112
View File
@@ -2028,6 +2028,86 @@ struct rt_view_info {
fastf_t curve_spacing;
};
/**
* R T _ S E L E C T I O N
*
* Specifies a subset of a primitive's geometry as the target for
* an operation.
*
* TODO: This structure is tentative and subject to change or removal
* without notice.
*/
struct rt_selection {
void *s; /**< @brief primitive-specific selection object */
};
/**
* R T _ S E L E C T I O N _ L I S T
*
* TODO: This structure is tentative and subject to change or removal
* without notice.
*/
struct rt_selection_list {
struct bu_list l;
struct rt_selection *obj;
};
/**
* R T _ S E L E C T I O N _ Q U E R Y
*
* Analogous to a database query. Specifies how to filter and sort
* the selectable components of a primitive in order to find the most
* relevant selections for a particular application.
*
* TODO: This structure is tentative and subject to change or removal
* without notice.
*/
struct rt_selection_query {
point_t start; /**< @brief start point of query ray */
vect_t dir; /**< @brief direction of query ray */
/** Comparison function to specify a sort order for matching
* selections. Should return <0 if the first selection should come
* before the second selection, >0 if the second selection should
* come before the first selection, and 0 otherwise.
*
* If cmp is NULL, selections are sorted by proximity to the start
* point of the query ray.
*/
int (*cmp)(const struct rt_selection *, const struct rt_selection *);
};
/**
* R T _ S E L E C T I O N _ T R A N S L A T I O N
*
* Paramters of a translation applied to a selection.
*
* TODO: This structure is tentative and subject to change or removal
* without notice.
*/
struct rt_selection_translation {
fastf_t dx;
fastf_t dy;
fastf_t dz;
};
/**
* R T _ S E L E C T I O N _ O P E R A T I O N
*
* Describes an operation that can be applied to a selection.
*
* TODO: This structure is tentative and subject to change or removal
* without notice.
*/
struct rt_selection_operation {
#define RT_SELECTION_NOP 0
#define RT_SELECTION_TRANSLATION 1
int type;
union {
struct rt_selection_translation tran;
} parameters;
};
/**
* R T _ F U N C T A B
*
@@ -2155,7 +2235,20 @@ struct rt_functab {
int (*ft_oriented_bbox)(struct rt_arb_internal * /* bounding arb8 */,
struct rt_db_internal * /*ip*/,
const fastf_t);
/** get a list of the selections matching a query */
struct rt_selection_list *(*ft_find_selections)(const struct rt_db_internal *,
const struct rt_selection_query *);
/** evaluate a logical selection expression (e.g. a INTERSECT b,
* NOT a) to create a new selection
*/
struct rt_selection *(*ft_evaluate_selection)(const struct rt_db_internal *,
int op,
const struct rt_selection *,
const struct rt_selection *);
/** apply an operation to a selected subset of a primitive */
int (*ft_process_selection)(struct rt_db_internal *,
const struct rt_selection *,
const struct rt_selection_operation *);
};
@@ -3657,112 +3750,56 @@ RT_EXPORT extern int db_full_path_match_top(const struct db_full_path *a,
RT_EXPORT extern int db_full_path_search(const struct db_full_path *a,
const struct directory *dp);
/**
* search the database using a supplied list of filter criteria.
* db_search_full_paths returns a bu_list of db_full_path structs to
* instances of objects matching the filter criteria. Note that this is
* a full path tree search of the entire database, not just the toplevel
* objects that would be reported by the ls command. E.g., a
* database with the following objects:
*
* r1 r2
* | |
* s1 s1
*
* would, if searched from the top level for s1, return both
*
* /r1/s1
*
* and
*
* /r2/s1
*
* instead of just s1. To iterate over the results, see examples of
* iterating over bu_list structures. (Bear in mind the db_full_path
* structures in the list are individually malloced.)
*
* To return only unique objects, use
* db_search_unique_objects, which would return just
*
* s1
*
* in the above example. db_search_unique_objects returns a bu_ptbl of
* (struct directory *) pointers. To iterate over this list use
* BU_PTBL_LEN to get the size of the table and BU_PTBL_GET in a for
* loop to access each element.
*
*/
/* search.c */
/* DEPRECATED - db_full_path_list structure is replaced by
* bu_ptbl and char ** arrays in new search functionality*/
struct db_full_path_list {
struct bu_list l;
struct db_full_path *path;
int local;
};
/**
* Add an object to the db_full_path_list based on its database object name
*/
RT_EXPORT extern int db_full_path_list_add(const char *path, int local, struct db_i *dbip, struct db_full_path_list *path_list);
/**
* Free all entries and the list of a db_full_path_list
*/
RT_EXPORT extern void db_free_full_path_list(struct db_full_path_list *path_list);
/**
* Low level command to process the command line and create a "plan" corresponding to the
* command arguments.
*/
RT_EXPORT extern void *db_search_formplan(char **argv,
DEPRECATED RT_EXPORT extern int db_full_path_list_add(const char *path, int local, struct db_i *dbip, struct db_full_path_list *path_list);
DEPRECATED RT_EXPORT extern void db_free_full_path_list(struct db_full_path_list *path_list);
DEPRECATED RT_EXPORT extern void *db_search_formplan(char **argv,
struct db_i *dbip,
struct rt_wdb *wdbp);
/**
* release memory for the formulated plan returned by
* db_search_formplan().
*/
RT_EXPORT extern void db_search_freeplan(void **plan);
/**
* Low level routines for invocation of search plans
*/
RT_EXPORT extern struct db_full_path_list *db_search_full_paths(void *searchplan,
DEPRECATED RT_EXPORT extern void db_search_freeplan(void **plan);
DEPRECATED RT_EXPORT extern struct db_full_path_list *db_search_full_paths(void *searchplan,
struct db_full_path_list *path_list,
struct db_i *dbip,
struct rt_wdb *wdbp);
RT_EXPORT extern struct bu_ptbl *db_search_unique_objects(void *searchplan,
DEPRECATED RT_EXPORT extern struct bu_ptbl *db_search_unique_objects(void *searchplan,
struct db_full_path_list *path_list,
struct db_i *dbip,
struct rt_wdb *wdbp);
/* search.c */
/**
* Use the string form of a search plan to build and execute a search
*/
RT_EXPORT extern struct db_full_path_list *db_search_full_paths_strplan(const char *plan_string,
struct db_full_path_list *path_list,
struct db_i *dbip,
struct rt_wdb *wdbp);
RT_EXPORT extern struct bu_ptbl *db_search_unique_objects_strplan(const char *plan_string,
struct db_full_path_list *path_list,
struct db_i *dbip,
struct rt_wdb *wdbp);
/**
* TODO: PROPOSED API for search functionality
* D B _ S E A R C H _ P A T H
*
* This is the proposed replacement to all of the preceding search functionality -
* the previous API calls will .
* Programmatic interface to the find-command style search functionality
* available in librt for databases. These functions search the
* database using a supplied list of filter criteria and return either
* db_full_path instances or directory pointers (depending on the function).
* Both types of returns use a bu_ptbl container to hold the set of results.
*
* Design notes:
*
* * As long as struct db_i retains its pointer back to its parent rt_wdb
* structure, and dbip is a parameter in rt_wdb, only one of the two is
* needed as a parameter and either will work. Probably go with rt_wdb,
* since it isn't tagged as private within the data structure definition.
* since it isn't tagged as private within the data structure definition,
* but on the other hand some ways db_i would be preferable since it
* would allow the search functions to break out cleanly into a
* hypothetical libgio/libdb that is separate from the raytracing.
* Unfortunately, the need to get to the internal form of some of the
* primitives means we do need rt_wdb available for now. If the ways
* search currently is accessing rt_wdb could be avoided with a future
* improvement/redesign, then db_i and using the private link to rt_wdb
* is justified. Need to discuss before this API is finalized.
*
* * Plan strings are the most intuitive way for humans to spell out a search
* pattern - db_search_formplan becomes a behind-the-scenes function that
@@ -3772,42 +3809,70 @@ RT_EXPORT extern struct bu_ptbl *db_search_unique_objects_strplan(const char *pl
* sufficient justification for the added API complexity without hard
* evidence that complexity is needed.
*
* * Instead of having the user go through the trouble of generating full
* path structures from string inputs, just accept char pointers to
* object or path names and build the necessary additional data structures
* in the backend. Again, minor possible performance gain from path list
* re-use doesn't justify more API complexity without compelling evidence
* it is needed.
* * Offer simple function calls for the common cases of one path and an
* array of paths, and for both input cases support returning either
* a db_full_path set or a unique directory pointer set via table. This
* should cover the most common programmatic situations, while still
* allowing commands enough flexibility to do what they need to (see,
* for example, combining results from search sets (multiple arrays
* of paths) in libged's search result consolidation.)
*
* * instead of having multiple search function calls, add a search type
* parameter that toggles between various search types. All of them can
* return a bu_ptbl of pointers to db full paths, and the search type
* will control how the search is done and what the expectations/guarantees
* are for the results.
* * Need to add a plan option for dealing with hidden geometry during the search,
* maybe -nohide or something like that... The traversal by default shouldn't
* traverse down anything hidden, but we should be able to override that at user request.
*
* * Need a flag to know what to do about hidden geometry during the search,
* unless we make that one of the plan options - maybe -nohide or something
* like that...
* WARNING: THESE FUNCTIONS ARE STILL IN DEVELOPMENT - IT IS NOT YET
* ASSUMED THAT THE SEARCH API IS IN ITS FINAL FORM - DO NOT DEPEND ON IT
* REMAINING THE SAME UNTIL THIS WARNING IS REMOVED
*
* * One possible option to the enums for search types is to rely fully on the
* first character of the path strings (which are currently fully informative in the
* libged search command line interface) but the difficulty there is if more
* search styles are added initial path string characters are a very constraining
* selection mechanism. For future proofing I think the input conventions on the
* path strings should be handled above this level.
*/
RT_EXPORT extern struct bu_ptbl *db_search_path(const char *plan_string,
struct directory *dp,
struct rt_wdb *wdbp);
RT_EXPORT extern struct bu_ptbl *db_search_paths(const char *plan_string,
int path_cnt,
struct directory **paths,
struct rt_wdb *wdbp);
/* Available search types */
enum {
DB_SEARCH_STANDARD = 0, /* Full path tree search starting with the set of objects having no parents */
DB_SEARCH_UNIQ_OBJ, /* Like DB_SEARCH_STANDARD, but returns only unique object list without paths */
DB_SEARCH_FLAT /* Instead of only starting with objects that don't have a parent, all objects are starting points for a full path tree search*/
};
/* Because the handling of the plan is now wrapped up inside the
* search commands, we need a way to check ahead of time to see
* if the string we have is valid. Not an issue for hard-coded
* search strings in C logic, but may be needed when the string
* is user (or script) generated.
*
* Returns: 1 if plan is valid, 0 if it is not */
RT_EXPORT extern int db_search_plan_validate(const char *plan_string);
RT_EXPORT extern struct bu_ptbl *db_search(const char *plan_string,
const char *path_strings[],
struct rt_wdb *wdbp,
int search_type);
/* Properly free the tables returned by db_search_path and db_search_paths */
RT_EXPORT extern void db_free_search_tbl(struct bu_ptbl *search_results);
/* Because a list of unique directory pointers is a common output
* needed from search, functions are provided that produce a
* table of directory pointers to unique leaf objects from the search
* results. Note that db_free_search_tbl does *not* free the table returned
* by db_search_obj, but a custom free is not needed - only directory
* pointers are stored in the table, so a normal bu_ptbl_free combined
* with a freeing of the table structure itself is sufficient.
*/
RT_EXPORT extern struct bu_ptbl *db_search_path_obj(const char *plan_string,
struct directory *dp,
struct rt_wdb *wdbp);
RT_EXPORT extern struct bu_ptbl *db_search_paths_obj(const char *plan_string,
int path_cnt,
struct directory **paths,
struct rt_wdb *wdbp);
/* For situations where performance is critical and there are no
* search criteria that depend on depth (for example, wanting a list
* of all brep objects with name matching pattern *.b) a truly flat
* iteration through the directory objects will be much faster.
*
* Returns a bu_ptbl of directory pointers, since full paths are
* meaningless in this type of search
*/
RT_EXPORT extern struct bu_ptbl *db_search_flat(const char *plan_string,
struct rt_wdb *wdbp,
int flags);
/* db_open.c */
/**
@@ -4912,6 +4977,7 @@ RT_EXPORT extern struct bu_ptbl *db_lookup_by_attr(struct db_i *dbip,
int dir_flags,
struct bu_attribute_value_set *avs,
int op);
/* add entry to directory */
/**
@@ -5035,6 +5101,50 @@ RT_EXPORT extern int db_regexp_match_all(struct bu_vls *dest,
struct db_i *dbip,
const char *pattern);
/* db_ls.c */
/**
* db_ls takes a database instance pointer and assembles a
* directory pointer array of objects in the database according
* to a set of flags.
*
* The caller is responsible for freeing the array.
*
* Returns -
* integer count of objects in dpv
* struct directory ** array of objects in dpv via argument
*
* WARNING: THIS FUNCTION IS STILL IN DEVELOPMENT - IT IS NOT YET
* ASSUMED THAT THIS IS ITS FINAL FORM - DO NOT DEPEND ON IT REMAINING
* THE SAME UNTIL THIS WARNING IS REMOVED
*/
#define DB_LS_PRIM 0x1 /* filter for primitives (solids)*/
#define DB_LS_COMB 0x2 /* filter for combinations */
#define DB_LS_REGION 0x4 /* filter for regions */
#define DB_LS_HIDDEN 0x8 /* include hidden objects in results */
#define DB_LS_NON_GEOM 0x10 /* filter for non-geometry objects */
#define DB_LS_TOPS 0x20 /* filter for objects un-referenced by other objects */
RT_EXPORT extern int db_ls(const struct db_i *dbip,
int flags,
struct directory ***dpv);
/**
* convert an argv list of names to a directory pointer array.
*
* If db_lookup fails for any individual argv, an empty directory
* structure is created and assigned the name and RT_DIR_PHONY_ADDR
*
* The returned directory ** structure is NULL terminated.
*/
RT_EXPORT extern struct directory **db_argv_to_dpv(const struct db_i *dbip,
const char **argv);
/**
* convert a directory pointer array to an argv char pointer array.
*/
RT_EXPORT extern char **db_dpv_to_argv(struct directory **dpv);
/* db_flags.c */
/**
* Given the internal form of a database object, return the
+1 -1
View File
@@ -58,7 +58,7 @@ SYSV_EXPORT extern void *memset(void *s, int c, size_t n);
#endif
#ifndef HAVE_STRCHR
SYSV_EXPORT extern char *strchr(char *sp, char c);
SYSV_EXPORT extern char *strchr(const char *sp, int c);
#endif
#ifndef HAVE_STRDUP
+1
View File
@@ -33,6 +33,7 @@
#define __TCLCAD_H__
#include "common.h"
#include "cmd.h"
#include "tcl.h"
#include "ged.h"
+2 -1
View File
@@ -43,6 +43,7 @@ include(CheckIncludeFileCXX)
include(CheckTypeSize)
include(CheckLibraryExists)
include(CheckStructHasMember)
include(CheckCInline)
###
@@ -268,7 +269,7 @@ macro(BRLCAD_CHECK_C99_FORMAT_SPECIFIERS)
set(CMAKE_C_FLAGS_TMP "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "")
set(CMAKE_REQUIRED_DEFINITIONS_BAK ${CMAKE_REQUIRED_DEFINITIONS})
CHECK_INCLUDE_file(stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
if(HAVE_STDINT_H)
set(CMAKE_REQUIRED_DEFINITIONS "-DHAVE_STDINT_H=1")
endif(HAVE_STDINT_H)
+45 -45
View File
@@ -40,23 +40,23 @@
# -fast-math results in non-IEEE floating point math among a handful
# of other optimizations that cause substantial error in ray tracing
# and tessellation (and probably more).
BRLCAD_CHECK_C_FLAG(O3 GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_C_FLAG(fstrength-reduce GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_C_FLAG(fexpensive-optimizations GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_C_FLAG(finline-functions GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_C_FLAG("finline-limit=10000 --param inline-unit-growth=300 --param large-function-growth=300" GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_CXX_FLAG(O3 GROUPS OPTIMIZE_CXX_FLAGS)
BRLCAD_CHECK_CXX_FLAG(fstrength-reduce GROUPS OPTIMIZE_CXX_FLAGS)
BRLCAD_CHECK_CXX_FLAG(fexpensive-optimizations GROUPS OPTIMIZE_CXX_FLAGS)
BRLCAD_CHECK_CXX_FLAG(finline-functions GROUPS OPTIMIZE_CXX_FLAGS)
BRLCAD_CHECK_CXX_FLAG("finline-limit=10000 --param inline-unit-growth=300 --param large-function-growth=300" GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_C_FLAG(O3 GROUPS OPTIMIZE_C_FLAGS)
CHECK_C_FLAG(fstrength-reduce GROUPS OPTIMIZE_C_FLAGS)
CHECK_C_FLAG(fexpensive-optimizations GROUPS OPTIMIZE_C_FLAGS)
CHECK_C_FLAG(finline-functions GROUPS OPTIMIZE_C_FLAGS)
CHECK_C_FLAG("finline-limit=10000 --param inline-unit-growth=300 --param large-function-growth=300" GROUPS OPTIMIZE_C_FLAGS)
CHECK_CXX_FLAG(O3 GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_CXX_FLAG(fstrength-reduce GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_CXX_FLAG(fexpensive-optimizations GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_CXX_FLAG(finline-functions GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_CXX_FLAG("finline-limit=10000 --param inline-unit-growth=300 --param large-function-growth=300" GROUPS OPTIMIZE_CXX_FLAGS)
if(${BRLCAD_OPTIMIZED_BUILD} MATCHES "ON")
if(NOT BRLCAD_ENABLE_PROFILING AND NOT BRLCAD_FLAGS_DEBUG)
BRLCAD_CHECK_C_FLAG(fomit-frame-pointer GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_CXX_FLAG(fomit-frame-pointer GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_C_FLAG(fomit-frame-pointer GROUPS OPTIMIZE_C_FLAGS)
CHECK_CXX_FLAG(fomit-frame-pointer GROUPS OPTIMIZE_CXX_FLAGS)
else(NOT BRLCAD_ENABLE_PROFILING AND NOT BRLCAD_FLAGS_DEBUG)
BRLCAD_CHECK_C_FLAG(fno-omit-frame-pointer GROUPS OPTIMIZE_C_FLAGS)
BRLCAD_CHECK_CXX_FLAG(fno-omit-frame-pointer GROUPS OPTIMIZE_CXX_FLAGS)
CHECK_C_FLAG(fno-omit-frame-pointer GROUPS OPTIMIZE_C_FLAGS)
CHECK_CXX_FLAG(fno-omit-frame-pointer GROUPS OPTIMIZE_CXX_FLAGS)
endif(NOT BRLCAD_ENABLE_PROFILING AND NOT BRLCAD_FLAGS_DEBUG)
endif(${BRLCAD_OPTIMIZED_BUILD} MATCHES "ON")
@@ -83,11 +83,11 @@ endif(opt_conf_list)
# only when compiling unoptimized (because the extra barrier checks
# can affect the memory footprint and runtime performance.
if(${BRLCAD_OPTIMIZED_BUILD} MATCHES "OFF" AND BRLCAD_FLAGS_DEBUG)
BRLCAD_CHECK_C_FLAG(fstack-protector-all)
BRLCAD_CHECK_CXX_FLAG(fstack-protector-all)
CHECK_C_FLAG(fstack-protector-all)
CHECK_CXX_FLAG(fstack-protector-all)
# checking both in case compiling c/c++ with different compilers
BRLCAD_CHECK_C_FLAG(qstackprotect)
BRLCAD_CHECK_CXX_FLAG(qstackprotect)
CHECK_C_FLAG(qstackprotect)
CHECK_CXX_FLAG(qstackprotect)
endif(${BRLCAD_OPTIMIZED_BUILD} MATCHES "OFF" AND BRLCAD_FLAGS_DEBUG)
# verbose warning flags. we intentionally try to turn on as many as
@@ -96,58 +96,58 @@ endif(${BRLCAD_OPTIMIZED_BUILD} MATCHES "OFF" AND BRLCAD_FLAGS_DEBUG)
if(BRLCAD_ENABLE_COMPILER_WARNINGS OR BRLCAD_ENABLE_STRICT)
# also of interest:
# -Wunreachable-code -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -ansi
# -Wformat=2 (after bu_fopen_uniq() is obsolete)
BRLCAD_CHECK_C_FLAG(pedantic)
BRLCAD_CHECK_CXX_FLAG(pedantic)
# -Wformat=2 (after bu_fopen_uniq() is obsolete) -Wdocumentation (for Doxygen comments)
CHECK_C_FLAG(pedantic)
CHECK_CXX_FLAG(pedantic)
# FIXME: The Wall warnings are too verbose with Visual C++ (for
# now). we have a lot to clean up.
if(NOT MSVC)
BRLCAD_CHECK_C_FLAG(Wall)
BRLCAD_CHECK_CXX_FLAG(Wall)
CHECK_C_FLAG(Wall)
CHECK_CXX_FLAG(Wall)
else(NOT MSVC)
BRLCAD_CHECK_C_FLAG(W4)
BRLCAD_CHECK_CXX_FLAG(W4)
CHECK_C_FLAG(W4)
CHECK_CXX_FLAG(W4)
endif(NOT MSVC)
BRLCAD_CHECK_C_FLAG(Wextra)
BRLCAD_CHECK_CXX_FLAG(Wextra)
CHECK_C_FLAG(Wextra)
CHECK_CXX_FLAG(Wextra)
BRLCAD_CHECK_C_FLAG(Wundef)
BRLCAD_CHECK_CXX_FLAG(Wundef)
CHECK_C_FLAG(Wundef)
CHECK_CXX_FLAG(Wundef)
BRLCAD_CHECK_C_FLAG(Wfloat-equal)
BRLCAD_CHECK_CXX_FLAG(Wfloat-equal)
CHECK_C_FLAG(Wfloat-equal)
CHECK_CXX_FLAG(Wfloat-equal)
BRLCAD_CHECK_C_FLAG(Wshadow)
BRLCAD_CHECK_CXX_FLAG(Wshadow)
CHECK_C_FLAG(Wshadow)
CHECK_CXX_FLAG(Wshadow)
# report where we throw away const
# BRLCAD_CHECK_C_FLAG(Wcast-qual)
# BRLCAD_CHECK_CXX_FLAG(Wcast-qual)
# CHECK_C_FLAG(Wcast-qual)
# CHECK_CXX_FLAG(Wcast-qual)
# check for redundant declarations
# BRLCAD_CHECK_C_FLAG(Wredundant-decls)
# BRLCAD_CHECK_CXX_FLAG(Wredundant-decls)
# CHECK_C_FLAG(Wredundant-decls)
# CHECK_CXX_FLAG(Wredundant-decls)
# want C inline warnings, but versions of g++ (circa 4.7) spew
# unquellable bogus warnings on default constructors that we don't
# have access to (e.g., in opennurbs and boost), so turn them off
BRLCAD_CHECK_C_FLAG(Winline)
BRLCAD_CHECK_CXX_FLAG(Wno-inline)
CHECK_C_FLAG(Winline)
CHECK_CXX_FLAG(Wno-inline)
# Need this for tcl.h
BRLCAD_CHECK_C_FLAG(Wno-long-long)
BRLCAD_CHECK_CXX_FLAG(Wno-long-long)
CHECK_C_FLAG(Wno-long-long)
CHECK_CXX_FLAG(Wno-long-long)
# Need this for X11 headers using variadic macros
BRLCAD_CHECK_C_FLAG(Wno-variadic-macros)
BRLCAD_CHECK_CXX_FLAG(Wno-variadic-macros)
CHECK_C_FLAG(Wno-variadic-macros)
CHECK_CXX_FLAG(Wno-variadic-macros)
endif(BRLCAD_ENABLE_COMPILER_WARNINGS OR BRLCAD_ENABLE_STRICT)
if(BRLCAD_ENABLE_STRICT)
BRLCAD_CHECK_C_FLAG(Werror)
BRLCAD_CHECK_CXX_FLAG(Werror)
CHECK_C_FLAG(Werror)
CHECK_CXX_FLAG(Werror)
endif(BRLCAD_ENABLE_STRICT)
# End detection of flags intended for BRL-CAD use. Make sure all variables have
+6 -2
View File
@@ -230,12 +230,15 @@ set(BRLCAD_OPENNURBS_BUILD_LABEL "Compile openNURBS ")
set(BRLCAD_SCL_BUILD_LABEL "Compile NIST STEP Class Libraries ")
set(BRLCAD_ENABLE_X11_LABEL "X11 support (optional) ")
set(BRLCAD_ENABLE_OPENGL_LABEL "OpenGL support (optional) ")
set(BRLCAD_ENABLE_QT_LABEL "Qt support (optional) ")
set(BRLCAD_ENABLE_RTSERVER_LABEL "librtserver JDK support (optional) ")
set(BRLCAD_ENABLE_RUNTIME_DEBUG_LABEL "Enable run-time debugging (optional) ")
set(BRLCAD_ARCH_BITSETTING_LABEL "Build 32/64-bit release ")
set(BRLCAD_OPTIMIZED_BUILD_LABEL "Build optimized release ")
set(BRLCAD_FLAGS_DEBUG_LABEL "Build debuggable release")
set(BRLCAD_ENABLE_PROFILING_LABEL "Build profile release ")
set(C_COMPILER_STANDARD_LABEL "C compiler standard ")
set(CXX_COMPILER_STANDARD_LABEL "C++ compiler standard")
set(BRLCAD_ENABLE_SMP_LABEL "Build SMP-capable release ")
set(BUILD_STATIC_LIBS_LABEL "Build static libraries ")
set(BUILD_SHARED_LIBS_LABEL "Build dynamic libraries ")
@@ -251,14 +254,15 @@ set(BUILD_REPORT_ITEMS
set(FEATURE_REPORT_ITEMS
BRLCAD_ENABLE_X11 BRLCAD_ENABLE_OPENGL BRLCAD_ENABLE_RTSERVER
BRLCAD_ENABLE_RUNTIME_DEBUG)
BRLCAD_ENABLE_RUNTIME_DEBUG BRLCAD_ENABLE_QT)
set(OTHER_REPORT_ITEMS
BRLCAD_ARCH_BITSETTING BRLCAD_OPTIMIZED_BUILD
BRLCAD_FLAGS_DEBUG BRLCAD_ENABLE_PROFILING
BRLCAD_ENABLE_SMP BUILD_STATIC_LIBS BUILD_SHARED_LIBS
BRLCAD_ENABLE_COMPILER_WARNINGS BRLCAD_ENABLE_VERBOSE_PROGRESS
BRLCAD_INSTALL_EXAMPLE_GEOMETRY BRLCAD_DOCBOOK_BUILD)
BRLCAD_INSTALL_EXAMPLE_GEOMETRY BRLCAD_DOCBOOK_BUILD
C_COMPILER_STANDARD CXX_COMPILER_STANDARD)
# Construct list of all items
set(ALL_ITEMS)
+34 -34
View File
@@ -52,7 +52,7 @@ endmacro(CHECK_OPT)
# Take a target definition and find out what definitions its libraries
# are using
macro(GET_TARGET_DEFINES targetname target_libs)
# Take care of compile flags and definitions
# Take care of compile flags and definitions
foreach(libitem ${target_libs})
list(FIND BRLCAD_LIBS ${libitem} FOUNDIT)
if(NOT ${FOUNDIT} STREQUAL "-1")
@@ -113,26 +113,26 @@ endmacro(GET_TARGET_FLAGS)
# When a build target source file list contains files that are NOT all
# one language, we need to apply flags on a per-file basis
macro(FLAGS_TO_FILES srcslist targetname)
foreach(srcfile ${srcslist})
get_property(file_language SOURCE ${srcfile} PROPERTY LANGUAGE)
if(NOT file_language)
get_filename_component(srcfile_ext ${srcfile} EXT)
if(${srcfile_ext} STREQUAL ".cxx" OR ${srcfile_ext} STREQUAL ".cpp" OR ${srcfile_ext} STREQUAL ".cc")
set(file_language CXX)
endif(${srcfile_ext} STREQUAL ".cxx" OR ${srcfile_ext} STREQUAL ".cpp" OR ${srcfile_ext} STREQUAL ".cc")
if(${srcfile_ext} STREQUAL ".c")
set(file_language C)
endif(${srcfile_ext} STREQUAL ".c")
endif(NOT file_language)
if(file_language)
foreach(lib_flag ${${targetname}_${file_language}_FLAGS})
set_property(SOURCE ${srcfile} APPEND PROPERTY COMPILE_FLAGS "${lib_flag}")
endforeach(lib_flag ${${targetname}_${file_language}_FLAGS})
endif(file_language)
if("${file_language}" STREQUAL "C" AND NOT "${C_INLINE}" STREQUAL "inline")
set_property(SOURCE ${srcfile} APPEND PROPERTY COMPILE_DEFINITIONS "inline=${C_INLINE}")
endif("${file_language}" STREQUAL "C" AND NOT "${C_INLINE}" STREQUAL "inline")
endforeach(srcfile ${srcslist})
foreach(srcfile ${srcslist})
get_property(file_language SOURCE ${srcfile} PROPERTY LANGUAGE)
if(NOT file_language)
get_filename_component(srcfile_ext ${srcfile} EXT)
if(${srcfile_ext} STREQUAL ".cxx" OR ${srcfile_ext} STREQUAL ".cpp" OR ${srcfile_ext} STREQUAL ".cc")
set(file_language CXX)
endif(${srcfile_ext} STREQUAL ".cxx" OR ${srcfile_ext} STREQUAL ".cpp" OR ${srcfile_ext} STREQUAL ".cc")
if(${srcfile_ext} STREQUAL ".c")
set(file_language C)
endif(${srcfile_ext} STREQUAL ".c")
endif(NOT file_language)
if(file_language)
foreach(lib_flag ${${targetname}_${file_language}_FLAGS})
set_property(SOURCE ${srcfile} APPEND PROPERTY COMPILE_FLAGS "${lib_flag}")
endforeach(lib_flag ${${targetname}_${file_language}_FLAGS})
endif(file_language)
if("${file_language}" STREQUAL "C" AND NOT "${C_INLINE}" STREQUAL "inline")
set_property(SOURCE ${srcfile} APPEND PROPERTY COMPILE_DEFINITIONS "inline=${C_INLINE}")
endif("${file_language}" STREQUAL "C" AND NOT "${C_INLINE}" STREQUAL "inline")
endforeach(srcfile ${srcslist})
endmacro(FLAGS_TO_FILES)
# Handle C++ NO_STRICT settings
@@ -211,17 +211,17 @@ macro(BRLCAD_ADDEXEC execname srcslist libslist)
foreach(lib_flag ${${execname}_${exec_type}_FLAGS})
set_property(TARGET ${execname} APPEND PROPERTY COMPILE_FLAGS "${lib_flag}")
endforeach(lib_flag ${${execname}_${exec_type}_FLAGS})
if(NOT "${C_INLINE}" STREQUAL "inline" AND "${exec_type}" STREQUAL "C")
set_property(TARGET ${execname} APPEND PROPERTY COMPILE_DEFINITIONS "inline=${C_INLINE}")
endif(NOT "${C_INLINE}" STREQUAL "inline" AND "${exec_type}" STREQUAL "C")
if(NOT "${C_INLINE}" STREQUAL "inline" AND "${exec_type}" STREQUAL "C")
set_property(TARGET ${execname} APPEND PROPERTY COMPILE_DEFINITIONS "inline=${C_INLINE}")
endif(NOT "${C_INLINE}" STREQUAL "inline" AND "${exec_type}" STREQUAL "C")
endif(${exec_type} STREQUAL "MIXED")
# If this target is marked as incompatible with the strict flags, disable them
foreach(extraarg ${ARGN})
if(${extraarg} MATCHES "NO_STRICT$" AND BRLCAD_ENABLE_STRICT)
if(NOERROR_FLAG)
set_property(TARGET ${execname} APPEND PROPERTY COMPILE_FLAGS "-Wno-error")
endif(NOERROR_FLAG)
set_property(TARGET ${execname} APPEND PROPERTY COMPILE_FLAGS "-Wno-error")
endif(NOERROR_FLAG)
endif(${extraarg} MATCHES "NO_STRICT$" AND BRLCAD_ENABLE_STRICT)
endforeach(extraarg ${ARGN})
@@ -307,13 +307,13 @@ macro(BRLCAD_ADDLIB libname srcslist libslist)
# If we haven't already taken care of the flags on a per-file basis,
# apply them to the target now that we have one.
if(NOT ${lib_type} STREQUAL "MIXED")
# All one language - we can apply the flags to the target
foreach(lib_flag ${${libname}_${lib_type}_FLAGS})
set_property(TARGET ${libname} APPEND PROPERTY COMPILE_FLAGS "${lib_flag}")
endforeach(lib_flag ${${libname}_${lib_type}_FLAGS})
if(NOT "${C_INLINE}" STREQUAL "inline" AND "${lib_type}" STREQUAL "C")
set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS "inline=${C_INLINE}")
endif(NOT "${C_INLINE}" STREQUAL "inline" AND "${lib_type}" STREQUAL "C")
# All one language - we can apply the flags to the target
foreach(lib_flag ${${libname}_${lib_type}_FLAGS})
set_property(TARGET ${libname} APPEND PROPERTY COMPILE_FLAGS "${lib_flag}")
endforeach(lib_flag ${${libname}_${lib_type}_FLAGS})
if(NOT "${C_INLINE}" STREQUAL "inline" AND "${lib_type}" STREQUAL "C")
set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS "inline=${C_INLINE}")
endif(NOT "${C_INLINE}" STREQUAL "inline" AND "${lib_type}" STREQUAL "C")
endif(NOT ${lib_type} STREQUAL "MIXED")
foreach(extraarg ${ARGN})
@@ -503,7 +503,7 @@ endmacro(BRLCAD_LIB_INCLUDE_DIRS)
# to copy/symlink as dependencies, there is a potential for file names to
# conflict with build target names. (This has actually been observed with
# MSVC - our file INSTALL in the toplevel source directory conflicts with the
# MSVC target named INSTALL.) To avoid conflicts and make the dependencies
# MSVC target named INSTALL.) To avoid conflicts and make the dependencies
# of the custom commands robust we supply full file paths as dependencies to
# the file copying custom commands.
+11 -8
View File
@@ -62,12 +62,12 @@ macro(CHECK_C_INLINE RESULT)
if(NOT DEFINED HAVE_INLINE)
# initialize to empty
set(${RESULT} "")
# initialize to empty
set(${RESULT} "")
# test candidates to find one that works
foreach(INLINE "inline" "__inline__" "__inline")
# test candidates to find one that works
foreach(INLINE "inline" "__inline__" "__inline")
if(NOT HAVE_INLINE)
string(TOUPPER "HAVE_${INLINE}_KEYWORD" HAVE_INLINE_KEYWORD)
set(PRE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
@@ -84,18 +84,21 @@ macro(CHECK_C_INLINE RESULT)
}
int
main(int argc, char *argv[]) {
return 0;
return (argc > 0 || argv)?0:1;
}" ${HAVE_INLINE_KEYWORD})
set(CMAKE_REQUIRED_FLAGS "${PRE_CMAKE_REQUIRED_FLAGS}")
if(${HAVE_INLINE_KEYWORD})
set(HAVE_INLINE "${INLINE}" CACHE INTERNAL "C compiler provides inlining support")
break()
endif(${HAVE_INLINE_KEYWORD})
endif(NOT HAVE_INLINE)
endforeach(INLINE)
endforeach(INLINE)
endif(NOT DEFINED HAVE_INLINE)
# still not defined?
if(NOT DEFINED HAVE_INLINE)
set(HAVE_INLINE "" CACHE INTERNAL "C compiler does not provide inlining support")
endif(NOT DEFINED HAVE_INLINE)
+118 -83
View File
@@ -69,7 +69,8 @@ macro(ADD_NEW_FLAG FLAG_TYPE NEW_FLAG CONFIG_LIST)
endif(${NEW_FLAG})
endmacro(ADD_NEW_FLAG)
# Convenience language based wrapper for calling the correct compiler flag test macro
# Convenience language based wrapper for calling the correct compiler
# flag test macro
macro(CHECK_COMPILER_FLAG FLAG_LANG NEW_FLAG RESULTVAR)
if("${FLAG_LANG}" STREQUAL "C")
CHECK_C_COMPILER_FLAG(${NEW_FLAG} ${RESULTVAR})
@@ -80,38 +81,42 @@ macro(CHECK_COMPILER_FLAG FLAG_LANG NEW_FLAG RESULTVAR)
endmacro(CHECK_COMPILER_FLAG LANG NEW_FLAG RESULTVAR)
# Synopsis: BRLCAD_CHECK_FLAG(LANG flag [BUILD_TYPES type1 type2 ...] [GROUPS group1 group2 ...] [VARS var1 var2 ...] )
# Synopsis: CHECK_FLAG(LANG flag [BUILD_TYPES type1 type2 ...] [GROUPS group1 group2 ...] [VARS var1 var2 ...] )
#
# BRLCAD_CHECK_FLAG is BRL-CAD's core macro for C/C++ flag testing. The first value
# is the language to test (C or C++ currently). The second entry is the flag (without
# preliminary dash).
# CHECK_FLAG is BRL-CAD's core macro for C/C++ flag testing.
# The first value is the language to test (C or C++ currently). The
# second entry is the flag (without preliminary dash).
#
# If the first two mandatory options are the only ones provided, the a successful test
# of the flag will result in its being assigned to *all* compilations using the appropriate global
# C/C++ CMake variable. If optional parameters are included, they tell the macro what to do with the
# test results instead of doing the default global assignment. Options include assigning the
# flag to one or more of the variable lists associated with build types (e.g. Debug or Release),
# appending the variable to a string that contains a group of variables, or assigning the flag to
# a variable if that variable does not already hold a value. The assignments are not mutually
# If the first two mandatory options are the only ones provided, a
# successful test of the flag will result in its being assigned to
# *all* compilations using the appropriate global C/C++ CMake
# variable. If optional parameters are included, they tell the macro
# what to do with the test results instead of doing the default global
# assignment. Options include assigning the flag to one or more of
# the variable lists associated with build types (e.g. Debug or
# Release), appending the variable to a string that contains a group
# of variables, or assigning the flag to a variable if that variable
# does not already hold a value. The assignments are not mutually
# exclusive - any or all of them may be used in a given command.
#
# For example, to test a flag and add it to the C Debug configuration flags:
# For example, to test a flag and add it to the C Debug configuration
# flags:
#
# BRLCAD_CHECK_FLAG(C ggdb3 BUILD_TYPES Debug)
# CHECK_FLAG(C ggdb3 BUILD_TYPES Debug)
#
# To assign a C flag to a unique variable:
#
# BRLCAD_CHECK_FLAG(C c99 VARS C99_FLAG)
# CHECK_FLAG(C c99 VARS C99_FLAG)
#
# To do all assignments at once, for multiple configs and vars:
#
# BRLCAD_CHECK_FLAG(C ggdb3
# CHECK_FLAG(C ggdb3
# BUILD_TYPES Debug Release
# GROUPS DEBUG_FLAGS
# VARS DEBUG1 DEBUG2)
include (CMakeParseArguments)
macro(BRLCAD_CHECK_FLAG)
macro(CHECK_FLAG)
# Set up some variables and names
set(FLAG_LANG ${ARGV0})
set(flag ${ARGV1})
@@ -167,15 +172,16 @@ macro(BRLCAD_CHECK_FLAG)
endforeach(flag_var ${FLAG_VARS})
endif(${ARGC} LESS 3)
endmacro(BRLCAD_CHECK_FLAG)
endmacro(CHECK_FLAG)
# Convenience wrappers to call the primary checking function with a default language.
macro(BRLCAD_CHECK_C_FLAG)
BRLCAD_CHECK_FLAG(C ${ARGN})
endmacro(BRLCAD_CHECK_C_FLAG)
macro(BRLCAD_CHECK_CXX_FLAG)
BRLCAD_CHECK_FLAG(CXX ${ARGN})
endmacro(BRLCAD_CHECK_CXX_FLAG)
# Convenience wrappers to call the primary checking function with a
# default language.
macro(CHECK_C_FLAG)
CHECK_FLAG(C ${ARGN})
endmacro(CHECK_C_FLAG)
macro(CHECK_CXX_FLAG)
CHECK_FLAG(CXX ${ARGN})
endmacro(CHECK_CXX_FLAG)
# Clear out most CMake-assigned defaults - We're managing
# our own compile flags, and don't (for example) want NDEBUG
@@ -209,72 +215,101 @@ set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "$ENV{LDFLAGS}")
#set(CMAKE_EXE_LINKER_FLAGS "")
# Check for c90 support with gnu extensions if we're not building for
# a release so we get more broad portability testing. Since the
# default is debug, it will be the more difficult to keep working
# given it's the lesser feature-rich C standard.
# If nothing has been specified, set a default
set(USING_DEFAULT_C_STANDARD 0)
set(USING_DEFAULT_CXX_STANDARD 0)
if(NOT DEFINED C_COMPILER_STANDARD OR "${C_COMPILER_STANDARD}" STREQUAL "")
set(C_COMPILER_STANDARD "C89" CACHE STRING "Default C Standard" FORCE)
set(USING_DEFAULT_C_STANDARD 1)
else(NOT DEFINED C_COMPILER_STANDARD OR "${C_COMPILER_STANDARD}" STREQUAL "")
string(TOUPPER "${C_COMPILER_STANDARD}" C_COMPILER_STANDARD)
set(C_COMPILER_STANDARD "${C_COMPILER_STANDARD" CACHE STRING "C Standard" FORCE)
endif(NOT DEFINED C_COMPILER_STANDARD OR "${C_COMPILER_STANDARD}" STREQUAL "")
if(NOT DEFINED CXX_COMPILER_STANDARD OR "${CXX_COMPILER_STANDARD}" STREQUAL "")
set(CXX_COMPILER_STANDARD "C++98" CACHE STRING "Default CXX Standard" FORCE)
set(USING_DEFAULT_CXX_STANDARD 1)
else(NOT DEFINED CXX_COMPILER_STANDARD OR "${CXX_COMPILER_STANDARD}" STREQUAL "")
string(TOUPPER "${CXX_COMPILER_STANDARD}" CXX_COMPILER_STANDARD)
set(CXX_COMPILER_STANDARD "${CXX_COMPILER_STANDARD" CACHE STRING "CXX Standard" FORCE)
endif(NOT DEFINED CXX_COMPILER_STANDARD OR "${CXX_COMPILER_STANDARD}" STREQUAL "")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND USING_DEFAULT_C_STANDARD)
set(C_COMPILER_STANDARD "C99" CACHE STRING "Default C Standard" FORCE)
endif("${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND USING_DEFAULT_C_STANDARD)
set(C_STD_OPTS "C89" "C99" "C11")
set(CXX_STD_OPTS "C++98" "C++03" "C++11")
if(CMAKE_COMPILER_IS_GNUCC)
set(C_COMPILER_OPTS "GNU89" "GNU99" "GNU11")
endif(CMAKE_COMPILER_IS_GNUCC)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CXX_COMPILER_OPTS "GNU++98" "GNU++11")
endif(CMAKE_COMPILER_IS_GNUCXX)
set_property(CACHE C_COMPILER_STANDARD PROPERTY STRINGS ${C_STD_OPTS} ${C_COMPILER_OPTS})
set_property(CACHE CXX_COMPILER_STANDARD PROPERTY STRINGS ${CXX_STD_OPTS} ${CXX_COMPILER_OPTS})
CHECK_C_FLAG("pedantic")
string(TOLOWER "${C_COMPILER_STANDARD}" C_STD_FLAG_INPUT)
CHECK_C_FLAG("std=${C_STD_FLAG_INPUT}" BUILD_TYPES Debug)
CHECK_C_FLAG("std=gnu99" BUILD_TYPES Release VARS C99_FLAG)
CHECK_C_FLAG("D_POSIX_C_SOURCE=200112L")
# try to use -pipe to speed up the compiles
BRLCAD_CHECK_C_FLAG(pipe)
BRLCAD_CHECK_CXX_FLAG(pipe)
CHECK_C_FLAG(pipe)
CHECK_CXX_FLAG(pipe)
# check for -fno-strict-aliasing
# XXX - THIS FLAG IS REQUIRED if any level of optimization is
# enabled with GCC as we do use aliasing and type-punning.
BRLCAD_CHECK_C_FLAG(fno-strict-aliasing)
BRLCAD_CHECK_CXX_FLAG(fno-strict-aliasing)
CHECK_C_FLAG(fno-strict-aliasing)
CHECK_CXX_FLAG(fno-strict-aliasing)
# check for -fno-common (libtcl needs it on darwin)
BRLCAD_CHECK_C_FLAG(fno-common)
BRLCAD_CHECK_CXX_FLAG(fno-common)
CHECK_C_FLAG(fno-common)
CHECK_CXX_FLAG(fno-common)
# check for -fexceptions
# this is needed to resolve __Unwind_Resume when compiling and
# linking against openNURBS in librt for some binaries, for
# example rttherm (i.e. any -static binaries)
BRLCAD_CHECK_C_FLAG(fexceptions)
BRLCAD_CHECK_CXX_FLAG(fexceptions)
CHECK_C_FLAG(fexceptions)
CHECK_CXX_FLAG(fexceptions)
# check for -ftemplate-depth-NN this is needed in libpc and
# other code using boost where the template instantiation depth
# needs to be increased from the default ANSI minimum of 17.
BRLCAD_CHECK_CXX_FLAG(ftemplate-depth-128)
CHECK_CXX_FLAG(ftemplate-depth-128)
# dynamic SSE optimizations for NURBS processing
#
# XXX disable the SSE flags for now as they can cause illegal instructions.
# the test needs to also be tied to run-time functionality since gcc
# may still output SSE instructions (e.g., for cross-compiling).
# BRLCAD_CHECK_C_FLAG(msse)
# BRLCAD_CHECK_C_FLAG(msse2)
BRLCAD_CHECK_C_FLAG(msse3 BUILD_TYPES Debug)
# CHECK_C_FLAG(msse)
# CHECK_C_FLAG(msse2)
CHECK_C_FLAG(msse3 BUILD_TYPES Debug)
# Check for c90 support with gnu extensions if we're not building for
# a release so we get more broad portability testing. Since the
# default is debug, it will be the more difficult to keep working
# given it's the lesser feature-rich C standard.
BRLCAD_CHECK_C_FLAG("std=gnu89" BUILD_TYPES Debug)
# Check for c99 support with gnu extensions when we are building for a
# release so we get to leverage more system features where available.
#
# Also check for c99 conformance (with extensions) since some platform
# environments require it due to c99-specific system headers (e.g.,
# /System/Library/Frameworks/OpenGL.framework/Headers/gl.h on Mac OS X
# having '//' comments embedded).
BRLCAD_CHECK_C_FLAG("std=gnu99" BUILD_TYPES Release VARS C99_FLAG)
# Silence check for unused arguments (used to silence clang warnings about
# unused options on the command line). By default clang generates a lot of
# warnings about such arguments, and we don't really care.
BRLCAD_CHECK_C_FLAG(Qunused-arguments)
BRLCAD_CHECK_CXX_FLAG(Qunused-arguments)
CHECK_C_FLAG(Qunused-arguments)
CHECK_CXX_FLAG(Qunused-arguments)
# 64bit compilation flags
if(${CMAKE_WORD_SIZE} MATCHES "64BIT")
BRLCAD_CHECK_C_FLAG(m64 VARS 64BIT_FLAG)
BRLCAD_CHECK_C_FLAG("arch x86_64" VARS 64BIT_FLAG)
BRLCAD_CHECK_C_FLAG(64 VARS 64BIT_FLAG)
BRLCAD_CHECK_C_FLAG("mabi=64" VARS 64BIT_FLAG)
CHECK_C_FLAG(m64 VARS 64BIT_FLAG)
CHECK_C_FLAG("arch x86_64" VARS 64BIT_FLAG)
CHECK_C_FLAG(64 VARS 64BIT_FLAG)
CHECK_C_FLAG("mabi=64" VARS 64BIT_FLAG)
if(NOT 64BIT_FLAG AND ${CMAKE_WORD_SIZE} MATCHES "64BIT")
message(FATAL_ERROR "Trying to compile 64BIT but all 64 bit compiler flag tests failed!")
endif(NOT 64BIT_FLAG AND ${CMAKE_WORD_SIZE} MATCHES "64BIT")
BRLCAD_CHECK_C_FLAG(q64 VARS 64BIT_FLAG)
CHECK_C_FLAG(q64 VARS 64BIT_FLAG)
ADD_NEW_FLAG(C 64BIT_FLAG ALL)
ADD_NEW_FLAG(CXX 64BIT_FLAG ALL)
ADD_NEW_FLAG(SHARED_LINKER 64BIT_FLAG ALL)
@@ -282,12 +317,12 @@ if(${CMAKE_WORD_SIZE} MATCHES "64BIT")
endif(${CMAKE_WORD_SIZE} MATCHES "64BIT")
# 32 bit compilation flags
if(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND NOT ${BRLCAD_WORD_SIZE} MATCHES "AUTO")
BRLCAD_CHECK_C_FLAG(m32 VARS 32BIT_FLAG)
BRLCAD_CHECK_C_FLAG("arch i686" VARS 32BIT_FLAG)
BRLCAD_CHECK_C_FLAG(32 VARS 32BIT_FLAG)
BRLCAD_CHECK_C_FLAG("mabi=32" VARS 32BIT_FLAG)
BRLCAD_CHECK_C_FLAG(q32 VARS 32BIT_FLAG)
if(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND NOT ${WORD_SIZE} MATCHES "AUTO")
CHECK_C_FLAG(m32 VARS 32BIT_FLAG)
CHECK_C_FLAG("arch i686" VARS 32BIT_FLAG)
CHECK_C_FLAG(32 VARS 32BIT_FLAG)
CHECK_C_FLAG("mabi=32" VARS 32BIT_FLAG)
CHECK_C_FLAG(q32 VARS 32BIT_FLAG)
if(NOT 32BIT_FLAG AND ${CMAKE_WORD_SIZE} MATCHES "32BIT")
message(FATAL_ERROR "Trying to compile 32BIT but all 32 bit compiler flag tests failed!")
endif(NOT 32BIT_FLAG AND ${CMAKE_WORD_SIZE} MATCHES "32BIT")
@@ -295,30 +330,30 @@ if(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND NOT ${BRLCAD_WORD_SIZE} MATCHES "AUTO"
ADD_NEW_FLAG(CXX 32BIT_FLAG ALL)
ADD_NEW_FLAG(SHARED_LINKER 32BIT_FLAG ALL)
ADD_NEW_FLAG(EXE_LINKER 32BIT_FLAG ALL)
endif(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND NOT ${BRLCAD_WORD_SIZE} MATCHES "AUTO")
endif(${CMAKE_WORD_SIZE} MATCHES "32BIT" AND NOT ${WORD_SIZE} MATCHES "AUTO")
if(BRLCAD_ENABLE_PROFILING)
BRLCAD_CHECK_C_FLAG(pg VARS PROFILE_FLAG)
BRLCAD_CHECK_C_FLAG(p VARS PROFILE_FLAG)
BRLCAD_CHECK_C_FLAG(prof_gen VARS PROFILE_FLAG)
if(ENABLE_PROFILING)
CHECK_C_FLAG(pg VARS PROFILE_FLAG)
CHECK_C_FLAG(p VARS PROFILE_FLAG)
CHECK_C_FLAG(prof_gen VARS PROFILE_FLAG)
if(NOT PROFILE_FLAG)
message("Warning - profiling requested, but don't know how to profile with this compiler - disabling.")
set(BRLCAD_ENABLE_PROFILING OFF)
set(ENABLE_PROFILING OFF)
else(NOT PROFILE_FLAG)
ADD_NEW_FLAG(C PROFILE_FLAG ALL)
ADD_NEW_FLAG(CXX PROFILE_FLAG ALL)
endif(NOT PROFILE_FLAG)
endif(BRLCAD_ENABLE_PROFILING)
endif(ENABLE_PROFILING)
# Debugging flags
if(BRLCAD_FLAGS_DEBUG)
BRLCAD_CHECK_C_FLAG(g GROUPS DEBUG_C_FLAGS)
BRLCAD_CHECK_CXX_FLAG(g GROUPS DEBUG_CXX_FLAGS)
if(FLAGS_DEBUG)
CHECK_C_FLAG(g GROUPS DEBUG_C_FLAGS)
CHECK_CXX_FLAG(g GROUPS DEBUG_CXX_FLAGS)
if(APPLE)
EXEC_PROGRAM(sw_vers ARGS -productVersion OUTPUT_VARIABLE MACOSX_VERSION)
if(${MACOSX_VERSION} VERSION_LESS "10.5")
BRLCAD_CHECK_C_FLAG(ggdb3 GROUPS DEBUG_C_FLAGS)
BRLCAD_CHECK_CXX_FLAG(ggdb3 GROUPS DEBUG_CXX_FLAGS)
CHECK_C_FLAG(ggdb3 GROUPS DEBUG_C_FLAGS)
CHECK_CXX_FLAG(ggdb3 GROUPS DEBUG_CXX_FLAGS)
else(${MACOSX_VERSION} VERSION_LESS "10.5")
# CHECK_C_COMPILER_FLAG silently eats gstabs+ - also, compiler
# apparently doesn't like mixing stabs with another debug flag.
@@ -326,8 +361,8 @@ if(BRLCAD_FLAGS_DEBUG)
set(DEBUG_CXX_FLAGS "-ggdb")
endif(${MACOSX_VERSION} VERSION_LESS "10.5")
else(APPLE)
BRLCAD_CHECK_C_FLAG(ggdb3 GROUPS DEBUG_C_FLAGS)
BRLCAD_CHECK_CXX_FLAG(ggdb3 GROUPS DEBUG_CXX_FLAGS)
CHECK_C_FLAG(ggdb3 GROUPS DEBUG_C_FLAGS)
CHECK_CXX_FLAG(ggdb3 GROUPS DEBUG_CXX_FLAGS)
endif(APPLE)
if(CMAKE_CONFIGURATION_TYPES)
set(debug_config_list "${CMAKE_CONFIGURATION_TYPES}")
@@ -340,7 +375,7 @@ if(BRLCAD_FLAGS_DEBUG)
ADD_NEW_FLAG(SHARED_LINKER DEBUG_C_FLAGS "${debug_config_list}")
ADD_NEW_FLAG(EXE_LINKER DEBUG_C_FLAGS "${debug_config_list}")
mark_as_advanced(DEBUG_FLAGS)
endif(BRLCAD_FLAGS_DEBUG)
endif(FLAGS_DEBUG)
# Set the minimum compilation linkage for Mac systems if not already
@@ -352,16 +387,16 @@ if(APPLE)
endif(NOT MACOSX_DEPLOYMENT_TARGET)
if(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.3")
BRLCAD_CHECK_C_FLAG("mmacosx-version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk" VARS SDK_FLAG)
CHECK_C_FLAG("mmacosx-version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk" VARS SDK_FLAG)
endif(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.3")
if(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.4")
BRLCAD_CHECK_C_FLAG("mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" VARS SDK_FLAG)
CHECK_C_FLAG("mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" VARS SDK_FLAG)
endif(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.4")
if(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.5")
BRLCAD_CHECK_C_FLAG("mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk" VARS SDK_FLAG)
CHECK_C_FLAG("mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk" VARS SDK_FLAG)
endif(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.5")
if(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.6")
BRLCAD_CHECK_C_FLAG("mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk" VARS SDK_FLAG)
CHECK_C_FLAG("mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk" VARS SDK_FLAG)
endif(MACOSX_DEPLOYMENT_TARGET STREQUAL "10.6")
ADD_NEW_FLAG(C SDK_FLAG ALL)
+2
View File
@@ -140,10 +140,12 @@ if(NOT BRLCAD_IS_SUBBUILD)
set(DISTCHECK_BUILD_CMD "$(MAKE)")
set(DISTCHECK_INSTALL_CMD "$(MAKE) install")
set(DISTCHECK_REGRESS_CMD "$(MAKE) regress")
set(DISTCHECK_TEST_CMD "$(MAKE) test")
else("${CMAKE_GENERATOR}" MATCHES "Make")
set(DISTCHECK_BUILD_CMD "${CMAKE_COMMAND} -E build .")
set(DISTCHECK_INSTALL_CMD "${CMAKE_COMMAND} -E build . --target install")
set(DISTCHECK_REGRESS_CMD "${CMAKE_COMMAND} -E build . --target regress")
set(DISTCHECK_TEST_CMD "${CMAKE_COMMAND} -E build . --target test")
set(TARGET_REDIRECT "")
endif("${CMAKE_GENERATOR}" MATCHES "Make")
+8 -3
View File
@@ -90,10 +90,15 @@ add_custom_target(distcheck-${TARGET_SUFFIX}
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Compiling using source from TGZ archive..."
COMMAND ${CMAKE_COMMAND} -E chdir distcheck-${TARGET_SUFFIX}/${CPACK_SOURCE_PACKAGE_FILE_NAME} @DISTCHECK_BUILD_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Compiling using source from TGZ archive... Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression and benchmark testing..."
COMMAND ${CMAKE_COMMAND} -E chdir distcheck-${TARGET_SUFFIX}/${CPACK_SOURCE_PACKAGE_FILE_NAME} @DISTCHECK_REGRESS_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory benchmark testing..."
COMMAND ${CMAKE_COMMAND} -E chdir distcheck-${TARGET_SUFFIX}/${CPACK_SOURCE_PACKAGE_FILE_NAME}/bench ../${BIN_DIR}/benchmark run TIMEFRAME=1 @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression and benchmark testing... Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory benchmark testing...Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression testing..."
COMMAND ${CMAKE_COMMAND} -E chdir distcheck-${TARGET_SUFFIX}/${CPACK_SOURCE_PACKAGE_FILE_NAME} @DISTCHECK_REGRESS_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression testing...Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory unit testing..."
COMMAND ${CMAKE_COMMAND} -E chdir distcheck-${TARGET_SUFFIX}/${CPACK_SOURCE_PACKAGE_FILE_NAME} @DISTCHECK_TEST_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory unit testing... Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Install from tgz build directory..."
COMMAND ${CMAKE_COMMAND} -E chdir distcheck-${TARGET_SUFFIX}/${CPACK_SOURCE_PACKAGE_FILE_NAME} @DISTCHECK_INSTALL_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Install from tgz build directory... Done."
+8 -3
View File
@@ -61,10 +61,15 @@ add_custom_target(distcheck-${TARGET_SUFFIX}
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Compiling using source from TGZ archive..."
COMMAND ${CMAKE_COMMAND} -E chdir "distcheck-${TARGET_SUFFIX}/${build_dir}" @DISTCHECK_BUILD_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Compiling using source from TGZ archive... Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression and benchmark testing..."
COMMAND ${CMAKE_COMMAND} -E chdir "distcheck-${TARGET_SUFFIX}/${build_dir}" @DISTCHECK_REGRESS_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory benchmark testing..."
COMMAND ${CMAKE_COMMAND} -E chdir "distcheck-${TARGET_SUFFIX}/${build_dir}/bench" ../${BIN_DIR}/benchmark run TIMEFRAME=1 @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression and benchmark testing... Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory benchmark testing...Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression testing..."
COMMAND ${CMAKE_COMMAND} -E chdir "distcheck-${TARGET_SUFFIX}/${build_dir}" @DISTCHECK_REGRESS_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory regression testing...Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory unit testing..."
COMMAND ${CMAKE_COMMAND} -E chdir "distcheck-${TARGET_SUFFIX}/${build_dir}" @DISTCHECK_TEST_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Run build-directory unit testing... Done."
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Install from tgz build directory..."
COMMAND ${CMAKE_COMMAND} -E chdir "distcheck-${TARGET_SUFFIX}/${build_dir}" @DISTCHECK_INSTALL_CMD@ @TARGET_REDIRECT@
COMMAND ${CMAKE_COMMAND} -E echo "-- distcheck-${TARGET_SUFFIX} - Install from tgz build directory... Done."
+16 -4
View File
@@ -6,7 +6,8 @@
#endif
#define chararraysize 2048
int main(void) {
char hostname[chararraysize];
int res __attribute__((unused)) = 0;
char hostname[chararraysize] __attribute__((unused));
FILE *outfp = NULL;
#ifdef _WIN32
LPHOSTENT lpHostEntry;
@@ -15,10 +16,21 @@ int main(void) {
wVersionRequested = MAKEWORD(1, 1);
WSAStartup(wVersionRequested, &wsaData);
#endif
hostname[chararraysize - 1] = '\0';
gethostname(hostname, chararraysize - 1);
outfp = fopen("${BRLCAD_BINARY_DIR}/include/conf/HOST.tmp", "w");
fprintf(outfp, "\"%s\"", hostname);
#if defined(_BSD_SOURCE) \
|| defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500 \
|| defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112
res = gethostname(hostname, chararraysize - 1);
if (!res && hostname[0] != ' ')
fprintf(outfp, "\"%s\"", hostname);
else
fprintf(outfp, "\"%s\"", "unknown");
#else
fprintf(outfp, "\"%s\"", "unknown");
#endif
fclose(outfp);
return 0;
}
+5 -2
View File
@@ -9,9 +9,12 @@
#define chararraysize 2048
int main(void) {
FILE *outfp = NULL;
char *name = getenv(USERVAR);
outfp = fopen("${BRLCAD_BINARY_DIR}/include/conf/USER.tmp", "w");
printf("user name: %s\n", getenv(USERVAR));
fprintf(outfp, "\"%s\"", getenv(USERVAR));
if (!name)
name = "unknown";
printf("user name: %s\n", name);
fprintf(outfp, "\"%s\"", name);
fclose(outfp);
return 0;
}
+3 -3
View File
@@ -11,8 +11,8 @@ int
main ()
{
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
;
wait(&s);
s = WIFEXITED(s) ? WEXITSTATUS(s) : 1;
return 0;
}
File diff suppressed because it is too large Load Diff
@@ -169,7 +169,7 @@ Usage: %s port_num\n\
other_refs:
...list of other refences, if any,
...list of other references, if any,
semicolon-separated, no other embellishments...
...both lists will go in the SEE ALSO section...
+6
View File
@@ -1,3 +1,9 @@
brlcad (7.24.2-0) unstable; urgency=low
* update brlcad version
-- Jordi Sayol <g.sayol@yahoo.es> Thu, 05 Sep 2013 23:44:51 +0200
brlcad (7.24.0-0) unstable; urgency=low
* update brlcad version
-5
View File
@@ -61,10 +61,6 @@ if(SH_EXEC)
${SH_EXEC} ${CMAKE_SOURCE_DIR}/regress/red.sh ${CMAKE_SOURCE_DIR}
DEPENDS mged
)
#add_custom_target(regress-vls_vprintf
# ${SH_EXEC} ${CMAKE_SOURCE_DIR}/regress/vls_vprintf.sh ${CMAKE_SOURCE_DIR}
# DEPENDS test_vls_vprintf
# )
add_custom_target(regress-nirt
${SH_EXEC} ${CMAKE_SOURCE_DIR}/regress/nirt.sh ${CMAKE_SOURCE_DIR}
DEPENDS mged nirt
@@ -185,7 +181,6 @@ CMAKEFILES(
tgms/m35.cg.gz
tgms/solids-simple.mged
tgms/solids.mged
vls_vprintf.sh
weight.sh
)
+2 -1
View File
@@ -88,7 +88,8 @@ echo "running common.h inclusion order check..."
# small performance savings.
FILES="`grep -I -e '#[[:space:]]*include' $SRCFILES $INCFILES | grep -E 'common.h|<' | sed 's/:.*//g' | sort | uniq`"
EXEMPT="bin.h bio.h config_win.h pstdint.h uce-dirent.h ttcp.c"
LEXERS="schema.h obj_grammar.c obj_grammar.cpp obj_scanner.h points_scan.c script.c"
EXEMPT="bin.h bio.h config_win.h pstdint.h uce-dirent.h ttcp.c $LEXERS"
FOUND=
for file in $FILES ; do
-127
View File
@@ -1,127 +0,0 @@
#!/bin/sh
# V L S _ V P R I N T F . S H
# BRL-CAD
#
# Copyright (c) 2010-2013 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# 3. The name of the author may not be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
###
# for debugging uncomment the following:
#set -x
# Ensure /bin/sh
export PATH || (echo "This isn't sh."; sh $0 $*; kill $$)
# source common library functionality, setting ARGS, NAME_OF_THIS,
# PATH_TO_THIS, and THIS.
. "$1/regress/library.sh"
TEST=vls_vprintf
TESTSCRIPT=$TEST.sh
TESTEXE=test_vls_vprintf
TESTLOG=${TEST}_test.log
TESTCMD="`ensearch $TESTEXE`"
if test ! -f "$TESTCMD" ; then
echo "Unable to find $TESTEXE, aborting"
exit 1
fi
# another file for test output
ERRLOG=${TEST}_test.stderr
rm -f $TESTLOG $ERRLOG
# the known number of expected failures is:
KNOWNEXP=0
# run the test and capture exit status
`$TESTCMD 1> $TESTLOG 2>$ERRLOG`
STATUS=$?
# STATUS contains number of UNEXPECTED failures
# get the failure numbers
if [ -f $ERRLOG ] ; then
EXP=`cat $ERRLOG`
else
EXP=0
fi
if [ $STATUS -ge 128 ] ; then
# a signal received
SIGNUM=`expr $STATUS - 128`
echo "-> $TESTSCRIPT FAILED with signal $SIGNUM."
if [ $SIGNUM -eq 11 ] ; then
echo " (SIGSEGV, invalid memory reference)"
fi
echo " See file './regress/$TESTLOG' for results (may be empty with a code dump)."
# allow the rest of the test to continue
STATUS=`expr $STATUS - $SIGNUM - 128`
fi
# FIXME: this if/else block can be more efficient
if [ $STATUS -eq 0 ] ; then
if [ $KNOWNEXP -ne 0 ] ; then
if [ $EXP -eq $KNOWNEXP ] ; then
echo "-> $TESTSCRIPT succeeded with $EXP expected failed test(s)."
echo " See file './regress/$TESTLOG' for results."
echo " Do NOT use the failures in production code."
fi
elif [ $EXP -ne 0 ] ; then
echo "-> $TESTSCRIPT succeeded with $EXP expected failed test(s)."
echo " But SURPRISE! We expected $KNOWNEXP failed tests so something has changed!"
echo " See file './regress/$TESTLOG' for results and compare"
echo " with file './src/libbu/test_vls.c'."
echo " Do NOT use the failures in production code."
else
echo "-> $TESTSCRIPT succeeded with no failures of any kind."
# but one more check
if [ $KNOWNEXP -ne 0 ] ; then
echo " But SURPRISE! We expected $KNOWNEXP failed tests so"
echo " something has changed!"
echo " See file './regress/$TESTLOG' for results and compare"
echo " with file './src/libbu/test_vls.c'."
else
# remove test products since all appears well
rm -f $TESTLOG $ERRLOG
fi
fi
else
echo "-> $TESTSCRIPT unexpectedly FAILED $STATUS test(s)."
echo " See files './regress/$TESTLOG' and."
echo " './regress/$ERRLOG' for results."
fi
exit $STATUS
# Local Variables:
# mode: sh
# tab-width: 8
# sh-indentation: 4
# sh-basic-offset: 4
# indent-tabs-mode: t
# End:
# ex: shiftwidth=4 tabstop=8
+1
View File
@@ -177,6 +177,7 @@ endwhile(${current_level} LESS ${HIGHEST_TARGET_LEVEL})
#endif(${HIGHEST_TARGET_LEVEL} GREATER 1)
CMAKEFILES(README external)
CMAKEFILES(compat)
# Local Variables:
# tab-width: 8
+1 -1
View File
@@ -195,7 +195,7 @@ render_cut_init(render_t *render, const char *buf)
vect_t v;
VSUB2(v, ray_pos, render->tie->mid);
shot_len = 2.0 * render->tie->radius + MAGNITUDE(v) - render->tie->radius;;
shot_len = 2.0 * render->tie->radius + MAGNITUDE(v) - render->tie->radius;
}
/*
+2 -2
View File
@@ -347,7 +347,7 @@ cmd_hist(void *clientData, int argc, const char **argv)
static int
wrapper_func(ClientData data, Tcl_Interp *interp, int argc, const char *argv[])
{
struct bu_cmdtab *ctp = (struct bu_cmdtab *)data;;
struct bu_cmdtab *ctp = (struct bu_cmdtab *)data;
return ctp->ct_func(interp, argc, argv);
}
@@ -380,7 +380,7 @@ cmdInit(Tcl_Interp *interp)
{"history", cmd_history},
{"hist", cmd_hist},
{"q", cmd_quit},
{(char *)NULL, BU_CMD_NULL}
{(const char *)NULL, BU_CMD_NULL}
};
/* Register bwish/btclsh commands */
+1
View File
@@ -45,6 +45,7 @@
#endif
#include "bu.h"
#include "dm.h"
/* We need to be careful about tty resetting - xcodebuild
* and resetTty were locking up. Add a tty check
+6
View File
@@ -0,0 +1,6 @@
This directory contains various header files that are used make code
C89 compliant. Typically, files from this directory are used to
provide a function declaration to compile BRL-CAD when a system
doesn't know about the functions which are normally hidden for C89.
When the whole world becomes POSIX- compliant this directory should be
unnecessary.
+166
View File
@@ -0,0 +1,166 @@
Following are declarations of C functions available in libc but hidden
by various standards after C89 or hidden by other undefined macros.
See man feature_test_macros(7) for a definitive list of all such
macros.
==================================================================
------------------------------------------------------------------
defs: _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
#include <stdio.h>
int fileno(FILE *stream);
FILE *fdopen(int fd, const char *mode);
------------------------------------------------------------------
defs:_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <stdio.h>
int snprintf(char *str, size_t size, const char *format, ...);
------------------------------------------------------------------
std: 4.4BSD, POSIX.1-2001.
#include <strings.h>
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char *s1, const char *s2, size_t n);
------------------------------------------------------------------
defs: _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200112L
#include <unistd.h>
int gethostname(char *name, size_t len);
------------------------------------------------------------------
defs: _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment, size_t size);
------------------------------------------------------------------
defs: _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
#include <limits.h>
#include <stdlib.h>
char *realpath(const char *path, char *resolved_path);
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <math.h>
double hypot(double x, double y);
------------------------------------------------------------------
defs:
#include <stdlib.h>
srand48(), drand()
fix: replace with rand()
------------------------------------------------------------------
defs: _SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
#include <stdlib.h>
random(), srandom()
------------------------------------------------------------------
defs: _BSD_SOURCE || !(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
#include <unistd.h>
getpagesize_compat.h
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE
#include <ctype.h>
isascii_compat.h
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <math.h>
isinf_compat.h
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <math.h>
isnan_compat.h
------------------------------------------------------------------
std: C99, POSIX.1-2001.
#include <math.h>
modff_compat.h
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE ||
_POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <math.h>
nextafter_compat.h
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <math.h>
nextafterf_compat.h
------------------------------------------------------------------
defs: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || _ISOC99_SOURCE ||
_POSIX_C_SOURCE >= 200112L;
or cc -std=c99
#include <math.h>
rint_compat.h
------------------------------------------------------------------
stds: SVr4, 4.3BSD, POSIX.1-2001.
strdup_compat.h
------------------------------------------------------------------
OTHER C89 FIXES documented here:
===============================
------------------------------------------------------------------
#include <netdb.h>
struct hostent member 'h_addr' is defined as actual member
'h_addr_list[0]' (for backward compatibility); that define is
hidden by macros
__USE_MISC || defined __USE_GNU
fix is to substitute 'h_addr_list[0]' for 'h_addr'
affected several files (fixed):
./src/util/ttcp.c
./src/libpkg/pkg.c
also affects (not fixed!):
./src/other/tcl/win/tclWinSock.c
------------------------------------------------------------------
#include <signal.h>
signal handler struct __sighandler_t is typedef'd differently by several macros:
#ifdef HAVE_SIGHANDLER_T
typedef __sighandler_t sighandler_t;
#endif
#ifdef HAVE_SIG_T
typedef __sighandler_t sig_t;
#endif
fix is to leverage portable function sigaction(2) in addition to
signal(2) for platforms that have one but not the other.
only file affected:
./src/libbu/interrupt.c
------------------------------------------------------------------
#define _GNU_SOURCE
#include <errno.h>
extern char *program_invocation_name;
extern char *program_invocation_short_name;
not portable
proper fix is to use a bu_* function that does not use them
fixed by turning off its use for strict compatibility checks
------------------------------------------------------------------
#endif /* BRLCAD_SRC_COMPAT_H */
+85
View File
@@ -0,0 +1,85 @@
Following are declarations of C functions available in libc but hidden
by various standards after C99 or hidden by other undefined macros.
See man feature_test_macros(7) for a definitive list of all such
macros.
The fix is to use libbu/bu_* versions of those functions. Those bu_*
functions not yet available are so marked.
Note that some bu_* functions use non-C99 solutions so they need to be
fixed. Those functions are so marked.
There are currently seven functions NOT in C99. Of those seven, only
three have no working bu_* solution.
==================================================================
------------------------------------------------------------------
error: implicit declaration of function 'fdopen'
error: implicit declaration of function 'fileno'
defs: _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE
stds: POSIX.1-1990 (fdopen)
#include <stdio.h>
int fileno(FILE *stream);
FILE *fdopen(int fd, const char *mode);
fix:
use bu_fileno (not yet available)
use bu_fdopen (not yet available)
------------------------------------------------------------------
error: implicit declaration of function 'posix_memalign'
defs: _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
stds: POSIX.1d
#include <stdlib.h>
int posix_memalign(void **memptr, size_t alignment, size_t size);
fix:
use bu_posix_memalign (not yet available)
------------------------------------------------------------------
error: implicit declaration of function 'gethostname'
defs: _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _POSIX_C_SOURCE >= 200112L (since glibc 2.12)
defs: _BSD_SOURCE || _XOPEN_SOURCE >= 500 (before glibc 2.12)
stds: POSIX.1-2001
#include <unistd.h>
int gethostname(char *name, size_t len);
fix:
use bu_gethostname
------------------------------------------------------------------
error: implicit declaration of function 'realpath'
defs: _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
stds: 4.4BSD, POSIX.1-2001.
#include <limits.h>
#include <stdlib.h>
char *realpath(const char *path, char *resolved_path);
fix:
use bu_realpath
------------------------------------------------------------------
error: implicit declaration of function 'strcasecmp'
error: implicit declaration of function 'strncasecmp'
stds: 4.4BSD, POSIX.1-2001.
#include <strings.h>
int strcasecmp(const char *s1, const char *s2);
int strncasecmp(const char *s1, const char *s2, size_t n);
fix:
use bu_strcasecmp
use bu_strncasecmp
------------------------------------------------------------------
+10
View File
@@ -0,0 +1,10 @@
#ifndef BRLCAD_FDOPEN_COMPAT_H
#define BRLCAD_FDOPEN_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
#include <stdio.h>
FILE *fdopen(int fd, const char *mode);
#endif /* BRLCAD_FDOPEN_COMPAT_H */
+10
View File
@@ -0,0 +1,10 @@
#ifndef BRLCAD_FILENO_COMPAT_H
#define BRLCAD_FILENO_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
#include <stdio.h>
int fileno(FILE *stream);
#endif /* BRLCAD_FILENO_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_GETHOSTNAME_COMPAT_H
#define BRLCAD_GETHOSTNAME_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
int gethostname(char *name, size_t len);
#endif /* BRLCAD_GETHOSTNAME_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_HYPOT_COMPAT_H
#define BRLCAD_HYPOT_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
double hypot(double x, double y);
#endif /* BRLCAD_HYPOT_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_POSIX_MEMALIGN_COMPAT_H
#define BRLCAD_POSIX_MEMALIGN_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
int posix_memalign(void **memptr, size_t alignment, size_t size);
#endif /* BRLCAD_POSIX_MEMALIGN_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_REALPATH_COMPAT_H
#define BRLCAD_REALPATH_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
char *realpath(const char *path, char *resolved_path);
#endif /* BRLCAD_REALPATH_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_SNPRINTF_COMPAT_H
#define BRLCAD_SNPRINTF_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
int snprintf(char *str, size_t size, const char *format, ...);
#endif /* BRLCAD_SNPRINTF_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_STRCASECMP_COMPAT_H
#define BRLCAD_STRCASECMP_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
int strcasecmp(const char *s1, const char *s2);
#endif /* BRLCAD_STRCASECMP_COMPAT_H */
+8
View File
@@ -0,0 +1,8 @@
#ifndef BRLCAD_STRNCASECMP_COMPAT_H
#define BRLCAD_STRNCASECMP_COMPAT_H
/* see file 'src/compat/README.compat' for more details */
int strncasecmp(const char *s1, const char *s2, size_t n);
#endif /* BRLCAD_STRNCASECMP_COMPAT_H */
+15
View File
@@ -0,0 +1,15 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
int
main(void)
{
char *nam = tmpnam(NULL);
int fd = open(nam, O_WRONLY);
FILE *fp __attribute((unused))__ = fdopen(fd, "w");
return 0;
}
+10
View File
@@ -0,0 +1,10 @@
#include <stdio.h>
int
main(void)
{
FILE *fp = tmpfile();
int fd __attribute((unused))__ = fileno(fp);
return 0;
}
+14
View File
@@ -0,0 +1,14 @@
#include <unistd.h>
int
main(void)
{
const size_t bufsiz = 512;
char *name = (char *)malloc(bufsiz);
int res __attribute((unused))__ = gethostname(name, bufsiz);
if (name)
free(name);
return 0;
}
+14
View File
@@ -0,0 +1,14 @@
#include <stdlib.h>
int
main(void)
{
char *buf;
const size_t bufsiz = 512;
int res = posix_memalign(&buf, sizeof(void *), bufsiz);
if (!res && buf)
free(buf);
return 0;
}
+13
View File
@@ -0,0 +1,13 @@
#include <limits.h>
#include <stdlib.h>
int
main(int argc __attribute((unused))__, char **argv)
{
char *name = realpath(argv[0], NULL);
if (name)
free(name);
return 0;
}
+12
View File
@@ -0,0 +1,12 @@
#include <strings.h>
int
main(void)
{
const char s1[] = "one";
const char s2[] = "two";
int res __attribute((unused))__ = strcasecmp(s1, s2);
return 0;
}
+12
View File
@@ -0,0 +1,12 @@
#include <strings.h>
int
main(void)
{
const char s1[] = "one";
const char s2[] = "two";
int res __attribute((unused))__ = strncasecmp(s1, s2);
return 0;
}
+13 -7
View File
@@ -55,28 +55,34 @@ case $CASE in
1)
comgeom-g $OPT -v4 m35.cg4 $DB
break;;
break
;;
2)
comgeom-g $OPT m35a2.cg5 $DB
break;;
break
;;
3)
comgeom-g $OPT apache.cg $DB
break;;
break
;;
4)
comgeom-g $OPT avlb.cg5 $DB
break;;
break
;;
5)
comgeom-g $OPT -v1 atr.cg1 $DB
break;;
break
;;
*)
echo "Try /$1/ unknown"
exit 1;
break;;
exit 1
break
;;
esac
# Local Variables:
+14 -15
View File
@@ -20,11 +20,11 @@
*/
/** @file conv/g-shell-rect.c
*
* This routine creates an single NMG shell from an object by
* This routine creates a single NMG shell from an object by
* raytracing and using the hit points as vertices in the shell.
* Raytracing is done in the Y-direction primarily. The -r option
* requests raytracing in the X and Z directions to refine the shape
* of the shell.
* of the shell. [Sept. 12, 2013: CANNOT FIND -r OPTION!]
*
*/
@@ -97,8 +97,8 @@ static struct xray *xz_rays;
static struct xray *yz_rays;
static struct rt_i *rtip;
static struct bn_tol tol;
static char *usage="Usage:\n\
%s [-d debug_level] [-b] [-n] [-v] [-i initial_ray_dir] [-g cell_size] [-d debug_level] -o brlcad_output_file database.g object1 object2...\n";
static char *usage="Usage: %s [-a rpp_args] [-R edge_tol] [-p plotfile] [-X lvl]\n\
[-d debug_level] [-b] [-n] [-i initial_ray_dir] [-g cell_size] -o brlcad_output_file database.g object1 object2...\n";
static char dir_ch[3]={ 'X', 'Y', 'Z' };
static struct local_part *xy_parts=(struct local_part *)NULL;
@@ -1659,7 +1659,7 @@ main(int argc, char **argv)
BU_LIST_INIT(&subtract_rpp_head);
/* Get command line arguments. */
while ((c=bu_getopt(argc, argv, "bi:a:s:nR:g:o:d:p:X:")) != -1) {
while ((c=bu_getopt(argc, argv, "bi:a:nR:g:o:d:p:X:h?")) != -1) {
switch (c) {
case 'i': /* set initial ray direction */
switch (*bu_optarg)
@@ -1764,22 +1764,21 @@ main(int argc, char **argv)
sscanf(bu_optarg, "%x", (unsigned int *)&RTG.NMG_debug);
bu_log("%s: setting RTG.NMG_debug to x%x\n", argv[0], RTG.NMG_debug);
break;
default:
bu_exit(1, usage, argv[0]);
}
}
if (bu_optind+1 >= argc) {
if (bu_optind+1 >= argc)
bu_exit(1, usage, argv[0]);
}
if (output_file) {
if ((fd_out = wdb_fopen(output_file)) == NULL) {
perror(argv[0]);
bu_exit(1, "ERROR: Cannot open output file (%s)\n", output_file);
}
mk_id(fd_out, "test g-sgp");
}
else
if (!output_file)
bu_exit(1, "ERROR: Output file must be specified!\n");
if ((fd_out = wdb_fopen(output_file)) == NULL) {
perror(argv[0]);
bu_exit(1, "ERROR: Cannot open output file (%s)\n", output_file);
}
mk_id(fd_out, "test g-sgp");
if (plotfile) {
if ((fd_plot = fopen(plotfile, "wb")) == NULL) {
+8 -12
View File
@@ -405,7 +405,7 @@ int main(int argc, char *argv[])
rt_init_resource(&rt_uniresource, 0, NULL);
/* process command line arguments */
while ((c = bu_getopt(argc, argv, "vo:ys:f")) != -1) {
while ((c = bu_getopt(argc, argv, "vo:ys:fh?")) != -1) {
switch (c) {
case 'v':
verbose++;
@@ -429,13 +429,12 @@ int main(int argc, char *argv[])
default:
bu_exit(1, usage, argv[0]);
break;
}
}
/* param check */
if (bu_optind+1 >= argc) {
if (bu_optind+1 >= argc)
bu_exit(1, usage, argv[0]);
}
/* get database filename and object */
db_file = argv[bu_optind++];
object = argv[bu_optind];
@@ -445,12 +444,11 @@ int main(int argc, char *argv[])
perror(argv[0]);
bu_exit(1, "Cannot open geometry database file %s\n", db_file);
}
if (db_dirbuild(dbip)) {
if (db_dirbuild(dbip))
bu_exit(1, "db_dirbuild() failed!\n");
}
if (verbose) {
if (verbose)
fprintf(stderr, ">> opened db '%s'\n", dbip->dbi_title);
}
/* setup output stream */
if (out_file == NULL) {
@@ -470,15 +468,13 @@ int main(int argc, char *argv[])
db_update_nref(dbip, &rt_uniresource);
dp = db_lookup(dbip, object, 0);
if (dp == RT_DIR_NULL) {
if (dp == RT_DIR_NULL)
bu_exit(1, "Object %s not found in database!\n", object);
}
/* generate mesh list */
db_functree(dbip, dp, NULL, mesh_tracker, &rt_uniresource, NULL);
if (verbose) {
if (verbose)
fprintf(stderr, ">> mesh count: %d\n", mesh_count);
}
/* write out header */
write_header(dbip);
+11 -17
View File
@@ -92,7 +92,8 @@ extern union tree *do_region_end1(struct db_tree_state *tsp, const struct db_ful
extern union tree *do_region_end2(struct db_tree_state *tsp, const struct db_full_path *pathp, union tree *curtree, genptr_t client_data);
extern union tree *nmg_region_end(struct db_tree_state *tsp, const struct db_full_path *pathp, union tree *curtree, genptr_t client_data);
static const char usage[] = "Usage: %s [-b] [-e] [-v] [-xX lvl] [-d tolerance_distance (mm) ] [-a abs_tol (mm)] [-r rel_tol] [-n norm_tol] [-o out_file] [-u units] brlcad_db.g object(s)\n";
static const char usage[] = "Usage: %s [-b] [-e] [-v] [-xX lvl] [-d tolerance_distance] [-a abs_tol] [-r rel_tol] [-n norm_tol] [-o out_file] [-u units] brlcad_db.g object(s)\n\
(units default to mm)\n";
static char *tok_sep = " \t";
static int NMG_debug; /* saved arg of -X, for longjmp handling */
@@ -104,7 +105,7 @@ static struct rt_tess_tol ttol;
static struct bn_tol tol;
static struct model *the_model;
static char *units = (char *)NULL;
static char *units = "mm";
static fastf_t scale_factor = 1.0;
static struct db_tree_state tree_state; /* includes tol & model */
@@ -616,7 +617,7 @@ main(int argc, char **argv)
BU_LIST_INIT(&RTG.rtg_vlfree); /* for vlist macros */
/* Get command line arguments. */
while ((c = bu_getopt(argc, argv, "a:bd:en:o:r:vx:X:u:")) != -1) {
while ((c = bu_getopt(argc, argv, "a:bd:en:o:r:vx:X:u:h?")) != -1) {
switch (c) {
case 'a': /* Absolute tolerance. */
ttol.abs = atof(bu_optarg);
@@ -655,24 +656,17 @@ main(int argc, char **argv)
case 'u':
units = bu_strdup(bu_optarg);
scale_factor = bu_units_conversion(units);
if (ZERO(scale_factor)) {
if (ZERO(scale_factor))
bu_exit(1, "Unrecognized units (%s)\n", units);
}
scale_factor = 1.0 / scale_factor;
break;
default:
bu_exit(1, usage, argv[0]);
break;
}
}
if (bu_optind + 1 >= argc) {
if (bu_optind + 1 >= argc)
bu_exit(1, usage, argv[0]);
}
if (!units) {
units = "mm";
}
if ((bot_dump == 1) && (eval_all == 1)) {
bu_exit(1, "BOT Dump and Evaluate All are mutually exclusive\n");
@@ -911,10 +905,10 @@ nmg_2_vrml(struct db_tree_state *tsp, const struct db_full_path *pathp, struct m
is_light = 1;
} else {
path_2_vrml_id(&shape_name, full_path);
fprintf(fp_out, "\t\tDEF %s Shape { \n", bu_vls_addr(&shape_name));
fprintf(fp_out, "\t\tDEF %s Shape {\n", bu_vls_addr(&shape_name));
fprintf(fp_out, "\t\t\t# Component_ID: %ld %s\n", comb->region_id, full_path);
fprintf(fp_out, "\t\t\tappearance Appearance { \n");
fprintf(fp_out, "\t\t\tappearance Appearance {\n");
if (bu_strncmp("plastic", mat.shader, 7) == 0) {
if (mat.shininess < 0) {
@@ -1024,9 +1018,9 @@ nmg_2_vrml(struct db_tree_state *tsp, const struct db_full_path *pathp, struct m
if (!is_light) {
nmg_triangulate_model(m, tol2);
fprintf(fp_out, "\t\t\t} \n");
fprintf(fp_out, "\t\t\tgeometry IndexedFaceSet { \n");
fprintf(fp_out, "\t\t\t\tcoord Coordinate { \n");
fprintf(fp_out, "\t\t\t}\n");
fprintf(fp_out, "\t\t\tgeometry IndexedFaceSet {\n");
fprintf(fp_out, "\t\t\t\tcoord Coordinate {\n");
}
/* get list of vertices */
+6 -13
View File
@@ -105,7 +105,8 @@ struct bu_structparse vrml_mat_parse[]={
extern union tree *do_region_end(struct db_tree_state *tsp, const struct db_full_path *pathp, union tree *curtree, genptr_t client_data);
extern union tree *nmg_region_end(struct db_tree_state *tsp, const struct db_full_path *pathp, union tree *curtree, genptr_t client_data);
static const char usage[] = "Usage: %s [-v] [-xX lvl] [-d tolerance_distance (mm) ] [-a abs_tol (mm)] [-r rel_tol] [-n norm_tol] [-o out_file] [-u units] brlcad_db.g object(s)\n";
static const char usage[] = "Usage: %s [-v] [-xX lvl] [-d tolerance_distance] [-a abs_tol] [-r rel_tol] [-n norm_tol] [-P #_of_cpus] [-o out_file] [-u units] brlcad_db.g object(s)\n\
(units default to mm)\n";
static char *tok_sep = " \t";
static int NMG_debug; /* saved arg of -X, for longjmp handling */
@@ -118,7 +119,7 @@ static struct rt_tess_tol ttol;
static struct bn_tol tol;
static struct model *the_model;
static char* units=NULL;
static char* units="mm";
static fastf_t scale_factor=1.0;
static struct db_tree_state tree_state; /* includes tol & model */
@@ -392,7 +393,7 @@ main(int argc, char **argv)
BARRIER_CHECK;
/* Get command line arguments. */
while ((c = bu_getopt(argc, argv, "d:a:n:o:r:vx:P:X:u:")) != -1) {
while ((c = bu_getopt(argc, argv, "d:a:n:o:r:vx:P:X:u:h?")) != -1) {
switch (c) {
case 'a': /* Absolute tolerance. */
ttol.abs = atof(bu_optarg);
@@ -429,23 +430,16 @@ main(int argc, char **argv)
units = bu_strdup( bu_optarg );
scale_factor = bu_units_conversion( units );
if ( ZERO(scale_factor) )
{
bu_exit(1, "Unrecognized units (%s)\n", units );
}
scale_factor = 1.0 / scale_factor;
break;
default:
bu_exit(1, usage, argv[0]);
break;
}
}
if (bu_optind+1 >= argc) {
if (bu_optind+1 >= argc)
bu_exit(1, usage, argv[0]);
}
if ( !units )
units = "mm";
/* Open BRL-CAD database */
if ((dbip = db_open( argv[bu_optind], DB_OPEN_READONLY)) == DBI_NULL)
@@ -453,9 +447,8 @@ main(int argc, char **argv)
perror(argv[0]);
bu_exit(1, "Cannot open geometry database file %s\n", argv[bu_optind] );
}
if ( db_dirbuild( dbip ) ) {
if ( db_dirbuild( dbip ) )
bu_exit(1, "db_dirbuild() failed!\n" );
}
if (out_file == NULL) {
outfp = stdout;
+6 -12
View File
@@ -107,7 +107,7 @@ main(int argc, char **argv)
the_model = nmg_mm();
/* Get command line arguments. */
while ((c = bu_getopt(argc, argv, "r:a:n:o:vx:D:X:")) != -1) {
while ((c = bu_getopt(argc, argv, "r:a:n:o:vx:D:X:h?")) != -1) {
switch (c) {
case 'r': /* Relative tolerance. */
ttol.rel = atof(bu_optarg);
@@ -140,13 +140,11 @@ main(int argc, char **argv)
break;
default:
bu_exit(1, usage, argv[0]);
break;
}
}
if (bu_optind+1 >= argc) {
if (bu_optind+1 >= argc)
bu_exit(1, usage, argv[0]);
}
/* Open output file */
@@ -158,9 +156,8 @@ main(int argc, char **argv)
perror(argv[0]);
bu_exit(1, "ERROR: Unable to open geometry database file (%s)\n", argv[0]);
}
if (db_dirbuild(dbip)) {
if (db_dirbuild(dbip))
bu_exit(1, "db_dirbuild failed\n");
}
BN_CK_TOL(tree_state.ts_tol);
RT_CK_TESS_TOL(tree_state.ts_ttol);
@@ -272,18 +269,16 @@ output_nmg(struct nmgregion *r, const struct db_full_path *pathp, int UNUSED(reg
continue;
/* loop through the edges in this loop (facet) */
if (verbose) {
if (verbose)
printf("\tfacet:\n");
}
for (BU_LIST_FOR(eu, edgeuse, &lu->down_hd))
{
NMG_CK_EDGEUSE(eu);
v = eu->vu_p->v_p;
NMG_CK_VERTEX(v);
if (verbose) {
if (verbose)
printf("\t\t(%g %g %g)\n", V3ARGS(v->vg_p->coord));
}
}
tot_polygons++;
}
@@ -423,9 +418,8 @@ union tree *do_region_end(struct db_tree_state *tsp, const struct db_full_path *
r = ret_tree->tr_d.td_r;
else
{
if (verbose) {
if (verbose)
bu_log("\tNothing left of this region after Boolean evaluation\n");
}
regions_written++; /* don't count as a failure */
r = (struct nmgregion *)NULL;
}
+1 -1
View File
@@ -464,7 +464,7 @@ Draw_entities(struct model *m, int de_list[], int no_of_des, fastf_t x, fastf_t
tmp_ptr = ptr->next;
bu_free((char *)ptr, "Draw_entities: ptr");
ptr = tmp_ptr;;
ptr = tmp_ptr;
}
break;
}
+1 -1
View File
@@ -566,7 +566,7 @@ do_nmg_region_end(struct db_tree_state *tsp, const struct db_full_path *pathp, u
/* not unique, try adding a suffix */
len = strlen(suffix);
i = len - 1;;
i = len - 1;
suffix[i]++;
while (suffix[i] > 'z' && i > 0) {
suffix[i] = 'a';
+1 -1
View File
@@ -1791,7 +1791,7 @@ write_shell_face_loop(char *name,
dir_entry[15] = 1;
dir_entry[14] = write_freeform(fp_param, bu_vls_addr(&str), dir_seq+1, 'P');
face_list[face_count++] = write_dir_entry(fp_dir, dir_entry);;
face_list[face_count++] = write_dir_entry(fp_dir, dir_entry);
bu_free((char *)loop_list, "loop list");
bu_vls_free(&str);
+1 -1
View File
@@ -1274,7 +1274,7 @@ main(int argc, char **argv)
g_pts[grid_used].gid = gid;
g_pts[grid_used].cid = cid;
g_pts[grid_used].v = (struct vertex **)bu_calloc(pshell_count + 1, sizeof(struct vertex *), "g_pts vertex array");;
g_pts[grid_used].v = (struct vertex **)bu_calloc(pshell_count + 1, sizeof(struct vertex *), "g_pts vertex array");
VMOVE(g_pts[grid_used].pt, tmp);
grid_used++;
}
+323
View File
@@ -0,0 +1,323 @@
/* A S S E M B L Y _ P R O D U C T . C P P
*
* BRL-CAD
*
* Copyright (c) 2013 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.
*/
/** @file Assembly_Product.cpp
*
*/
#include "common.h"
#include "raytrace.h"
#include "Comb_Tree.h"
#include "G_STEP_internal.h"
#include "ON_Brep.h"
/*
* To associate multiple objects in STEP, we must define and relate product definitions
* for both shapes (BReps) and assembly objects (combs) that will relate the shapes.
* Below is an example of how the structural definitions relate - in this instance, one
* BRep and two instances of that BRep moved and added to an assembly.
*
* // Representation context
* #10=DIMENSIONAL_EXPONENTS(1.E0,0.E0,0.E0,0.E0,0.E0,0.E0,0.E0);
* #11=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
* #12=LENGTH_MEASURE_WITH_UNIT(LENGTH_MEASURE(1E1),#11);
* #13=(CONVERSION_BASED_UNIT('INCH',#12)LENGTH_UNIT()NAMED_UNIT(#10));
* #14=DIMENSIONAL_EXPONENTS(0.E0,0.E0,0.E0,0.E0,0.E0,0.E0,0.E0);
* #15=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
* #16=PLANE_ANGLE_MEASURE_WITH_UNIT(PLANE_ANGLE_MEASURE(0.0174532925199433),#15);
* #17=(CONVERSION_BASED_UNIT('DEGREE',#16)NAMED_UNIT(*)PLANE_ANGLE_UNIT());
* #18=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
* #19=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.05),#13,'accuracy','Tolerance');
* #20=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT
* ((#19))GLOBAL_UNIT_ASSIGNED_CONTEXT((#13,#17,#18))REPRESENTATION_CONTEXT('ID52','3'));
*
* #100=APPLICATION_CONTEXT('CONFIGURATION CONTROLLED 3D DESIGNS OF MECHANICAL PARTS AND ASSEMBLIES');
* #1001=DESIGN_CONTEXT('',#100,'design');
*
* // seems to be a list of AXIS2_PLACEMENT_3D objects - does this put all the axis
* // in a representation context? Used by the REPRESENTATION_RELATIONSHIP objects.
* #300=SHAPE_REPRESENTATION('',(...,#9004,#9013,...), #20);
*
* // Transformation definitions - I think these are similar to matrices over combs?
*
* #8001=CARTESIAN_POINT('',(0.E0,0.E0,0.E0));
* #8002=DIRECTION('',(0.E0,0.E0,1.E0));
* #8003=DIRECTION('',(1.E0,0.E0,0.E0));
* #8004=AXIS2_PLACEMENT_3D('',#8001,#8002,#8003);
*
* #9001=CARTESIAN_POINT('',());
* #9002=DIRECTION('',());
* #9003=DIRECTION('',());
* #9004=AXIS2_PLACEMENT_3D('',#9001,#9002,#9003);
* #7001=ITEM_DEFINED_TRANSFORMATION('','',#8004,#9004);
*
* #9010=CARTESIAN_POINT('',());
* #9011=DIRECTION('',());
* #9012=DIRECTION('',());
* #9013=AXIS2_PLACEMENT_3D('',#9010,#9011,#9012);
* #7002=ITEM_DEFINED_TRANSFORMATION('','',#8004,#9013);
*
* // Solid shape representation Looks like this is the bit that needs to be created
* // for each solid - should be done by the SHAPE_DEFINITION_REPRESENTATION logic.
* #200=ADVANCED_BREP_SHAPE_REPRESENTATION();
* #1002=MECHANICAL_CONTEXT('',#100,'mechanical');
* #1003=PRODUCT('Geometric_Shape_01','Geometric_Shape_01','NOT SPECIFIED',(#1002));
* #1004=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('1','LAST_VERSION',#1003,.MADE.);
* #1005=PRODUCT_DEFINITION('design','',#1004,#1001);
* #1006=PRODUCT_DEFINITION_SHAPE('','Shape For Geometric_Shape_01',#1005);
* #1007=SHAPE_DEFINITION_REPRESENTATION(#1006,#200);
*
* // Assembly shape representation
* #5001=MECHANICAL_CONTEXT('',#100,'mechanical');
* #5002=PRODUCT('Comb_01','Comb_01','NOT SPECIFIED',(#5001));
* #5003=PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE('1','LAST_VERSION',#5002,.MADE.);
* #5004=PRODUCT_DEFINITION('design','',#5003,#1001);
*
* // Assembly components
*
* #2001=NEXT_ASSEMBLY_USAGE_OCCURRENCE('01','Next assembly relationship','Geometric_Shape_01',#5004,#1005,$);
* #2002=PRODUCT_DEFINITION_SHAPE('Placement #01','Placement of Geometric_Shape_01 with respect to Comb_01',#2001);
*
* #3001=NEXT_ASSEMBLY_USAGE_OCCURRENCE('02','Next assembly relationship','Geometric_Shape_01',#5004,#1005,$);
* #3002=PRODUCT_DEFINITION_SHAPE('Placement #02','Placement of Geometric_Shape_01 with respect to Comb_01',#3001);
*
* #4001=(REPRESENTATION_RELATIONSHIP('','',#200,#300)REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(#7002)SHAPE_REPRESENTATION_RELATIONSHIP());
* #4002=CONTEXT_DEPENDENT_SHAPE_REPRESENTATION(#4001,#3002);
*
* #6001=(REPRESENTATION_RELATIONSHIP('','',#200,#300)REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(#7001)SHAPE_REPRESENTATION_RELATIONSHIP());
* #6002=CONTEXT_DEPENDENT_SHAPE_REPRESENTATION(#6001,#2002);
*
*
* Mapping from BRL-CAD to STEP
*
* Roughly speaking, the STEP requirement that each shape representation have an associated product appears
* to translate to BRL-CAD as each brep object having a comb above it. To avoid introducing unnecessary combs,
* it will be necessary to recognize when a brep referenced by one or more comb trees listed for export has
* one and only one parent comb in the existing tree structure, which in turn does not have any other children.
* Otherwise, repeated imports and exports will bury the brep below an ever deepening hierarchy of combs. When
* a brep does not have this wrapper already in place, one will need to be explicitly created for it.
* Hopefully, search can be used to quickly identify sets of geometry that need to be handled differently.
* It may be that the assumption of shared naming - a comb with the same root name as its child brep - can be used
* as a quick check to determine if the comb is a parent or not, if we accept that as a convention.
*
* Because combs reference combs in BRL-CAD, the step product definitions associated with combs will need to be
* fully created before the assembly usage occurrences can start to be assembled. A search that collects all combs
* will provide a convenient list for multiple passes that create and then assemble combs, as will a similar search
* for solids (currently just breps...). Should also make sure the tree is union only for AP203, where booleans are
* not supported. Once boolean evaluation is in place, should be able to default to brep solids for combs with non
* union booleans below them.
*
*/
/* TODO - generic, move to the internal utility file */
STEPentity *
Create_AXIS2_PLACEMENT_3D(fastf_t pt_x, fastf_t pt_y, fastf_t pt_z,
fastf_t d1_x, fastf_t d1_y, fastf_t d1_z,
fastf_t d2_x, fastf_t d2_y, fastf_t d2_z,
Registry *registry, InstMgr *instance_list) {
SdaiCartesian_point *pnt = (SdaiCartesian_point *)registry->ObjCreate("CARTESIAN_POINT");
pnt->name_("''");
XYZ_to_Cartesian_point(pt_x, pt_y, pt_z, pnt);
SdaiDirection *axis = (SdaiDirection *)registry->ObjCreate("DIRECTION");
axis->name_("''");
XYZ_to_Direction(d1_x, d1_y, d1_z, axis);
SdaiDirection *ref = (SdaiDirection *)registry->ObjCreate("DIRECTION");
ref->name_("''");
XYZ_to_Direction(d2_x, d2_y, d2_z, ref);
SdaiAxis2_placement_3d *placement = (SdaiAxis2_placement_3d *)registry->ObjCreate("AXIS2_PLACEMENT_3D");
placement->name_("''");
placement->location_(pnt);
placement->axis_(axis);
placement->ref_direction_(ref);
instance_list->Append((STEPentity *)pnt, completeSE);
instance_list->Append((STEPentity *)axis, completeSE);
instance_list->Append((STEPentity *)ref, completeSE);
instance_list->Append((STEPentity *)placement, completeSE);
return (STEPentity *)placement;
}
STEPentity *
Identity_AXIS2_PLACEMENT_3D(Registry *registry, InstMgr *instance_list) {
return Create_AXIS2_PLACEMENT_3D(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, registry, instance_list);
}
// Returns either an AXIS2_PLACEMENT_3D, a CARTESIAN_TRANSFORMATION_OPERATOR_3D, or NULL
// If NULL, geometry is being deformed in a way not supported by AP203
STEPentity *
Mat_to_Rep(matp_t curr_matrix, Registry *registry, InstMgr *instance_list)
{
// TODO - investigate CARTESIAN_TRANSFORMATION_OPERATOR_3D, which seems to
// allow uniform scaling as well and appears to be compatible with the
// same slot used for AXIS2_PLACEMENT_3D - may be able to use the latter
// for simple cases without scaling (i.e. VUNITIZE doesn't change the length
// of X, Y or Z unit vectors after the matrix is applied), the former when
// the there is uniform scaling (X, Y and Z lengths all change by the same
// amount) and in the worst case (non-uniform scaling) will have to create
// a new Brep and abandon the attempt to preserve the comb-level operation.
point_t origin, outorig;
vect_t x_axis, y_axis, z_axis;
vect_t outx, outy, outz;
fastf_t xm, ym, zm;
VSET(origin, 0, 0, 0);
VSET(x_axis, 1, 0, 0);
VSET(y_axis, 0, 1, 0);
VSET(z_axis, 0, 0, 1);
MAT4X3PNT(outorig, curr_matrix, origin);
MAT4X3VEC(outx, curr_matrix, x_axis);
MAT4X3VEC(outy, curr_matrix, y_axis);
MAT4X3VEC(outz, curr_matrix, z_axis);
xm = MAGNITUDE(outx);
ym = MAGNITUDE(outy);
zm = MAGNITUDE(outz);
VUNITIZE(outx);
VUNITIZE(outy);
VUNITIZE(outz);
if (NEAR_ZERO(xm - 1.0, RT_LEN_TOL) && NEAR_ZERO(ym - 1.0, RT_LEN_TOL) && NEAR_ZERO(zm - 1.0, RT_LEN_TOL)) {
bu_log("AXIS2_PLACEMENT_3D cartesian_point: %f, %f, %f\n", outorig[0], outorig[1], outorig[2]);
bu_log("AXIS2_PLACEMENT_3D axis: %f, %f, %f\n", outz[0], outz[1], outz[2]);
bu_log("AXIS2_PLACEMENT_3D ref axis: %f, %f, %f\n", outx[0], outx[1], outx[2]);
return Create_AXIS2_PLACEMENT_3D(outorig[0], outorig[1], outorig[2],
outz[0], outz[1], outz[2], outx[0], outx[1], outx[2], registry, instance_list);
} else {
if (NEAR_ZERO(xm - ym, RT_LEN_TOL) && NEAR_ZERO(xm - zm, RT_LEN_TOL)) {
bu_log("CARTESIAN_TRANSFORMATION_OPERATOR_3D local_origin: %f, %f, %f\n", outorig[0], outorig[1], outorig[2]);
bu_log("CARTESIAN_TRANSFORMATION_OPERATOR_3D axis1: %f, %f, %f\n", outx[0], outx[1], outx[2]);
bu_log("CARTESIAN_TRANSFORMATION_OPERATOR_3D axis2: %f, %f, %f\n", outy[0], outy[1], outy[2]);
bu_log("CARTESIAN_TRANSFORMATION_OPERATOR_3D axis3: %f, %f, %f\n", outz[0], outz[1], outz[2]);
bu_log("Scaling: %f\n", xm);
return NULL;
} else {
return NULL;
}
}
}
// Representation relationships are a complex type
STEPentity *
Build_Representation_Relationship(STEPentity *input_transformation, STEPentity *parent, STEPentity *child, Registry *registry, InstMgr *instance_list) {
STEPattribute *attr;
STEPcomplex *stepcomplex;
const char *entNmArr[4] = {"representation_relationship", "representation_relationship_with_transformation", "shape_representation_relationship", "*"};
STEPcomplex *complex_entity = new STEPcomplex(registry, (const char **)entNmArr, registry->GetEntityCnt() + 1);
/* REPRESENTATION_RELATIONSHIP */
stepcomplex = complex_entity->EntityPart("representation_relationship");
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
//std::cout << " " << attr->Name() << "," << attr->NonRefType() << "\n";
if (!bu_strcmp(attr->Name(), "name")) attr->StrToVal("''");
if (!bu_strcmp(attr->Name(), "rep_1")) {
attr->ptr.c = new (STEPentity *);
*(attr->ptr.c) = parent;
}
if (!bu_strcmp(attr->Name(), "rep_2")) {
attr->ptr.c = new (STEPentity *);
*(attr->ptr.c) = child;
}
}
/* REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION */
stepcomplex = complex_entity->EntityPart("representation_relationship_with_transformation");
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "transformation_operator")) {
SdaiTransformation *transformation = new SdaiTransformation((SdaiItem_defined_transformation *)input_transformation);
attr->ptr.sh = transformation;
}
}
instance_list->Append((STEPentity *)complex_entity, completeSE);
return complex_entity;
}
void
Add_Assembly_Product(struct directory *dp, struct db_i *dbip, struct bu_ptbl *children,
struct comb_maps *maps,
Registry *registry, InstMgr *instance_list)
{
struct rt_db_internal comb_intern;
STEPentity *parent_shape = maps->comb_to_step_shape.find(dp)->second;
rt_db_get_internal(&comb_intern, dp, dbip, bn_mat_identity, &rt_uniresource);
RT_CK_DB_INTERNAL(&comb_intern);
struct rt_comb_internal *comb = (struct rt_comb_internal *)(comb_intern.idb_ptr);
for (int j = (int)BU_PTBL_LEN(children) - 1; j >= 0; j--){
STEPentity *orig_transform = Identity_AXIS2_PLACEMENT_3D(registry, instance_list);
STEPentity *curr_transform = NULL;
struct directory *curr_dp = (struct directory *)BU_PTBL_GET(children, j);
STEPentity *child_shape = maps->comb_to_step_shape.find(curr_dp)->second;
if (!child_shape)
child_shape = maps->brep_to_step_shape.find(curr_dp)->second;
bu_log("%s under %s: ", curr_dp->d_namep, dp->d_namep);
union tree *curr_node = db_find_named_leaf(comb->tree, curr_dp->d_namep);
matp_t curr_matrix = curr_node->tr_l.tl_mat;
if(curr_matrix) {
bu_log(" - found matrix over %s in %s\n", curr_dp->d_namep, dp->d_namep);
bn_mat_print(curr_dp->d_namep, curr_matrix);
curr_transform = Mat_to_Rep(curr_matrix, registry, instance_list);
} else {
curr_transform = Identity_AXIS2_PLACEMENT_3D(registry, instance_list);
bu_log("identity matrix\n");
}
if (curr_transform) {
SdaiItem_defined_transformation *item_transform = (SdaiItem_defined_transformation *)registry->ObjCreate("ITEM_DEFINED_TRANSFORMATION");
item_transform->name_("''");
item_transform->description_("''");
item_transform->transform_item_1_((SdaiRepresentation_item_ptr)orig_transform);
item_transform->transform_item_2_((SdaiRepresentation_item_ptr)curr_transform);
instance_list->Append((STEPentity *)item_transform, completeSE);
SdaiNext_assembly_usage_occurrence *usage = (SdaiNext_assembly_usage_occurrence *)registry->ObjCreate("NEXT_ASSEMBLY_USAGE_OCCURRENCE");
usage->id_("''");
usage->name_("''");
usage->description_("''");
usage->reference_designator_("''");
usage->relating_product_definition_((SdaiProduct_definition *)maps->comb_to_step.find(dp)->second);
SdaiProduct_definition *child_def = (SdaiProduct_definition *)maps->comb_to_step.find(curr_dp)->second;
if (!child_def)
child_def = (SdaiProduct_definition *)maps->brep_to_step.find(curr_dp)->second;
usage->related_product_definition_(child_def);
instance_list->Append((STEPentity *)usage, completeSE);
SdaiProduct_definition_shape *pshape = (SdaiProduct_definition_shape *)registry->ObjCreate("PRODUCT_DEFINITION_SHAPE");
pshape->name_("''");
pshape->description_("''");
SdaiCharacterized_product_definition *cpd = new SdaiCharacterized_product_definition(usage);
pshape->definition_(new SdaiCharacterized_definition(cpd));
instance_list->Append((STEPentity *)pshape, completeSE);
STEPentity *rep_rel = Build_Representation_Relationship(item_transform, parent_shape, child_shape, registry, instance_list);
SdaiContext_dependent_shape_representation *cshape = (SdaiContext_dependent_shape_representation *)registry->ObjCreate("CONTEXT_DEPENDENT_SHAPE_REPRESENTATION");
cshape->representation_relation_((SdaiShape_representation_relationship *)rep_rel);
cshape->represented_product_relation_(pshape);
instance_list->Append((STEPentity *)cshape, completeSE);
} else {
bu_log("non-uniform scaling detected: %s/%s\n", dp->d_namep, curr_dp->d_namep);
}
}
rt_db_free_internal(&comb_intern);
}
// Local Variables:
// tab-width: 8
// mode: C++
// c-basic-offset: 4
// indent-tabs-mode: t
// c-file-style: "stroustrup"
// End:
// ex: shiftwidth=4 tabstop=8
+47
View File
@@ -0,0 +1,47 @@
/* Assembly_Product.h
* BRL-CAD
*
* Copyright (c) 2013 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program 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 program 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.
*/
/** @file step/Assembly_Product.h
*
*/
#ifndef ASSEMBLY_PRODUCT_H_
#define ASSEMBLY_PRODUCT_H_
#include <map>
#include "ON_Brep.h"
STEPentity *Add_Assembly_Product(struct directory *dp,
struct db_i *dbip,
struct bu_ptbl *children,
struct comb_maps *maps,
Registry *registry,
InstMgr *instance_list);
#endif /* ASSEMBLY_PRODUCT_H_ */
/*
* Local Variables:
* tab-width: 8
* mode: C
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
+16 -1
View File
@@ -9,7 +9,16 @@ GENERATE_SCHEMA_INPUTS(${STEP_SCHEMA_FILE} gstep)
set(gstep_SOURCES
${express_srcs}
../BRLCADWrapper.cpp
Assembly_Product.cpp
Comb_Tree.cpp
Default_Geometric_Context.cpp
G_STEP_Util.cpp
ON_NurbsCurve.cpp
ON_NurbsSurface.cpp
ON_Brep.cpp
Shape_Definition_Representation.cpp
Shape_Representation.cpp
Shape_Representation_Relationship.cpp
g-step.cpp
)
@@ -47,7 +56,13 @@ if(MSVC)
set_target_properties(g-step PROPERTIES COMPILE_DEFINITIONS "${gstep_IMPORTS}")
endif(MSVC)
CMAKEFILES(ON_Brep.h)
set(IGNORE_FILES
Assembly_Product.h
ON_Brep.h
Comb_Tree.h
G_STEP_internal.h
)
CMAKEFILES(${IGNORE_FILES})
# Local Variables:
# tab-width: 8
+212
View File
@@ -0,0 +1,212 @@
/* C O M B _ T R E E . C P P
* BRL-CAD
*
* Copyright (c) 2013 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.
*/
/** @file Comb_Tree.cpp
*
* File for writing out a combination and its tree contents
* into the STEPcode containers
*
*/
#include <sstream>
#include <map>
#include <set>
#include "bu.h"
#include "raytrace.h"
#include "G_STEP_internal.h"
#include "STEPWrapper.h"
#include "ON_Brep.h"
#include "Assembly_Product.h"
#include "Comb_Tree.h"
void
Comb_to_STEP(struct directory *dp, Registry *registry, InstMgr *instance_list, STEPentity **shape, STEPentity **product) {
std::ostringstream ss;
ss << "'" << dp->d_namep << "'";
std::string str = ss.str();
// MECHANICAL_CONTEXT
SdaiMechanical_context *mech_context = (SdaiMechanical_context *)registry->ObjCreate("MECHANICAL_CONTEXT");
instance_list->Append((STEPentity *)mech_context, completeSE);
mech_context->name_("''");
mech_context->discipline_type_("''");
// APPLICATION_CONTEXT - TODO, should be one of these per file?
SdaiApplication_context *app_context = (SdaiApplication_context *)registry->ObjCreate("APPLICATION_CONTEXT");
instance_list->Append((STEPentity *)app_context, completeSE);
mech_context->frame_of_reference_(app_context);
app_context->application_("'CONFIGURATION CONTROLLED 3D DESIGNS OF MECHANICAL PARTS AND ASSEMBLIES'");
// DESIGN_CONTEXT - TODO, should be one of these per file?
SdaiDesign_context *design_context = (SdaiDesign_context *)registry->ObjCreate("DESIGN_CONTEXT");
instance_list->Append((STEPentity *)design_context, completeSE);
design_context->name_("''");
design_context->life_cycle_stage_("'design'");
design_context->frame_of_reference_(app_context);
// PRODUCT_DEFINITION
SdaiProduct_definition *prod_def = (SdaiProduct_definition *)registry->ObjCreate("PRODUCT_DEFINITION");
instance_list->Append((STEPentity *)prod_def, completeSE);
prod_def->id_("''");
prod_def->description_("''");
prod_def->frame_of_reference_(design_context);
// PRODUCT_DEFINITION_FORMATION
SdaiProduct_definition_formation *prod_def_form = (SdaiProduct_definition_formation *)registry->ObjCreate("PRODUCT_DEFINITION_FORMATION");
instance_list->Append((STEPentity *)prod_def_form, completeSE);
prod_def->formation_(prod_def_form);
prod_def_form->id_("''");
prod_def_form->description_("''");
// PRODUCT
SdaiProduct *prod = (SdaiProduct *)registry->ObjCreate("PRODUCT");
instance_list->Append((STEPentity *)prod, completeSE);
prod_def_form->of_product_(prod);
prod->id_("''");
prod->name_(str.c_str());
prod->description_("''");
prod->frame_of_reference_()->AddNode(new EntityNode((SDAI_Application_instance *)mech_context));
// PRODUCT_DEFINITION_SHAPE
SdaiProduct_definition_shape *pshape = (SdaiProduct_definition_shape *)registry->ObjCreate("PRODUCT_DEFINITION_SHAPE");
instance_list->Append((STEPentity *)pshape, completeSE);
pshape->name_("''");
pshape->description_("'Comb shape definition'");
SdaiCharacterized_product_definition *cpd = new SdaiCharacterized_product_definition(prod_def);
pshape->definition_(new SdaiCharacterized_definition(cpd));
// SHAPE_DEFINITION_REPRESENTATION
SdaiShape_definition_representation *shape_def_rep = (SdaiShape_definition_representation*)registry->ObjCreate("SHAPE_DEFINITION_REPRESENTATION");
instance_list->Append((STEPentity *)shape_def_rep, completeSE);
shape_def_rep->definition_(pshape);
// SHAPE_REPRESENTATION
SdaiShape_representation*shape_rep = (SdaiShape_representation*)registry->ObjCreate("SHAPE_REPRESENTATION");
instance_list->Append((STEPentity *)shape_rep, completeSE);
shape_def_rep->used_representation_(shape_rep);
(*product) = (STEPentity *)prod_def;
(*shape) = (STEPentity *)shape_rep;
}
STEPentity *
Comb_Tree_to_STEP(struct directory *dp, struct rt_wdb *wdbp, Registry *registry, InstMgr *instance_list)
{
STEPentity *toplevel_comb = NULL;
struct comb_maps *maps = new comb_maps;
std::set<struct directory *> non_wrapper_combs;
/* Find all solids, make instances of them, insert them, and stick in *dp to STEPentity* map */
const char *brep_search = "-type brep";
struct bu_ptbl *breps = db_search_path_obj(brep_search, dp, wdbp);
for (int j = (int)BU_PTBL_LEN(breps) - 1; j >= 0; j--){
STEPentity *brep_shape;
STEPentity *brep_product;
struct directory *curr_dp = (struct directory *)BU_PTBL_GET(breps, j);
struct rt_db_internal brep_intern;
rt_db_get_internal(&brep_intern, curr_dp, wdbp->dbip, bn_mat_identity, &rt_uniresource);
RT_CK_DB_INTERNAL(&brep_intern);
ON_BRep_to_STEP(curr_dp, &brep_intern, registry, instance_list, &brep_shape, &brep_product);
maps->brep_to_step[curr_dp] = brep_product;
maps->brep_to_step_shape[curr_dp] = brep_shape;
bu_log("Brep: %s\n", curr_dp->d_namep);
}
/* Find all combs that are not already brep wrappers, make instances of them, insert them, and stick in *dp to STEPentity* map */
const char *comb_search = "-type comb ! ( -nnodes 1 -below=1 -type brep )";
struct bu_ptbl *combs = db_search_path_obj(comb_search, dp, wdbp);
for (int j = (int)BU_PTBL_LEN(combs) - 1; j >= 0; j--){
struct directory *curr_dp = (struct directory *)BU_PTBL_GET(combs, j);
STEPentity *comb_shape;
STEPentity *comb_product;
Comb_to_STEP(curr_dp, registry, instance_list, &comb_shape, &comb_product);
maps->comb_to_step[curr_dp] = comb_product;
maps->comb_to_step_shape[curr_dp] = comb_shape;
non_wrapper_combs.insert(curr_dp);
bu_log("Comb non-wrapper: %s\n", curr_dp->d_namep);
}
/* Find the combs that *are* wrappers, and point them to the product associated with their brep.
* Change the name of the product, if appropriate */
const char *comb_wrapper_search = "-type comb -nnodes 1 -below=1 -type brep";
const char *comb_child_search = "-mindepth 1 -type brep";
struct bu_ptbl *comb_wrappers = db_search_path_obj(comb_wrapper_search, dp, wdbp);
for (int j = (int)BU_PTBL_LEN(comb_wrappers) - 1; j >= 0; j--){
struct directory *curr_dp = (struct directory *)BU_PTBL_GET(comb_wrappers, j);
/* Satisfying the search pattern isn't enough to qualify as a wrapping comb - there
* must also be no matrix hanging over the primitive */
struct rt_db_internal comb_intern;
rt_db_get_internal(&comb_intern, curr_dp, wdbp->dbip, bn_mat_identity, &rt_uniresource);
RT_CK_DB_INTERNAL(&comb_intern);
struct rt_comb_internal *comb = (struct rt_comb_internal *)(comb_intern.idb_ptr);
struct bu_ptbl *comb_child = db_search_path_obj(comb_child_search, curr_dp, wdbp);
struct directory *child = (struct directory *)BU_PTBL_GET(comb_child, 0);
bu_ptbl_free(comb_child);
bu_free(comb_child, "free search result");
union tree *curr_node = db_find_named_leaf(comb->tree, child->d_namep);
if (!(curr_node->tr_l.tl_mat)) {
std::ostringstream ss;
ss << "'" << curr_dp->d_namep << "'";
std::string str = ss.str();
maps->comb_to_step[curr_dp] = maps->brep_to_step.find(child)->second;
maps->comb_to_step_shape[curr_dp] = maps->brep_to_step_shape.find(child)->second;
bu_log("Comb wrapper: %s\n", curr_dp->d_namep);
((SdaiProduct_definition *)(maps->comb_to_step[curr_dp]))->formation_()->of_product_()->name_(str.c_str());
}else{
STEPentity *comb_shape;
STEPentity *comb_product;
Comb_to_STEP(curr_dp, registry, instance_list, &comb_shape, &comb_product);
maps->comb_to_step[curr_dp] = comb_product;
maps->comb_to_step_shape[curr_dp] = comb_shape;
non_wrapper_combs.insert(curr_dp);
bu_log("Comb non-wrapper (matrix over primitive): %s\n", curr_dp->d_namep);
}
rt_db_free_internal(&comb_intern);
}
/* For each non-wrapper comb, get list of immediate children and call Assembly Product,
* which will define the relationships between the comb and its children using
* the appropriate step foo and the pointers in the map.*/
/* TODO - need to figure out how to pull matrices, translate them into STEP, and
* where to associate them.*/
const char *comb_children_search = "-mindepth 1 -maxdepth 1";
for (std::set<struct directory *>::iterator it=non_wrapper_combs.begin(); it != non_wrapper_combs.end(); ++it) {
bu_log("look for matrices in %s\n", (*it)->d_namep);
struct bu_ptbl *comb_children = db_search_path_obj(comb_children_search, (*it), wdbp);
Add_Assembly_Product((*it), wdbp->dbip, comb_children, maps, registry, instance_list);
bu_ptbl_free(comb_children);
bu_free(comb_children, "free search result");
}
return toplevel_comb;
}
// Local Variables:
// tab-width: 8
// mode: C++
// c-basic-offset: 4
// indent-tabs-mode: t
// c-file-style: "stroustrup"
// End:
// ex: shiftwidth=4 tabstop=8
+52
View File
@@ -0,0 +1,52 @@
/* Comb_Tree.h
* BRL-CAD
*
* Copyright (c) 2013 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program 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 program 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.
*/
/** @file step/Comb_Tree.h
*
*/
#ifndef COMB_TREE_H_
#define COMB_TREE_H_
#include <map>
#include "ON_Brep.h"
struct comb_maps {
std::map<struct directory *, STEPentity *> brep_to_step;
std::map<struct directory *, STEPentity *> brep_to_step_shape;
std::map<struct directory *, STEPentity *> comb_to_step;
std::map<struct directory *, STEPentity *> comb_to_step_shape;
};
STEPentity *Comb_Tree_to_STEP(struct directory *dp,
struct rt_wdb *wdbp,
Registry *registry,
InstMgr *instance_list);
#endif /* COMB_TREE_H_ */
/*
* Local Variables:
* tab-width: 8
* mode: C
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/
@@ -0,0 +1,218 @@
/* D E F A U L T _ G E O M E T R I C _ C O N T E X T . C P P
*
* BRL-CAD
*
* Copyright (c) 2013 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.
*/
/** @file Default_Geometric_Context.cpp
*
*/
#include "common.h"
#include "G_STEP_internal.h"
STEPcomplex *
Add_Default_Geometric_Context(Registry *registry, InstMgr *instance_list)
{
int instance_cnt = 0;
STEPattribute *attr;
STEPcomplex *stepcomplex;
/* Uncertainty measure with unit */
SdaiUncertainty_measure_with_unit *uncertainty = (SdaiUncertainty_measure_with_unit *)registry->ObjCreate("UNCERTAINTY_MEASURE_WITH_UNIT");
uncertainty->name_("'DISTANCE_ACCURACY_VALUE'");
uncertainty->description_("'Threshold below which geometry imperfections (such as overlaps) are not considered errors.'");
instance_list->Append(uncertainty, completeSE);
instance_cnt++;
/** unit component of uncertainty measure with unit */
const char *unitNmArr[4] = {"length_unit", "named_unit", "si_unit", "*"};
STEPcomplex *unit_complex = new STEPcomplex(registry, (const char **)unitNmArr, instance_cnt);
instance_list->Append((STEPentity *)unit_complex, completeSE);
instance_cnt++;
stepcomplex = unit_complex->head;
while (stepcomplex) {
if (!bu_strcmp(stepcomplex->EntityName(), "Si_Unit")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "prefix")) attr->ptr.e = new SdaiSi_prefix_var(Si_prefix__milli);
if (!bu_strcmp(attr->Name(), "name")) attr->ptr.e = new SdaiSi_unit_name_var(Si_unit_name__metre);
}
}
stepcomplex = stepcomplex->sc;
}
SdaiUnit *new_unit = new SdaiUnit((SdaiNamed_unit *)unit_complex);
uncertainty->ResetAttributes();
{
while ((attr = uncertainty->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "unit_component")) attr->ptr.sh = new_unit;
if (!bu_strcmp(attr->Name(), "value_component")) attr->StrToVal("0.05");
}
}
/* Global Unit Assigned Context */
const char *ua_entry_1_types[4] = {"named_unit", "si_unit", "solid_angle_unit", "*"};
STEPcomplex *ua_entry_1 = new STEPcomplex(registry, (const char **)ua_entry_1_types, instance_cnt);
stepcomplex = ua_entry_1->head;
while (stepcomplex) {
if (!bu_strcmp(stepcomplex->EntityName(), "Si_Unit")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "name")) attr->ptr.e = new SdaiSi_unit_name_var(Si_unit_name__steradian);
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append((STEPentity *)ua_entry_1, completeSE);
instance_cnt++;
const char *ua_entry_3_types[4] = {"named_unit", "plane_angle_unit", "si_unit", "*"};
STEPcomplex *ua_entry_3 = new STEPcomplex(registry, (const char **)ua_entry_3_types, instance_cnt);
stepcomplex = ua_entry_3->head;
while (stepcomplex) {
if (!bu_strcmp(stepcomplex->EntityName(), "Si_Unit")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "name")) attr->ptr.e = new SdaiSi_unit_name_var(Si_unit_name__radian);
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append((STEPentity *)ua_entry_3, completeSE);
instance_cnt++;
/* Plane Angle Measure */
SdaiPlane_angle_measure_with_unit *p_ang_measure_with_unit = new SdaiPlane_angle_measure_with_unit();
SdaiMeasure_value * p_ang_measure_value = new SdaiMeasure_value(DEG2RAD, config_control_design::t_measure_value);
p_ang_measure_value->SetUnderlyingType(config_control_design::t_plane_angle_measure);
p_ang_measure_with_unit->value_component_(p_ang_measure_value);
SdaiUnit *p_ang_unit = new SdaiUnit((SdaiNamed_unit *)ua_entry_3);
p_ang_measure_with_unit->unit_component_(p_ang_unit);
instance_list->Append((STEPentity *)p_ang_measure_with_unit, completeSE);
instance_cnt++;
/* Conversion based unit */
const char *ua_entry_2_types[4] = {"conversion_based_unit", "named_unit", "plane_angle_unit", "*"};
STEPcomplex *ua_entry_2 = new STEPcomplex(registry, (const char **)ua_entry_2_types, instance_cnt);
/** dimensional exponents **/
SdaiDimensional_exponents *dimensional_exp = new SdaiDimensional_exponents();
dimensional_exp->length_exponent_(0.0);
dimensional_exp->mass_exponent_(0.0);
dimensional_exp->time_exponent_(0.0);
dimensional_exp->electric_current_exponent_(0.0);
dimensional_exp->thermodynamic_temperature_exponent_(0.0);
dimensional_exp->amount_of_substance_exponent_(0.0);
dimensional_exp->luminous_intensity_exponent_(0.0);
instance_list->Append((STEPentity *)dimensional_exp, completeSE);
stepcomplex = ua_entry_2->head;
while (stepcomplex) {
if (!bu_strcmp(stepcomplex->EntityName(), "Conversion_Based_Unit")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "name")) attr->StrToVal("'DEGREES'");
if (!bu_strcmp(attr->Name(), "conversion_factor")) {
attr->ptr.c = new (STEPentity *);
*(attr->ptr.c) = (STEPentity *)(p_ang_measure_with_unit);
}
}
}
if (!bu_strcmp(stepcomplex->EntityName(), "Named_Unit")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "dimensions")) {
attr->ptr.c = new (STEPentity *);
*(attr->ptr.c) = (STEPentity *)(dimensional_exp);
}
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append((STEPentity *)ua_entry_2, completeSE);
instance_cnt++;
/*
* Now that we have the pieces, build the final complex type from four other types:
*/
const char *entNmArr[5] = {"geometric_representation_context", "global_uncertainty_assigned_context",
"global_unit_assigned_context", "representation_context", "*"};
STEPcomplex *complex_entity = new STEPcomplex(registry, (const char **)entNmArr, instance_cnt);
stepcomplex = complex_entity->head;
while (stepcomplex) {
if (!bu_strcmp(stepcomplex->EntityName(), "Geometric_Representation_Context")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "coordinate_space_dimension")) attr->StrToVal("3");
}
}
if (!bu_strcmp(stepcomplex->EntityName(), "Global_Uncertainty_Assigned_Context")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "uncertainty")) {
EntityAggregate *unc_agg = new EntityAggregate();
unc_agg->AddNode(new EntityNode((SDAI_Application_instance *)uncertainty));
attr->ptr.a = unc_agg;
}
}
}
if (!bu_strcmp(stepcomplex->EntityName(), "Global_Unit_Assigned_Context")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
std::string attrval;
if (!bu_strcmp(attr->Name(), "units")) {
EntityAggregate *unit_assigned_agg = new EntityAggregate();
unit_assigned_agg->AddNode(new EntityNode((SDAI_Application_instance *)unit_complex));
unit_assigned_agg->AddNode(new EntityNode((SDAI_Application_instance *)ua_entry_2));
unit_assigned_agg->AddNode(new EntityNode((SDAI_Application_instance *)ua_entry_3));
attr->ptr.a = unit_assigned_agg;
}
}
}
if (!bu_strcmp(stepcomplex->EntityName(), "Representation_Context")) {
stepcomplex->ResetAttributes();
while ((attr = stepcomplex->NextAttribute()) != NULL) {
if (!bu_strcmp(attr->Name(), "context_identifier")) attr->StrToVal("'STANDARD'");
if (!bu_strcmp(attr->Name(), "context_type")) attr->StrToVal("'3D'");
}
}
stepcomplex = stepcomplex->sc;
}
instance_list->Append((STEPentity *)complex_entity, completeSE);
return complex_entity;
}
// Local Variables:
// tab-width: 8
// mode: C++
// c-basic-offset: 4
// indent-tabs-mode: t
// c-file-style: "stroustrup"
// End:
// ex: shiftwidth=4 tabstop=8
+69
View File
@@ -0,0 +1,69 @@
/* G _ S T E P _ U T I L . C P P
* BRL-CAD
*
* Copyright (c) 2013 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.
*/
/** @file G_STEP_util.cpp
*
* General utilities for translating data to STEPcode containers
*
*/
#include "common.h"
#include <sstream>
#include <map>
#include "G_STEP_internal.h"
void
XYZ_to_Cartesian_point(double x, double y, double z, SdaiCartesian_point *step_pnt) {
RealAggregate_ptr coord_vals = step_pnt->coordinates_();
RealNode *xnode = new RealNode();
xnode->value = x;
coord_vals->AddNode(xnode);
RealNode *ynode = new RealNode();
ynode->value = y;
coord_vals->AddNode(ynode);
RealNode *znode = new RealNode();
znode->value = z;
coord_vals->AddNode(znode);
}
void
XYZ_to_Direction(double x, double y, double z, SdaiDirection *step_direction) {
RealAggregate_ptr coord_vals = step_direction->direction_ratios_();
RealNode *xnode = new RealNode();
xnode->value = x;
coord_vals->AddNode(xnode);
RealNode *ynode = new RealNode();
ynode->value = y;
coord_vals->AddNode(ynode);
RealNode *znode = new RealNode();
znode->value = z;
coord_vals->AddNode(znode);
}
// Local Variables:
// tab-width: 8
// mode: C++
// c-basic-offset: 4
// indent-tabs-mode: t
// c-file-style: "stroustrup"
// End:
// ex: shiftwidth=4 tabstop=8
+47
View File
@@ -0,0 +1,47 @@
/* G _ S T E P _ I N T E R N A L . H
* BRL-CAD
*
* Copyright (c) 2013 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program 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 program 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.
*/
/** @file step/G_STEP_internal.h
*
*/
#ifndef G_STEP_internal_H_
#define G_STEP_internal_H_
#include "STEPWrapper.h"
void XYZ_to_Cartesian_point(double x, double y, double z, SdaiCartesian_point *step_pnt);
void XYZ_to_Direction(double x, double y, double z, SdaiDirection *step_direction);
STEPentity * Add_Shape_Representation_Relationship(Registry *registry, InstMgr *instance_list, SdaiRepresentation *shape_rep, SdaiRepresentation *manifold_shape);
SdaiRepresentation * Add_Shape_Representation(Registry *registry, InstMgr *instance_list, SdaiRepresentation_context *context);
STEPentity * Add_Shape_Definition_Representation(Registry *registry, InstMgr *instance_list, SdaiRepresentation *sdairep);
STEPcomplex * Add_Default_Geometric_Context(Registry *registry, InstMgr *instance_list);
#endif /* G_STEP_internal_H_ */
/*
* Local Variables:
* tab-width: 8
* mode: C
* indent-tabs-mode: t
* c-file-style: "stroustrup"
* End:
* ex: shiftwidth=4 tabstop=8
*/

Some files were not shown because too many files have changed in this diff Show More