[brlcad-commits] SF.net SVN: brlcad:[43215] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice
Revision: 43215 http://brlcad.svn.sourceforge.net/brlcad/?rev=43215view=rev Author: davidloman Date: 2011-02-11 14:17:15 + (Fri, 11 Feb 2011) Log Message: --- Beginnings of a minimal test client. Gui looks ok but doesn't do anything yet Added Paths: --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/Main.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/Main.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/Main.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/Main.java 2011-02-11 14:17:15 UTC (rev 43215) @@ -0,0 +1,49 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file Main.java + * + */ +package org.brlcad.geometryservice.minimalclient; + +import javax.swing.SwingUtilities; + +/** + * @author david.h.loman + * + */ +public class Main { + + /** +* @param args +*/ + public static void main(String[] args) { + + /* Use .invokeLater() to prevent certain types of concurrency deadlocks */ + SwingUtilities.invokeLater(new Runnable() { + public void run() { + MinimalGSClient cli = new MinimalGSClient(Testing Text!!); + + cli.setVisible(true); + } + }); + + } + +} Property changes on: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/Main.java ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java 2011-02-11 14:17:15 UTC (rev 43215) @@ -0,0 +1,164 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file MinimalGSClient.java + * + */ +package org.brlcad.geometryservice.minimalclient; + +import java.awt.Container; +import java.awt.Dimension; +import java.awt.GraphicsConfiguration; +import java.awt.HeadlessException; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import javax.swing.border.Border; +import javax.swing.border.EtchedBorder; + +/** + * @author david.h.loman + * + */ +public class MinimalGSClient extends JFrame implements ActionListener { + + private static final long serialVersionUID = -839046331894878664L; + + + private JTextArea area01 = new JTextArea(); + private JTextArea area02 = new JTextArea(); + private JTextField area03 = new JTextField(); + + /** +* @throws HeadlessException +
[brlcad-commits] SF.net SVN: brlcad:[43216] brlcad/trunk/src/libged
Revision: 43216 http://brlcad.svn.sourceforge.net/brlcad/?rev=43216view=rev Author: brlcad Date: 2011-02-11 14:32:36 + (Fri, 11 Feb 2011) Log Message: --- another conversion from NEAR_ZERO() to ZERO() where SMALL, SMALL_FASTF, and sometimes where SQRT_SMALL_FASTF is used. simplify. reduction also made where intent seems to be a zero-test for a subsequent division. Modified Paths: -- brlcad/trunk/src/libged/3ptarb.c brlcad/trunk/src/libged/adc.c brlcad/trunk/src/libged/bigE.c brlcad/trunk/src/libged/bot_dump.c brlcad/trunk/src/libged/clone.c brlcad/trunk/src/libged/combmem.c brlcad/trunk/src/libged/get_comb.c brlcad/trunk/src/libged/gqa.c brlcad/trunk/src/libged/grid.c brlcad/trunk/src/libged/inside.c brlcad/trunk/src/libged/png.c brlcad/trunk/src/libged/ps.c brlcad/trunk/src/libged/rect.c brlcad/trunk/src/libged/red.c brlcad/trunk/src/libged/rfarb.c brlcad/trunk/src/libged/scale_tgc.c brlcad/trunk/src/libged/size.c brlcad/trunk/src/libged/solids_on_ray.c brlcad/trunk/src/libged/tire.c brlcad/trunk/src/libged/view_obj.c brlcad/trunk/src/libged/wdb_bigE.c Modified: brlcad/trunk/src/libged/3ptarb.c === --- brlcad/trunk/src/libged/3ptarb.c2011-02-11 14:17:15 UTC (rev 43215) +++ brlcad/trunk/src/libged/3ptarb.c2011-02-11 14:32:36 UTC (rev 43216) @@ -103,7 +103,7 @@ } VCROSS(norm, vec1, vec2); length = MAGNITUDE( norm ); -if (NEAR_ZERO(length, SMALL_FASTF)) { +if (ZERO(length)) { bu_vls_printf(gedp-ged_result_str, %s: points are colinear\n, argv[0]); return GED_ERROR; } @@ -116,7 +116,7 @@ switch (argv[11][0]) { case 'x': - if (NEAR_ZERO(norm[0], SMALL_FASTF)) { + if (ZERO(norm[0])) { bu_vls_printf(gedp-ged_result_str, %s: X not unique in this face\n, argv[0]); return GED_ERROR; } @@ -136,7 +136,7 @@ break; case 'y': - if (NEAR_ZERO(norm[1], SMALL_FASTF)) { + if (ZERO(norm[1])) { bu_vls_printf(gedp-ged_result_str, %s: Y not unique in this face\n, argv[0]); return GED_ERROR; } @@ -156,7 +156,7 @@ break; case 'z': - if (NEAR_ZERO(norm[2], SMALL_FASTF)) { + if (ZERO(norm[2])) { bu_vls_printf(gedp-ged_result_str, %s: Z not unique in this face\n, argv[0]); return GED_ERROR; } @@ -186,7 +186,7 @@ } thick = atof(argv[14]); -if (NEAR_ZERO(thick, SMALL_FASTF)) { +if (ZERO(thick)) { bu_vls_printf(gedp-ged_result_str, %s: thickness = 0.0\n, argv[0]); return GED_ERROR; } Modified: brlcad/trunk/src/libged/adc.c === --- brlcad/trunk/src/libged/adc.c 2011-02-11 14:17:15 UTC (rev 43215) +++ brlcad/trunk/src/libged/adc.c 2011-02-11 14:32:36 UTC (rev 43216) @@ -652,7 +652,7 @@ dx = view_pt[X] * GED_MAX - gvp-gv_adc.gas_dv_x; dy = view_pt[Y] * GED_MAX - gvp-gv_adc.gas_dv_y; - if (!NEAR_ZERO(dx, SMALL_FASTF) || !NEAR_ZERO(dy, SMALL_FASTF)) { + if (!ZERO(dx) || !ZERO(dy)) { gvp-gv_adc.gas_a1 = RAD2DEG*atan2(dy, dx); gvp-gv_adc.gas_dv_a1 = (1.0 - (gvp-gv_adc.gas_a1 / 45.0)) * GED_MAX; } @@ -670,7 +670,7 @@ dx = view_pt[X] * GED_MAX - gvp-gv_adc.gas_dv_x; dy = view_pt[Y] * GED_MAX - gvp-gv_adc.gas_dv_y; - if (!NEAR_ZERO(dx, SMALL_FASTF) || !NEAR_ZERO(dy, SMALL_FASTF)) { + if (!ZERO(dx) || !ZERO(dy)) { gvp-gv_adc.gas_a2 = RAD2DEG*atan2(dy, dx); gvp-gv_adc.gas_dv_a2 = (1.0 - (gvp-gv_adc.gas_a2 / 45.0)) * GED_MAX; } Modified: brlcad/trunk/src/libged/bigE.c === --- brlcad/trunk/src/libged/bigE.c 2011-02-11 14:17:15 UTC (rev 43215) +++ brlcad/trunk/src/libged/bigE.c 2011-02-11 14:32:36 UTC (rev 43216) @@ -473,8 +473,8 @@ continue; } - if (NEAR_ZERO(a-seg_in.hit_dist - b-seg_in.hit_dist, SMALL_FASTF) -NEAR_ZERO(a-seg_out.hit_dist - b-seg_out.hit_dist, SMALL_FASTF)) + if (ZERO(a-seg_in.hit_dist - b-seg_in.hit_dist) +ZERO(a-seg_out.hit_dist - b-seg_out.hit_dist)) { a-seg_stp = ON_SURF; tmp = b; @@ -484,7 +484,7 @@ continue;; } - if (NEAR_ZERO(a-seg_out.hit_dist - b-seg_out.hit_dist, SMALL_FASTF)) + if (ZERO(a-seg_out.hit_dist - b-seg_out.hit_dist)) a-seg_out.hit_dist = b-seg_in.hit_dist; else if (a-seg_out.hit_dist b-seg_out.hit_dist) { if
[brlcad-commits] SF.net SVN: brlcad:[43217] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice
Revision: 43217 http://brlcad.svn.sourceforge.net/brlcad/?rev=43217view=rev Author: davidloman Date: 2011-02-11 14:35:03 + (Fri, 11 Feb 2011) Log Message: --- Break out gui components into dedicated, individual subclasses of JPanel. This gives better control and expansion flexibility. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java Added Paths: --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java 2011-02-11 14:35:03 UTC (rev 43217) @@ -0,0 +1,103 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file CmdConsolePanel.java + * + */ +package org.brlcad.geometryservice; + +import java.awt.Dimension; +import java.awt.LayoutManager; +import java.awt.event.ActionListener; + +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import javax.swing.border.Border; +import javax.swing.border.EtchedBorder; + +/** + * @author david.h.loman + * + */ +public class CmdConsolePanel extends JPanel { + + private static final long serialVersionUID = -4138207212648943638L; + private JTextArea console; + private JTextField cmdLine; + + /** +* +*/ + public CmdConsolePanel(ActionListener actListener) { + this.commonCstr(actListener); + } + + /** +* @param arg0 +*/ + public CmdConsolePanel(ActionListener actListener, LayoutManager arg0) { + super(arg0); + this.commonCstr(actListener); + } + + /** +* @param arg0 +*/ + public CmdConsolePanel(ActionListener actListener, boolean arg0) { + super(arg0); + this.commonCstr(actListener); + } + + /** +* @param arg0 +* @param arg1 +*/ + public CmdConsolePanel(ActionListener actListener, LayoutManager arg0, boolean arg1) { + super(arg0, arg1); + this.commonCstr(actListener); + } + + private final void commonCstr(ActionListener actListener) { + this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); + Border myBorder = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); + + /* */ + console = new JTextArea(); + console.setLineWrap(true); + console.setWrapStyleWord(true); + console.setEditable(false); + console.setBorder(myBorder); + this.add(console); + + /* */ + cmdLine = new JTextField(); + cmdLine.setEditable(true); + cmdLine.setBorder(myBorder); + cmdLine.setMinimumSize(new Dimension(1, 25)); + cmdLine.setPreferredSize(new Dimension(300, 25)); + cmdLine.setMaximumSize(new Dimension(1024 ^ 2, 25)); + cmdLine.addActionListener(actListener); + this.add(cmdLine); + + } + +} Property changes on: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java
[brlcad-commits] SF.net SVN: brlcad:[43218] brlcad/branches/cmake/src/other/openNURBS
Revision: 43218 http://brlcad.svn.sourceforge.net/brlcad/?rev=43218view=rev Author: starseeker Date: 2011-02-11 14:36:04 + (Fri, 11 Feb 2011) Log Message: --- Keep tripping on this - just move it, can always put it back if there's a need to keep it in opennurbs_math.h Modified Paths: -- brlcad/branches/cmake/src/other/openNURBS/opennurbs_array_defs.h brlcad/branches/cmake/src/other/openNURBS/opennurbs_math.h Modified: brlcad/branches/cmake/src/other/openNURBS/opennurbs_array_defs.h === --- brlcad/branches/cmake/src/other/openNURBS/opennurbs_array_defs.h 2011-02-11 14:35:03 UTC (rev 43217) +++ brlcad/branches/cmake/src/other/openNURBS/opennurbs_array_defs.h 2011-02-11 14:36:04 UTC (rev 43218) @@ -454,6 +454,61 @@ } +/* +Description: + heap sort analogue of qsort() +Parameters + base - [in] +array of count elements + count - [in] +number of elements in the index[] and base[] arrays + sizeof_element - [in] +number of bytes between consecutive elements in the +base[] array. + compare - [in] +Comparison function a la qsort(). The context parameter +is pass as the third argument. + context - [in] +pointer passed as the third argument to compare(). +*/ +ON_DECL +void ON_hsort( +void* base, +size_t count, +size_t sizeof_element, +int (*compare)(const void*,const void*) +); + +/* +Description: + heap sort analogue of qsort() with a compare function + that takes an additional pointer that can be used to + pass extra informtation. +Parameters + base - [in] +array of count elements + count - [in] +number of elements in the index[] and base[] arrays + sizeof_element - [in] +number of bytes between consecutive elements in the +base[] array. + compare - [in] +Comparison function a la qsort(). The context parameter +is passed as the first argument. + context - [in] +pointer passed as the first argument to compare(). +*/ +ON_DECL +void ON_hsort( +void* base, +size_t count, +size_t sizeof_element, +int (*compare)(void*,const void*,const void*), +void* context +); + + + template class T bool ON_SimpleArrayT::HeapSort( int (*compar)(const T*,const T*) ) { Modified: brlcad/branches/cmake/src/other/openNURBS/opennurbs_math.h === --- brlcad/branches/cmake/src/other/openNURBS/opennurbs_math.h 2011-02-11 14:35:03 UTC (rev 43217) +++ brlcad/branches/cmake/src/other/openNURBS/opennurbs_math.h 2011-02-11 14:36:04 UTC (rev 43218) @@ -1357,59 +1357,6 @@ /* Description: - heap sort analogue of qsort() -Parameters - base - [in] -array of count elements - count - [in] -number of elements in the index[] and base[] arrays - sizeof_element - [in] -number of bytes between consecutive elements in the -base[] array. - compare - [in] -Comparison function a la qsort(). The context parameter -is pass as the third argument. - context - [in] -pointer passed as the third argument to compare(). -*/ -ON_DECL -void ON_hsort( -void* base, -size_t count, -size_t sizeof_element, -int (*compare)(const void*,const void*) -); - -/* -Description: - heap sort analogue of qsort() with a compare function - that takes an additional pointer that can be used to - pass extra informtation. -Parameters - base - [in] -array of count elements - count - [in] -number of elements in the index[] and base[] arrays - sizeof_element - [in] -number of bytes between consecutive elements in the -base[] array. - compare - [in] -Comparison function a la qsort(). The context parameter -is passed as the first argument. - context - [in] -pointer passed as the first argument to compare(). -*/ -ON_DECL -void ON_hsort( -void* base, -size_t count, -size_t sizeof_element, -int (*compare)(void*,const void*,const void*), -void* context -); - -/* -Description: Quick sort an array Parameters base - [in] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43219] brlcad/branches/cmake/src
Revision: 43219 http://brlcad.svn.sourceforge.net/brlcad/?rev=43219view=rev Author: starseeker Date: 2011-02-11 15:17:23 + (Fri, 11 Feb 2011) Log Message: --- Tweaks to get BRL-CAD compiling with the latest clang/clang++ - a few things that look legit, lot of adding of UNUSED and removal of self assignments - if there was a reason to avoid UNUSED in these cases will have to revert and try something else. Somewhat mysteriously, bu_byte_offset didn't cause a compiler failure - that's probably incorrect and we still need to do some sort of #if defined(__clang__) specific logic there. Modified Paths: -- brlcad/branches/cmake/src/burst/prnt.c brlcad/branches/cmake/src/conv/dem-g.c brlcad/branches/cmake/src/conv/tankill/tankill-g.c brlcad/branches/cmake/src/libbn/tcl.c brlcad/branches/cmake/src/libbu/cmdhist_obj.c brlcad/branches/cmake/src/libbu/list.c brlcad/branches/cmake/src/libbu/tcl.c brlcad/branches/cmake/src/libfb/fbserv_obj.c brlcad/branches/cmake/src/libged/tables.c brlcad/branches/cmake/src/liboptical/shade.c brlcad/branches/cmake/src/libpc/pcMathLF.h brlcad/branches/cmake/src/libpkg/pkg.c brlcad/branches/cmake/src/librt/bool.c brlcad/branches/cmake/src/librt/constraint.c brlcad/branches/cmake/src/librt/opennurbs_ext.h brlcad/branches/cmake/src/librt/primitives/arb8/arb8.c brlcad/branches/cmake/src/librt/primitives/arbn/arbn.c brlcad/branches/cmake/src/librt/primitives/ars/ars.c brlcad/branches/cmake/src/librt/primitives/cline/cline.c brlcad/branches/cmake/src/librt/primitives/grip/grip.c brlcad/branches/cmake/src/librt/primitives/half/half.c brlcad/branches/cmake/src/librt/primitives/hf/hf.c brlcad/branches/cmake/src/librt/primitives/hyp/hyp.c brlcad/branches/cmake/src/librt/primitives/metaball/metaball.c brlcad/branches/cmake/src/librt/primitives/nmg/nmg.c brlcad/branches/cmake/src/librt/primitives/nmg/nmg_extrude.c brlcad/branches/cmake/src/librt/primitives/nmg/nmg_tri_mc.c brlcad/branches/cmake/src/librt/primitives/part/part.c brlcad/branches/cmake/src/librt/primitives/pipe/pipe.c brlcad/branches/cmake/src/librt/primitives/poly/poly.c brlcad/branches/cmake/src/librt/primitives/rec/rec.c brlcad/branches/cmake/src/librt/primitives/rhc/rhc.c brlcad/branches/cmake/src/librt/primitives/rpc/rpc.c brlcad/branches/cmake/src/librt/primitives/sketch/sketch.c brlcad/branches/cmake/src/librt/primitives/sph/sph.c brlcad/branches/cmake/src/librt/primitives/submodel/submodel.c brlcad/branches/cmake/src/librt/primitives/superell/superell.c brlcad/branches/cmake/src/librt/primitives/tgc/tgc.c brlcad/branches/cmake/src/librt/primitives/tor/tor.c brlcad/branches/cmake/src/librt/primitives/vol/vol.c brlcad/branches/cmake/src/libsysv/tcl.c Modified: brlcad/branches/cmake/src/burst/prnt.c === --- brlcad/branches/cmake/src/burst/prnt.c 2011-02-11 14:36:04 UTC (rev 43218) +++ brlcad/branches/cmake/src/burst/prnt.c 2011-02-11 15:17:23 UTC (rev 43219) @@ -102,14 +102,12 @@ Thickness returned in a_rbeam. */ static int -f_Normal(struct application *ap, struct partition *pt_headp, struct seg *segp) +f_Normal(struct application *ap, struct partition *pt_headp, struct seg *UNUSED(segp)) { struct partition *pp = pt_headp-pt_forw; struct partition *cp; struct hit *ohitp; -segp = segp; /* quell */ - for (cp = pp-pt_forw; cp != pt_headp SameCmp(pp-pt_regionp, cp-pt_regionp); cp = cp-pt_forw Modified: brlcad/branches/cmake/src/conv/dem-g.c === --- brlcad/branches/cmake/src/conv/dem-g.c 2011-02-11 14:36:04 UTC (rev 43218) +++ brlcad/branches/cmake/src/conv/dem-g.c 2011-02-11 15:17:23 UTC (rev 43219) @@ -861,7 +861,7 @@ */ int process_manual_dem_max_raw_elevation( double *out_raw_dem_2_raw_dsp_scale_factor_ptr, -double *in_raw_dem_2_raw_dsp_auto_scale_factor_ptr, +double *UNUSED(in_raw_dem_2_raw_dsp_auto_scale_factor_ptr), long int *in_manual_dem_max_raw_elevation_ptr, double *in_derived_dem_max_raw_elevation_ptr, double *in_z_spatial_resolution_ptr, @@ -871,9 +871,6 @@ long int manual_dem_max_raw_elevation_lowerlimit = 1; long int manual_dem_max_raw_elevation_upperlimit = 99; -/* unused variable quelling */ -in_raw_dem_2_raw_dsp_auto_scale_factor_ptr = in_raw_dem_2_raw_dsp_auto_scale_factor_ptr; - /* compute raw_dem_2_raw_dsp_scale_factor based on the user entered */ /* dem max raw elevation */ /* test for zero to avoid divide by 0 math error */ @@ -957,9 +954,9 @@ */ int process_manual_dem_max_real_elevation( double *out_raw_dem_2_raw_dsp_scale_factor_ptr, -double *in_raw_dem_2_raw_dsp_auto_scale_factor_ptr, +double
[brlcad-commits] SF.net SVN: brlcad:[43220] brlcad/branches/cmake/src/other/tnt
Revision: 43220 http://brlcad.svn.sourceforge.net/brlcad/?rev=43220view=rev Author: starseeker Date: 2011-02-11 15:20:17 + (Fri, 11 Feb 2011) Log Message: --- Whoops, missed a couple tnt tweaks Modified Paths: -- brlcad/branches/cmake/src/other/tnt/tnt_array1d.h brlcad/branches/cmake/src/other/tnt/tnt_fortran_array1d.h brlcad/branches/cmake/src/other/tnt/tnt_matrix.h Modified: brlcad/branches/cmake/src/other/tnt/tnt_array1d.h === --- brlcad/branches/cmake/src/other/tnt/tnt_array1d.h 2011-02-11 15:17:23 UTC (rev 43219) +++ brlcad/branches/cmake/src/other/tnt/tnt_array1d.h 2011-02-11 15:20:17 UTC (rev 43220) @@ -258,7 +258,7 @@ template class T inline Array1DT Array1DT::subarray(int i0, int i1) { - if ((i0 0) (i1 n_) || (i0 = i1)) + if (((i0 0) (i1 n_)) || (i0 = i1)) { Array1DT X(*this); /* create a new instance of this array. */ X.n_ = i1-i0+1; Modified: brlcad/branches/cmake/src/other/tnt/tnt_fortran_array1d.h === --- brlcad/branches/cmake/src/other/tnt/tnt_fortran_array1d.h 2011-02-11 15:17:23 UTC (rev 43219) +++ brlcad/branches/cmake/src/other/tnt/tnt_fortran_array1d.h 2011-02-11 15:20:17 UTC (rev 43220) @@ -221,7 +221,7 @@ #ifdef TNT_DEBUG std::cout entered subarray. \n; #endif - if ((i0 0) (i1 n_) || (i0 = i1)) + if (((i0 0) (i1 n_)) || (i0 = i1)) { Fortran_Array1DT X(*this); /* create a new instance of this array. */ X.n_ = i1-i0+1; Modified: brlcad/branches/cmake/src/other/tnt/tnt_matrix.h === --- brlcad/branches/cmake/src/other/tnt/tnt_matrix.h2011-02-11 15:17:23 UTC (rev 43219) +++ brlcad/branches/cmake/src/other/tnt/tnt_matrix.h2011-02-11 15:20:17 UTC (rev 43220) @@ -545,7 +545,7 @@ #endif Subscript M = A.num_rows(); -Subscript N = A.num_cols(); +//Subscript N = A.num_cols(); Subscript K = B.num_cols(); MatrixT tmp(M,K); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43221] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/CmdConsolePanel.java
Revision: 43221 http://brlcad.svn.sourceforge.net/brlcad/?rev=43221view=rev Author: davidloman Date: 2011-02-11 15:29:27 + (Fri, 11 Feb 2011) Log Message: --- Make default prompt work correctly. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java 2011-02-11 15:20:17 UTC (rev 43220) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java 2011-02-11 15:29:27 UTC (rev 43221) @@ -24,6 +24,7 @@ import java.awt.Dimension; import java.awt.LayoutManager; +import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.BorderFactory; @@ -38,12 +39,15 @@ * @author david.h.loman * */ -public class CmdConsolePanel extends JPanel { +public class CmdConsolePanel extends JPanel implements ActionListener { private static final long serialVersionUID = -4138207212648943638L; private JTextArea console; private JTextField cmdLine; + private static final String DEFAULT_PROMPT = gsMinClient ; + private String prompt; + /** * */ @@ -95,9 +99,42 @@ cmdLine.setMinimumSize(new Dimension(1, 25)); cmdLine.setPreferredSize(new Dimension(300, 25)); cmdLine.setMaximumSize(new Dimension(1024 ^ 2, 25)); - cmdLine.addActionListener(actListener); + cmdLine.addActionListener(this); this.add(cmdLine); + + this.setDefaultPrompt(); + this.cmdLine.setText(this.prompt); + } + @Override + public void actionPerformed(ActionEvent event) { + Object source = event.getSource(); + + if (source == this.cmdLine) { + String val = this.cmdLine.getText(); + String text = this.console.getText(); + text += val + \n; + this.console.setText(text); + this.cmdLine.setText(this.prompt); + } } + /** +* @return the prompt +*/ + public final String getPrompt() { + return prompt; + } + + /** +* @param prompt +*the prompt to set +*/ + public final void setPrompt(String prompt) { + this.prompt = prompt; + } + + public final void setDefaultPrompt() { + this.prompt = CmdConsolePanel.DEFAULT_PROMPT; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43222] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/minimalclient/MinimalGSClient.java
Revision: 43222 http://brlcad.svn.sourceforge.net/brlcad/?rev=43222view=rev Author: davidloman Date: 2011-02-11 15:30:52 + (Fri, 11 Feb 2011) Log Message: --- Remove antiquated JText* code Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java 2011-02-11 15:29:27 UTC (rev 43221) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java 2011-02-11 15:30:52 UTC (rev 43222) @@ -32,10 +32,7 @@ import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JFrame; -import javax.swing.JOptionPane; import javax.swing.JPanel; -import javax.swing.JTextArea; -import javax.swing.JTextField; import org.brlcad.geometryservice.CmdConsolePanel; import org.brlcad.geometryservice.RepositoryViewerPanel; @@ -48,10 +45,6 @@ private static final long serialVersionUID = -839046331894878664L; - private JTextArea area01 = new JTextArea(); - private JTextArea area02 = new JTextArea(); - private JTextField area03 = new JTextField(); - /** * @throws HeadlessException */ @@ -117,13 +110,6 @@ @Override public void actionPerformed(ActionEvent event) { Object source = event.getSource(); - - if (source == this.area03) { - String val = this.area03.getText(); - - JOptionPane.showMessageDialog(null, val, Message Dialog, JOptionPane.PLAIN_MESSAGE); - setVisible(true); // show something - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43223] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/RepositoryViewerPanel.java
Revision: 43223 http://brlcad.svn.sourceforge.net/brlcad/?rev=43223view=rev Author: davidloman Date: 2011-02-11 15:31:10 + (Fri, 11 Feb 2011) Log Message: --- Swap the JTextArea for a real JTree Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java 2011-02-11 15:30:52 UTC (rev 43222) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java 2011-02-11 15:31:10 UTC (rev 43223) @@ -29,9 +29,11 @@ import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; -import javax.swing.JTextArea; +import javax.swing.JScrollPane; +import javax.swing.JTree; import javax.swing.border.Border; import javax.swing.border.EtchedBorder; +import javax.swing.tree.DefaultMutableTreeNode; /** * @author david.h.loman @@ -40,7 +42,8 @@ public class RepositoryViewerPanel extends JPanel { private static final long serialVersionUID = -4138207212648943638L; - private JTextArea treeview; + private JTree jtree; + private JScrollPane treeView; /** * @@ -80,13 +83,24 @@ Border myBorder = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); - /* */ - treeview = new JTextArea(); - treeview.setLineWrap(true); - treeview.setWrapStyleWord(true); - treeview.setEditable(false); - treeview.setBorder(myBorder); - this.add(treeview); + DefaultMutableTreeNode top = new DefaultMutableTreeNode(Tops!!); + + jtree = new JTree(top); + jtree.setRootVisible(true); + //jtree.setPreferredSize(new Dimension(300, 560)); + + this.treeView = new JScrollPane(jtree); + treeView.setBorder(myBorder); + this.add(this.treeView); + + +/* */ + + top.add(new DefaultMutableTreeNode(one)); + top.add(new DefaultMutableTreeNode(two)); + top.add(new DefaultMutableTreeNode(three)); + top.add(new DefaultMutableTreeNode(four)); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43224] brlcad/branches/cmake
Revision: 43224 http://brlcad.svn.sourceforge.net/brlcad/?rev=43224view=rev Author: starseeker Date: 2011-02-11 17:57:35 + (Fri, 11 Feb 2011) Log Message: --- Don't copy the headers into the bin dir - a little experience suggests that it's better from a debugging standpoint to have error messages relating to headers pointing directly back to the file to edit. This is also a concern with Tcl/Tk data and the like, but there the tradeoff is between complicating search logic vs. identifying the file to modify in case of error - need to check but if memory serves Tcl/Tk errors aren't very helpful about pointing out what file to edit anyway, so the loss would be fairly minimal. Another possible approch might be to symlink instead of copy, but the cross platform implications of that would need to be explored. Modified Paths: -- brlcad/branches/cmake/include/CMakeLists.txt brlcad/branches/cmake/src/adrt/CMakeLists.txt brlcad/branches/cmake/src/other/libregex/CMakeLists.txt brlcad/branches/cmake/src/other/libutahrle/CMakeLists.txt brlcad/branches/cmake/src/other/openNURBS/CMakeLists.txt brlcad/branches/cmake/src/other/tk/CMakeLists.txt brlcad/branches/cmake/src/other/tnt/CMakeLists.txt Modified: brlcad/branches/cmake/include/CMakeLists.txt === --- brlcad/branches/cmake/include/CMakeLists.txt2011-02-11 15:31:10 UTC (rev 43223) +++ brlcad/branches/cmake/include/CMakeLists.txt2011-02-11 17:57:35 UTC (rev 43224) @@ -80,10 +80,8 @@ sysv.h ) -FILE(COPY ${brlcadinclude_required} DESTINATION ${CMAKE_BINARY_DIR}/include/brlcad) INSTALL(FILES ${brlcadinclude_required} DESTINATION include/brlcad) IF(NOT BRLCAD-BUILD_BENCHMARK_ONLY AND NOT BRLCAD-BUILD_RTSERVER_ONLY) - FILE(COPY ${brlcadinclude_wanted} DESTINATION ${CMAKE_BINARY_DIR}/include/brlcad) INSTALL(FILES ${brlcadinclude_wanted} DESTINATION include/brlcad) ENDIF(NOT BRLCAD-BUILD_BENCHMARK_ONLY AND NOT BRLCAD-BUILD_RTSERVER_ONLY) Modified: brlcad/branches/cmake/src/adrt/CMakeLists.txt === --- brlcad/branches/cmake/src/adrt/CMakeLists.txt 2011-02-11 15:31:10 UTC (rev 43223) +++ brlcad/branches/cmake/src/adrt/CMakeLists.txt 2011-02-11 17:57:35 UTC (rev 43224) @@ -99,7 +99,6 @@ librender/texture_internal.h libtie/tie.h ) -FILE(COPY ${tie_HDRS} DESTINATION ${CMAKE_BINARY_DIR}/include/tie) INSTALL(FILES ${tie_HDRS} DESTINATION include/tie) CMAKEFILES(${tie_HDRS}) SET(adrt_ignore_files Modified: brlcad/branches/cmake/src/other/libregex/CMakeLists.txt === --- brlcad/branches/cmake/src/other/libregex/CMakeLists.txt 2011-02-11 15:31:10 UTC (rev 43223) +++ brlcad/branches/cmake/src/other/libregex/CMakeLists.txt 2011-02-11 17:57:35 UTC (rev 43224) @@ -28,6 +28,5 @@ SET_TARGET_PROPERTIES(regex-static PROPERTIES OUTPUT_NAME regex) ENDIF(NOT WIN32) if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) - FILE(COPY ${LIBREGEX_PUBLIC_HDRS} DESTINATION ${CMAKE_BINARY_DIR}/include) install(FILES ${LIBREGEX_PUBLIC_HDRS} DESTINATION include) endif() Modified: brlcad/branches/cmake/src/other/libutahrle/CMakeLists.txt === --- brlcad/branches/cmake/src/other/libutahrle/CMakeLists.txt 2011-02-11 15:31:10 UTC (rev 43223) +++ brlcad/branches/cmake/src/other/libutahrle/CMakeLists.txt 2011-02-11 17:57:35 UTC (rev 43224) @@ -124,6 +124,5 @@ install(FILES ${LIBUTAHRLE_MAN3} DESTINATION ${MAN_DIR}/man3) install(FILES rle.5 DESTINATION ${MAN_DIR}/man5) INSTALL(FILES ${LIBUTAHRLE_PUBLIC_HDRS} DESTINATION include) -FILE(COPY ${LIBUTAHRLE_PUBLIC_HDRS} DESTINATION ${CMAKE_BINARY_DIR}/include) endif() Modified: brlcad/branches/cmake/src/other/openNURBS/CMakeLists.txt === --- brlcad/branches/cmake/src/other/openNURBS/CMakeLists.txt2011-02-11 15:31:10 UTC (rev 43223) +++ brlcad/branches/cmake/src/other/openNURBS/CMakeLists.txt2011-02-11 17:57:35 UTC (rev 43224) @@ -286,5 +286,4 @@ ENDIF(BUILD_STATIC_LIBS) ENDIF(NOT MSVC) -FILE(COPY ${OPENNURBS_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/include/openNURBS) install(FILES ${OPENNURBS_HEADERS} DESTINATION include/openNURBS) Modified: brlcad/branches/cmake/src/other/tk/CMakeLists.txt === --- brlcad/branches/cmake/src/other/tk/CMakeLists.txt 2011-02-11 15:31:10 UTC (rev 43223) +++ brlcad/branches/cmake/src/other/tk/CMakeLists.txt 2011-02-11 17:57:35 UTC (rev 43224) @@ -325,7 +325,6 @@ generic/tkDecls.h generic/tkPlatDecls.h ) -FILE(COPY ${TK_HDRS} DESTINATION ${CMAKE_BINARY_DIR}/include) SET(TTK_SRCS
[brlcad-commits] SF.net SVN: brlcad:[43225] geomcore/trunk/cmake/FindBRLCAD.cmake
Revision: 43225 http://brlcad.svn.sourceforge.net/brlcad/?rev=43225view=rev Author: starseeker Date: 2011-02-11 18:00:55 + (Fri, 11 Feb 2011) Log Message: --- More tweaking of FindBRLCAD Modified Paths: -- geomcore/trunk/cmake/FindBRLCAD.cmake Modified: geomcore/trunk/cmake/FindBRLCAD.cmake === --- geomcore/trunk/cmake/FindBRLCAD.cmake 2011-02-11 17:57:35 UTC (rev 43224) +++ geomcore/trunk/cmake/FindBRLCAD.cmake 2011-02-11 18:00:55 UTC (rev 43225) @@ -49,7 +49,15 @@ # BRLCAD_RENDER_LIBRARY - librender # BRLCAD_TIE_LIBRARY - libtie # BRLCAD_SYSV_LIBRARY - libsysv -# BRLCAD_TERMIO_LIBRARY - libtermio +# BRLCAD_TERMIO_LIBRARY - libtermio (non WIN32 systems) +# +# Technically these are external but we need the versions +# tweaked for BRL-CAD. If a developer wishes to use the +# BRL-CAD altered versions of these libraries to satisfy a +# generic request for the library, they'll need to assign +# the results of these variables to the non-BRL-CAD specific +# variables they are using +# # BRLCAD_EXPPP_LIBRARY - SCL libexppp library # BRLCAD_EXPRESS_LIBRARY - SCL libexpress library # BRLCAD_STEPCORE_LIBRARY - SCL core library @@ -57,13 +65,17 @@ # BRLCAD_STEPEDITOR_LIBRARY - SCL editor library # BRLCAD_STEPUTILS_LIBRARY - SCL utils library # BRLCAD_OPENNURBS_LIBRARY - openNURBS library -# BRLCAD_UTAHRLE_LIBRARY - libutahrle # # In addition to the above variables, which are essentially unique # to BRL-CAD, this routine will look for local copies of libraries -# installed with BRL-CAD and return their results as would a +# installed with BRL-CAD and return their results as would a # standard find_package for that library (if one exists). The -# libraries searched for: +# distinction between these libraries and those above is that these +# libraries do not have known modifications required by BRL-CAD that +# preclude system libraries from substituting for them, although +# if BRL-CAD was compiled against local versions of these it is +# not guaranteed (or in some cases expected) that a found system +# version will successfully replace the local copy. # # libregex # libpng @@ -72,10 +84,8 @@ # tcl/tk # incrTcl # Togl +# utahrle # -# $Revision: $ -# $Author: $ -# # SET(BRLCAD_ROOT $ENV{BRLCAD_ROOT}) @@ -88,82 +98,63 @@ ENDIF(BRLCAD_BASE_DIR AND BRLCAD_ROOT) #First, find the install directories. -IF(BRLCAD_BASE_DIR) -#if BRLCAD_BASE_DIR is set, then this makes it easy! -SET(BRLCAD_BIN_DIR ${BRLCAD_BASE_DIR}/bin) -SET(BRLCAD_INC_DIRS ${BRLCAD_BASE_DIR}/include ${BRLCAD_BASE_DIR}/include/brlcad ${BRLCAD_BASE_DIR}/include/openNURBS) -SET(BRLCAD_LIB_DIR ${BRLCAD_BASE_DIR}/lib) -ELSE(BRLCAD_BASE_DIR) -#try looking for BRL-CAD's brlcad-config - it should give us -#a location -FIND_PATH(BRLCAD_BIN_DIR brlcad-config) -IF(BRLCAD_BIN_PATH) -EXEC_PROGRAM(${BRLCAD_BIN_DIR} ARGS --prefix OUTPUT_VARIABLE BRLCAD_BASE_DIR) -ENDIF(BRLCAD_BIN_PATH) -IF(NOT BRLCAD_BASE_DIR) -SET(BRLCAD_HEADERS_DIR_CANDIDATES -/usr/brlcad/include/brlcad -/usr/local/brlcad/include/brlcad -) -#Look for headers if brlcad-config fails -FIND_PATH(BRLCAD_HEADERS_DIR NAMES bu.h bn.h rt.h PATHS ${BRLCAD_HEADERS_DIR_CANDIDATES}) -IF(BRLCAD_HEADERS_DIR) -GET_FILENAME_COMPONENT(BRLCAD_BASE_DIR ${BRLCAD_HEADERS_DIR} PATH) -ENDIF(BRLCAD_HEADERS_DIR) -ENDIF(NOT BRLCAD_BASE_DIR) +IF(NOT BRLCAD_BASE_DIR) + #try looking for BRL-CAD's brlcad-config - it should give us + #a location for bin, and the parent will be the root dir + IF(NOT BRLCAD_BASE_DIR) + FIND_PROGRAM(BRLCAD_CONFIGEXE brlcad-config) + IF(BRLCAD_CONFIGEXE) + EXEC_PROGRAM(brlcad-config ARGS --prefix OUTPUT_VARIABLE BRLCAD_BASE_DIR) + ENDIF(BRLCAD_CONFIGEXE) + ENDIF(NOT BRLCAD_BASE_DIR) -IF(NOT BRLCAD_BASE_DIR) -MESSAGE(FATAL_ERROR \nCould not find BRL-CAD root directory - please set BRLCAD_BASE_DIR in CMake) -ENDIF(NOT BRLCAD_BASE_DIR) + #if that didn't work, see if we can find brlcad-config and use the parent path + IF(NOT BRLCAD_BASE_DIR) + FIND_PATH(BRLCAD_BIN_DIR brlcad-config) + IF(BRLCAD_BIN_DIR) + GET_FILENAME_COMPONENT(BRLCAD_BASE_DIR ${BRLCAD_BIN_DIR} PATH) + ENDIF(BRLCAD_BIN_DIR) + ENDIF(NOT BRLCAD_BASE_DIR) -#Find include directories (aka more than one) -SET(HEADERS_TO_SEARCH_FOR brlcad/bu.h bu.h opennurbs.h ) -
[brlcad-commits] SF.net SVN: brlcad:[43226] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice
Revision: 43226 http://brlcad.svn.sourceforge.net/brlcad/?rev=43226view=rev Author: davidloman Date: 2011-02-11 18:45:24 + (Fri, 11 Feb 2011) Log Message: --- Ooops. Moved two classes to the proper package. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java Added Paths: --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/RepositoryViewerPanel.java Removed Paths: - geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/RepositoryViewerPanel.java Deleted: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java 2011-02-11 18:00:55 UTC (rev 43225) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/CmdConsolePanel.java 2011-02-11 18:45:24 UTC (rev 43226) @@ -1,140 +0,0 @@ -/* - * BRL-CAD - * - * Copyright (c) 2011 United States Government as represented by - * the U.S. Army Research Laboratory. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this file; see the file named COPYING for more - * information. - */ -/** @file CmdConsolePanel.java - * - */ -package org.brlcad.geometryservice; - -import java.awt.Dimension; -import java.awt.LayoutManager; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; -import javax.swing.JPanel; -import javax.swing.JTextArea; -import javax.swing.JTextField; -import javax.swing.border.Border; -import javax.swing.border.EtchedBorder; - -/** - * @author david.h.loman - * - */ -public class CmdConsolePanel extends JPanel implements ActionListener { - - private static final long serialVersionUID = -4138207212648943638L; - private JTextArea console; - private JTextField cmdLine; - - private static final String DEFAULT_PROMPT = gsMinClient ; - private String prompt; - - /** -* -*/ - public CmdConsolePanel(ActionListener actListener) { - this.commonCstr(actListener); - } - - /** -* @param arg0 -*/ - public CmdConsolePanel(ActionListener actListener, LayoutManager arg0) { - super(arg0); - this.commonCstr(actListener); - } - - /** -* @param arg0 -*/ - public CmdConsolePanel(ActionListener actListener, boolean arg0) { - super(arg0); - this.commonCstr(actListener); - } - - /** -* @param arg0 -* @param arg1 -*/ - public CmdConsolePanel(ActionListener actListener, LayoutManager arg0, boolean arg1) { - super(arg0, arg1); - this.commonCstr(actListener); - } - - private final void commonCstr(ActionListener actListener) { - this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); - Border myBorder = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); - - /* */ - console = new JTextArea(); - console.setLineWrap(true); - console.setWrapStyleWord(true); - console.setEditable(false); - console.setBorder(myBorder); - this.add(console); - - /* */ - cmdLine = new JTextField(); - cmdLine.setEditable(true); - cmdLine.setBorder(myBorder); - cmdLine.setMinimumSize(new Dimension(1, 25)); - cmdLine.setPreferredSize(new Dimension(300, 25)); - cmdLine.setMaximumSize(new Dimension(1024 ^ 2, 25)); - cmdLine.addActionListener(this); - this.add(cmdLine); - - this.setDefaultPrompt(); - this.cmdLine.setText(this.prompt); - } - - @Override - public void actionPerformed(ActionEvent event) { - Object source = event.getSource(); - - if (source == this.cmdLine) { - String val =
[brlcad-commits] SF.net SVN: brlcad:[43227] brlcad/branches/cmake/misc/CMake/BRLCAD_Util. cmake
Revision: 43227 http://brlcad.svn.sourceforge.net/brlcad/?rev=43227view=rev Author: starseeker Date: 2011-02-11 18:54:45 + (Fri, 11 Feb 2011) Log Message: --- Go with symlinks on platforms that support them for data - this means we get both the build layout and editing in the source tree. Windows is too stupid to allow this so we fall back on a full copy - it'll be up to the windows dev not to change things in the build tree and forget to copy them back to the source tree. In principle if they do remember to do the edit in the original src file, the build targets should copy it for them. Modified Paths: -- brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake Modified: brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake === --- brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake 2011-02-11 18:45:24 UTC (rev 43226) +++ brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake 2011-02-11 18:54:45 UTC (rev 43227) @@ -121,27 +121,53 @@ ENDIF(LOCAL_COMPILE_FLAGS) ENDMACRO(BRLCAD_ADDLIB libname srcs libs) +# We attempt here to strike a balance between competing needs. Ideally, any error messages +# returned as a consequence of using data while running programs should point the developer +# back to the version controlled source code, not a copy in the build directory. However, +# another design goal is to replicate the install tree layout in the build directory. On +# platforms with symbolic links, we can do both by linking the source data files to their +# locations in the build directory. On Windows, this is not possible and we have to fall +# back on an explicit file copy mechanism. In both cases we have a build target that is +# triggered if source files are edited in order to allow the build system to take any further +# actions that may be needed (the current example is re-generating tclIndex and pkgIndex.tcl +# files when the source .tcl files change). MACRO(BRLCAD_ADDDATA datalist targetdir) - # This first line shouldn't be needed if target dependencies are set up correctly - FILE(COPY ${${datalist}} DESTINATION ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) - STRING(REGEX REPLACE / _ targetprefix ${targetdir}) - SET(inputlist) + IF(NOT WIN32) + IF(NOT EXISTS ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) + ENDIF(NOT EXISTS ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) + FOREACH(filename ${${datalist}}) + GET_FILENAME_COMPONENT(ITEM_NAME ${filename} NAME) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/${filename} ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}/${ITEM_NAME}) + ENDFOREACH(filename ${${datalist}}) + STRING(REGEX REPLACE / _ targetprefix ${targetdir}) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel + DEPENDS ${${datalist}} + ) + ADD_CUSTOM_TARGET(${datalist}_cp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel) + ELSE(NOT WIN32) + FILE(COPY ${${datalist}} DESTINATION ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) + STRING(REGEX REPLACE / _ targetprefix ${targetdir}) + SET(inputlist) + FOREACH(filename ${${datalist}}) + SET(inputlist ${inputlist} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}) + ENDFOREACH(filename ${${datalist}}) + SET(${targetprefix}_cmake_contents + SET(FILES_TO_COPY ${inputlist}) + FILE(COPY \${FILES_TO_COPY} DESTINATION ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) + ) + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.cmake ${${targetprefix}_cmake_contents}) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.cmake + COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel + DEPENDS ${${datalist}} + ) + ADD_CUSTOM_TARGET(${datalist}_cp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${targetprefix}.sentinel) + ENDIF(NOT WIN32) FOREACH(filename ${${datalist}}) - SET(inputlist ${inputlist} ${CMAKE_CURRENT_SOURCE_DIR}/${filename}) - ENDFOREACH(filename ${${datalist}}) - SET(${targetprefix}_cmake_contents -
[brlcad-commits] SF.net SVN: brlcad:[43228] brlcad/branches/cmake/misc/CMake/BRLCAD_Util. cmake
Revision: 43228 http://brlcad.svn.sourceforge.net/brlcad/?rev=43228view=rev Author: starseeker Date: 2011-02-11 18:59:34 + (Fri, 11 Feb 2011) Log Message: --- Add note to consider copying changes back from build to src tree for data files. Modified Paths: -- brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake Modified: brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake === --- brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake 2011-02-11 18:54:45 UTC (rev 43227) +++ brlcad/branches/cmake/misc/CMake/BRLCAD_Util.cmake 2011-02-11 18:59:34 UTC (rev 43228) @@ -131,6 +131,10 @@ # triggered if source files are edited in order to allow the build system to take any further # actions that may be needed (the current example is re-generating tclIndex and pkgIndex.tcl # files when the source .tcl files change). + +# In principle it may be possible to go even further and add rules to copy files in the build +# dir that are different from their source originals back into the source tree... need to +# think about complexity/robustness tradeoffs MACRO(BRLCAD_ADDDATA datalist targetdir) IF(NOT WIN32) IF(NOT EXISTS ${CMAKE_BINARY_DIR}/${DATA_DIR}/${targetdir}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43229] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/minimalclient
Revision: 43229 http://brlcad.svn.sourceforge.net/brlcad/?rev=43229view=rev Author: davidloman Date: 2011-02-11 19:01:23 + (Fri, 11 Feb 2011) Log Message: --- Implement a bare bones cmd line text interpreter Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java Added Paths: --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java 2011-02-11 18:59:34 UTC (rev 43228) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java 2011-02-11 19:01:23 UTC (rev 43229) @@ -35,6 +35,8 @@ import javax.swing.border.Border; import javax.swing.border.EtchedBorder; +import org.brlcad.geometryservice.minimalclient.cmd.CmdManager; + /** * @author david.h.loman * @@ -101,7 +103,7 @@ cmdLine.setMaximumSize(new Dimension(1024 ^ 2, 25)); cmdLine.addActionListener(this); this.add(cmdLine); - + this.setDefaultPrompt(); this.cmdLine.setText(this.prompt); } @@ -111,10 +113,8 @@ Object source = event.getSource(); if (source == this.cmdLine) { - String val = this.cmdLine.getText(); - String text = this.console.getText(); - text += val + \n; - this.console.setText(text); + String cmd = this.cmdLine.getText().replace(this.prompt, ); + CmdManager.parseCmd(cmd, this); this.cmdLine.setText(this.prompt); } } @@ -137,4 +137,9 @@ public final void setDefaultPrompt() { this.prompt = CmdConsolePanel.DEFAULT_PROMPT; } + + public final void addTextToConsole(String line) { + String oldText = this.console.getText()+ line + \n; + this.console.setText(oldText); + } } Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java 2011-02-11 19:01:23 UTC (rev 43229) @@ -0,0 +1,57 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file CmdManager.java + * + */ +package org.brlcad.geometryservice.minimalclient.cmd; + +import org.brlcad.geometryservice.minimalclient.CmdConsolePanel; + +/** + * @author david.h.loman + * + */ +public class CmdManager { + + + + public static final void parseCmd(String line, CmdConsolePanel output) { + + /* Id-10-T check */ + if (line.length() 1) + return; + + String[] cmdStack = line.split( ); + + String cmd = cmdStack[0]; + + if (cmd.equals(Testing)) { + output.addTextToConsole(line); + return; + } + + + + + output.addTextToConsole(Unknown Command String: ' + line + '); + + } + +} Property changes on: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source
[brlcad-commits] SF.net SVN: brlcad:[43230] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/minimalclient
Revision: 43230 http://brlcad.svn.sourceforge.net/brlcad/?rev=43230view=rev Author: davidloman Date: 2011-02-11 19:44:27 + (Fri, 11 Feb 2011) Log Message: --- Implement help command. Add requirement for subclasses of AbstractCmd to implement a help string. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java Added Paths: --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/HelpCmd.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java 2011-02-11 19:01:23 UTC (rev 43229) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java 2011-02-11 19:44:27 UTC (rev 43230) @@ -118,6 +118,10 @@ this.cmdLine.setText(this.prompt); } } + + public final void giveFocusToCmdLine() { + this.cmdLine.grabFocus(); + } /** * @return the prompt Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java 2011-02-11 19:01:23 UTC (rev 43229) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/MinimalGSClient.java 2011-02-11 19:44:27 UTC (rev 43230) @@ -34,6 +34,7 @@ import javax.swing.JFrame; import javax.swing.JPanel; +import org.brlcad.geometryservice.minimalclient.cmd.CmdManager; /** * @author david.h.loman @@ -103,6 +104,10 @@ /* */ CmdConsolePanel consolePanel = new CmdConsolePanel(this); masterPanel.add(consolePanel); + + consolePanel.giveFocusToCmdLine(); + + CmdManager.registerBuiltInCmds(consolePanel); } @Override Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java 2011-02-11 19:44:27 UTC (rev 43230) @@ -0,0 +1,56 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file AbstractCmd.java + * + */ +package org.brlcad.geometryservice.minimalclient.cmd; + +import org.brlcad.geometryservice.minimalclient.CmdConsolePanel; + +/** + * @author david.h.loman + * + */ +public abstract class AbstractCmd { + + protected final String cmd; + protected final CmdConsolePanel cmdConsole; + + /** +* @param cmd +* @param cmdConsole +*/ + public AbstractCmd(String cmd, CmdConsolePanel cmdConsole) { + super(); + this.cmd = cmd; + this.cmdConsole = cmdConsole; + } + + public abstract boolean doCmd(String[] args); + + /** +* @return the cmd +*/ + public final String getCmd() { + return cmd; + } + + public abstract String getHelp(); +} Property changes on: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified:
[brlcad-commits] SF.net SVN: brlcad:[43231] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/minimalclient/cmd
Revision: 43231 http://brlcad.svn.sourceforge.net/brlcad/?rev=43231view=rev Author: davidloman Date: 2011-02-11 19:46:51 + (Fri, 11 Feb 2011) Log Message: --- Make AbstractCmd subclasses implement a usage string also. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/HelpCmd.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java 2011-02-11 19:44:27 UTC (rev 43230) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/AbstractCmd.java 2011-02-11 19:46:51 UTC (rev 43231) @@ -53,4 +53,6 @@ } public abstract String getHelp(); + public abstract String getUsage(); + } Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/HelpCmd.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/HelpCmd.java 2011-02-11 19:44:27 UTC (rev 43230) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/HelpCmd.java 2011-02-11 19:46:51 UTC (rev 43231) @@ -96,4 +96,12 @@ return Displays all registered commands if no argument is given. If a specific command is supplied, e.g. 'help login', then the help statement for the supplied command will be printed.; } + /* (non-Javadoc) +* @see org.brlcad.geometryservice.minimalclient.cmd.AbstractCmd#getUsage() +*/ + @Override + public String getUsage() { + return help [cmd]; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43232] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/minimalclient/cmd
Revision: 43232 http://brlcad.svn.sourceforge.net/brlcad/?rev=43232view=rev Author: davidloman Date: 2011-02-11 20:02:18 + (Fri, 11 Feb 2011) Log Message: --- Stubbed in a 'login' command. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java Added Paths: --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java 2011-02-11 19:46:51 UTC (rev 43231) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/CmdManager.java 2011-02-11 20:02:18 UTC (rev 43232) @@ -70,11 +70,6 @@ CmdManager.cmdMap.put(cmdStr, cmd); } - - public static final void registerBuiltInCmds(CmdConsolePanel console) { - CmdManager.registerCmd(new HelpCmd(console)); - } - /** * @return * @see java.util.HashMap#keySet() @@ -86,4 +81,12 @@ public static final AbstractCmd getCmdByName(String name) { return CmdManager.cmdMap.get(name); } + + + public static final void registerBuiltInCmds(CmdConsolePanel console) { + CmdManager.registerCmd(new HelpCmd(console)); + CmdManager.registerCmd(new LoginCmd(console)); + } + + } Added: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java (rev 0) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java 2011-02-11 20:02:18 UTC (rev 43232) @@ -0,0 +1,83 @@ +/* + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file HelpCmd.java + * + */ +package org.brlcad.geometryservice.minimalclient.cmd; + +import java.util.Set; + +import org.brlcad.geometryservice.minimalclient.CmdConsolePanel; + +/** + * @author david.h.loman + * + */ +public class LoginCmd extends AbstractCmd { + + /** +* @param cmd +* @param cmdConsole +*/ + public LoginCmd(CmdConsolePanel cmdConsole) { + super(login, cmdConsole); + } + + /* +* (non-Javadoc) +* +* @see +* org.brlcad.geometryservice.minimalclient.cmd.AbstractCmd#doCmd(java.lang +* .String[]) +*/ + @Override + public boolean doCmd(String[] args) { + + if (args.length 3 || args.length 4) { + this.cmdConsole.addTextToConsole(this.getUsage()); + return false; + } + + this.cmdConsole.addTextToConsole(Not Implemented yet.); + + return true; + } + + /* +* (non-Javadoc) +* +* @see org.brlcad.geometryservice.minimalclient.cmd.AbstractCmd#getHelp() +*/ + @Override + public String getHelp() { + return Attempts to login to a Geometry Service; + } + + /* +* (non-Javadoc) +* +* @see org.brlcad.geometryservice.minimalclient.cmd.AbstractCmd#getUsage() +*/ + @Override + public String getUsage() { + return login uname password address [port]; + } + +} Property changes on: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before
[brlcad-commits] SF.net SVN: brlcad:[43233] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice/minimalclient/CmdConsolePanel.java
Revision: 43233 http://brlcad.svn.sourceforge.net/brlcad/?rev=43233view=rev Author: davidloman Date: 2011-02-11 20:02:40 + (Fri, 11 Feb 2011) Log Message: --- Make console scroll when screen fills with text. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java 2011-02-11 20:02:18 UTC (rev 43232) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/CmdConsolePanel.java 2011-02-11 20:02:40 UTC (rev 43233) @@ -30,6 +30,7 @@ import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JPanel; +import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.border.Border; @@ -85,15 +86,17 @@ private final void commonCstr(ActionListener actListener) { this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); Border myBorder = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); - + /* */ console = new JTextArea(); console.setLineWrap(true); console.setWrapStyleWord(true); console.setEditable(false); console.setBorder(myBorder); - this.add(console); + JScrollPane scroll = new JScrollPane(console); + this.add(scroll); + /* */ cmdLine = new JTextField(); cmdLine.setEditable(true); @@ -118,7 +121,7 @@ this.cmdLine.setText(this.prompt); } } - + public final void giveFocusToCmdLine() { this.cmdLine.grabFocus(); } @@ -143,7 +146,7 @@ } public final void addTextToConsole(String line) { - String oldText = this.console.getText()+ line + \n; + String oldText = this.console.getText() + line + \n; this.console.setText(oldText); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43234] geomcore/trunk/src/interfaces/java/src/org/ brlcad/geometryservice
Revision: 43234 http://brlcad.svn.sourceforge.net/brlcad/?rev=43234view=rev Author: davidloman Date: 2011-02-11 20:04:14 + (Fri, 11 Feb 2011) Log Message: --- Import cleanup. Modified Paths: -- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/RemoteNodeNameSetMsg.java Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java 2011-02-11 20:02:40 UTC (rev 43233) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/minimalclient/cmd/LoginCmd.java 2011-02-11 20:04:14 UTC (rev 43234) @@ -22,8 +22,6 @@ */ package org.brlcad.geometryservice.minimalclient.cmd; -import java.util.Set; - import org.brlcad.geometryservice.minimalclient.CmdConsolePanel; /** Modified: geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/RemoteNodeNameSetMsg.java === --- geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/RemoteNodeNameSetMsg.java 2011-02-11 20:02:40 UTC (rev 43233) +++ geomcore/trunk/src/interfaces/java/src/org/brlcad/geometryservice/net/msg/RemoteNodeNameSetMsg.java 2011-02-11 20:04:14 UTC (rev 43234) @@ -22,7 +22,6 @@ */ package org.brlcad.geometryservice.net.msg; -import org.brlcad.geometryservice.net.msg.AbstractNetMsg; import org.brlcad.geometryservice.net.ByteBufferReader; import org.brlcad.geometryservice.net.ByteBufferWriter; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43235] brlcad/trunk
Revision: 43235 http://brlcad.svn.sourceforge.net/brlcad/?rev=43235view=rev Author: brlcad Date: 2011-02-11 20:09:14 + (Fri, 11 Feb 2011) Log Message: --- minimize differences, merge r43219 from cmake branch. provides lots of quellage goodness that was caught by the llvm compiler, but that should've been applied to trunk instead of branch. Modified Paths: -- brlcad/trunk/src/burst/prnt.c brlcad/trunk/src/conv/dem-g.c brlcad/trunk/src/conv/tankill/tankill-g.c brlcad/trunk/src/libbn/tcl.c brlcad/trunk/src/libbu/cmdhist_obj.c brlcad/trunk/src/libbu/list.c brlcad/trunk/src/libbu/tcl.c brlcad/trunk/src/libfb/fbserv_obj.c brlcad/trunk/src/libged/tables.c brlcad/trunk/src/liboptical/shade.c brlcad/trunk/src/libpc/pcMathLF.h brlcad/trunk/src/libpkg/pkg.c brlcad/trunk/src/librt/bool.c brlcad/trunk/src/librt/constraint.c brlcad/trunk/src/librt/opennurbs_ext.h brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/arbn/arbn.c brlcad/trunk/src/librt/primitives/ars/ars.c brlcad/trunk/src/librt/primitives/cline/cline.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/nmg/nmg.c brlcad/trunk/src/librt/primitives/nmg/nmg_extrude.c brlcad/trunk/src/librt/primitives/nmg/nmg_tri_mc.c brlcad/trunk/src/librt/primitives/part/part.c brlcad/trunk/src/librt/primitives/pipe/pipe.c brlcad/trunk/src/librt/primitives/poly/poly.c brlcad/trunk/src/librt/primitives/rec/rec.c brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/sketch/sketch.c brlcad/trunk/src/librt/primitives/sph/sph.c brlcad/trunk/src/librt/primitives/submodel/submodel.c brlcad/trunk/src/librt/primitives/superell/superell.c brlcad/trunk/src/librt/primitives/tgc/tgc.c brlcad/trunk/src/librt/primitives/tor/tor.c brlcad/trunk/src/librt/primitives/vol/vol.c brlcad/trunk/src/libsysv/tcl.c Property Changed: brlcad/trunk/ brlcad/trunk/src/adrt/load.c brlcad/trunk/src/adrt/load.h brlcad/trunk/src/adrt/master/tienet_master.c brlcad/trunk/src/adrt/master/tienet_master.h brlcad/trunk/src/adrt/slave/tienet_slave.c brlcad/trunk/src/adrt/slave/tienet_slave.h brlcad/trunk/src/libbn/randmt.c brlcad/trunk/src/libpc/pcVCSet.cpp brlcad/trunk/src/libpc/pcVCSet.h brlcad/trunk/src/util/pc_test.c Property changes on: brlcad/trunk ___ Added: svn:mergeinfo + /brlcad/branches/cmake:43219 Property changes on: brlcad/trunk/src/adrt/load.c ___ Deleted: svn:mergeinfo - Property changes on: brlcad/trunk/src/adrt/load.h ___ Deleted: svn:mergeinfo - Property changes on: brlcad/trunk/src/adrt/master/tienet_master.c ___ Deleted: svn:mergeinfo - Property changes on: brlcad/trunk/src/adrt/master/tienet_master.h ___ Deleted: svn:mergeinfo - Property changes on: brlcad/trunk/src/adrt/slave/tienet_slave.c ___ Deleted: svn:mergeinfo - Property changes on: brlcad/trunk/src/adrt/slave/tienet_slave.h ___ Deleted: svn:mergeinfo - Modified: brlcad/trunk/src/burst/prnt.c === --- brlcad/trunk/src/burst/prnt.c 2011-02-11 20:04:14 UTC (rev 43234) +++ brlcad/trunk/src/burst/prnt.c 2011-02-11 20:09:14 UTC (rev 43235) @@ -102,14 +102,12 @@ Thickness returned in a_rbeam. */ static int -f_Normal(struct application *ap, struct partition *pt_headp, struct seg *segp) +f_Normal(struct application *ap, struct partition *pt_headp, struct seg *UNUSED(segp)) { struct partition *pp = pt_headp-pt_forw; struct partition *cp; struct hit *ohitp; -segp = segp; /* quell */ - for (cp = pp-pt_forw; cp != pt_headp SameCmp(pp-pt_regionp, cp-pt_regionp); cp = cp-pt_forw Modified: brlcad/trunk/src/conv/dem-g.c === --- brlcad/trunk/src/conv/dem-g.c 2011-02-11 20:04:14 UTC (rev 43234) +++ brlcad/trunk/src/conv/dem-g.c 2011-02-11 20:09:14 UTC (rev 43235) @@ -861,7 +861,7 @@ */ int process_manual_dem_max_raw_elevation( double *out_raw_dem_2_raw_dsp_scale_factor_ptr, -double
[brlcad-commits] SF.net SVN: brlcad:[43236] brlcad/trunk/TODO
Revision: 43236 http://brlcad.svn.sourceforge.net/brlcad/?rev=43236view=rev Author: brlcad Date: 2011-02-11 20:11:10 + (Fri, 11 Feb 2011) Log Message: --- demote platemode nurbs back down with the other nurbs tasks even though it's still possible within two months. Modified Paths: -- brlcad/trunk/TODO Modified: brlcad/trunk/TODO === --- brlcad/trunk/TODO 2011-02-11 20:09:14 UTC (rev 43235) +++ brlcad/trunk/TODO 2011-02-11 20:11:10 UTC (rev 43236) @@ -18,12 +18,9 @@ - * implement new makesegs for tie + * png support in rtwizard - -THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS - * upgrade source repository back-end to the latest SVN 1.5 so we can benefit from proper merge tracking. @@ -40,6 +37,10 @@ * rt/rtedge command-line options for overriding object colors + +THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS +--- + * rtwizard enhancement to allow color overrides to be specified for selected objects. @@ -49,12 +50,7 @@ objects, have some means to determine that something is large and complex or at a minimum, provide an option to not draw on copy. -* plate mode NURBS/BREP objects. Similar, if not identical, to plate - mode BoTs, 'brep' objects need the ability to have a thickness - described so you could automatically handle non-solid NURBS and - sheet-metal style geometry without requiring surface solidity. - THESE ARE UNSCHEDULED BACKLOG TASKS --- @@ -828,13 +824,16 @@ present in openNURBS, and port that code to openNURBS data structures and routines. This will eventually allow us to remove the old NURBS code. -* improve min/max bounding box routines for BREP/NURBS - * document the new NURBS/BREP primitive, capabilities and limitations * implement boolean evaluation of nurbs surfaces +* plate mode NURBS/BREP objects. Similar, if not identical, to plate + mode BoTs, 'brep' objects need the ability to have a thickness + described so you could automatically handle non-solid NURBS and + sheet-metal style geometry without requiring surface solidity. + NMG/BoT --- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43237] brlcad/trunk
Revision: 43237 http://brlcad.svn.sourceforge.net/brlcad/?rev=43237view=rev Author: bob1961 Date: 2011-02-11 20:23:38 + (Fri, 11 Feb 2011) Log Message: --- Added pix2fb and fb2pix to libged. Modified Paths: -- brlcad/trunk/include/fb.h brlcad/trunk/include/fbserv_obj.h brlcad/trunk/include/ged.h brlcad/trunk/src/libfb/fb_generic.c brlcad/trunk/src/libged/Makefile.am brlcad/trunk/src/libtclcad/ged_obj.c brlcad/trunk/src/tclscripts/lib/Ged.tcl Added Paths: --- brlcad/trunk/src/libged/fb2pix.c brlcad/trunk/src/libged/pix2fb.c Modified: brlcad/trunk/include/fb.h === --- brlcad/trunk/include/fb.h 2011-02-11 20:11:10 UTC (rev 43236) +++ brlcad/trunk/include/fb.h 2011-02-11 20:23:38 UTC (rev 43237) @@ -92,6 +92,8 @@ FB_EXPORT extern int fb_common_file_size(size_t *widthp, size_t *heightp, const char *filename, int pixel_size); FB_EXPORT extern int fb_common_image_size(size_t *widthp, size_t *heightp, size_t npixels); FB_EXPORT extern int fb_common_name_size(size_t *widthp, size_t *heightp, const char *name); +FB_EXPORT extern int fb_write_fp(FBIO *ifp, FILE *fp, int req_width, int req_height, int crunch, int inverse, struct bu_vls *result); +FB_EXPORT extern int fb_read_fd(FBIO *ifp, int fd, int file_width, int file_height, int file_xoff, int file_yoff, int scr_width, int scr_height, int scr_xoff, int scr_yoff, int fileinput, char *file_name, int one_line_only, int multiple_lines, int autosize, int inverse, int clear, int zoom, struct bu_vls *result); /* color mapping */ FB_EXPORT extern int fb_is_linear_cmap(const ColorMap *cmap); Modified: brlcad/trunk/include/fbserv_obj.h === --- brlcad/trunk/include/fbserv_obj.h 2011-02-11 20:11:10 UTC (rev 43236) +++ brlcad/trunk/include/fbserv_obj.h 2011-02-11 20:23:38 UTC (rev 43237) @@ -32,6 +32,7 @@ #define MAX_CLIENTS 32 #define MAX_PORT_TRIES 100 #define FBS_CALLBACK_NULL (void (*)())NULL +#define FBSERV_OBJ_NULL (struct fbserv_obj *)NULL struct fbserv_listener { int fbsl_fd; /** @brief socket to listen for connections */ Modified: brlcad/trunk/include/ged.h === --- brlcad/trunk/include/ged.h 2011-02-11 20:11:10 UTC (rev 43236) +++ brlcad/trunk/include/ged.h 2011-02-11 20:23:38 UTC (rev 43237) @@ -164,6 +164,26 @@ return (_flags); \ } +#define GED_CHECK_FBSERV(_gedp, _flags) \ +if (_gedp-ged_fbsp == FBSERV_OBJ_NULL) { \ + int ged_check_view_quiet = (_flags) GED_QUIET; \ + if (!ged_check_view_quiet) { \ + bu_vls_trunc((_gedp)-ged_result_str, 0); \ + bu_vls_printf((_gedp)-ged_result_str, A framebuffer server object does not exist.); \ + } \ + return (_flags); \ +} + +#define GED_CHECK_FBSERV_FBP(_gedp, _flags) \ +if (_gedp-ged_fbsp-fbs_fbp == FBIO_NULL) { \ + int ged_check_view_quiet = (_flags) GED_QUIET; \ + if (!ged_check_view_quiet) { \ + bu_vls_trunc((_gedp)-ged_result_str, 0); \ + bu_vls_printf((_gedp)-ged_result_str, A framebuffer IO structure does not exist.); \ + } \ + return (_flags); \ +} + /** Lookup database object */ #define GED_CHECK_EXISTS(_gedp, _name, _noisy, _flags) \ if (db_lookup((_gedp)-ged_wdbp-dbip, (_name), (_noisy)) != RT_DIR_NULL) { \ @@ -494,6 +514,7 @@ struct ged_drawable*ged_gdp; struct ged_view*ged_gvp; +struct fbserv_obj *ged_fbsp; void *ged_dmp; void *ged_refresh_clientdata;/** @brief client data passed to refresh handler */ @@ -1601,6 +1622,11 @@ GED_EXPORT BU_EXTERN(int ged_facetize, (struct ged *gedp, int argc, const char *argv[])); /** + * Fb2pix writes a framebuffer image to a .pix file. + */ +GED_EXPORT BU_EXTERN(int ged_fb2pix, (struct ged *gedp, int argc, const char *argv[])); + +/** * Find combinations that reference object */ GED_EXPORT BU_EXTERN(int ged_find, (struct ged *gedp, int argc, const char *argv[])); @@ -1939,6 +1965,11 @@ GED_EXPORT BU_EXTERN(int ged_perspective, (struct ged *gedp, int argc, const char *argv[])); /** + * Pix2fb reads a pix file into a framebuffer. + */ +GED_EXPORT BU_EXTERN(int ged_pix2fb, (struct ged *gedp, int argc, const char *argv[])); + +/** * Create a unix plot file of the currently displayed objects. */ GED_EXPORT BU_EXTERN(int ged_plot, (struct ged *gedp, int argc, const char *argv[])); Modified: brlcad/trunk/src/libfb/fb_generic.c === --- brlcad/trunk/src/libfb/fb_generic.c 2011-02-11 20:11:10 UTC (rev 43236) +++ brlcad/trunk/src/libfb/fb_generic.c 2011-02-11 20:23:38 UTC (rev 43237) @@ -430,8 +430,278 @@ } } +static
[brlcad-commits] SF.net SVN: brlcad:[43238] geomcore/trunk
Revision: 43238 http://brlcad.svn.sourceforge.net/brlcad/?rev=43238view=rev Author: erikgreenwald Date: 2011-02-11 20:25:44 + (Fri, 11 Feb 2011) Log Message: --- eliminate QByteArray and QFile Modified Paths: -- geomcore/trunk/include/DataStreamUtils.h geomcore/trunk/include/DbObject.h geomcore/trunk/include/GenericMultiByteMsg.h geomcore/trunk/include/NetMsg.h geomcore/trunk/include/NetMsgFactory.h geomcore/trunk/src/GS/DataManager.cxx geomcore/trunk/src/GS/DbObject.cxx geomcore/trunk/src/GS/FileDataSource.cxx geomcore/trunk/src/libNet/NetMsgFactory.cxx geomcore/trunk/src/libNet/Portal.cxx geomcore/trunk/src/libNet/netMsg/GenericMultiByteMsg.cxx geomcore/trunk/src/libNet/netMsg/NetMsg.cxx geomcore/trunk/src/utility/CMakeLists.txt geomcore/trunk/src/utility/DataStreamUtils.cxx geomcore/trunk/tests/libNet/netMsgSerialTest.cxx Modified: geomcore/trunk/include/DataStreamUtils.h === --- geomcore/trunk/include/DataStreamUtils.h2011-02-11 20:23:38 UTC (rev 43237) +++ geomcore/trunk/include/DataStreamUtils.h2011-02-11 20:25:44 UTC (rev 43238) @@ -28,10 +28,13 @@ #include stdint.h #include string + #include QtCore/QDataStream #include QtCore/QUuid #include iostream +#include ByteArray.h + class DataStreamUtils { public: @@ -39,7 +42,7 @@ static void putString(QDataStream* ds, std::string str); static QUuid* getQUuid(QDataStream* ds); static void putQUuid(QDataStream* ds, QUuid str); - static void printQByteArray(QByteArray* ba); + static void printByteArray(ByteArray* ba); private: DataStreamUtils(){}; Modified: geomcore/trunk/include/DbObject.h === --- geomcore/trunk/include/DbObject.h 2011-02-11 20:23:38 UTC (rev 43237) +++ geomcore/trunk/include/DbObject.h 2011-02-11 20:25:44 UTC (rev 43238) @@ -29,23 +29,23 @@ #include string #include QtCore/QUuid -#include QtCore/QByteArray +#include ByteArray.h class DbObject { public: - DbObject(std::string path, QByteArray* data); - DbObject(QUuid id, QByteArray* data); + DbObject(std::string path, ByteArray* data); + DbObject(QUuid id, ByteArray* data); virtual ~DbObject(); std::string getPath(); QUuid getID(); - QByteArray* getData(); + ByteArray* getData(); private: std::string path; QUuid id; - QByteArray* data; + ByteArray* data; /* Disable copy cstr and =operator */ DbObject(DbObject const){}; Modified: geomcore/trunk/include/GenericMultiByteMsg.h === --- geomcore/trunk/include/GenericMultiByteMsg.h2011-02-11 20:23:38 UTC (rev 43237) +++ geomcore/trunk/include/GenericMultiByteMsg.h2011-02-11 20:25:44 UTC (rev 43238) @@ -27,7 +27,7 @@ #define __GENERICMULTIBYTEMSG_H__ #include NetMsg.h -#include QtCore/QByteArray +#include ByteArray.h class GenericMultiByteMsg : public NetMsg { @@ -48,7 +48,7 @@ * Utilities */ virtual std::string toString(); - QByteArray* getQByteArray(); + ByteArray* getByteArray(); protected: uint32_t getDataLen(); Modified: geomcore/trunk/include/NetMsg.h === --- geomcore/trunk/include/NetMsg.h 2011-02-11 20:23:38 UTC (rev 43237) +++ geomcore/trunk/include/NetMsg.h 2011-02-11 20:25:44 UTC (rev 43238) @@ -30,10 +30,12 @@ #include string #include stdint.h #include stdio.h + #include QtCore/QDataStream -#include QtCore/QByteArray #include QtCore/QUuid +#include ByteArray.h + class Portal; class NetMsg @@ -52,8 +54,8 @@ virtual ~NetMsg(); /* Serializers */ - QByteArray* serialize(); - void serialize(QByteArray* ba); + ByteArray* serialize(); + void serialize(ByteArray* ba); /* *Getters n Setters Modified: geomcore/trunk/include/NetMsgFactory.h === --- geomcore/trunk/include/NetMsgFactory.h 2011-02-11 20:23:38 UTC (rev 43237) +++ geomcore/trunk/include/NetMsgFactory.h 2011-02-11 20:25:44 UTC (rev 43238) @@ -30,7 +30,7 @@ #include brlcad/pkg.h -#include QtCore/QByteArray +#include ByteArray.h #include string #include QtCore/QDataStream @@ -39,7 +39,7 @@ public: static NetMsgFactory* getInstance(); virtual ~NetMsgFactory(); - NetMsg* deserializeNetMsg(QByteArray data, Portal* origin); + NetMsg* deserializeNetMsg(ByteArray data, Portal* origin); private: NetMsgFactory(); Modified: geomcore/trunk/src/GS/DataManager.cxx === --- geomcore/trunk/src/GS/DataManager.cxx 2011-02-11 20:23:38 UTC
[brlcad-commits] SF.net SVN: brlcad:[43239] geomcore/trunk
Revision: 43239 http://brlcad.svn.sourceforge.net/brlcad/?rev=43239view=rev Author: erikgreenwald Date: 2011-02-11 20:28:42 + (Fri, 11 Feb 2011) Log Message: --- add helper class replacing QByteArray Added Paths: --- geomcore/trunk/include/ByteArray.h geomcore/trunk/src/utility/ByteArray.cxx Added: geomcore/trunk/include/ByteArray.h === --- geomcore/trunk/include/ByteArray.h (rev 0) +++ geomcore/trunk/include/ByteArray.h 2011-02-11 20:28:42 UTC (rev 43239) @@ -0,0 +1,59 @@ +/* B Y T E A R R A Y . H + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file ByteArray.h + * + * Brief description + * + */ + +#ifndef __BYTEARRAY_H__ +#define __BYTEARRAY_H__ + +#include stdio.h + +class ByteArray +{ +public: + ByteArray(); + ByteArray(char* buf, int len); + ~ByteArray(); + + char* data(); + int size(); + int length(); + char at(int i); + +private: + char *databuf; + int len; + int maxlen; +}; + +#endif /* __CONFIG_H__ */ + +/* + * Local Variables: *** + * mode: C++ *** + * tab-width: 8 *** + * c-basic-offset: 2 *** + * indent-tabs-mode: t *** + * End: *** + * ex: shiftwidth=2 tabstop=8 +*/ Property changes on: geomcore/trunk/include/ByteArray.h ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: geomcore/trunk/src/utility/ByteArray.cxx === --- geomcore/trunk/src/utility/ByteArray.cxx(rev 0) +++ geomcore/trunk/src/utility/ByteArray.cxx2011-02-11 20:28:42 UTC (rev 43239) @@ -0,0 +1,64 @@ +/* B Y T E A R R A Y . C X X + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file ByteArray.cxx + * + * dynamic byte array + * + */ + +#include stdio.h +#include stdlib.h +#include string.h + +#include ByteArray.h + +ByteArray::ByteArray() +{ +this-databuf = NULL; +this-len = 0; +this-maxlen = 0; +} + +ByteArray::ByteArray(char *buf, int len) { +this-len = len; +this-maxlen = len; +this-databuf = (char *)malloc(len); +memcpy(databuf, buf, len); +} + +ByteArray::~ByteArray() +{ +delete this-databuf; +} + +char *ByteArray::data() { return databuf; } +int ByteArray::size() { return len; } +int ByteArray::length() { return len; } +char ByteArray::at(int i) { return databuf[i]; } + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: geomcore/trunk/src/utility/ByteArray.cxx ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net
[brlcad-commits] SF.net SVN: brlcad:[43240] geomcore/trunk
Revision: 43240 http://brlcad.svn.sourceforge.net/brlcad/?rev=43240view=rev Author: erikgreenwald Date: 2011-02-11 21:48:22 + (Fri, 11 Feb 2011) Log Message: --- add DataStream helper class to replace QDataStream Modified Paths: -- geomcore/trunk/src/utility/CMakeLists.txt Added Paths: --- geomcore/trunk/include/DataStream.h geomcore/trunk/src/utility/DataStream.cxx Added: geomcore/trunk/include/DataStream.h === --- geomcore/trunk/include/DataStream.h (rev 0) +++ geomcore/trunk/include/DataStream.h 2011-02-11 21:48:22 UTC (rev 43240) @@ -0,0 +1,61 @@ +/* D A T A S T R E A M . H + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file DataStream.h + * + * Brief description + * + */ + +#ifndef __DATASTREAM_H__ +#define __DATASTREAM_H__ + +#include stdio.h + +#include ByteArray.h + +class DataStream +{ +public: + DataStream(); + DataStream(char* buf, int len); + + ~DataStream(); + + char *getptr(); + char *get(int); + void advance(int); + void append(const char *data, int len); +private: + char *buf; + int ind; + int maxlen; +}; + +#endif /* __CONFIG_H__ */ + +/* + * Local Variables: *** + * mode: C++ *** + * tab-width: 8 *** + * c-basic-offset: 2 *** + * indent-tabs-mode: t *** + * End: *** + * ex: shiftwidth=2 tabstop=8 +*/ Property changes on: geomcore/trunk/include/DataStream.h ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: geomcore/trunk/src/utility/CMakeLists.txt === --- geomcore/trunk/src/utility/CMakeLists.txt 2011-02-11 20:28:42 UTC (rev 43239) +++ geomcore/trunk/src/utility/CMakeLists.txt 2011-02-11 21:48:22 UTC (rev 43240) @@ -35,6 +35,7 @@ SET(gcutil_SRCS ByteArray.cxx Config.cxx + DataStream.cxx DataStreamUtils.cxx GSException.cxx Logger.cxx Added: geomcore/trunk/src/utility/DataStream.cxx === --- geomcore/trunk/src/utility/DataStream.cxx (rev 0) +++ geomcore/trunk/src/utility/DataStream.cxx 2011-02-11 21:48:22 UTC (rev 43240) @@ -0,0 +1,60 @@ +/* D A T A S T R E A M . C X X + * BRL-CAD + * + * Copyright (c) 2011 United States Government as represented by + * the U.S. Army Research Laboratory. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this file; see the file named COPYING for more + * information. + */ +/** @file DataStream.cxx + * + * data stream. + * + */ + +#include stdio.h +#include stdlib.h +#include string.h + +#include DataStream.h + +DataStream::DataStream() { buf = NULL, ind = 0, maxlen = 0; } +DataStream::DataStream(char* data, int len) { +buf = (char *)malloc(len); +memcpy(buf, data, len); +ind = 0; +maxlen = len; +} +DataStream::~DataStream() { if(buf)free(buf); } + +char* DataStream::getptr() { return buf; } +char* DataStream::get(int i) { char *t = buf+ind; ind+=i; return t; } +void DataStream::advance(int i) { ind+=i; } +void DataStream::append(const char *data, int len) { +if(ind + len maxlen) + buf = (char *)realloc(buf, maxlen += lenBUFSIZ?len:BUFSIZ); +memcpy(buf+ind, data, len); +ind+=len; +} + + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: geomcore/trunk/src/utility/DataStream.cxx ___ Added:
[brlcad-commits] SF.net SVN: brlcad:[43241] geomcore/trunk/src/libNet/netMsg/ GenericEightBytesMsg.cxx
Revision: 43241 http://brlcad.svn.sourceforge.net/brlcad/?rev=43241view=rev Author: erikgreenwald Date: 2011-02-11 21:50:45 + (Fri, 11 Feb 2011) Log Message: --- switch to DataStream and add some ... endian... stuff.. Modified Paths: -- geomcore/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx Modified: geomcore/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx === --- geomcore/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx 2011-02-11 21:48:22 UTC (rev 43240) +++ geomcore/trunk/src/libNet/netMsg/GenericEightBytesMsg.cxx 2011-02-11 21:50:45 UTC (rev 43241) @@ -38,19 +38,33 @@ {} /* Deserializing Constructor */ -GenericEightBytesMsg::GenericEightBytesMsg(QDataStream* ds, Portal* origin) : +GenericEightBytesMsg::GenericEightBytesMsg(DataStream* ds, Portal* origin) : NetMsg(ds, origin) { -*ds this-data; +data = *(uint64_t*)ds-get(8); +#if _BYTE_ORDER == _LITTLE_ENDIAN +(((char *)data)[0]) ^= (((char *)data)[7]) ^= (((char *)data)[0]) ^= (((char *)data)[7]); +(((char *)data)[1]) ^= (((char *)data)[6]) ^= (((char *)data)[1]) ^= (((char *)data)[6]); +(((char *)data)[2]) ^= (((char *)data)[5]) ^= (((char *)data)[2]) ^= (((char *)data)[5]); +(((char *)data)[3]) ^= (((char *)data)[4]) ^= (((char *)data)[3]) ^= (((char *)data)[4]); +#endif } /* Destructor */ GenericEightBytesMsg::~GenericEightBytesMsg() {} -bool GenericEightBytesMsg::_serialize(QDataStream* ds) +bool GenericEightBytesMsg::_serialize(DataStream* ds) { -*ds this-data; +uint64_t t = this-data; + +#if _BYTE_ORDER == _LITTLE_ENDIAN +(((char *)data)[0]) ^= (((char *)data)[7]) ^= (((char *)data)[0]) ^= (((char *)data)[7]); +(((char *)data)[1]) ^= (((char *)data)[6]) ^= (((char *)data)[1]) ^= (((char *)data)[6]); +(((char *)data)[2]) ^= (((char *)data)[5]) ^= (((char *)data)[2]) ^= (((char *)data)[5]); +(((char *)data)[3]) ^= (((char *)data)[4]) ^= (((char *)data)[3]) ^= (((char *)data)[4]); +#endif +ds-append((const char *)t, 8); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43242] geomcore/trunk
Revision: 43242 http://brlcad.svn.sourceforge.net/brlcad/?rev=43242view=rev Author: erikgreenwald Date: 2011-02-11 21:52:48 + (Fri, 11 Feb 2011) Log Message: --- switch from QDataStream to DataStream Modified Paths: -- geomcore/trunk/include/DataStreamUtils.h geomcore/trunk/include/FailureMsg.h geomcore/trunk/include/GenericEightBytesMsg.h geomcore/trunk/include/GenericFourBytesMsg.h geomcore/trunk/include/GenericMultiByteMsg.h geomcore/trunk/include/GenericOneByteMsg.h geomcore/trunk/include/GenericOneStringMsg.h geomcore/trunk/include/GenericTwoBytesMsg.h geomcore/trunk/include/GeometryChunkMsg.h geomcore/trunk/include/GeometryManifestMsg.h geomcore/trunk/include/GeometryReqMsg.h geomcore/trunk/include/NetMsg.h geomcore/trunk/include/NetMsgFactory.h geomcore/trunk/include/NewNodeOnNetMsg.h geomcore/trunk/include/NewSessionReqMsg.h geomcore/trunk/include/PingMsg.h geomcore/trunk/include/PongMsg.h geomcore/trunk/include/RemoteNodenameSetMsg.h geomcore/trunk/include/SessionInfoMsg.h geomcore/trunk/include/SuccessMsg.h geomcore/trunk/include/TypeOnlyMsg.h geomcore/trunk/src/libNet/NetMsgFactory.cxx geomcore/trunk/src/libNet/netMsg/FailureMsg.cxx geomcore/trunk/src/libNet/netMsg/GenericFourBytesMsg.cxx geomcore/trunk/src/libNet/netMsg/GenericMultiByteMsg.cxx geomcore/trunk/src/libNet/netMsg/GenericOneByteMsg.cxx geomcore/trunk/src/libNet/netMsg/GenericOneStringMsg.cxx geomcore/trunk/src/libNet/netMsg/GenericTwoBytesMsg.cxx geomcore/trunk/src/libNet/netMsg/GeometryChunkMsg.cxx geomcore/trunk/src/libNet/netMsg/GeometryManifestMsg.cxx geomcore/trunk/src/libNet/netMsg/GeometryReqMsg.cxx geomcore/trunk/src/libNet/netMsg/NetMsg.cxx geomcore/trunk/src/libNet/netMsg/NewNodeOnNetMsg.cxx geomcore/trunk/src/libNet/netMsg/NewSessionReqMsg.cxx geomcore/trunk/src/libNet/netMsg/PingMsg.cxx geomcore/trunk/src/libNet/netMsg/PongMsg.cxx geomcore/trunk/src/libNet/netMsg/RemoteNodenameSetMsg.cxx geomcore/trunk/src/libNet/netMsg/SessionInfoMsg.cxx geomcore/trunk/src/libNet/netMsg/SuccessMsg.cxx geomcore/trunk/src/libNet/netMsg/TypeOnlyMsg.cxx geomcore/trunk/src/utility/DataStreamUtils.cxx geomcore/trunk/tests/libNet/libNetTest.cxx geomcore/trunk/tests/libNet/netMsgSerialTest.cxx Modified: geomcore/trunk/include/DataStreamUtils.h === --- geomcore/trunk/include/DataStreamUtils.h2011-02-11 21:50:45 UTC (rev 43241) +++ geomcore/trunk/include/DataStreamUtils.h2011-02-11 21:52:48 UTC (rev 43242) @@ -29,19 +29,19 @@ #include stdint.h #include string -#include QtCore/QDataStream #include QtCore/QUuid #include iostream #include ByteArray.h +#include DataStream.h class DataStreamUtils { public: - static std::string* getString(QDataStream* ds); - static void putString(QDataStream* ds, std::string str); - static QUuid* getQUuid(QDataStream* ds); - static void putQUuid(QDataStream* ds, QUuid str); + static std::string* getString(DataStream* ds); + static void putString(DataStream* ds, std::string str); + static QUuid* getQUuid(DataStream* ds); + static void putQUuid(DataStream* ds, QUuid str); static void printByteArray(ByteArray* ba); private: Modified: geomcore/trunk/include/FailureMsg.h === --- geomcore/trunk/include/FailureMsg.h 2011-02-11 21:50:45 UTC (rev 43241) +++ geomcore/trunk/include/FailureMsg.h 2011-02-11 21:52:48 UTC (rev 43242) @@ -38,7 +38,7 @@ FailureMsg(NetMsg* msg, uint8_t failureCode); /* Deserializing Constructor */ -FailureMsg(QDataStream* ds, Portal* origin); +FailureMsg(DataStream* ds, Portal* origin); /* Destructor */ virtual ~FailureMsg(); Modified: geomcore/trunk/include/GenericEightBytesMsg.h === --- geomcore/trunk/include/GenericEightBytesMsg.h 2011-02-11 21:50:45 UTC (rev 43241) +++ geomcore/trunk/include/GenericEightBytesMsg.h 2011-02-11 21:52:48 UTC (rev 43242) @@ -38,7 +38,7 @@ GenericEightBytesMsg(uint32_t type, NetMsg* msg, uint64_t b); /* Deserializing Constructor */ - GenericEightBytesMsg(QDataStream* ds, Portal* origin); + GenericEightBytesMsg(DataStream* ds, Portal* origin); /* Destructor */ virtual ~GenericEightBytesMsg(); @@ -52,7 +52,7 @@ uint64_t getData(); uint64_t data; - virtual bool _serialize(QDataStream* ds); + virtual bool _serialize(DataStream* ds); virtual bool _equals(const NetMsg msg); private: Modified: geomcore/trunk/include/GenericFourBytesMsg.h === --- geomcore/trunk/include/GenericFourBytesMsg.h
[brlcad-commits] SF.net SVN: brlcad:[43243] geomcore/trunk/src/other/uuid/CMakeLists.txt
Revision: 43243 http://brlcad.svn.sourceforge.net/brlcad/?rev=43243view=rev Author: erikgreenwald Date: 2011-02-11 22:07:44 + (Fri, 11 Feb 2011) Log Message: --- disable uuid binary, rename liblibuuid.so to libuuid.so Modified Paths: -- geomcore/trunk/src/other/uuid/CMakeLists.txt Modified: geomcore/trunk/src/other/uuid/CMakeLists.txt === --- geomcore/trunk/src/other/uuid/CMakeLists.txt2011-02-11 21:52:48 UTC (rev 43242) +++ geomcore/trunk/src/other/uuid/CMakeLists.txt2011-02-11 22:07:44 UTC (rev 43243) @@ -87,14 +87,10 @@ uuid_str.c ) -add_library(libuuid ${common_uuid_SRCS}) -INSTALL(TARGETS libuuid DESTINATION lib) -add_library(libuuid++ ${common_uuid_SRCS} uuid++.cc) -INSTALL(TARGETS libuuid++ DESTINATION lib) +add_library(uuid ${common_uuid_SRCS}) +INSTALL(TARGETS uuid DESTINATION lib) +add_library(uuid++ ${common_uuid_SRCS} uuid++.cc) +INSTALL(TARGETS uuid++ DESTINATION lib) -add_executable(uuid uuid_cli.c) -target_link_libraries(uuid libuuid) -INSTALL(TARGETS uuid DESTINATION bin) - #MAN_NAME= uuid.3 uuid++.3 uuid.1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43245] brlcad/branches/cmake/src
Revision: 43245 http://brlcad.svn.sourceforge.net/brlcad/?rev=43245view=rev Author: starseeker Date: 2011-02-11 23:08:31 + (Fri, 11 Feb 2011) Log Message: --- Get CMake build working again after MFC 43242 Modified Paths: -- brlcad/branches/cmake/src/adrt/CMakeLists.txt brlcad/branches/cmake/src/libged/CMakeLists.txt brlcad/branches/cmake/src/librt/CMakeLists.txt Modified: brlcad/branches/cmake/src/adrt/CMakeLists.txt === --- brlcad/branches/cmake/src/adrt/CMakeLists.txt 2011-02-11 22:50:19 UTC (rev 43244) +++ brlcad/branches/cmake/src/adrt/CMakeLists.txt 2011-02-11 23:08:31 UTC (rev 43245) @@ -1,44 +1,10 @@ include_directories( ${TCL_INCLUDE_DIRS} ${BRLCAD_SOURCE_DIR}/src/adrt - ${BRLCAD_SOURCE_DIR}/src/adrt/libtie ${BRLCAD_SOURCE_DIR}/src/adrt/libcommon ${BRLCAD_SOURCE_DIR}/src/adrt/librender ) -#TODO - look at the Windows build logic that handles -#the dllimport/dllexport magic needed for this lib - -#the standard ADDLIB macro probably isn't going to -#cover it - -SET(LIBTIE_SRCS - libtie/tie0.c - libtie/tie1.c - libtie/tie_kdtree0.c - libtie/tie_kdtree1.c -) - -IF(BUILD_SHARED_LIBS) - add_library(libtie SHARED ${LIBTIE_SRCS}) - target_link_libraries(libtie libbu) - INSTALL(TARGETS libtie DESTINATION ${${CMAKE_PROJECT_NAME}_INSTALL_LIB_DIR}) - IF(WIN32) - SET_TARGET_PROPERTIES(libtie PROPERTIES COMPILE_FLAGS -DTIE_EXPORT_DLL) - ENDIF(WIN32) -ENDIF(BUILD_SHARED_LIBS) -IF(BUILD_STATIC_LIBS AND NOT MSVC) - add_library(libtie-static STATIC ${LIBTIE_SRCS}) - target_link_libraries(libtie-static libbu) - IF(NOT WIN32) - SET_TARGET_PROPERTIES(libtie-static PROPERTIES OUTPUT_NAME libtie) - ENDIF(NOT WIN32) - IF(WIN32) - SET_TARGET_PROPERTIES(libtie-static PROPERTIES COMPILE_FLAGS -DTIE_EXPORT_DLL) - SET_TARGET_PROPERTIES(libtie-static PROPERTIES PREFIX lib) - ENDIF(WIN32) - INSTALL(TARGETS libtie-static DESTINATION ${${CMAKE_PROJECT_NAME}_INSTALL_LIB_DIR}) -ENDIF(BUILD_STATIC_LIBS AND NOT MSVC) - SET(LIBRENDER_SRCS load.c load_g.c @@ -69,7 +35,7 @@ ) IF(BUILD_SHARED_LIBS) add_library(librender SHARED ${LIBRENDER_SRCS}) - target_link_libraries(librender libtie libgcv) + target_link_libraries(librender libgcv) INSTALL(TARGETS librender DESTINATION ${${CMAKE_PROJECT_NAME}_INSTALL_LIB_DIR}) IF(WIN32) SET_TARGET_PROPERTIES(librender PROPERTIES COMPILE_FLAGS -DRENDER_EXPORT_DLL) @@ -77,7 +43,7 @@ ENDIF(BUILD_SHARED_LIBS) IF(BUILD_STATIC_LIBS AND NOT MSVC) add_library(librender-static STATIC ${LIBRENDER_SRCS}) - target_link_libraries(librender-static libtie libgcv) + target_link_libraries(librender-static libgcv) IF(NOT WIN32) SET_TARGET_PROPERTIES(librender-static PROPERTIES OUTPUT_NAME librender) ENDIF(NOT WIN32) @@ -97,7 +63,6 @@ librender/render_util.h librender/texture.h librender/texture_internal.h - libtie/tie.h ) INSTALL(FILES ${tie_HDRS} DESTINATION include/tie) CMAKEFILES(${tie_HDRS}) @@ -105,9 +70,6 @@ isst.h isst.tcl isst_tcltk.c - libtie/tie.c - libtie/tie_kdtree.c - libtie/tieprivate.h load.h master slave Modified: brlcad/branches/cmake/src/libged/CMakeLists.txt === --- brlcad/branches/cmake/src/libged/CMakeLists.txt 2011-02-11 22:50:19 UTC (rev 43244) +++ brlcad/branches/cmake/src/libged/CMakeLists.txt 2011-02-11 23:08:31 UTC (rev 43245) @@ -69,6 +69,7 @@ eye.c eye_pos.c facetize.c +fb2pix.c find.c form.c fracture.c @@ -139,6 +140,7 @@ pathlist.c pathsum.c perspective.c +pix2fb.c plot.c pmat.c pmodel2view.c @@ -266,7 +268,7 @@ ${TCL_INCLUDE_DIRS} ) -BRLCAD_ADDLIB(libged ${LIBGED_SOURCES} libwdb librt libbu libanalyze ${REGEX_LIBRARY} STRICT) +BRLCAD_ADDLIB(libged ${LIBGED_SOURCES} libwdb librt libfb libbu libanalyze ${REGEX_LIBRARY} STRICT) SET_TARGET_PROPERTIES(libged PROPERTIES VERSION 19.0.1 SOVERSION 19) SET(ged_ignore_files Modified: brlcad/branches/cmake/src/librt/CMakeLists.txt === --- brlcad/branches/cmake/src/librt/CMakeLists.txt 2011-02-11 22:50:19 UTC (rev 43244) +++ brlcad/branches/cmake/src/librt/CMakeLists.txt 2011-02-11 23:08:31 UTC (rev 43245) @@ -55,6 +55,8 @@ primitives/bot/bot.c primitives/bot/bot_brep.cpp primitives/bot/bot_mirror.c +primitives/bot/btg.c +primitives/bot/btgf.c primitives/brep/brep.cpp primitives/brep/brep_debug.cpp primitives/bspline/bspline.cpp @@ -220,7 +222,11 @@
[brlcad-commits] SF.net SVN: brlcad:[43247] brlcad/trunk/src/irprep/subroutines.c
Revision: 43247 http://brlcad.svn.sourceforge.net/brlcad/?rev=43247view=rev Author: starseeker Date: 2011-02-11 23:33:11 + (Fri, 11 Feb 2011) Log Message: --- Use vmath here for M_PI Modified Paths: -- brlcad/trunk/src/irprep/subroutines.c Modified: brlcad/trunk/src/irprep/subroutines.c === --- brlcad/trunk/src/irprep/subroutines.c 2011-02-11 23:27:58 UTC (rev 43246) +++ brlcad/trunk/src/irprep/subroutines.c 2011-02-11 23:33:11 UTC (rev 43247) @@ -29,7 +29,7 @@ #include common.h #include stdio.h -#include math.h +#include vmath.h /* Subroutine to rotate a point, given a point (3 coordinates) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43248] brlcad/trunk/src/mged/attach.c
Revision: 43248 http://brlcad.svn.sourceforge.net/brlcad/?rev=43248view=rev Author: starseeker Date: 2011-02-11 23:39:22 + (Fri, 11 Feb 2011) Log Message: --- If we have a situation where Tk is completely not part of the compile, we won't have Tk_GenericProc Modified Paths: -- brlcad/trunk/src/mged/attach.c Modified: brlcad/trunk/src/mged/attach.c === --- brlcad/trunk/src/mged/attach.c 2011-02-11 23:33:11 UTC (rev 43247) +++ brlcad/trunk/src/mged/attach.c 2011-02-11 23:39:22 UTC (rev 43248) @@ -371,8 +371,9 @@ int gui_setup(const char *dstr) { +#ifdef HAVE_TK Tk_GenericProc *handler = doEvent; - +#endif /* initialize only once */ if (tkwin != NULL) return TCL_OK; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43249] brlcad/branches/cmake/src
Revision: 43249 http://brlcad.svn.sourceforge.net/brlcad/?rev=43249view=rev Author: starseeker Date: 2011-02-11 23:44:25 + (Fri, 11 Feb 2011) Log Message: --- Sync some more source files from trunk. opennurbs_ext.h needs more checking before those attributes are removed, and will have to figure out where in autotools to place the appropriate flag if we go the flag route... Modified Paths: -- brlcad/branches/cmake/src/libbu/simd.c brlcad/branches/cmake/src/libged/bigE.c brlcad/branches/cmake/src/libged/human.c brlcad/branches/cmake/src/librt/opennurbs_ext.h Modified: brlcad/branches/cmake/src/libbu/simd.c === --- brlcad/branches/cmake/src/libbu/simd.c 2011-02-11 23:39:22 UTC (rev 43248) +++ brlcad/branches/cmake/src/libbu/simd.c 2011-02-11 23:44:25 UTC (rev 43249) @@ -30,9 +30,9 @@ int d; /* since we're PIC, we need to stash EBX on ia32 */ #ifdef __i386__ -__asm (pushl %%ebx;cpuid;popl %%ebx;movl $0,%%eax: =d (d): a (0x1)); +asm (pushl %%ebx;cpuid;popl %%ebx;movl $0,%%eax: =d (d): a (0x1)); #else -__asm (cpuid;movl $0,%%eax: =d(d): a(0x1)); +asm (cpuid;movl $0,%%eax: =d(d): a(0x1)); #endif if(d 0x126) return BU_SIMD_SSE2; Modified: brlcad/branches/cmake/src/libged/bigE.c === --- brlcad/branches/cmake/src/libged/bigE.c 2011-02-11 23:39:22 UTC (rev 43248) +++ brlcad/branches/cmake/src/libged/bigE.c 2011-02-11 23:44:25 UTC (rev 43249) @@ -444,52 +444,7 @@ } } -/* perform the union of two segments the types of A and B should be - * the same - */ -#if 0 HIDDEN void -do_union(struct seg *A, -struct seg *B, -struct bu_list *seghead, -struct _ged_client_data *dgcdp) -{ -struct seg *tmp; - -RT_GET_SEG(tmp, dgcdp-ap-a_resource) - - if (NOT_SEG_OVERLAP(A, B)) { - if (A-seg_in.hit_dist = B-seg_in.hit_dist) { - *tmp = *A; - BU_LIST_INSERT(seghead, tmp-l); - RT_GET_SEG(tmp, dgcdp-ap-a_resource); - *tmp = *B; - BU_LIST_INSERT(seghead, tmp-l); - } else { - *tmp = *B; - BU_LIST_INSERT(seghead, tmp-l); - RT_GET_SEG(tmp, dgcdp-ap-a_resource); - *tmp = *A; - BU_LIST_INSERT(seghead, tmp-l); - } - return; - } - -if (A-seg_in.hit_dist = B-seg_in.hit_dist) { - *tmp = *A; - if (B-seg_out.hit_dist A-seg_out.hit_dist) - tmp-seg_out.hit_dist = B-seg_out.hit_dist; -} else { - *tmp = *B; - if (A-seg_out.hit_dist B-seg_out.hit_dist) - tmp-seg_out.hit_dist = B-seg_out.hit_dist; -} - -BU_LIST_INSERT(seghead, tmp-l); -} -#endif - -HIDDEN void promote_ints(struct bu_list *head, struct _ged_client_data *dgcdp) { Modified: brlcad/branches/cmake/src/libged/human.c === --- brlcad/branches/cmake/src/libged/human.c2011-02-11 23:39:22 UTC (rev 43248) +++ brlcad/branches/cmake/src/libged/human.c2011-02-11 23:44:25 UTC (rev 43249) @@ -256,45 +256,6 @@ return *rotMatrix; } -#if 0 -HIDDEN void -vectorTest(struct rt_wdb *file) -{ -/* - * This code here takes a direction vector, and then redirects it based on the angles given - * so it is as follows : startingVector, resultVector, xdegrees, ydegrees, zdegrees. - * and this will be used to position the arms and legs so they are joined yet flexable. - * Just a test with an rcc. - */ - -/*Vector shape modifying test */ -vect_t test1, test2; -point_t testpoint; -mat_t rotMatrix; -VSET(testpoint, 0.0, 0.0, 0.0); -VSET(test1, 0, 0, 200); -setDirection(test1, test2, rotMatrix, 0, 90, 0); -bu_log(%f, %f, %f\n, test1[X], test1[Y], test1[Z]); -bu_log(%f, %f, %f\n, test2[X], test2[Y], test2[Z]); -mk_rcc(file, NormalTest.s, testpoint, test1, (5*IN2MM)); -mk_rcc(file, ChangeTest.s, testpoint, test2, (5*IN2MM)); -/* See, now wasn't that easy? */ -} - - -/* Find the hypotenuse of 2 lengths / length vectors */ -HIDDEN fastf_t -findVector(fastf_t x, fastf_t y) -{ -fastf_t w; -fastf_t v; -v = x*x; -w = y*y; -return sqrt(v + w); -} -#endif - - /** * Create a bounding box around the individual part, this one has only * 1 value for depth and width. Currently is a big mess, as the boxes Modified: brlcad/branches/cmake/src/librt/opennurbs_ext.h === --- brlcad/branches/cmake/src/librt/opennurbs_ext.h 2011-02-11 23:39:22 UTC (rev 43248) +++ brlcad/branches/cmake/src/librt/opennurbs_ext.h 2011-02-11 23:44:25 UTC (rev 43249) @@ -217,6 +217,7 @@ templateclass BA inline +__attribute__((always_inline))
[brlcad-commits] SF.net SVN: brlcad:[43251] brlcad/branches/cmake/src/other/step
Revision: 43251 http://brlcad.svn.sourceforge.net/brlcad/?rev=43251view=rev Author: starseeker Date: 2011-02-12 00:07:36 + (Sat, 12 Feb 2011) Log Message: --- Make step functional as a stand-alone CMake build Modified Paths: -- brlcad/branches/cmake/src/other/step/CMakeLists.txt Added Paths: --- brlcad/branches/cmake/src/other/step/CMake/CheckCFileRuns.cmake Added: brlcad/branches/cmake/src/other/step/CMake/CheckCFileRuns.cmake === --- brlcad/branches/cmake/src/other/step/CMake/CheckCFileRuns.cmake (rev 0) +++ brlcad/branches/cmake/src/other/step/CMake/CheckCFileRuns.cmake 2011-02-12 00:07:36 UTC (rev 43251) @@ -0,0 +1,84 @@ +# - Check if the given C source code compiles and runs. +# CHECK_C_SOURCE_RUNS(code var) +# code - source code to try to compile +# var- variable to store the result +# (1 for success, empty for failure) +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +#= +# Copyright 2006-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the License); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + +MACRO(CHECK_C_FILE_RUNS SOURCE VAR) + IF(${VAR} MATCHES ^${VAR}$) +SET(MACRO_CHECK_FUNCTION_DEFINITIONS + -D${VAR} ${CMAKE_REQUIRED_FLAGS}) +IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES +-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}) +ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) +ENDIF(CMAKE_REQUIRED_LIBRARIES) +IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES +-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}) +ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) +ENDIF(CMAKE_REQUIRED_INCLUDES) + +MESSAGE(STATUS Performing Test ${VAR}) +TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${SOURCE} + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${FILE_RUN_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} + ${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES} + ${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES} + COMPILE_OUTPUT_VARIABLE OUTPUT) +# if it did not compile make the return value fail code of 1 +IF(NOT ${VAR}_COMPILED) + SET(${VAR}_EXITCODE 1) +ENDIF(NOT ${VAR}_COMPILED) +# if the return value was 0 then it worked +IF(${${VAR}_EXITCODE} EQUAL 0) + SET(${VAR} 1 CACHE INTERNAL Test ${VAR}) + MESSAGE(STATUS Performing Test ${VAR} - Success) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log +Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n +${OUTPUT}\n +Return value: ${${VAR}}\n +Source file was:\n${SOURCE}\n) +ELSE(${${VAR}_EXITCODE} EQUAL 0) + IF(CMAKE_CROSSCOMPILING AND ${${VAR}_EXITCODE} MATCHES FAILED_TO_RUN) +SET(${VAR} ${${VAR}_EXITCODE}) + ELSE(CMAKE_CROSSCOMPILING AND ${${VAR}_EXITCODE} MATCHES FAILED_TO_RUN) +SET(${VAR} CACHE INTERNAL Test ${VAR}) + ENDIF(CMAKE_CROSSCOMPILING AND ${${VAR}_EXITCODE} MATCHES FAILED_TO_RUN) + + MESSAGE(STATUS Performing Test ${VAR} - Failed) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log +Performing C SOURCE FILE Test ${VAR} failed with the following output:\n +${OUTPUT}\n +Return value: ${${VAR}_EXITCODE}\n +Source file was:\n${SOURCE}\n) + +ENDIF(${${VAR}_EXITCODE} EQUAL 0) + ENDIF(${VAR} MATCHES ^${VAR}$) +ENDMACRO(CHECK_C_FILE_RUNS) + Property changes on: brlcad/branches/cmake/src/other/step/CMake/CheckCFileRuns.cmake ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: brlcad/branches/cmake/src/other/step/CMakeLists.txt === --- brlcad/branches/cmake/src/other/step/CMakeLists.txt
[brlcad-commits] SF.net SVN: brlcad:[43252] brlcad/branches/cmake/src/other/step
Revision: 43252 http://brlcad.svn.sourceforge.net/brlcad/?rev=43252view=rev Author: starseeker Date: 2011-02-12 00:09:39 + (Sat, 12 Feb 2011) Log Message: --- Tweak step autotools system to work with the slightly different setup Modified Paths: -- brlcad/branches/cmake/src/other/step/configure.ac brlcad/branches/cmake/src/other/step/include/Makefile.am Modified: brlcad/branches/cmake/src/other/step/configure.ac === --- brlcad/branches/cmake/src/other/step/configure.ac 2011-02-12 00:07:36 UTC (rev 43251) +++ brlcad/branches/cmake/src/other/step/configure.ac 2011-02-12 00:09:39 UTC (rev 43252) @@ -80,13 +80,10 @@ dnl setting in autogen.sh script. AC_PREREQ(2.52) -dnl See HACKING for details on how to properly update the version -define([MAJOR_VERSION], [patsubst(esyscmd([cat include/conf/MAJOR]), [ -])]) -define([MINOR_VERSION], [patsubst(esyscmd([cat include/conf/MINOR]), [ -])]) -define([PATCH_VERSION], [patsubst(esyscmd([cat include/conf/PATCH]), [ -])]) +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl +define([MAJOR_VERSION], [3]) +define([MINOR_VERSION], [2]) +define([PATCH_VERSION], [0]) define([SCL_VERSION], [patsubst([MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION], [ ])]) @@ -187,7 +184,7 @@ AM_INIT_AUTOMAKE([1.6 dist-zip dist-bzip2]) # write out all of our definitions to this header -AM_CONFIG_HEADER([include/scl_config.h]) +AM_CONFIG_HEADER([include/scl_cf.h]) # automatically enable and load our configure cache file if available BC_CONFIG_CACHE([config.cache.${host_os}.${ac_hostname}]) @@ -788,7 +785,6 @@ m4/Makefile misc/Makefile include/Makefile - include/conf/Makefile include/express/Makefile include/exppp/Makefile doc/Makefile Modified: brlcad/branches/cmake/src/other/step/include/Makefile.am === --- brlcad/branches/cmake/src/other/step/include/Makefile.am2011-02-12 00:07:36 UTC (rev 43251) +++ brlcad/branches/cmake/src/other/step/include/Makefile.am2011-02-12 00:09:39 UTC (rev 43252) @@ -1,6 +1,5 @@ SUBDIRS = \ - conf \ express \ exppp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43253] brlcad/branches/cmake/src/other/step
Revision: 43253 http://brlcad.svn.sourceforge.net/brlcad/?rev=43253view=rev Author: starseeker Date: 2011-02-12 00:25:27 + (Sat, 12 Feb 2011) Log Message: --- More tweaks for standalone building with CMake Modified Paths: -- brlcad/branches/cmake/src/other/step/CMake/FindLEX.cmake brlcad/branches/cmake/src/other/step/CMakeLists.txt Added Paths: --- brlcad/branches/cmake/src/other/step/CMake/test_srcs/ brlcad/branches/cmake/src/other/step/CMake/test_srcs/sys_wait_test.c brlcad/branches/cmake/src/other/step/include/scl_cf_cmake.h.in Removed Paths: - brlcad/branches/cmake/src/other/step/include/scl_cf.h.in Modified: brlcad/branches/cmake/src/other/step/CMake/FindLEX.cmake === --- brlcad/branches/cmake/src/other/step/CMake/FindLEX.cmake2011-02-12 00:09:39 UTC (rev 43252) +++ brlcad/branches/cmake/src/other/step/CMake/FindLEX.cmake2011-02-12 00:25:27 UTC (rev 43253) @@ -149,9 +149,11 @@ EXEC_PROGRAM(${LEX_EXECUTABLE} ARGS ${CMAKE_SOURCE_DIR}/misc/CMake/test_srcs/lex_test.l -o ${CMAKE_BINARY_DIR}/CMakeTmp/lex_test.c RETURN_VALUE _retval OUTPUT_VARIABLE _lexOut) INCLUDE (CheckCFileRuns) SET(FILE_RUN_DEFINITIONS -DYYTEXT_POINTER=1) - CHECK_C_FILE_RUNS(${CMAKE_SOURCE_DIR}/misc/CMake/test_srcs/sys_wait_test.c YYTEXT_POINTER) + CHECK_C_FILE_RUNS(${CMAKE_CURRENT_SOURCE_DIR}/CMake/test_srcs/sys_wait_test.c YYTEXT_POINTER) SET(FILE_RUN_DEFINITIONS) - FILE(APPEND ${CONFIG_H_FILE} #cmakedefine YYTEXT_POINTER 1\n) + IF(CONFIG_H_FILE) + FILE(APPEND ${CONFIG_H_FILE} #cmakedefine YYTEXT_POINTER 1\n) + ENDIF(CONFIG_H_FILE) ENDIF(LEX_EXECUTABLE) Added: brlcad/branches/cmake/src/other/step/CMake/test_srcs/sys_wait_test.c === --- brlcad/branches/cmake/src/other/step/CMake/test_srcs/sys_wait_test.c (rev 0) +++ brlcad/branches/cmake/src/other/step/CMake/test_srcs/sys_wait_test.c 2011-02-12 00:25:27 UTC (rev 43253) @@ -0,0 +1,19 @@ +#include sys/types.h +#include sys/wait.h +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) 255) == 0) +#endif + +int +main () +{ + int s; + wait (s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} + Property changes on: brlcad/branches/cmake/src/other/step/CMake/test_srcs/sys_wait_test.c ___ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: brlcad/branches/cmake/src/other/step/CMakeLists.txt === --- brlcad/branches/cmake/src/other/step/CMakeLists.txt 2011-02-12 00:09:39 UTC (rev 43252) +++ brlcad/branches/cmake/src/other/step/CMakeLists.txt 2011-02-12 00:25:27 UTC (rev 43253) @@ -174,6 +174,11 @@ OPTION(SCL-BUILD_EXPRESS_ONLY Only build express parser. OFF) MARK_AS_ADVANCED(SCL-BUILD_EXPRESS_ONLY) +# Take the scl config file template and copy it to the build directory so CMake +# scripts can append to it if need be +configure_file(${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in ${SCL_BINARY_DIR}/include/scl_cf.h.in COPYONLY) +SET(CONFIG_H_FILE ${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in) + INCLUDE(CheckLibraryExists) INCLUDE(CheckIncludeFile) INCLUDE(CheckFunctionExists) @@ -193,8 +198,8 @@ CHECK_TYPE_SIZE(ssize_t SSIZE_T) -# Now that all the tests are done, configure the scl_config.h file: -configure_file(${SCL_SOURCE_DIR}/include/scl_cf.h.in ${SCL_BINARY_DIR}/include/scl_cf.h) +# Now that all the tests are done, configure the scl_cf.h file: +configure_file(${SCL_BINARY_DIR}/include/scl_cf.h.in ${SCL_BINARY_DIR}/include/scl_cf.h) add_definitions( -DHAVE_CONFIG_H Deleted: brlcad/branches/cmake/src/other/step/include/scl_cf.h.in === --- brlcad/branches/cmake/src/other/step/include/scl_cf.h.in2011-02-12 00:09:39 UTC (rev 43252) +++ brlcad/branches/cmake/src/other/step/include/scl_cf.h.in2011-02-12 00:25:27 UTC (rev 43253) @@ -1,10 +0,0 @@ -/ Define statements for CMake / -#cmakedefine HAVE_NDIR_H 1 -#cmakedefine HAVE_STDARG_H 1 -#cmakedefine HAVE_SYS_STAT_H 1 -#cmakedefine HAVE_SYSENT_H 1 -#cmakedefine HAVE_UNISTD_H 1 -#cmakedefine HAVE_ABS 1 -#cmakedefine HAVE_MEMCPY 1 -#cmakedefine HAVE_MEMMOVE 1 -#cmakedefine HAVE_SSIZE_T 1 Copied: brlcad/branches/cmake/src/other/step/include/scl_cf_cmake.h.in (from rev 43223, brlcad/branches/cmake/src/other/step/include/scl_cf.h.in) === --- brlcad/branches/cmake/src/other/step/include/scl_cf_cmake.h.in (rev 0) +++ brlcad/branches/cmake/src/other/step/include/scl_cf_cmake.h.in
[brlcad-commits] SF.net SVN: brlcad:[43254] brlcad/trunk/src/other/step
Revision: 43254 http://brlcad.svn.sourceforge.net/brlcad/?rev=43254view=rev Author: starseeker Date: 2011-02-12 00:35:17 + (Sat, 12 Feb 2011) Log Message: --- We should have a working autotools build with the step tweaks now - make trunk step directory match that from CMake. Since there is no previous CMake build for the step subdirectory, go ahead and put everything here. Modified Paths: -- brlcad/trunk/src/other/step/configure.ac brlcad/trunk/src/other/step/include/Makefile.am brlcad/trunk/src/other/step/src/cleditor/dispnodelist.cc brlcad/trunk/src/other/step/src/cleditor/mgrnode.cc brlcad/trunk/src/other/step/src/cleditor/mgrnodelist.cc brlcad/trunk/src/other/step/src/clstepcore/ExpDict.cc brlcad/trunk/src/other/step/src/clstepcore/STEPaggregate.cc brlcad/trunk/src/other/step/src/clstepcore/sdai.h brlcad/trunk/src/other/step/src/clutils/dirobj.cc brlcad/trunk/src/other/step/src/clutils/gennodearray.cc brlcad/trunk/src/other/step/src/clutils/gennodelist.cc brlcad/trunk/src/other/step/src/clutils/scl_char_str_list.cc Added Paths: --- brlcad/trunk/src/other/step/CMake/ brlcad/trunk/src/other/step/CMake/CheckCFileRuns.cmake brlcad/trunk/src/other/step/CMake/FindLEX.cmake brlcad/trunk/src/other/step/CMake/FindYACC.cmake brlcad/trunk/src/other/step/CMake/SCL_Utils.cmake brlcad/trunk/src/other/step/CMake/test_srcs/ brlcad/trunk/src/other/step/CMake/test_srcs/sys_wait_test.c brlcad/trunk/src/other/step/CMakeLists.txt brlcad/trunk/src/other/step/data/CMakeLists.txt brlcad/trunk/src/other/step/doc/CMakeLists.txt brlcad/trunk/src/other/step/include/CMakeLists.txt brlcad/trunk/src/other/step/include/conf/ brlcad/trunk/src/other/step/include/scl_cf_cmake.h.in brlcad/trunk/src/other/step/src/cldai/CMakeLists.txt brlcad/trunk/src/other/step/src/cleditor/CMakeLists.txt brlcad/trunk/src/other/step/src/clstepcore/CMakeLists.txt brlcad/trunk/src/other/step/src/clutils/CMakeLists.txt brlcad/trunk/src/other/step/src/exppp/CMakeLists.txt brlcad/trunk/src/other/step/src/express/CMakeLists.txt brlcad/trunk/src/other/step/src/fedex_plus/CMakeLists.txt Removed Paths: - brlcad/trunk/src/other/step/include/conf/ Added: brlcad/trunk/src/other/step/CMake/CheckCFileRuns.cmake === --- brlcad/trunk/src/other/step/CMake/CheckCFileRuns.cmake (rev 0) +++ brlcad/trunk/src/other/step/CMake/CheckCFileRuns.cmake 2011-02-12 00:35:17 UTC (rev 43254) @@ -0,0 +1,84 @@ +# - Check if the given C source code compiles and runs. +# CHECK_C_SOURCE_RUNS(code var) +# code - source code to try to compile +# var- variable to store the result +# (1 for success, empty for failure) +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +#= +# Copyright 2006-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the License); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + +MACRO(CHECK_C_FILE_RUNS SOURCE VAR) + IF(${VAR} MATCHES ^${VAR}$) +SET(MACRO_CHECK_FUNCTION_DEFINITIONS + -D${VAR} ${CMAKE_REQUIRED_FLAGS}) +IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES +-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}) +ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) +ENDIF(CMAKE_REQUIRED_LIBRARIES) +IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES +-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}) +ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) +ENDIF(CMAKE_REQUIRED_INCLUDES) + +MESSAGE(STATUS Performing Test ${VAR}) +TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${SOURCE} + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${FILE_RUN_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} + ${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES} +
[brlcad-commits] SF.net SVN: brlcad:[43256] brlcad/trunk/src/other/tnt
Revision: 43256 http://brlcad.svn.sourceforge.net/brlcad/?rev=43256view=rev Author: starseeker Date: 2011-02-12 00:38:16 + (Sat, 12 Feb 2011) Log Message: --- tnt fixes for clang Modified Paths: -- brlcad/trunk/src/other/tnt/tnt_array1d.h brlcad/trunk/src/other/tnt/tnt_fortran_array1d.h brlcad/trunk/src/other/tnt/tnt_matrix.h Modified: brlcad/trunk/src/other/tnt/tnt_array1d.h === --- brlcad/trunk/src/other/tnt/tnt_array1d.h2011-02-12 00:37:11 UTC (rev 43255) +++ brlcad/trunk/src/other/tnt/tnt_array1d.h2011-02-12 00:38:16 UTC (rev 43256) @@ -258,7 +258,7 @@ template class T inline Array1DT Array1DT::subarray(int i0, int i1) { - if ((i0 0) (i1 n_) || (i0 = i1)) + if (((i0 0) (i1 n_)) || (i0 = i1)) { Array1DT X(*this); /* create a new instance of this array. */ X.n_ = i1-i0+1; Modified: brlcad/trunk/src/other/tnt/tnt_fortran_array1d.h === --- brlcad/trunk/src/other/tnt/tnt_fortran_array1d.h2011-02-12 00:37:11 UTC (rev 43255) +++ brlcad/trunk/src/other/tnt/tnt_fortran_array1d.h2011-02-12 00:38:16 UTC (rev 43256) @@ -221,7 +221,7 @@ #ifdef TNT_DEBUG std::cout entered subarray. \n; #endif - if ((i0 0) (i1 n_) || (i0 = i1)) + if (((i0 0) (i1 n_)) || (i0 = i1)) { Fortran_Array1DT X(*this); /* create a new instance of this array. */ X.n_ = i1-i0+1; Modified: brlcad/trunk/src/other/tnt/tnt_matrix.h === --- brlcad/trunk/src/other/tnt/tnt_matrix.h 2011-02-12 00:37:11 UTC (rev 43255) +++ brlcad/trunk/src/other/tnt/tnt_matrix.h 2011-02-12 00:38:16 UTC (rev 43256) @@ -545,7 +545,7 @@ #endif Subscript M = A.num_rows(); -Subscript N = A.num_cols(); +//Subscript N = A.num_cols(); Subscript K = B.num_cols(); MatrixT tmp(M,K); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits
[brlcad-commits] SF.net SVN: brlcad:[43261] geomcore/trunk/src/utility/CMakeLists.txt
Revision: 43261 http://brlcad.svn.sourceforge.net/brlcad/?rev=43261view=rev Author: starseeker Date: 2011-02-12 01:06:13 + (Sat, 12 Feb 2011) Log Message: --- Add uuid library to src/utility in preparation for replacing QUuid - if we're going to use C++ instead of C just change the uuid listings in the target_link_libraries commands Modified Paths: -- geomcore/trunk/src/utility/CMakeLists.txt Modified: geomcore/trunk/src/utility/CMakeLists.txt === --- geomcore/trunk/src/utility/CMakeLists.txt 2011-02-12 01:04:54 UTC (rev 43260) +++ geomcore/trunk/src/utility/CMakeLists.txt 2011-02-12 01:06:13 UTC (rev 43261) @@ -30,6 +30,8 @@ ${QT_INCLUDE_DIR} ${TCL_INCLUDE_DIRS} ${BRLCAD_INC_DIRS} +${CMAKE_CURRENT_SOURCE_DIR}/../other/uuid +${CMAKE_CURRENT_BINARY_DIR}/../other/uuid ) SET(gcutil_SRCS @@ -45,13 +47,13 @@ IF(BUILD_SHARED_LIBS) add_library(libgcutil SHARED ${gcutil_SRCS}) - target_link_libraries(libgcutil ${_BRLCAD_LIBRARY_bu} ${TCL_LIBRARIES} ${QT_LIBRARIES}) + target_link_libraries(libgcutil ${_BRLCAD_LIBRARY_bu} ${TCL_LIBRARIES} ${QT_LIBRARIES} uuid) set_target_properties(libgcutil PROPERTIES PREFIX ) install(TARGETS libgcutil DESTINATION lib) ENDIF(BUILD_SHARED_LIBS) IF(BUILD_STATIC_LIBS) add_library(libgcutil-static STATIC ${gcutil_SRCS}) - target_link_libraries(libgcutil-static ${_BRLCAD_LIBRARY_bu} ${TCL_LIBRARIES} ${QT_LIBRARIES}) + target_link_libraries(libgcutil-static ${_BRLCAD_LIBRARY_bu} ${TCL_LIBRARIES} ${QT_LIBRARIES} uuid) IF(NOT WIN32) set_target_properties(libgcutil-static PROPERTIES PREFIX ) set_target_properties(libgcutil-static PROPERTIES OUTPUT_NAME libgcutil) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits