merged flipdot.c from master