It seems that subst(str, oldstr,newstr), as defined in lstring.C, does
not modify str, but returns the modified version instead. However, a
quick grep shows that the code relies on a different behaviour:
fantomas: grep 'subst(' *.[Ch]
LyXSendto.C: subst(command, "$$FName",fname);
buffer.C: subst(cmd, "$$FName",fname1);
layout.C: subst(labelsep, 'x', ' ');
layout.C: subst(name, '_',' ');
layout.C: if (!l->Delete(subst(style, '_', ' ')))
lyx_cb.C: subst(help2, "$$FName",ps);
lyx_cb.C: subst(pages, ';',',');
lyx_cb.C: subst(pages, '+',',');
lyx_main.C: subst(binpath, '\\', '/');
lyx_sendfax_main.C: subst(cmd, "$$Host",host);
lyx_sendfax_main.C: subst(cmd, "$$Comment",comment);
lyx_sendfax_main.C: subst(cmd, "$$Enterprise",enterprise);
lyx_sendfax_main.C: subst(cmd, "$$Name",name);
lyx_sendfax_main.C: subst(cmd, "$$Phone",phone);
lyx_sendfax_main.C: subst(cmd, "$$FName",fname);
lyxfunc.C: subst(tmp, "$$FName",file);
lyxfunc.C: subst(tmp, "$$OutName",result);
lyxlex.C: string tmpmsg = subst(message, "$$Token", GetString());
So who is right? Should we change the code or the subst() functions?
JMarc