b[o] = ".,-~:;=!*#$@"[N > 0 ? N : 0];
is allowed in C.
b[o] = ".,-~:;=!*#$@"[N > 0 ? N : 0];
is allowed in C.
Looks like the rest of the code is for generating the donut. Quite a bit of math involved - too much for a sunday morning to look into and attempt to decipher!
[1] http://www.codeguru.com/forum/archive/index.php/t-311110.htm... explains it quite well:
Those are so-called ANSI terminal escape sequences - there is a whole list of them. Hex 1B is the escape character, the characters after that determine the action (clearing the screen, changin text color, moving the cursor etc.) Well, and "[2J" is the sequence for clearing the screen.
An alternative method to animate ascii stuff, used in the Yahoo logo, is just to cursor-up 25 lines (or whatever) with <ESC>[25A between frames. That way it doesn't have to clear the screen and you can see your command history, etc.
This is an assignment to index o of the array b
b[0] =
this is the string ".,-~:;=!*#$@"
and this is indexing into the string literal with N, or 0 if N is less than 0. [N > 0 ? N : 0]