bin/mkpeep.pike:463:Too many arguments to sprintf. bin/mkpeep.pike:463:Expected: function(string(8), int(0..2147483647) : string) bin/mkpeep.pike:463:Got : function(string(8), int, string : void | mixed)
463: buf->add_line( sprintf("%*n}", ind, test) );
Er, I see now the problem is that »test» is a string, so it is a bug in mkpeep...
Say what? %n is supposed to ignore the argument, so why should its type matter?
Ah. Er. Wait, not ignore but have no argument at all,
| > sprintf("%*n%s",2,"hej"); | (3) Result: " hej"
so the typechecker is actually correct. What was that piece of code meant to do?
In that case the documentation is broken.
http://pike.ida.liu.se/generated/manual/modref/ex/predef_3A_3A/sprintf.html:
| 'n' No operation (ignore the argument).
In order for it to be possible to ignore the argument, there has to be an argument to ignore.
pike-devel@lists.lysator.liu.se