[brlcad-commits] SF.net SVN: brlcad:[41638]
Revision: 41638 http://brlcad.svn.sourceforge.net/brlcad/?rev=41638view=rev Author: davidloman Date: 2010-12-16 14:45:15 + (Thu, 16 Dec 2010) Log Message: --- GSClient header needs to be public now that it will be used in other classes. Added Paths: --- rt^3/trunk/include/GSClient.h Removed Paths: - rt^3/trunk/src/GS/GSClient.h Copied: rt^3/trunk/include/GSClient.h (from rev 41637, rt^3/trunk/src/GS/GSClient.h) === --- rt^3/trunk/include/GSClient.h (rev 0) +++ rt^3/trunk/include/GSClient.h 2010-12-16 14:45:15 UTC (rev 41638) @@ -0,0 +1,67 @@ +/* G S C L I E N T . H + * BRLCAD + * + * Copyright (c) 2010 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 GSClient.h + * GSClient.h + * + */ + +#ifndef __GSCLIENT_H__ +#define __GSCLIENT_H__ + +#include ClientCmdRegistry.h +#include Logger.h +#include JobManager.h + +#include QtCore/QString +#include QtCore/QStringList + +#include string +#include iostream +#include stdlib.h + +class GSClient { +public: + GSClient(); + virtual ~GSClient(); + + int run(); + bool execCmd(QString cmd, QStringList args); + +private: + ClientCmdRegistry* ccReg; + Logger* log; + JobManager* jobMan; + + bool stayRun; + std::string prompt; + const static std::string defaultPrompt; +}; + +#endif /* __GSCLIENT_H__ */ + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Deleted: rt^3/trunk/src/GS/GSClient.h === --- rt^3/trunk/src/GS/GSClient.h2010-12-15 20:19:25 UTC (rev 41637) +++ rt^3/trunk/src/GS/GSClient.h2010-12-16 14:45:15 UTC (rev 41638) @@ -1,67 +0,0 @@ -/* G S C L I E N T . H - * BRLCAD - * - * Copyright (c) 2010 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 GSClient.h - * GSClient.h - * - */ - -#ifndef __GSCLIENT_H__ -#define __GSCLIENT_H__ - -#include ClientCmdRegistry.h -#include Logger.h -#include JobManager.h - -#include QtCore/QString -#include QtCore/QStringList - -#include string -#include iostream -#include stdlib.h - -class GSClient { -public: - GSClient(); - virtual ~GSClient(); - - int run(); - bool execCmd(QString cmd, QStringList args); - -private: - ClientCmdRegistry* ccReg; - Logger* log; - JobManager* jobMan; - - bool stayRun; - std::string prompt; - const static std::string defaultPrompt; -}; - -#endif /* __GSCLIENT_H__ */ - -/* - * Local Variables: - * tab-width: 8 - * mode: C - * indent-tabs-mode: t - * c-file-style: stroustrup - * End: - * ex: shiftwidth=4 tabstop=8 - */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41640]
Revision: 41640 http://brlcad.svn.sourceforge.net/brlcad/?rev=41640view=rev Author: davidloman Date: 2010-12-16 14:59:36 + (Thu, 16 Dec 2010) Log Message: --- Removal of Author tag. Not needed imho. Modified Paths: -- rt^3/trunk/include/DbObject.h rt^3/trunk/include/PkgTcpClient.h rt^3/trunk/include/PkgTcpServer.h rt^3/trunk/include/PkgUdpClient.h rt^3/trunk/include/PkgUdpServer.h rt^3/trunk/src/GS/DbObject.cxx rt^3/trunk/src/libPkgCpp/PkgTcpClient.cxx rt^3/trunk/src/libPkgCpp/PkgTcpServer.cxx rt^3/trunk/src/libPkgCpp/PkgUdpClient.cxx rt^3/trunk/src/libPkgCpp/PkgUdpServer.cxx Modified: rt^3/trunk/include/DbObject.h === --- rt^3/trunk/include/DbObject.h 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/include/DbObject.h 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * DbObject.h * * Created on: Sep 29, 2010 - * Author: dloman + * */ #ifndef __DBOBJECT_H__ Modified: rt^3/trunk/include/PkgTcpClient.h === --- rt^3/trunk/include/PkgTcpClient.h 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/include/PkgTcpClient.h 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgTcpClient.h * * Created on: Aug 19, 2010 - * Author: dloman + * */ #ifndef __PKGTCPCLIENT_H__ Modified: rt^3/trunk/include/PkgTcpServer.h === --- rt^3/trunk/include/PkgTcpServer.h 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/include/PkgTcpServer.h 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgTcpServer.h * * Created on: Aug 19, 2010 - * Author: dloman + * */ #ifndef __PKGTCPSERVER_H__ Modified: rt^3/trunk/include/PkgUdpClient.h === --- rt^3/trunk/include/PkgUdpClient.h 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/include/PkgUdpClient.h 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgUdpClient.h * * Created on: Aug 19, 2010 - * Author: dloman + * */ #ifndef __PKGUDPCLIENT_H__ Modified: rt^3/trunk/include/PkgUdpServer.h === --- rt^3/trunk/include/PkgUdpServer.h 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/include/PkgUdpServer.h 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgUdpServer.h * * Created on: Aug 19, 2010 - * Author: dloman + * */ #ifndef __PKGUDPSERVER_H__ Modified: rt^3/trunk/src/GS/DbObject.cxx === --- rt^3/trunk/src/GS/DbObject.cxx 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/src/GS/DbObject.cxx 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * DbObject.cxx * * Created on: Sep 29, 2010 - * Author: dloman + * */ #include DbObject.h Modified: rt^3/trunk/src/libPkgCpp/PkgTcpClient.cxx === --- rt^3/trunk/src/libPkgCpp/PkgTcpClient.cxx 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/src/libPkgCpp/PkgTcpClient.cxx 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgTcpClient.cxx * * Created on: Aug 19, 2010 - * Author: dloman + * */ #include PkgTcpClient.h Modified: rt^3/trunk/src/libPkgCpp/PkgTcpServer.cxx === --- rt^3/trunk/src/libPkgCpp/PkgTcpServer.cxx 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/src/libPkgCpp/PkgTcpServer.cxx 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgTcpServer.cxx * * Created on: Aug 19, 2010 - * Author: dloman + * */ #include PkgTcpServer.h Modified: rt^3/trunk/src/libPkgCpp/PkgUdpClient.cxx === --- rt^3/trunk/src/libPkgCpp/PkgUdpClient.cxx 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/src/libPkgCpp/PkgUdpClient.cxx 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgUdpClient.cxx * * Created on: Aug 19, 2010 - * Author: dloman + * */ #include PkgUdpClient.h Modified: rt^3/trunk/src/libPkgCpp/PkgUdpServer.cxx === --- rt^3/trunk/src/libPkgCpp/PkgUdpServer.cxx 2010-12-16 14:52:55 UTC (rev 41639) +++ rt^3/trunk/src/libPkgCpp/PkgUdpServer.cxx 2010-12-16 14:59:36 UTC (rev 41640) @@ -21,7 +21,7 @@ * PkgUdpServer.cxx * * Created on: Aug 19, 2010 - * Author: dloman + * */ #include PkgUdpServer.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. --
[brlcad-commits] SF.net SVN: brlcad:[41641] brlcad/trunk/src/libbn/bntester.c
Revision: 41641 http://brlcad.svn.sourceforge.net/brlcad/?rev=41641view=rev Author: brlcad Date: 2010-12-16 15:15:24 + (Thu, 16 Dec 2010) Log Message: --- test for compilation warnings. unused params. Modified Paths: -- brlcad/trunk/src/libbn/bntester.c Modified: brlcad/trunk/src/libbn/bntester.c === --- brlcad/trunk/src/libbn/bntester.c 2010-12-16 14:59:36 UTC (rev 41640) +++ brlcad/trunk/src/libbn/bntester.c 2010-12-16 15:15:24 UTC (rev 41641) @@ -32,12 +32,12 @@ int main(int argc, char **argv) { +bu_log(%s: %d args\n, argv[0], argc); -bu_log(bntester\n); - -exit(0); +return 0; } + /** @} */ /* * Local Variables: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41642]
Revision: 41642 http://brlcad.svn.sourceforge.net/brlcad/?rev=41642view=rev Author: davidloman Date: 2010-12-16 15:27:59 + (Thu, 16 Dec 2010) Log Message: --- Stub in framework for 'login' 'logout' and 'Help' commands. Modified Paths: -- rt^3/trunk/src/GS/CMakeLists.txt Added Paths: --- rt^3/trunk/include/HelpCmd.h rt^3/trunk/include/LoginCmd.h rt^3/trunk/include/LogoutCmd.h rt^3/trunk/src/GS/cmds/HelpCmd.cxx rt^3/trunk/src/GS/cmds/LoginCmd.cxx rt^3/trunk/src/GS/cmds/LogoutCmd.cxx Added: rt^3/trunk/include/HelpCmd.h === --- rt^3/trunk/include/HelpCmd.h(rev 0) +++ rt^3/trunk/include/HelpCmd.h2010-12-16 15:27:59 UTC (rev 41642) @@ -0,0 +1,54 @@ +/* H E L P C M D . H + * BRL-CAD + * + * Copyright (c) 2010 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.h + * HelpCmd.h + * + * Created on: Dec 16, 2010 + */ + +#ifndef __HELPCMD_H__ +#define __HELPCMD_H__ + +#include AbstractClientCmd.h +#include QtCore/QString + +class HelpCmd: public AbstractClientCmd { +public: + HelpCmd(); + virtual ~HelpCmd(); + + QString getUsage(); + QString getHelp(); + +protected: + bool _exec(GSClient* client, QStringList args); +}; + +#endif /* __HELPCMD_H__ */ + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: rt^3/trunk/include/HelpCmd.h ___ Added: svn:mime-type + text/plain Added: svn:keywords + Revision Date Author Added: svn:eol-style + native Added: rt^3/trunk/include/LoginCmd.h === --- rt^3/trunk/include/LoginCmd.h (rev 0) +++ rt^3/trunk/include/LoginCmd.h 2010-12-16 15:27:59 UTC (rev 41642) @@ -0,0 +1,55 @@ +/* L O G I N C M D . H + * BRL-CAD + * + * Copyright (c) 2010 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 LoginCmd.h + * LoginCmd.h + * + * Created on: Dec 16, 2010 + * + */ + +#ifndef __LOGINCMD_H__ +#define __LOGINCMD_H__ + +#include AbstractClientCmd.h +#include QtCore/QString + +class LoginCmd : public AbstractClientCmd { +public: + LoginCmd(); + virtual ~LoginCmd(); + + QString getUsage(); + QString getHelp(); + +protected: + bool _exec(GSClient* client, QStringList args); +}; + +#endif /* __LOGINCMD_H__ */ + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: rt^3/trunk/include/LoginCmd.h ___ Added: svn:mime-type + text/plain Added: svn:keywords + Revision Date Author Added: svn:eol-style + native Added: rt^3/trunk/include/LogoutCmd.h === --- rt^3/trunk/include/LogoutCmd.h (rev 0) +++ rt^3/trunk/include/LogoutCmd.h 2010-12-16 15:27:59 UTC (rev 41642) @@ -0,0 +1,56 @@ +/* L O G O U T C M D . H + * BRL-CAD + * + * Copyright (c) 2010 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
[brlcad-commits] SF.net SVN: brlcad:[41643] brlcad/branches/cmake/src/other/tcl/CMakeLists. txt
Revision: 41643 http://brlcad.svn.sourceforge.net/brlcad/?rev=41643view=rev Author: starseeker Date: 2010-12-16 15:40:09 + (Thu, 16 Dec 2010) Log Message: --- Visual Studio doesn't like the space, so use an underscore for now. Modified Paths: -- brlcad/branches/cmake/src/other/tcl/CMakeLists.txt Modified: brlcad/branches/cmake/src/other/tcl/CMakeLists.txt === --- brlcad/branches/cmake/src/other/tcl/CMakeLists.txt 2010-12-16 15:27:59 UTC (rev 41642) +++ brlcad/branches/cmake/src/other/tcl/CMakeLists.txt 2010-12-16 15:40:09 UTC (rev 41643) @@ -117,7 +117,11 @@ SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_NAME=\\\tcl\\\) SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_TARNAME=\\\tcl\\\) SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_VERSION=\\\${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}\\\) -SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_STRING=\\\tcl\\ ${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}\\\) +IF(WIN32) + SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_STRING=\\\tcl_${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}\\\) +ELSE(WIN32) + SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_STRING=\\\tcl\\ ${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}\\\) +ENDIF(WIN32) SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_BUGREPORT=\\) SET(TCL_CFLAGS ${TCL_CFLAGS} -DSTDC_HEADERS=1) SET(TCL_CFLAGS ${TCL_CFLAGS} -DTCL_SHLIB_EXT=\\\${CMAKE_SHARED_LIBRARY_SUFFIX}\\\) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41645]
Revision: 41645 http://brlcad.svn.sourceforge.net/brlcad/?rev=41645view=rev Author: davidloman Date: 2010-12-16 15:47:25 + (Thu, 16 Dec 2010) Log Message: --- Resolved a cyclic include issue. Modified Paths: -- rt^3/trunk/include/ClientCmdRegistry.h rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx Modified: rt^3/trunk/include/ClientCmdRegistry.h === --- rt^3/trunk/include/ClientCmdRegistry.h 2010-12-16 15:46:17 UTC (rev 41644) +++ rt^3/trunk/include/ClientCmdRegistry.h 2010-12-16 15:47:25 UTC (rev 41645) @@ -27,7 +27,6 @@ #ifndef __CLIENTCMDREGISTRY_H__ #define __CLIENTCMDREGISTRY_H__ -#include AbstractClientCmd.h #include Logger.h #include QtCore/QString @@ -35,6 +34,8 @@ #include QtCore/QList #include QtCore/QMutex +class AbstractClientCmd; + class ClientCmdRegistry { public: Modified: rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx === --- rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx2010-12-16 15:46:17 UTC (rev 41644) +++ rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx2010-12-16 15:47:25 UTC (rev 41645) @@ -25,6 +25,8 @@ #include ClientCmdRegistry.h +#include AbstractClientCmd.h + #include QtCore/QMutexLocker ClientCmdRegistry* ClientCmdRegistry::pInstance = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41646] brlcad/trunk
Revision: 41646 http://brlcad.svn.sourceforge.net/brlcad/?rev=41646view=rev Author: brlcad Date: 2010-12-16 15:48:09 + (Thu, 16 Dec 2010) Log Message: --- add a new bu_booleanize() function that will take a given string and return a boolean value for that string. useful for a plethora of routines that check for yes/no. Modified Paths: -- brlcad/trunk/include/bu.h brlcad/trunk/misc/win32-msvc/Dll/BrlcadCore.def brlcad/trunk/src/libbu/Makefile.am Added Paths: --- brlcad/trunk/src/libbu/booleanize.c Modified: brlcad/trunk/include/bu.h === --- brlcad/trunk/include/bu.h 2010-12-16 15:47:25 UTC (rev 41645) +++ brlcad/trunk/include/bu.h 2010-12-16 15:48:09 UTC (rev 41646) @@ -3859,6 +3859,23 @@ } +/** @file libbu/booleanize.c + * + * @brief routines for parsing boolean values + */ + +/** + * B U _ B O O L E A N I Z E + * + * Returns the boolean value of a given input string. + * + * Input values that are null, empty, begin with the letter 'n', or + * are 0-valued return as false. Any other input value returns as + * true. + */ +BU_EXPORT BU_EXTERN(int bu_booleanize, (const char *str)); + + /** @} */ /** @addtogroup bitv */ /** @{ */ Modified: brlcad/trunk/misc/win32-msvc/Dll/BrlcadCore.def === --- brlcad/trunk/misc/win32-msvc/Dll/BrlcadCore.def 2010-12-16 15:47:25 UTC (rev 41645) +++ brlcad/trunk/misc/win32-msvc/Dll/BrlcadCore.def 2010-12-16 15:48:09 UTC (rev 41646) @@ -34,6 +34,7 @@ bu_bitv_shift bu_bitv_to_hex bu_bomb +bu_booleanize bu_brlcad_data bu_byteorder bu_calloc Modified: brlcad/trunk/src/libbu/Makefile.am === --- brlcad/trunk/src/libbu/Makefile.am 2010-12-16 15:47:25 UTC (rev 41645) +++ brlcad/trunk/src/libbu/Makefile.am 2010-12-16 15:48:09 UTC (rev 41646) @@ -12,6 +12,7 @@ basename.c \ bitv.c \ bomb.c \ + booleanize.c \ brlcad_path.c \ cmd.c \ cmdhist.c \ Added: brlcad/trunk/src/libbu/booleanize.c === --- brlcad/trunk/src/libbu/booleanize.c (rev 0) +++ brlcad/trunk/src/libbu/booleanize.c 2010-12-16 15:48:09 UTC (rev 41646) @@ -0,0 +1,70 @@ +/*B O O L E A N I Z E . C + * BRL-CAD + * + * Copyright (c) 2010 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. + */ + +#include common.h + +#include stdlib.h +#include limits.h +#include string.h +#include errno.h + + +int +bu_booleanize(const char *str) +{ +long val; +size_t len; + +/* no string */ +if (!str == 0) + return 0; + +/* empty string */ +len = strlen(str); +if (len == 0) + return 0; + +/* starts with 'n', [nN]* looks like 'no' */ +if (str[0] == 'n' || str[0] == 'N') + return 0; + +/* exactly 0 */ +if (strcmp(str, 0) == 0) + return 0; + +/* variant of 0 (e.g., 000) */ +val = strtol(str, NULL, 10); +if (val == 0 errno != EINVAL) + return 0; + +/* anything else */ +return 1; +} + + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: brlcad/trunk/src/libbu/booleanize.c ___ 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. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41647] rt^3/trunk/include/AbstractClientCmd.h
Revision: 41647 http://brlcad.svn.sourceforge.net/brlcad/?rev=41647view=rev Author: davidloman Date: 2010-12-16 15:48:15 + (Thu, 16 Dec 2010) Log Message: --- Resolved a second cyclic include issue. Modified Paths: -- rt^3/trunk/include/AbstractClientCmd.h Modified: rt^3/trunk/include/AbstractClientCmd.h === --- rt^3/trunk/include/AbstractClientCmd.h 2010-12-16 15:48:09 UTC (rev 41646) +++ rt^3/trunk/include/AbstractClientCmd.h 2010-12-16 15:48:15 UTC (rev 41647) @@ -26,12 +26,11 @@ #define __ABSTRACTCLIENTCMD_H__ #include Logger.h +#include GSClient.h #include QtCore/QString #include QtCore/QStringList -class GSClient; - class AbstractClientCmd { public: virtual ~AbstractClientCmd(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41648]
Revision: 41648 http://brlcad.svn.sourceforge.net/brlcad/?rev=41648view=rev Author: davidloman Date: 2010-12-16 15:52:12 + (Thu, 16 Dec 2010) Log Message: --- Wire in ClientCmd registration so we can actually USE the commands. Add a getter for the current portal. Commands will need this. Modified Paths: -- rt^3/trunk/include/GSClient.h rt^3/trunk/src/GS/GSClient.cxx Modified: rt^3/trunk/include/GSClient.h === --- rt^3/trunk/include/GSClient.h 2010-12-16 15:48:15 UTC (rev 41647) +++ rt^3/trunk/include/GSClient.h 2010-12-16 15:52:12 UTC (rev 41648) @@ -29,6 +29,7 @@ #include Logger.h #include JobManager.h #include PortalManager.h +#include Portal.h #include QtCore/QString #include QtCore/QStringList @@ -45,6 +46,7 @@ int run(); bool execCmd(QString cmd, QStringList args); PortalManager* getPortMan(); + Portal* getCurrentPortal(); protected: @@ -54,6 +56,7 @@ JobManager* jobMan; PortalManager* portMan; + Portal* currentPortal; bool stayRun; std::string prompt; Modified: rt^3/trunk/src/GS/GSClient.cxx === --- rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 15:48:15 UTC (rev 41647) +++ rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 15:52:12 UTC (rev 41648) @@ -23,6 +23,11 @@ */ #include GSClient.h +#include AbstractClientCmd.h +#include HelpCmd.h +#include LoginCmd.h +#include LogoutCmd.h +#include ShutdownCmd.h const std::string GSClient::defaultPrompt =geoclient ; @@ -34,6 +39,12 @@ this-stayRun = true; this-prompt = defaultPrompt; + + /* Command Registrations */ + this-ccReg-registerCmd(new HelpCmd()); + this-ccReg-registerCmd(new LoginCmd()); + this-ccReg-registerCmd(new LogoutCmd()); + this-ccReg-registerCmd(new ShutdownCmd()); } GSClient::~GSClient() { @@ -95,6 +106,12 @@ return this-portMan; } +Portal* +GSClient::getCurrentPortal() +{ + return this-currentPortal; +} + /* * Local Variables: * tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41649]
Revision: 41649 http://brlcad.svn.sourceforge.net/brlcad/?rev=41649view=rev Author: davidloman Date: 2010-12-16 15:58:02 + (Thu, 16 Dec 2010) Log Message: --- Add in printing functions for both usage and help. Simplifies and reduces code in AbstractClientCmd subclasses. Modified Paths: -- rt^3/trunk/include/AbstractClientCmd.h rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx Modified: rt^3/trunk/include/AbstractClientCmd.h === --- rt^3/trunk/include/AbstractClientCmd.h 2010-12-16 15:52:12 UTC (rev 41648) +++ rt^3/trunk/include/AbstractClientCmd.h 2010-12-16 15:58:02 UTC (rev 41649) @@ -40,6 +40,9 @@ virtual QString getUsage() = 0; virtual QString getHelp() = 0; + void printUsage(); + void printHelp(); + protected: AbstractClientCmd(QString cmd); AbstractClientCmd(AbstractClientCmd* acCmd); Modified: rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx === --- rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx2010-12-16 15:52:12 UTC (rev 41648) +++ rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx2010-12-16 15:58:02 UTC (rev 41649) @@ -47,6 +47,16 @@ return this-_exec(client, args); } +void +AbstractClientCmd::printUsage() { + this-log-logERROR(this-cmd, this-getUsage()); +} + +void +AbstractClientCmd::printHelp() { + this-log-logERROR(this-cmd, this-getHelp()); +} + /* * Local Variables: * tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41650]
Revision: 41650 http://brlcad.svn.sourceforge.net/brlcad/?rev=41650view=rev Author: davidloman Date: 2010-12-16 16:00:52 + (Thu, 16 Dec 2010) Log Message: --- Switch over usage/help printing lines to abstractClientCmd calls. Modified Paths: -- rt^3/trunk/src/GS/cmds/HelpCmd.cxx rt^3/trunk/src/GS/cmds/LoginCmd.cxx Modified: rt^3/trunk/src/GS/cmds/HelpCmd.cxx === --- rt^3/trunk/src/GS/cmds/HelpCmd.cxx 2010-12-16 15:58:02 UTC (rev 41649) +++ rt^3/trunk/src/GS/cmds/HelpCmd.cxx 2010-12-16 16:00:52 UTC (rev 41650) @@ -46,7 +46,7 @@ int argn = args.length(); if (argn 0 || argn 1) { - this-log-logERROR(HelpCmd, this-getUsage()); + this-printUsage(); return false; } @@ -90,6 +90,7 @@ if(cmd.length() == 0) { this-log-logERROR(HelpCmd, Zero Length Cmd provided to help.); + this-printUsage(); return false; } @@ -97,14 +98,14 @@ if(acc == NULL) { this-log-logERROR(HelpCmd, NULL AbstractClientCmd returned from ClientCmdRegistry for ' + cmd + '.); + this-printUsage(); return false; } - QString usage = acc-getUsage(); - QString help = acc-getHelp(); + acc-printUsage(); + acc-printHelp(); - this-log-logINFO(HelpCmd, usage); - this-log-logINFO(HelpCmd, help); + /* NOTE: Do NOT delete acc, its used by other objects */ return true; } Modified: rt^3/trunk/src/GS/cmds/LoginCmd.cxx === --- rt^3/trunk/src/GS/cmds/LoginCmd.cxx 2010-12-16 15:58:02 UTC (rev 41649) +++ rt^3/trunk/src/GS/cmds/LoginCmd.cxx 2010-12-16 16:00:52 UTC (rev 41650) @@ -42,6 +42,24 @@ bool LoginCmd::_exec(GSClient* client, QStringList args){ + int argn = args.length(); + + if (argn != 4) { + this-printUsage(); + return false; + } + + QString host = args.at(0); + quint16 port = atoi(args.at(1).toStdString().c_str()); + QString uname = args.at(2); + QString passwd = args.at(3); + + + if (port =0 || host.length() == 0 || uname.length() == 0 || passwd.length() == 0){ + this-printUsage(); + return false; + } + PortalManager* pm = client-getPortMan(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41651] brlcad/branches/cmake/src/other/tcl/CMakeLists. txt
Revision: 41651 http://brlcad.svn.sourceforge.net/brlcad/?rev=41651view=rev Author: starseeker Date: 2010-12-16 16:00:53 + (Thu, 16 Dec 2010) Log Message: --- Mark WIN32 specific PACKAGE_STRING with a FIXME comment. Modified Paths: -- brlcad/branches/cmake/src/other/tcl/CMakeLists.txt Modified: brlcad/branches/cmake/src/other/tcl/CMakeLists.txt === --- brlcad/branches/cmake/src/other/tcl/CMakeLists.txt 2010-12-16 16:00:52 UTC (rev 41650) +++ brlcad/branches/cmake/src/other/tcl/CMakeLists.txt 2010-12-16 16:00:53 UTC (rev 41651) @@ -117,6 +117,7 @@ SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_NAME=\\\tcl\\\) SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_TARNAME=\\\tcl\\\) SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_VERSION=\\\${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}\\\) +# FIXME - Figure out why Visual Studio isn't liking the space in the PACKAGE_STRING IF(WIN32) SET(TCL_CFLAGS ${TCL_CFLAGS} -DPACKAGE_STRING=\\\tcl_${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}\\\) ELSE(WIN32) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41652] brlcad/trunk/doc/deprecation.txt
Revision: 41652 http://brlcad.svn.sourceforge.net/brlcad/?rev=41652view=rev Author: brlcad Date: 2010-12-16 16:04:37 + (Thu, 16 Dec 2010) Log Message: --- db_free_external is already obsolete. Modified Paths: -- brlcad/trunk/doc/deprecation.txt Modified: brlcad/trunk/doc/deprecation.txt === --- brlcad/trunk/doc/deprecation.txt2010-12-16 16:00:53 UTC (rev 41651) +++ brlcad/trunk/doc/deprecation.txt2010-12-16 16:04:37 UTC (rev 41652) @@ -176,7 +176,6 @@ pre 7.0 --- include/raytrace.h - db_free_external - bu_free_external [deprecated pre-7.0] RT_HIT_NORM - RT_HIT_NORMAL [deprecated pre-7.0] struct hit.hit_point - RT_HIT_POINT [deprecated pre-7.0] struct hit.hit_normal - RT_HIT_NORMAL [deprecated pre-7.0] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41653] rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx
Revision: 41653 http://brlcad.svn.sourceforge.net/brlcad/?rev=41653view=rev Author: davidloman Date: 2010-12-16 16:08:15 + (Thu, 16 Dec 2010) Log Message: --- Forgot to implement ClientCmdRegistry::getCmd() ooops! Modified Paths: -- rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx Modified: rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx === --- rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx2010-12-16 16:04:37 UTC (rev 41652) +++ rt^3/trunk/src/GS/cmds/ClientCmdRegistry.cxx2010-12-16 16:08:15 UTC (rev 41653) @@ -65,7 +65,12 @@ AbstractClientCmd* ClientCmdRegistry::getCmd(QString cmd) { + QMutexLocker(this-mapLock); + if (this-cmdMap-contains(cmd) == false) + return NULL; + + return this-cmdMap-value(cmd); } QListQString* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41654] rt^3/trunk/src/GS/cmds/HelpCmd.cxx
Revision: 41654 http://brlcad.svn.sourceforge.net/brlcad/?rev=41654view=rev Author: davidloman Date: 2010-12-16 16:10:06 + (Thu, 16 Dec 2010) Log Message: --- Quick tweaks to help cmd text formatting. Should be much prettier now. Modified Paths: -- rt^3/trunk/src/GS/cmds/HelpCmd.cxx Modified: rt^3/trunk/src/GS/cmds/HelpCmd.cxx === --- rt^3/trunk/src/GS/cmds/HelpCmd.cxx 2010-12-16 16:08:15 UTC (rev 41653) +++ rt^3/trunk/src/GS/cmds/HelpCmd.cxx 2010-12-16 16:10:06 UTC (rev 41654) @@ -58,11 +58,8 @@ this-log-logINFO(HelpCmd, Available commands:); - QString out(); + QString out(\t); for (int i = 0; i cmds-length(); ++i) { - - out.append(\t); - /* Append the new cmd name */ out.append(cmds-at(i)); @@ -73,7 +70,7 @@ /* every 5th command, start a new line. */ if ((i+1) % 5 == 0) { this-log-logINFO(HelpCmd, out); - out = ; /* reset for next loop pass */ + out = \t; /* reset for next loop pass */ } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41655] rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx
Revision: 41655 http://brlcad.svn.sourceforge.net/brlcad/?rev=41655view=rev Author: davidloman Date: 2010-12-16 16:10:39 + (Thu, 16 Dec 2010) Log Message: --- Make Help and Usage print on INFO (stdout) channel. Modified Paths: -- rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx Modified: rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx === --- rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx2010-12-16 16:10:06 UTC (rev 41654) +++ rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx2010-12-16 16:10:39 UTC (rev 41655) @@ -49,12 +49,12 @@ void AbstractClientCmd::printUsage() { - this-log-logERROR(this-cmd, this-getUsage()); + this-log-logINFO(this-cmd, this-getUsage()); } void AbstractClientCmd::printHelp() { - this-log-logERROR(this-cmd, this-getHelp()); + this-log-logINFO(this-cmd, this-getHelp()); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41656] rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx
Revision: 41656 http://brlcad.svn.sourceforge.net/brlcad/?rev=41656view=rev Author: davidloman Date: 2010-12-16 16:16:23 + (Thu, 16 Dec 2010) Log Message: --- Fixed up file footer and command usage statement. Modified Paths: -- rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx Modified: rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx === --- rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx 2010-12-16 16:10:39 UTC (rev 41655) +++ rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx 2010-12-16 16:16:23 UTC (rev 41656) @@ -32,7 +32,7 @@ QString ShutdownCmd::getUsage(){ - return Usage: shutdown ip port uname passwd; + return Usage: shutdown; } QString @@ -46,13 +46,13 @@ } +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ - -// Local Variables: -// tab-width: 8 -// mode: C++ -// c-basic-offset: 4 -// indent-tabs-mode: t -// c-file-style: stroustrup -// End: -// ex: shiftwidth=4 tabstop=8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41657] rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx
Revision: 41657 http://brlcad.svn.sourceforge.net/brlcad/?rev=41657view=rev Author: davidloman Date: 2010-12-16 16:20:03 + (Thu, 16 Dec 2010) Log Message: --- Quick tweaks to help and usage text formatting. Modified Paths: -- rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx Modified: rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx === --- rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx2010-12-16 16:16:23 UTC (rev 41656) +++ rt^3/trunk/src/GS/cmds/AbstractClientCmd.cxx2010-12-16 16:20:03 UTC (rev 41657) @@ -49,12 +49,12 @@ void AbstractClientCmd::printUsage() { - this-log-logINFO(this-cmd, this-getUsage()); + this-log-logINFO(this-cmd.toUpper(), this-getUsage()); } void AbstractClientCmd::printHelp() { - this-log-logINFO(this-cmd, this-getHelp()); + this-log-logINFO(this-cmd.toUpper(), this-getHelp()); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41658]
Revision: 41658 http://brlcad.svn.sourceforge.net/brlcad/?rev=41658view=rev Author: davidloman Date: 2010-12-16 16:24:55 + (Thu, 16 Dec 2010) Log Message: --- Stub in Exit command. We need a way to exit out of the client after all! Modified Paths: -- rt^3/trunk/src/GS/CMakeLists.txt Added Paths: --- rt^3/trunk/include/ExitCmd.h rt^3/trunk/src/GS/cmds/ExitCmd.cxx Added: rt^3/trunk/include/ExitCmd.h === --- rt^3/trunk/include/ExitCmd.h(rev 0) +++ rt^3/trunk/include/ExitCmd.h2010-12-16 16:24:55 UTC (rev 41658) @@ -0,0 +1,54 @@ +/* E X I T C M D . H + * BRL-CAD + * + * Copyright (c) 2010 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 ExitCmd.h + * ExitCmd.h + * + * Created on: Dec 16, 2010 + */ + +#ifndef __EXITCMD_H__ +#define __EXITCMD_H__ + +#include AbstractClientCmd.h +#include QtCore/QString + +class ExitCmd: public AbstractClientCmd { +public: + ExitCmd(); + virtual ~ExitCmd(); + + QString getUsage(); + QString getHelp(); + +protected: + bool _exec(GSClient* client, QStringList args); +}; + +#endif /* __EXITCMD_H__ */ + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: rt^3/trunk/include/ExitCmd.h ___ Added: svn:mime-type + text/plain Added: svn:keywords + Revision Date Author Added: svn:eol-style + native Modified: rt^3/trunk/src/GS/CMakeLists.txt === --- rt^3/trunk/src/GS/CMakeLists.txt2010-12-16 16:20:03 UTC (rev 41657) +++ rt^3/trunk/src/GS/CMakeLists.txt2010-12-16 16:24:55 UTC (rev 41658) @@ -60,6 +60,7 @@ cmds/LoginCmd.cxx cmds/LogoutCmd.cxx cmds/ShutdownCmd.cxx + cmds/ExitCmd.cxx ) #Set INST Headers @@ -80,6 +81,7 @@ LoginCmd.h LogoutCmd.h ShutdownCmd.h + ExitCmd.h ) #Set NOINST headers Added: rt^3/trunk/src/GS/cmds/ExitCmd.cxx === --- rt^3/trunk/src/GS/cmds/ExitCmd.cxx (rev 0) +++ rt^3/trunk/src/GS/cmds/ExitCmd.cxx 2010-12-16 16:24:55 UTC (rev 41658) @@ -0,0 +1,56 @@ +/* E X I T C M D . C X X + * BRL-CAD + * + * Copyright (c) 2010 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 ExitCmd.cxx + * ExitCmd.cxx + * + * Created on: Dec 16, 2010 + */ + +#include ExitCmd.h + +ExitCmd::ExitCmd() : AbstractClientCmd(shutdown){} +ExitCmd::~ExitCmd() {} + +QString +ExitCmd::getUsage(){ + return Usage: shutdown; +} + +QString +ExitCmd::getHelp(){ + return Sends a remote shutdown command to the GS server currently attached.; +} + +bool +ExitCmd::_exec(GSClient* client, QStringList args){ + + +} + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ + Property changes on: rt^3/trunk/src/GS/cmds/ExitCmd.cxx ___ Added: svn:mime-type + text/plain Added: svn:keywords + Revision Date Author Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register
[brlcad-commits] SF.net SVN: brlcad:[41659]
Revision: 41659 http://brlcad.svn.sourceforge.net/brlcad/?rev=41659view=rev Author: davidloman Date: 2010-12-16 16:26:19 + (Thu, 16 Dec 2010) Log Message: --- Add a stopRun() method. Sets run flag to false and starts the exit procedures. Modified Paths: -- rt^3/trunk/include/GSClient.h rt^3/trunk/src/GS/GSClient.cxx Modified: rt^3/trunk/include/GSClient.h === --- rt^3/trunk/include/GSClient.h 2010-12-16 16:24:55 UTC (rev 41658) +++ rt^3/trunk/include/GSClient.h 2010-12-16 16:26:19 UTC (rev 41659) @@ -44,6 +44,8 @@ virtual ~GSClient(); int run(); + void stopRun(); + bool execCmd(QString cmd, QStringList args); PortalManager* getPortMan(); Portal* getCurrentPortal(); Modified: rt^3/trunk/src/GS/GSClient.cxx === --- rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 16:24:55 UTC (rev 41658) +++ rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 16:26:19 UTC (rev 41659) @@ -80,7 +80,6 @@ QString cmd = list.takeFirst(); this-execCmd(cmd, list); - } this-log-logINFO(geoclient,Exiting.); @@ -112,6 +111,12 @@ return this-currentPortal; } +void +GSClient::stopRun() +{ + this-stayRun = false; +} + /* * Local Variables: * tab-width: 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41661] brlcad/trunk/src/other/tcl
Revision: 41661 http://brlcad.svn.sourceforge.net/brlcad/?rev=41661view=rev Author: starseeker Date: 2010-12-16 17:06:32 + (Thu, 16 Dec 2010) Log Message: --- Merge in changes based on a diff between BRL-CAD's tcl prior to the 8.5.9 vanilla commit and the earlier vanilla 8.5.8 commit. Modified Paths: -- brlcad/trunk/src/other/tcl/generic/regex.h brlcad/trunk/src/other/tcl/generic/tcl.h brlcad/trunk/src/other/tcl/generic/tclDecls.h brlcad/trunk/src/other/tcl/generic/tclInt.h brlcad/trunk/src/other/tcl/generic/tclIntDecls.h brlcad/trunk/src/other/tcl/generic/tclIntPlatDecls.h brlcad/trunk/src/other/tcl/generic/tclProc.c brlcad/trunk/src/other/tcl/unix/Makefile.in brlcad/trunk/src/other/tcl/unix/configure.in brlcad/trunk/src/other/tcl/unix/tcl.m4 brlcad/trunk/src/other/tcl/win/configure.in brlcad/trunk/src/other/tcl/win/tclWinPort.h Modified: brlcad/trunk/src/other/tcl/generic/regex.h === --- brlcad/trunk/src/other/tcl/generic/regex.h 2010-12-16 16:26:56 UTC (rev 41660) +++ brlcad/trunk/src/other/tcl/generic/regex.h 2010-12-16 17:06:32 UTC (rev 41661) @@ -70,49 +70,15 @@ * Add your own defines, if needed, here. */ +#include ./tclInt.h + /* * Location where a chunk of regcustom.h is automatically spliced into this * file (working from its prototype, regproto.h). */ /* --- begin --- */ -/* ensure certain things don't sneak in from system headers */ -#ifdef __REG_WIDE_T -#undef __REG_WIDE_T -#endif -#ifdef __REG_WIDE_COMPILE -#undef __REG_WIDE_COMPILE -#endif -#ifdef __REG_WIDE_EXEC -#undef __REG_WIDE_EXEC -#endif -#ifdef __REG_REGOFF_T -#undef __REG_REGOFF_T -#endif -#ifdef __REG_VOID_T -#undef __REG_VOID_T -#endif -#ifdef __REG_CONST -#undef __REG_CONST -#endif -#ifdef __REG_NOFRONT -#undef __REG_NOFRONT -#endif -#ifdef __REG_NOCHAR -#undef __REG_NOCHAR -#endif -/* interface types */ -#define__REG_WIDE_TTcl_UniChar -#define__REG_REGOFF_T long/* not really right, but good enough... */ -#define__REG_VOID_TVOID -#define__REG_CONST CONST -/* names and declarations */ -#define__REG_WIDE_COMPILE TclReComp -#define__REG_WIDE_EXEC TclReExec -#define__REG_NOFRONT /* don't want regcomp() and regexec() */ -#define__REG_NOCHAR/* or the char versions */ -#defineregfree TclReFree -#defineregerrorTclReError +#define __REG_NOCHAR 1 /* don't define the char versions so we can avoid conflicting type compilation errors */ /* --- end --- */ /* Modified: brlcad/trunk/src/other/tcl/generic/tcl.h === --- brlcad/trunk/src/other/tcl/generic/tcl.h2010-12-16 16:26:56 UTC (rev 41660) +++ brlcad/trunk/src/other/tcl/generic/tcl.h2010-12-16 17:06:32 UTC (rev 41661) @@ -92,6 +92,12 @@ # endif #endif /* __WIN32__ */ +/* quell shadow warnings */ +#ifdef index +# undef index +#endif +#define index tcl_scoped_index + /* * Utility macros: STRINGIFY takes an argument and wraps it in (double * quotation marks), JOIN joins two arguments. @@ -175,7 +181,7 @@ # ifdef STATIC_BUILD # define DLLIMPORT # define DLLEXPORT -# ifdef _DLL +# if (defined(HAVE_DECLSPEC) defined(_DLL)) # define CRTIMPORT __declspec(dllimport) # else # define CRTIMPORT @@ -195,6 +201,10 @@ # define CRTIMPORT #endif +#ifndef HAVE_DECLSPEC +# define HAVE_DECLSPEC 0 +#endif + /* * These macros are used to control whether functions are being declared for * import or export. If a function is being declared while it is being built @@ -2437,6 +2447,9 @@ * end block for C++ */ +/* quell shadow warnings */ +#undef index + #ifdef __cplusplus } #endif Modified: brlcad/trunk/src/other/tcl/generic/tclDecls.h === --- brlcad/trunk/src/other/tcl/generic/tclDecls.h 2010-12-16 16:26:56 UTC (rev 41660) +++ brlcad/trunk/src/other/tcl/generic/tclDecls.h 2010-12-16 17:06:32 UTC (rev 41661) @@ -159,7 +159,7 @@ #define Tcl_ConvertToType_TCL_DECLARED /* 18 */ EXTERN int Tcl_ConvertToType(Tcl_Interp *interp, - Tcl_Obj *objPtr, Tcl_ObjType *typePtr); + Tcl_Obj *objPtr, Tcl_ObjType *objTypePtr); #endif #ifndef Tcl_DbDecrRefCount_TCL_DECLARED #define Tcl_DbDecrRefCount_TCL_DECLARED @@ -558,7 +558,7 @@ #ifndef Tcl_CreateChannel_TCL_DECLARED #define Tcl_CreateChannel_TCL_DECLARED /* 88 */ -EXTERN Tcl_Channel Tcl_CreateChannel(Tcl_ChannelType *typePtr, +EXTERN Tcl_Channel Tcl_CreateChannel(Tcl_ChannelType *channelTypePtr, CONST char *chanName, ClientData instanceData, int mask); #endif @@
[brlcad-commits] SF.net SVN: brlcad:[41663] rt^3/trunk/src/GS/cmds/ExitCmd.cxx
Revision: 41663 http://brlcad.svn.sourceforge.net/brlcad/?rev=41663view=rev Author: davidloman Date: 2010-12-16 18:34:06 + (Thu, 16 Dec 2010) Log Message: --- Implement the details for ExitCmd Modified Paths: -- rt^3/trunk/src/GS/cmds/ExitCmd.cxx Modified: rt^3/trunk/src/GS/cmds/ExitCmd.cxx === --- rt^3/trunk/src/GS/cmds/ExitCmd.cxx 2010-12-16 17:59:16 UTC (rev 41662) +++ rt^3/trunk/src/GS/cmds/ExitCmd.cxx 2010-12-16 18:34:06 UTC (rev 41663) @@ -24,24 +24,31 @@ */ #include ExitCmd.h +#include Portal.h -ExitCmd::ExitCmd() : AbstractClientCmd(shutdown){} +ExitCmd::ExitCmd() : AbstractClientCmd(exit){} ExitCmd::~ExitCmd() {} QString ExitCmd::getUsage(){ - return Usage: shutdown; + return Usage: exit; } QString ExitCmd::getHelp(){ - return Sends a remote shutdown command to the GS server currently attached.; + return Causes the application to exit.; } bool ExitCmd::_exec(GSClient* client, QStringList args){ + Portal* p = client-getCurrentPortal(); + /* Check to see if we are connected */ + if (p != NULL) + p-disconnect(); + /* set the run flag to false */ + client-stopRun(); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41664] rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx
Revision: 41664 http://brlcad.svn.sourceforge.net/brlcad/?rev=41664view=rev Author: davidloman Date: 2010-12-16 18:38:04 + (Thu, 16 Dec 2010) Log Message: --- Implement the details for ShutdownCmd Modified Paths: -- rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx Modified: rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx === --- rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx 2010-12-16 18:34:06 UTC (rev 41663) +++ rt^3/trunk/src/GS/cmds/ShutdownCmd.cxx 2010-12-16 18:38:04 UTC (rev 41664) @@ -23,13 +23,11 @@ */ #include ShutdownCmd.h +#include NetMsgTypes.h -ShutdownCmd::ShutdownCmd() : AbstractClientCmd(shutdown) -{} +ShutdownCmd::ShutdownCmd() : AbstractClientCmd(shutdown){} +ShutdownCmd::~ShutdownCmd() {} -ShutdownCmd::~ShutdownCmd() { -} - QString ShutdownCmd::getUsage(){ return Usage: shutdown; @@ -42,8 +40,19 @@ bool ShutdownCmd::_exec(GSClient* client, QStringList args){ + Portal* p = client-getCurrentPortal(); + /* Check to see if we are connected */ + if (p == NULL) { + this-log-logWARNING(ShutdownCmd,Current Portal returned NULL. Cannot send Shutdown Msg.); + return false; + } + /* Send Shutdown Msg */ + TypeOnlyMsg tom(CMD_SHUTDOWN); + p-send(tom); + + return true; } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41666] rt^3/trunk/src/GS/GSClient.cxx
Revision: 41666 http://brlcad.svn.sourceforge.net/brlcad/?rev=41666view=rev Author: davidloman Date: 2010-12-16 18:41:42 + (Thu, 16 Dec 2010) Log Message: --- Have all the current commands register themselves in GSClient Modified Paths: -- rt^3/trunk/src/GS/GSClient.cxx Modified: rt^3/trunk/src/GS/GSClient.cxx === --- rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 18:39:56 UTC (rev 41665) +++ rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 18:41:42 UTC (rev 41666) @@ -24,6 +24,7 @@ #include GSClient.h #include AbstractClientCmd.h +#include ExitCmd.h #include HelpCmd.h #include LoginCmd.h #include LogoutCmd.h @@ -42,6 +43,7 @@ /* Command Registrations */ this-ccReg-registerCmd(new HelpCmd()); + this-ccReg-registerCmd(new ExitCmd()); this-ccReg-registerCmd(new LoginCmd()); this-ccReg-registerCmd(new LogoutCmd()); this-ccReg-registerCmd(new ShutdownCmd()); @@ -82,6 +84,17 @@ this-execCmd(cmd, list); } + if (this-currentPortal != NULL) + this-currentPortal-disconnect(); + + if (this-portMan != NULL) + this-portMan-shutdown(); + + if (this-jobMan != NULL) + this-jobMan-shutdown(); + + + this-log-logINFO(geoclient,Exiting.); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41667] rt^3/trunk/src/GS/GSClient.cxx
Revision: 41667 http://brlcad.svn.sourceforge.net/brlcad/?rev=41667view=rev Author: davidloman Date: 2010-12-16 18:48:32 + (Thu, 16 Dec 2010) Log Message: --- Forgot to init a pointer to NULL and that caused a nice little segfault. Fixeded now. Modified Paths: -- rt^3/trunk/src/GS/GSClient.cxx Modified: rt^3/trunk/src/GS/GSClient.cxx === --- rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 18:41:42 UTC (rev 41666) +++ rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 18:48:32 UTC (rev 41667) @@ -37,6 +37,7 @@ this-log = Logger::getInstance(); this-jobMan = JobManager::getInstance(); this-portMan = new PortalManager(); + this-currentPortal = NULL; this-stayRun = true; this-prompt = defaultPrompt; @@ -93,8 +94,6 @@ if (this-jobMan != NULL) this-jobMan-shutdown(); - - this-log-logINFO(geoclient,Exiting.); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41668] brlcad/trunk/src/other/tk
Revision: 41668 http://brlcad.svn.sourceforge.net/brlcad/?rev=41668view=rev Author: starseeker Date: 2010-12-16 18:51:56 + (Thu, 16 Dec 2010) Log Message: --- Merge in changes based on a diff between BRL-CAD's tk prior to the 8.5.9 vanilla commit and the earlier vanilla 8.5.8 commit. Modified Paths: -- brlcad/trunk/src/other/tk/generic/tk.h brlcad/trunk/src/other/tk/generic/tkDecls.h brlcad/trunk/src/other/tk/library/panedwindow.tcl brlcad/trunk/src/other/tk/unix/Makefile.in brlcad/trunk/src/other/tk/unix/tcl.m4 brlcad/trunk/src/other/tk/win/wish.exe.manifest Modified: brlcad/trunk/src/other/tk/generic/tk.h === --- brlcad/trunk/src/other/tk/generic/tk.h 2010-12-16 18:48:32 UTC (rev 41667) +++ brlcad/trunk/src/other/tk/generic/tk.h 2010-12-16 18:51:56 UTC (rev 41668) @@ -95,6 +95,12 @@ #define TK_USE_INPUT_METHODS #endif +/* quell shadow warnings */ +#ifdef index +# undef index +#endif +#define index tcl_scoped_index + /* * Dummy types that are used by clients: */ @@ -1590,6 +1596,9 @@ * end block for C++ */ +/* quell shadow warnings */ +#undef index + #ifdef __cplusplus } #endif Modified: brlcad/trunk/src/other/tk/generic/tkDecls.h === --- brlcad/trunk/src/other/tk/generic/tkDecls.h 2010-12-16 18:48:32 UTC (rev 41667) +++ brlcad/trunk/src/other/tk/generic/tkDecls.h 2010-12-16 18:51:56 UTC (rev 41668) @@ -86,8 +86,8 @@ #ifndef Tk_CanvasEventuallyRedraw_TCL_DECLARED #define Tk_CanvasEventuallyRedraw_TCL_DECLARED /* 8 */ -EXTERN voidTk_CanvasEventuallyRedraw(Tk_Canvas canvas, int x1, - int y1, int x2, int y2); +EXTERN voidTk_CanvasEventuallyRedraw(Tk_Canvas canvas, int _x1, + int _y1, int _x2, int _y2); #endif #ifndef Tk_CanvasGetCoord_TCL_DECLARED #define Tk_CanvasGetCoord_TCL_DECLARED @@ -1696,7 +1696,7 @@ void (*tk_AddOption) (Tk_Window tkwin, CONST char *name, CONST char *value, int priority); /* 5 */ void (*tk_BindEvent) (Tk_BindingTable bindingTable, XEvent *eventPtr, Tk_Window tkwin, int numObjects, ClientData *objectPtr); /* 6 */ void (*tk_CanvasDrawableCoords) (Tk_Canvas canvas, double x, double y, short *drawableXPtr, short *drawableYPtr); /* 7 */ -void (*tk_CanvasEventuallyRedraw) (Tk_Canvas canvas, int x1, int y1, int x2, int y2); /* 8 */ +void (*tk_CanvasEventuallyRedraw) (Tk_Canvas canvas, int _x1, int _y1, int _x2, int _y2); /* 8 */ int (*tk_CanvasGetCoord) (Tcl_Interp *interp, Tk_Canvas canvas, CONST char *str, double *doublePtr); /* 9 */ Tk_CanvasTextInfo * (*tk_CanvasGetTextInfo) (Tk_Canvas canvas); /* 10 */ int (*tk_CanvasPsBitmap) (Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap, int x, int y, int width, int height); /* 11 */ Modified: brlcad/trunk/src/other/tk/library/panedwindow.tcl === --- brlcad/trunk/src/other/tk/library/panedwindow.tcl 2010-12-16 18:48:32 UTC (rev 41667) +++ brlcad/trunk/src/other/tk/library/panedwindow.tcl 2010-12-16 18:51:56 UTC (rev 41668) @@ -39,7 +39,9 @@ if {[$w cget -opaqueresize]} { set proxy 0 } -set what [$w identify $x $y] +if {[catch {$w identify $x $y} what]} { + return +} if { [llength $what] == 2 } { lassign $what index which if {!$::tk_strictMotif || $which eq handle} { @@ -123,7 +125,9 @@ # proc ::tk::panedwindow::Motion {w x y} { variable ::tk::Priv -set id [$w identify $x $y] +if {[catch {$w identify $x $y} id]} { + return +} if {([llength $id] == 2) \ (!$::tk_strictMotif || [lindex $id 1] eq handle)} { if {![info exists Priv($w,panecursor)]} { Modified: brlcad/trunk/src/other/tk/unix/Makefile.in === --- brlcad/trunk/src/other/tk/unix/Makefile.in 2010-12-16 18:48:32 UTC (rev 41667) +++ brlcad/trunk/src/other/tk/unix/Makefile.in 2010-12-16 18:51:56 UTC (rev 41668) @@ -92,12 +92,6 @@ # Directory in which to install html documentation: HTML_INSTALL_DIR = $(INSTALL_ROOT)$(HTML_DIR) -# Directory in which to install the configuration file tkConfig.sh: -CONFIG_INSTALL_DIR = $(INSTALL_ROOT)$(libdir) - -# Directory in which to install the demo files: -DEMO_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY)/demos - # The directory containing the Tcl sources and headers appropriate # for this version of Tk (srcdir will be replaced or has already # been replaced by the configure script): @@ -193,7 +187,7 @@ # Some versions of make, like SGI's, use the following variable to # determine which shell to use for executing commands: -SHELL = @SHELL@ +SHELL = /bin/sh # BUILD_TCLSH is the fully qualified
[brlcad-commits] SF.net SVN: brlcad:[41669] rt^3/trunk/src/GS/cmds/ExitCmd.cxx
Revision: 41669 http://brlcad.svn.sourceforge.net/brlcad/?rev=41669view=rev Author: davidloman Date: 2010-12-16 19:03:21 + (Thu, 16 Dec 2010) Log Message: --- Leave network clean up to the GSClient class. Modified Paths: -- rt^3/trunk/src/GS/cmds/ExitCmd.cxx Modified: rt^3/trunk/src/GS/cmds/ExitCmd.cxx === --- rt^3/trunk/src/GS/cmds/ExitCmd.cxx 2010-12-16 18:51:56 UTC (rev 41668) +++ rt^3/trunk/src/GS/cmds/ExitCmd.cxx 2010-12-16 19:03:21 UTC (rev 41669) @@ -41,12 +41,6 @@ bool ExitCmd::_exec(GSClient* client, QStringList args){ - Portal* p = client-getCurrentPortal(); - - /* Check to see if we are connected */ - if (p != NULL) - p-disconnect(); - /* set the run flag to false */ client-stopRun(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41670] rt^3/trunk/src/GS/geoclient.cxx
Revision: 41670 http://brlcad.svn.sourceforge.net/brlcad/?rev=41670view=rev Author: davidloman Date: 2010-12-16 19:03:53 + (Thu, 16 Dec 2010) Log Message: --- Remove a bunch of antiquated code. New Cmd handler system handles all this now. Modified Paths: -- rt^3/trunk/src/GS/geoclient.cxx Modified: rt^3/trunk/src/GS/geoclient.cxx === --- rt^3/trunk/src/GS/geoclient.cxx 2010-12-16 19:03:21 UTC (rev 41669) +++ rt^3/trunk/src/GS/geoclient.cxx 2010-12-16 19:03:53 UTC (rev 41670) @@ -23,177 +23,21 @@ * */ -#include GeometryService.h -#include libjob.h -#include libutility.h -#include libevent.h -#include libnet.h +#include GSClient.h -#include string -#include iostream -#include stdlib.h - -#include QtCore/QString -#include QtCore/QStringList - -bool stayRun = true; -std::string prompt =geoclient ; - -void -logInfo(QString s) -{ - Logger::getInstance()-logINFO(geoclient, s); -} - -void -logBanner(QString s) -{ - Logger::getInstance()-logBANNER(geoclient, s); -} - -/** - * Prints the 'usage' statement to the console along with an optional message - */ -void -printUsage(std::string customMsg) { - if (customMsg.length() 0) { - customMsg += \n; - QString s(customMsg.c_str()); - logInfo(s); - } - logInfo(Usage: geoclient\n); - - return; -} - -void -handleSendShutdown(QString host, quint16 port, QString uname, QString passwd) { - - /* Log */ - QString s(Trying to connect to ); - s.append(host); - s.append(:); - s.append(QString::number(port)); - logInfo(s); - - PortalManager pm; - pm.start(); - Portal* p = pm.connectToHost(host, port); - GSThread::msleep(250); - - if (p == NULL){ - pm.shutdown(); - logInfo(Connection failed.); - return; - } - - /* Authenticate */ - /* TODO Make session AUTH */ - - NewSessionReqMsg nsrm(uname, passwd); - p-send(nsrm); - GSThread::msleep(1250); - - //Send Shutdown - TypeOnlyMsg tom(CMD_SHUTDOWN); - p-sendThenDisconnect(tom); - GSThread::msleep(250); - pm.shutdown(); - - delete p; -} - - -void -processIn(std::string in) { - QString qin(in.c_str()); - - //convert to lowercase - qin = qin.toLower(); - -//split string - QStringList list = qin.split( ); - - //check to see if there is at least one element - if (list.length() = 0) { - return; - } - QString cmd = list.takeAt(0); - -if (cmd == exit || cmd == quit) { - stayRun = false; - return; - } - -if (cmd == test01) { - processIn(sendshutdown localhost 5309 guest guest); - return; -} - -if (cmd == test02) { - processIn(sendshutdown localhost 5309 g g); - return; -} - -if(cmd == sendshutdown) { - if (list.size() !=4 ) { - logInfo(useage: sendshutdown ip port uname passwd); - return; - } - - QString host = list.at(0); - quint16 port = atoi(list.at(1).toStdString().c_str()); - QString uname = list.at(2); - QString passwd = list.at(3); - - if (port =0 || host.length() == 0 || uname.length() == 0 || passwd.length() == 0){ - logInfo(useage: sendshutdown ip port uname passwd); - return; - } - - handleSendShutdown(host, port, uname, passwd); - return; - } - - logInfo(\tunknown command: ' + cmd + '); -} - -/* - * = - * - *Main - * - * = - */ - int main(int argc, char* argv[]) { - Logger::getInstance(); - JobManager::getInstance()-startup(); - - logBanner(==); - logBanner(GeometryService Test/Stress Client); - logBanner(==); - - std::string in; - while (stayRun) { - in == ; - std::cout prompt; - getline (std::cin, in); - - processIn(in); - } - - logInfo(Exiting.); -return 0; + GSClient gsClient; +return gsClient.run(); } -// Local Variables: -// tab-width: 8 -// mode: C++ -// c-basic-offset: 4 -// indent-tabs-mode: t -// c-file-style: stroustrup -// End: -// ex: shiftwidth=4 tabstop=8 +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: stroustrup + * End: + * ex: shiftwidth=4 tabstop=8 + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment
[brlcad-commits] SF.net SVN: brlcad:[41671] brlcad/trunk/src/other/tcl/unix/Makefile.in
Revision: 41671 http://brlcad.svn.sourceforge.net/brlcad/?rev=41671view=rev Author: starseeker Date: 2010-12-16 19:17:12 + (Thu, 16 Dec 2010) Log Message: --- Put some tabs in instead of spaces. Modified Paths: -- brlcad/trunk/src/other/tcl/unix/Makefile.in Modified: brlcad/trunk/src/other/tcl/unix/Makefile.in === --- brlcad/trunk/src/other/tcl/unix/Makefile.in 2010-12-16 19:03:53 UTC (rev 41670) +++ brlcad/trunk/src/other/tcl/unix/Makefile.in 2010-12-16 19:17:12 UTC (rev 41671) @@ -392,7 +392,7 @@ $(GENERIC_DIR)/tclNamesp.c \ $(GENERIC_DIR)/tclNotify.c \ $(GENERIC_DIR)/tclObj.c \ -$(GENERIC_DIR)/tclParse.c \ + $(GENERIC_DIR)/tclParse.c \ $(GENERIC_DIR)/tclPathObj.c \ $(GENERIC_DIR)/tclPipe.c \ $(GENERIC_DIR)/tclPkg.c \ @@ -744,15 +744,15 @@ @$(INSTALL_PROGRAM) ${TCL_EXE} $(BIN_INSTALL_DIR)/tclsh$(VERSION)@EXEEXT@ @echo Installing ${TCL_EXE} as $(BIN_INSTALL_DIR)/tclsh @$(INSTALL_PROGRAM) ${TCL_EXE} $(BIN_INSTALL_DIR)/tclsh -@echo Installing tclConfig.sh to $(LIB_INSTALL_DIR)/ -@$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh + @echo Installing tclConfig.sh to $(LIB_INSTALL_DIR)/ + @$(INSTALL_DATA) tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh @if test $(STUB_LIB_FILE) != ; then \ echo Installing $(STUB_LIB_FILE) to $(LIB_INSTALL_DIR)/; \ @INSTALL_STUB_LIB@ ; \ chmod 775 $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; \ if test -f libtclstub.a ; then \ - $(INSTALL_LIBRARY) libtclstub.a $(LIB_INSTALL_DIR)/libtclstub.a ; \ - chmod 775 $(LIB_INSTALL_DIR)/libtclstub.a ; \ + $(INSTALL_LIBRARY) libtclstub.a $(LIB_INSTALL_DIR)/libtclstub.a ; \ + chmod 775 $(LIB_INSTALL_DIR)/libtclstub.a ; \ fi ; \ fi @EXTRA_INSTALL_BINARIES@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41672]
Revision: 41672 http://brlcad.svn.sourceforge.net/brlcad/?rev=41672view=rev Author: davidloman Date: 2010-12-16 19:17:28 + (Thu, 16 Dec 2010) Log Message: --- Move ClientCmd registration and NetMsgRoute registration to their own functions for clarity's sake. Also, made GSClient a INetMsgHandler and inserted handling functions. Modified Paths: -- rt^3/trunk/include/GSClient.h rt^3/trunk/src/GS/GSClient.cxx Modified: rt^3/trunk/include/GSClient.h === --- rt^3/trunk/include/GSClient.h 2010-12-16 19:17:12 UTC (rev 41671) +++ rt^3/trunk/include/GSClient.h 2010-12-16 19:17:28 UTC (rev 41672) @@ -26,10 +26,8 @@ #define __GSCLIENT_H__ #include ClientCmdRegistry.h -#include Logger.h -#include JobManager.h -#include PortalManager.h -#include Portal.h +#include libutility.h +#include libnet.h #include QtCore/QString #include QtCore/QStringList @@ -38,7 +36,10 @@ #include iostream #include stdlib.h -class GSClient { +class LoginCmd; +class GSClient: public INetMsgHandler { + friend class LoginCmd; + public: GSClient(); virtual ~GSClient(); @@ -46,13 +47,18 @@ int run(); void stopRun(); +bool handleNetMsg(NetMsg* msg); bool execCmd(QString cmd, QStringList args); + PortalManager* getPortMan(); Portal* getCurrentPortal(); protected: private: + void registerClientCmds(); + void registerMsgRoutes(); + ClientCmdRegistry* ccReg; Logger* log; JobManager* jobMan; Modified: rt^3/trunk/src/GS/GSClient.cxx === --- rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 19:17:12 UTC (rev 41671) +++ rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 19:17:28 UTC (rev 41672) @@ -23,6 +23,8 @@ */ #include GSClient.h +#include NetMsgRouter.h + #include AbstractClientCmd.h #include ExitCmd.h #include HelpCmd.h @@ -42,6 +44,17 @@ this-stayRun = true; this-prompt = defaultPrompt; + this-registerClientCmds(); + this-registerMsgRoutes(); +} + +GSClient::~GSClient() { + delete this-portMan; +} + +void +GSClient::registerClientCmds() +{ /* Command Registrations */ this-ccReg-registerCmd(new HelpCmd()); this-ccReg-registerCmd(new ExitCmd()); @@ -50,10 +63,29 @@ this-ccReg-registerCmd(new ShutdownCmd()); } -GSClient::~GSClient() { - delete this-portMan; +void +GSClient::registerMsgRoutes() +{ + NetMsgRouter* router = NetMsgRouter::getInstance(); + + router-registerType(DISCONNECTREQ, this-portMan); + router-registerType(SESSIONINFO, this); } +bool +GSClient::handleNetMsg(NetMsg* msg) +{ + quint16 type = msg-getMsgType(); + switch(type) { + case SESSIONINFO: + QString data =((SessionInfoMsg*)msg)-toString(); + log-logINFO(GSClient, Received SessionInfo: + data); + return true; + } + return false; +} + + int GSClient::run() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41673] rt^3/trunk/src/GS/cmds/LoginCmd.cxx
Revision: 41673 http://brlcad.svn.sourceforge.net/brlcad/?rev=41673view=rev Author: davidloman Date: 2010-12-16 19:50:31 + (Thu, 16 Dec 2010) Log Message: --- Implement portal connection, null checking, handshakes, waits and authentications for Login. Modified Paths: -- rt^3/trunk/src/GS/cmds/LoginCmd.cxx Modified: rt^3/trunk/src/GS/cmds/LoginCmd.cxx === --- rt^3/trunk/src/GS/cmds/LoginCmd.cxx 2010-12-16 19:17:28 UTC (rev 41672) +++ rt^3/trunk/src/GS/cmds/LoginCmd.cxx 2010-12-16 19:50:31 UTC (rev 41673) @@ -26,6 +26,7 @@ #include LoginCmd.h #include PortalManager.h +#include NewSessionReqMsg.h LoginCmd::LoginCmd() : AbstractClientCmd(login){} LoginCmd::~LoginCmd() {} @@ -49,6 +50,7 @@ return false; } + /* Convert args to proper types */ QString host = args.at(0); quint16 port = atoi(args.at(1).toStdString().c_str()); QString uname = args.at(2); @@ -62,6 +64,34 @@ PortalManager* pm = client-getPortMan(); + if (pm == NULL) { + this-log-logERROR(LoginCmd, NULL PortalManager, cannot connect.); + return false; + } + + Portal* p = pm-connectToHost(host, port); + + if (p == NULL) { + this-log-logERROR(LoginCmd, Failed to open new Portal, cannot connect.); + return false; + } + + /* Give the Portal some time to handshake. */ + GSThread::msleep(100); + + /* This is an ugly way to do this, 'friend' is needed in GSClient.h */ + client-currentPortal = p; + + /* Authenticate */ + NewSessionReqMsg nsrm(uname, passwd); + p-send(nsrm); + + GSThread::msleep(100); + + QString remNodename = p-getRemoteNodeName(); + this-log-logINFO(LoginCmd, Connected to: ' + remNodename+ '.); + + return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41674] rt^3/trunk/src/GS/cmds/LogoutCmd.cxx
Revision: 41674 http://brlcad.svn.sourceforge.net/brlcad/?rev=41674view=rev Author: davidloman Date: 2010-12-16 19:51:07 + (Thu, 16 Dec 2010) Log Message: --- Instead of having LogoutCmd just disconnect the socket, send a DisconnectReq and have the server drop the socket instead. This keeps both sides informed. Modified Paths: -- rt^3/trunk/src/GS/cmds/LogoutCmd.cxx Modified: rt^3/trunk/src/GS/cmds/LogoutCmd.cxx === --- rt^3/trunk/src/GS/cmds/LogoutCmd.cxx2010-12-16 19:50:31 UTC (rev 41673) +++ rt^3/trunk/src/GS/cmds/LogoutCmd.cxx2010-12-16 19:51:07 UTC (rev 41674) @@ -26,6 +26,7 @@ #include LogoutCmd.h #include PortalManager.h +#include TypeOnlyMsg.h LogoutCmd::LogoutCmd() : AbstractClientCmd(logout) {} LogoutCmd::~LogoutCmd() {} @@ -42,8 +43,21 @@ bool LogoutCmd::_exec(GSClient* client, QStringList args){ - PortalManager* pm = client-getPortMan(); + Portal* p = client-getCurrentPortal(); + /* Check to see if we are connected */ + if (p == NULL) { + this-log-logWARNING(ShutdownCmd,Current Portal returned NULL. Cannot send Shutdown Msg.); + return false; + } + + TypeOnlyMsg msg(DISCONNECTREQ); + p-send(msg); + + /* This is an ugly way to do this, 'friend' is needed in GSClient.h */ + client-currentPortal = NULL; + + return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41675] rt^3/trunk/src/libNet/PortalManager.cxx
Revision: 41675 http://brlcad.svn.sourceforge.net/brlcad/?rev=41675view=rev Author: davidloman Date: 2010-12-16 19:55:15 + (Thu, 16 Dec 2010) Log Message: --- Hrm, seems there is still an underlying issue with libpkg pulling data from the sockets buffer just prior to a data send on that socket, yet not firing the callback. Re-hotwire libNet's selector look to check all FD's each loop pass. Modified Paths: -- rt^3/trunk/src/libNet/PortalManager.cxx Modified: rt^3/trunk/src/libNet/PortalManager.cxx === --- rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-16 19:51:07 UTC (rev 41674) +++ rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-16 19:55:15 UTC (rev 41675) @@ -111,7 +111,7 @@ /* Shelect!! */ int retVal = select(fdmax + 1, readfds, NULL, exceptionfds, timeout); - /* + /**/ if (retVal != 0) { QString out(Select returned: ); out.append(QString::number(retVal)); @@ -121,7 +121,7 @@ out.append(QString::number(fdmax)); this-log-logINFO(PortalManager, out); } -*/ +/**/ if (retVal 0) { /* got a selector error */ @@ -141,7 +141,7 @@ /* Simplify switching later with bools now*/ isListener = (i == listener); - readyRead = FD_ISSET(i, readfds) !isListener; + readyRead = true; /*FD_ISSET(i, readfds) !isListener;*/ readyAccept = FD_ISSET(i, readfds) isListener; readyException = FD_ISSET(i, exceptionfds); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41676] rt^3/trunk/src/GS/GSClient.cxx
Revision: 41676 http://brlcad.svn.sourceforge.net/brlcad/?rev=41676view=rev Author: davidloman Date: 2010-12-16 19:56:50 + (Thu, 16 Dec 2010) Log Message: --- Move ClientCmd registration and NetMsgRoute registration to their own functions for clarity's sake. Also, made GSClient a INetMsgHandler and inserted handling functions. Still seeing a small issue with connection restarts (aka login, logout, login). The selector loop seems to either stall out or not recognize the newer FD. Modified Paths: -- rt^3/trunk/src/GS/GSClient.cxx Modified: rt^3/trunk/src/GS/GSClient.cxx === --- rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 19:55:15 UTC (rev 41675) +++ rt^3/trunk/src/GS/GSClient.cxx 2010-12-16 19:56:50 UTC (rev 41676) @@ -38,7 +38,12 @@ this-ccReg = ClientCmdRegistry::getInstance(); this-log = Logger::getInstance(); this-jobMan = JobManager::getInstance(); + this-jobMan-startup(); + this-portMan = new PortalManager(); + this-portMan-start(); + GSThread::msleep(100); + this-currentPortal = NULL; this-stayRun = true; @@ -102,6 +107,10 @@ /* make a qstring */ QString qin(in.c_str()); + /* cathc zero length strings here */ + if (qin.length() == 0) + continue; + /* convert to lowercase */ qin = qin.toLower(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41677] rt^3/trunk/include/GSClient.h
Revision: 41677 http://brlcad.svn.sourceforge.net/brlcad/?rev=41677view=rev Author: davidloman Date: 2010-12-16 19:57:12 + (Thu, 16 Dec 2010) Log Message: --- Straggler file from last commit. Oopsie. Modified Paths: -- rt^3/trunk/include/GSClient.h Modified: rt^3/trunk/include/GSClient.h === --- rt^3/trunk/include/GSClient.h 2010-12-16 19:56:50 UTC (rev 41676) +++ rt^3/trunk/include/GSClient.h 2010-12-16 19:57:12 UTC (rev 41677) @@ -37,8 +37,10 @@ #include stdlib.h class LoginCmd; +class LogoutCmd; class GSClient: public INetMsgHandler { friend class LoginCmd; + friend class LogoutCmd; public: GSClient(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41678] brlcad/trunk/src/libbu/vls.c
Revision: 41678 http://brlcad.svn.sourceforge.net/brlcad/?rev=41678view=rev Author: bob1961 Date: 2010-12-16 20:07:18 + (Thu, 16 Dec 2010) Log Message: --- Updated bu_argv_from_string to handle double quotes. This is for cases where an argument contains spaces (i.e. like in a path). Modified Paths: -- brlcad/trunk/src/libbu/vls.c Modified: brlcad/trunk/src/libbu/vls.c === --- brlcad/trunk/src/libbu/vls.c2010-12-16 19:57:12 UTC (rev 41677) +++ brlcad/trunk/src/libbu/vls.c2010-12-16 20:07:18 UTC (rev 41678) @@ -501,6 +501,7 @@ { int argc = 0; /* number of words seen */ int skip = 0; +int quoted = 0; if (UNLIKELY(!argv)) { /* do this instead of crashing */ @@ -528,8 +529,33 @@ for (; *lp != '\0'; lp++) { + if (*lp == '') { + if (!quoted) { + /* start collecting quoted string */ + quoted = 1; + + /* skip past the quote character */ + argv[argc] = lp + 1; + continue; + } + + /* end qoute */ + quoted = 0; + *lp++ = '\0'; + + /* skip leading whitespace */ + while (*lp != '\0' isspace(*lp)) { + /* null out spaces */ + *lp = '\0'; + lp++; + } + + skip = 0; + goto nextword; + } + /* skip over current word */ - if (!isspace(*lp)) + if (quoted || !isspace(*lp)) continue; skip = 0; @@ -545,6 +571,7 @@ if (*(lp + skip) == '\0') break; +nextword: /* make sure argv[] isn't full, need room for NULL */ if (argc = lim-1) break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41680] brlcad/trunk/src/mged/tedit.c
Revision: 41680 http://brlcad.svn.sourceforge.net/brlcad/?rev=41680view=rev Author: bob1961 Date: 2010-12-16 20:09:24 + (Thu, 16 Dec 2010) Log Message: --- Use double quotes in WIN_EDITOR to keep bu_argv_from_string from seeing this as multiple arguments. Modified Paths: -- brlcad/trunk/src/mged/tedit.c Modified: brlcad/trunk/src/mged/tedit.c === --- brlcad/trunk/src/mged/tedit.c 2010-12-16 20:07:27 UTC (rev 41679) +++ brlcad/trunk/src/mged/tedit.c 2010-12-16 20:09:24 UTC (rev 41680) @@ -51,7 +51,7 @@ extern int classic_mged; /* editors to test, in order of discovery preference (EDITOR overrides) */ -#define WIN_EDITOR c:/Program Files/Windows NT/Accessories/wordpad +#define WIN_EDITOR \c:/Program Files/Windows NT/Accessories/wordpad\ #define MAC_EDITOR /Applications/TextEdit.app/Contents/MacOS/TextEdit #define EMACS_EDITOR emacs #define JOVE_EDITOR jove This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41681] brlcad/trunk/misc/win32-msvc8/tclsh/library/ installTree.tcl
Revision: 41681 http://brlcad.svn.sourceforge.net/brlcad/?rev=41681view=rev Author: bob1961 Date: 2010-12-16 20:21:52 + (Thu, 16 Dec 2010) Log Message: --- Copy the appropriate redist, depending on the platform. Modified Paths: -- brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl Modified: brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl === --- brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl 2010-12-16 20:09:24 UTC (rev 41680) +++ brlcad/trunk/misc/win32-msvc8/tclsh/library/installTree.tcl 2010-12-16 20:21:52 UTC (rev 41681) @@ -305,11 +305,21 @@ puts \[12 of 15] COPYING REDIST FILES catch { if {[info exists C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT]} { - copy_stuff C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT [file join $installDir bin] - copy_stuff C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.MFC [file join $installDir bin] + if {$platform == x64} { + copy_stuff C:/Program Files/Microsoft Visual Studio 8/VC/redist/amd64/Microsoft.VC80.CRT [file join $installDir bin] + copy_stuff C:/Program Files/Microsoft Visual Studio 8/VC/redist/amd64/Microsoft.VC80.MFC [file join $installDir bin] + } else { + copy_stuff C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT [file join $installDir bin] + copy_stuff C:/Program Files/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.MFC [file join $installDir bin] + } } else { - copy_stuff C:/Program Files (x86)/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT [file join $installDir bin] - copy_stuff C:/Program Files (x86)/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.MFC [file join $installDir bin] + if {$platform == x64} { + copy_stuff C:/Program Files (x86)/Microsoft Visual Studio 8/VC/redist/amd64/Microsoft.VC80.CRT [file join $installDir bin] + copy_stuff C:/Program Files (x86)/Microsoft Visual Studio 8/VC/redist/amd64/Microsoft.VC80.MFC [file join $installDir bin] + } else { + copy_stuff C:/Program Files (x86)/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.CRT [file join $installDir bin] + copy_stuff C:/Program Files (x86)/Microsoft Visual Studio 8/VC/redist/x86/Microsoft.VC80.MFC [file join $installDir bin] + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41682] brlcad/trunk/src/other/openNURBS/ opennurbs_revsurface.cpp
Revision: 41682 http://brlcad.svn.sourceforge.net/brlcad/?rev=41682view=rev Author: indianlarry Date: 2010-12-16 20:37:55 + (Thu, 16 Dec 2010) Log Message: --- Fixed issue with revolved surface bounding box. Submitted to opennurbs forum for review. Modified Paths: -- brlcad/trunk/src/other/openNURBS/opennurbs_revsurface.cpp Modified: brlcad/trunk/src/other/openNURBS/opennurbs_revsurface.cpp === --- brlcad/trunk/src/other/openNURBS/opennurbs_revsurface.cpp 2010-12-16 20:21:52 UTC (rev 41681) +++ brlcad/trunk/src/other/openNURBS/opennurbs_revsurface.cpp 2010-12-16 20:37:55 UTC (rev 41682) @@ -1493,7 +1493,13 @@ rc = m_curve-GetBoundingBox( cbox ); if (rc) { - bbox = cbox; +#if 1 + /* + * does not account for start angle of revolve + */ +#else +bbox = cbox; +#endif ON_3dPointArray corners; cbox.GetCorners(corners); ON_3dPoint P; @@ -1522,7 +1528,21 @@ if ( arc.IsValid() ) { abox = arc.BoundingBox(); -bbox.Union(abox); +#if 1 +/* + * modified so that first time through corner loop arc bbox initializes + * overall surface bbox since arc already accounts for start and stop angles + * of revolve + */ +if (i==0) { + bbox = abox; +} else { + bbox.Union(abox); +} + +#else + bbox.Union(abox); +#endif } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41683] brlcad/trunk
Revision: 41683 http://brlcad.svn.sourceforge.net/brlcad/?rev=41683view=rev Author: indianlarry Date: 2010-12-16 21:00:28 + (Thu, 16 Dec 2010) Log Message: --- Now using opennurbs bounding box routines. Also separated surface flatness into flatness and straightness, where straightness measures in planar bending of the surface. Modified Paths: -- brlcad/trunk/include/opennurbs_ext.h brlcad/trunk/src/librt/opennurbs_ext.cpp Modified: brlcad/trunk/include/opennurbs_ext.h === --- brlcad/trunk/include/opennurbs_ext.h2010-12-16 20:37:55 UTC (rev 41682) +++ brlcad/trunk/include/opennurbs_ext.h2010-12-16 21:00:28 UTC (rev 41683) @@ -77,7 +77,8 @@ #define BREP_MAX_LN_DEPTH 20 #define SIGN(x) ((x) = 0 ? 1 : -1) /* Surface flatness parameter, Abert says between 0.8-0.9 */ -#define BREP_SURFACE_FLATNESS 0.8 +#define BREP_SURFACE_FLATNESS 0.85 +#define BREP_SURFACE_STRAIGHTNESS 0.75 /* Max newton iterations when finding closest point */ #define BREP_MAX_FCP_ITERATIONS 50 /* Root finding epsilon */ @@ -1425,6 +1426,7 @@ private: bool isFlat(const ON_Surface* surf, ON_Plane frames[], ON_3dVector normals[], ON_3dPoint corners[], const ON_Interval u, const ON_Interval v); +bool isStraight(const ON_Surface* surf, ON_Plane frames[], ON_3dVector normals[], ON_3dPoint corners[], const ON_Interval u, const ON_Interval v); fastf_t isFlatU(const ON_Surface* surf, ON_Plane frames[], ON_3dVector normals[], ON_3dPoint corners[], const ON_Interval u, const ON_Interval v); fastf_t isFlatV(const ON_Surface* surf, ON_Plane frames[], ON_3dVector normals[], ON_3dPoint corners[], const ON_Interval u, const ON_Interval v); BBNode* subdivideSurfaceByKnots(const ON_Surface *localsurf, const ON_Interval u, const ON_Interval v, ON_Plane frames[], ON_3dPoint corners[], ON_3dVector normals[], int depth, int depthLimit); Modified: brlcad/trunk/src/librt/opennurbs_ext.cpp === --- brlcad/trunk/src/librt/opennurbs_ext.cpp2010-12-16 20:37:55 UTC (rev 41682) +++ brlcad/trunk/src/librt/opennurbs_ext.cpp2010-12-16 21:00:28 UTC (rev 41683) @@ -747,16 +747,16 @@ ON_BoundingBox bbox = localsurf-BoundingBox(); VSETALL(buffer, BREP_EDGE_MISS_TOLERANCE); -VSETALL(min, MAX_FASTF); -VSETALL(max, -MAX_FASTF); -for (int i = 0; i 9; i++) { - VMINMAX(min, max, ((double*)m_corners[i])); +//VSETALL(min, MAX_FASTF); +//VSETALL(max, -MAX_FASTF); +//for (int i = 0; i 9; i++) { + //VMINMAX(min, max, ((double*)m_corners[i])); //bu_log(in c%d_%d sph %f %f %f %f\n, bb_cnt, i, m_corners[i].x, m_corners[i].y, m_corners[i].z, 1.0); -} +//} //bu_log(in bb%d rpp %f %f %f %f %f %f\n, bb_cnt, min[0], max[0], min[1], max[1], min[2], max[2]); -//VMOVE(min,bbox.Min()); -//VMOVE(max,bbox.Max()); +VMOVE(min,bbox.Min()); +VMOVE(max,bbox.Max()); //bu_log(in b%d rpp %f %f %f %f %f %f\n, bb_cnt++, bbox.m_min.x, bbox.m_max.x, bbox.m_min.y, bbox.m_max.y, bbox.m_min.z, bbox.m_max.z); //bu_log(in bc%d rpp %f %f %f %f %f %f\n, bb_cnt++, min[0], max[0], min[1], max[1], min[2], max[2]); @@ -777,11 +777,11 @@ VSUB2(min, min, buffer); VADD2(max, max, buffer); - VSUB2(delta, max, min); +/* VSUB2(delta, max, min); VSCALE(delta, delta, BBOX_GROW_3D); VSUB2(min, min, delta); VADD2(max, max, delta); - +*/ TRACE(creating leaf: u( u.Min() , u.Max() ) v( v.Min() , v.Max() )); node = new BBNode(ctree, ON_BoundingBox(ON_3dPoint(min), @@ -1417,6 +1417,7 @@ } else { //return surfaceBBox(localsurf, true, corners, normals, u, v); //parent-addChild(subdivideSurface(localsurf, u, v, frames, corners, normals,0)); + ((ON_Surface *)localsurf)-ClearBoundingBox(); return subdivideSurface(localsurf, u, v, frames, corners, normals,0, depthLimit); } delete [] spanu; @@ -1468,8 +1469,9 @@ double width,height; double ratio = 5.0; localsurf-GetSurfaceSize(width, height); - if (((width/height ratio) (width/height 1.0/ratio)) -(isFlat(localsurf, frames, normals, corners, u, v)) || (divDepth = depthLimit)) { //BREP_MAX_FT_DEPTH))) { + if width/height ratio) (width/height 1.0/ratio)) +isFlat(localsurf, frames, normals, corners, u, v) +isStraight(localsurf, frames, normals, corners, u, v)) || (divDepth = depthLimit)) { //BREP_MAX_FT_DEPTH))) { return surfaceBBox(localsurf, true, corners, normals, u, v); } else { fastf_t uflat = isFlatU(localsurf, frames, normals, corners, u, v); @@ -2078,6
[brlcad-commits] SF.net SVN: brlcad:[41684] brlcad/trunk/src/other/tcl/generic/tclPlatDecls. h
Revision: 41684 http://brlcad.svn.sourceforge.net/brlcad/?rev=41684view=rev Author: bob1961 Date: 2010-12-16 21:50:29 + (Thu, 16 Dec 2010) Log Message: --- Added this bit of code from the previous version of tclPlatDecls.h to get things compiling on windows again. Modified Paths: -- brlcad/trunk/src/other/tcl/generic/tclPlatDecls.h Modified: brlcad/trunk/src/other/tcl/generic/tclPlatDecls.h === --- brlcad/trunk/src/other/tcl/generic/tclPlatDecls.h 2010-12-16 21:00:28 UTC (rev 41683) +++ brlcad/trunk/src/other/tcl/generic/tclPlatDecls.h 2010-12-16 21:50:29 UTC (rev 41684) @@ -26,13 +26,19 @@ /* * Pull in the typedef of TCHAR for windows. */ -#if defined(__WIN32__) !defined(_TCHAR_DEFINED) +#if defined(__CYGWIN__) +typedef char TCHAR; +#elif defined(__WIN32__) !defined(_TCHAR_DEFINED) # include tchar.h # ifndef _TCHAR_DEFINED /* Borland seems to forget to set this. */ - typedef _TCHAR TCHAR; +typedef _TCHAR TCHAR; # define _TCHAR_DEFINED # endif +# if defined(_MSC_VER) defined(__STDC__) + /* MSVC++ misses this. */ + typedef _TCHAR TCHAR; +# endif #endif /* !BEGIN!: Do not edit below this line. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ 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:[41685] brlcad/trunk/src/libbn
Revision: 41685 http://brlcad.svn.sourceforge.net/brlcad/?rev=41685view=rev Author: r_weiss Date: 2010-12-17 00:24:26 + (Fri, 17 Dec 2010) Log Message: --- Updated the 'bntester' tool used to test 'libbn' functions. The basic framework for testing the 'bn_distsq_line3_pt3' function is almost complete. The code was written to make it easy to add new functions to test. Placed some sample test data within 'bntester.dat' which was obtained by capturing real data passed in/out of the 'bn_distsq_line3_pt3' function while running the mged 'ev' command. Modified Paths: -- brlcad/trunk/src/libbn/bntester.c brlcad/trunk/src/libbn/bntester.dat Modified: brlcad/trunk/src/libbn/bntester.c === --- brlcad/trunk/src/libbn/bntester.c 2010-12-16 21:50:29 UTC (rev 41684) +++ brlcad/trunk/src/libbn/bntester.c 2010-12-17 00:24:26 UTC (rev 41685) @@ -29,15 +29,277 @@ #include bn.h +static char *usage=Usage: bntester [-c test_case_number] [-f function_number] -i input_file -o output_file\n; + int -main(int argc, char **argv) +parse_case(char *buf_p, int *i, long *l, double *d, unsigned long *u, char *fmt_str, int line_num, int case_idx) { -bu_log(%s: %d args\n, argv[0], argc); +int i_idx; +int l_idx; +int d_idx; +int u_idx; +int idx; +int fmt_str_len; +char *endp; +fmt_str_len = strlen(fmt_str); + +for (idx = 0 ; idx fmt_str_len ; idx++) { +buf_p = strtok(NULL, ,); + +if ((buf_p == NULL) (idx != fmt_str_len-1)) { +bu_log(missing parameter(s) for test case %d on line %d\n, case_idx, line_num); +return EXIT_FAILURE; +} + +switch (fmt_str[idx]) { +case 'd' : /* double */ +d[d_idx] = strtod(buf_p, endp); +if (!((buf_p != endp) (*endp == '\0'))) { +/* 2 is added to idx since the user numbers the parameters + * starting with 1 but internally they start at 0, also idx + * starts a the 2nd parameter in the data file since the first + * parameter is always the function number, so we need to add + * again to the idx to correspond to the parameter in the data + * file + */ +bu_log(Convert to double failed, line %d test case %d parameter %d string '%s'\n, + line_num, case_idx, idx+2, buf_p); +return EXIT_FAILURE; +} +d_idx++; +break; +case 'l' : /* long int */ +l[l_idx] = strtol(buf_p, endp, 10); +if (!((buf_p != endp) (*endp == '\0'))) { +bu_log(Convert to long int failed, line %d test case %d parameter %d string '%s'\n, + line_num, case_idx, idx+2, buf_p); +return EXIT_FAILURE; +} +l_idx++; +break; +default: +bu_log(unknown data type '%c'\n, fmt_str[idx]); +return EXIT_FAILURE; +break; +} /* end of data format switch */ +} /* end of for loop traversing data format string */ + return 0; } +int +main(int argc, char **argv) +{ +char buf[BUFSIZ]; +char input_file_name[BUFSIZ]; +char output_file_name[BUFSIZ]; +int input_file_name_defined = 0; +int output_file_name_defined = 0; +FILE *fp_in; +FILE *fp_out; +char *endp; +long int case_num; +int process_single_case = 0; +int function_num_defined = 0; +long int function_num; +int string_length; +char c; +int early_exit = 0; +int found_eof = 0; +int i[50]; +long l[50]; +double d[50]; +unsigned long u[50]; +char io_fmt[50]; /* input-output format string */ +char dt_fmt[50]; /* data type format string */ +int ret = 0; +char *buf_p1; +char *buf_p; +int case_idx = 0; +int line_num = 0; +struct bn_tol tol; + +tol.magic = BN_TOL_MAGIC; +tol.dist = 0.0005; +tol.dist_sq = tol.dist * tol.dist; +tol.perp = 1e-6; +tol.para = 1.0 - tol.perp; + + +if (argc 3) { +bu_log(Too few parameters, %d specified, at least 2 required\n, argc - 1); +bu_exit(EXIT_FAILURE, usage); +} + +while ((c = bu_getopt(argc, argv, c:f:i:o:)) != EOF) { +switch (c) { +case 'c': /* test case number */ +case_num = strtol(bu_optarg, endp, 10); +if ((bu_optarg != endp) (*endp == '\0')) { +/* convert to long integer success */ +process_single_case = 1; +} else { +/* convert to long integer failed */ +bu_exit(EXIT_FAILURE, usage); +} +