void analysis(int ch)
{
static int repeat_count = -1; /* < 0 は無効値 */
int i;
if (ch == 'F' || ch == 'R' || ch == 'L') {
if (repeat_count < 0) repeat_count = 1;
for (i = 0; i < repeat_count; i++) {
switch(ch){
case 'F': forward(); break;
case 'R': right_turn(); break;
case 'L': left_turn(); break;
}
}
repeat_count = -1;
} else if (isdigit(ch)) {
if (repeat_count < 0) repeat_count = ch - '0';
else repeat_count = repeat_count * 10 + ch - '0';
}
}

解説お願いします。
if (repeat_count < 0) repeat_count = 1;
for (i = 0; i < repeat_count; i++)
ってこのプログラムではどういう働きをしているの?