Re: where is the rotating thing /^H-^H\^H|^H/^H-...

From: Dan Nelson <dnelson_at_allantgroup.com>
Date: Sun, 21 Dec 2003 14:44:51 -0600
In the last episode (Dec 21), Bjoern A. Zeeb said:
> Hi,
> 
> I am currently searching the  sequence (rotating thing at boot time
> when loading kernel or md_images ...):
> 
> /^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|^H/^H-^H\^H|
> 
> can anybody please tell me where the code for this is (be it C or 4th) ?

It's usually implemented as something like:

    static unsigned c = 0x2d5c7c2f;
    printf("%c\b", c = c << 8 | c >> 24);

Print the first byte of 'c', then rotate it 8 bits :)

-- 
	Dan Nelson
	dnelson_at_allantgroup.com
Received on Sun Dec 21 2003 - 11:44:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC