yoda: Calculate sopt_nr in advance

Signed-off-by: Pavel Emelyanov <xemul@sacred.ru>
yoda: Factor out sname/sname_nr evaluation for getopt

Signed-off-by: Pavel Emelyanov <xemul@sacred.ru>