Revision: 45951
http://brlcad.svn.sourceforge.net/brlcad/?rev=45951&view=rev
Author: bhinesley
Date: 2011-08-12 21:11:20 +0000 (Fri, 12 Aug 2011)
Log Message:
-----------
suboptions (-x/-y/-z) were erroneously detected as primary options, triggering
a syntax error
Modified Paths:
--------------
brlcad/trunk/src/libged/edit.c
Modified: brlcad/trunk/src/libged/edit.c
===================================================================
--- brlcad/trunk/src/libged/edit.c 2011-08-12 21:09:41 UTC (rev 45950)
+++ brlcad/trunk/src/libged/edit.c 2011-08-12 21:11:20 UTC (rev 45951)
@@ -2164,13 +2164,13 @@
ged_edit(struct ged *gedp, int argc, const char *argv[])
{
const char *const cmd_name = argv[0];
+ union edit_cmd subcmd;
const char *subcmd_name = NULL;
struct edit_arg *cur_arg;
struct edit_arg *keypoint;
- union edit_cmd subcmd;
+ static const char *const usage = "[subcommand] [args]";
int idx_cur_opt = 0; /* pos in options array for current arg */
int conv_flags = 0; /* for edit_strs_to_arg */
- static const char *const usage = "[subcommand] [args]";
int i; /* iterator */
int c; /* for bu_getopt */
int ret;
@@ -2432,12 +2432,13 @@
if ((strlen(bu_optarg) > 1) && (bu_optarg[0] == '-') &&
(!isdigit(bu_optarg[1])))
goto err_missing_arg;
- if (idx_cur_opt == 0) {
+ if (idx_cur_opt != 0) {
bu_vls_printf(gedp->ged_result_str, "-%c must follow an"
- "argument specification option", c);
+ " argument specification option", c);
edit_cmd_free(&subcmd);
return GED_ERROR;
}
+ ++idx_cur_opt;
break;
case 'k': /* standard arg specification options */
case 'a':
@@ -2529,7 +2530,6 @@
if (argc == 0)
break; /* no more args */
cur_arg = edit_arg_postfix_new(subcmd.cmd_line.args);
- idx_cur_opt = 0;
}
/* conversion moves argc/argv, so re-init bu_getopt() */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
Subversion made easy with a complete admin console. Easy
to use, easy to manage, easy to install, easy to extend.
Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits