git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5591 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2011-02-04 19:13:14 +00:00
parent 3ad614b04a
commit 89cbe1ceeb
9 changed files with 76 additions and 121 deletions

View File

@ -322,17 +322,17 @@ void Variable::set(int narg, char **arg)
}
/* ----------------------------------------------------------------------
single-value INDEX variable created by command-line argument
INDEX variable created by command-line argument
make it INDEX rather than STRING so cannot be re-defined in input script
------------------------------------------------------------------------- */
void Variable::set(char *name, char *value)
void Variable::set(char *name, int narg, char **arg)
{
char **newarg = new char*[3];
char **newarg = new char*[2+narg];
newarg[0] = name;
newarg[1] = (char *) "index";
newarg[2] = value;
set(3,newarg);
for (int i = 0; i < narg; i++) newarg[2+i] = arg[i];
set(2+narg,newarg);
delete [] newarg;
}