bug fix, incorrect handling of `co_spiceonly' commands

This commit is contained in:
rlar 2010-10-28 18:12:27 +00:00
parent 2b3bcfea74
commit ea8d250999
3 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2010-10-28 Robert Larice
* src/frontend/commands.c ,
* src/frontend/control.c :
bug fix, incorrect handling of `co_spiceonly' commands
http://sourceforge.net/tracker/?func=detail&aid=3092998&group_id=38962&atid=423915
2010-10-27 Robert Larice
* src/frontend/device.c :
bug fix, const data space was used, instead of malloced area

View File

@ -911,7 +911,7 @@ struct comm nutcp_coms[] = {
{ 0, 0, 0, 0 }, E_DEFHMASK, 3, 3,
NULL,
"varname s1 s2 : Set $varname to strcmp(s1, s2)." } ,
{ "linearize", NULL, FALSE, FALSE,
{ "linearize", com_linearize, TRUE, FALSE,
{ 040000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS,
NULL,
" [ vec ... ] : Convert plot into one with linear scale." } ,

View File

@ -209,11 +209,13 @@ docommand(wordlist *wlist)
s, cp_program);
goto out;
/* If it hasn't been implemented */
} else if (!cp_coms[i].co_func) {
fprintf(cp_err,"%s: command is not implemented\n", s);
goto out;
/* If it's there but spiceonly, and this is nutmeg, error. */
} else if (!cp_coms[i].co_func && ft_nutmeg &&
(cp_coms[i].co_spiceonly)) {
fprintf(cp_err,"%s: command available only in spice\n",
s);
} else if (ft_nutmeg && cp_coms[i].co_spiceonly) {
fprintf(cp_err,"%s: command available only in spice\n", s);
goto out;
}