Revision: 44647
http://brlcad.svn.sourceforge.net/brlcad/?rev=44647&view=rev
Author: starseeker
Date: 2011-05-20 17:31:20 +0000 (Fri, 20 May 2011)
Log Message:
-----------
attr get and show should work in read-only databases - it's only when we
actually try to change something that we need to care about read-only.
Modified Paths:
--------------
brlcad/trunk/src/libged/attr.c
Modified: brlcad/trunk/src/libged/attr.c
===================================================================
--- brlcad/trunk/src/libged/attr.c 2011-05-20 15:19:32 UTC (rev 44646)
+++ brlcad/trunk/src/libged/attr.c 2011-05-20 17:31:20 UTC (rev 44647)
@@ -51,7 +51,6 @@
static const char *usage = "{set|get|show|rm|append} object [key [value]
... ]";
GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
- GED_CHECK_READ_ONLY(gedp, GED_ERROR);
GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
/* initialize result */
@@ -120,6 +119,7 @@
bu_avs_free(&avs);
} else if (BU_STR_EQUAL(argv[1], "set")) {
+ GED_CHECK_READ_ONLY(gedp, GED_ERROR);
/* setting attribute/value pairs */
if ((argc - 3) % 2) {
bu_vls_printf(&gedp->ged_result_str,
@@ -147,6 +147,7 @@
/* avs is freed by db5_update_attributes() */
} else if (BU_STR_EQUAL(argv[1], "rm")) {
+ GED_CHECK_READ_ONLY(gedp, GED_ERROR);
i = 3;
while (i < (size_t)argc) {
if (BU_STR_EQUAL(argv[i], "region")) {
@@ -165,6 +166,7 @@
/* avs is freed by db5_replace_attributes() */
} else if (BU_STR_EQUAL(argv[1], "append")) {
+ GED_CHECK_READ_ONLY(gedp, GED_ERROR);
if ((argc-3)%2) {
bu_vls_printf(&gedp->ged_result_str,
"Error: attribute names and values must be in
pairs!!!\n");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits