xref: /netbsd-src/sys/arch/amiga/stand/bootblock/boot/twiddle.c (revision df7f595ecd6efe54ea7c11083e2dbf711cad4b31)
1*df7f595eScegger /*	$NetBSD: twiddle.c,v 1.5 2009/03/18 10:22:23 cegger Exp $	*/
26ddf65c1Sis 
36ddf65c1Sis /*-
46ddf65c1Sis  * Copyright (c) 1993
56ddf65c1Sis  *	The Regents of the University of California.  All rights reserved.
66ddf65c1Sis  *
76ddf65c1Sis  * Redistribution and use in source and binary forms, with or without
86ddf65c1Sis  * modification, are permitted provided that the following conditions
96ddf65c1Sis  * are met:
106ddf65c1Sis  * 1. Redistributions of source code must retain the above copyright
116ddf65c1Sis  *    notice, this list of conditions and the following disclaimer.
126ddf65c1Sis  * 2. Redistributions in binary form must reproduce the above copyright
136ddf65c1Sis  *    notice, this list of conditions and the following disclaimer in the
146ddf65c1Sis  *    documentation and/or other materials provided with the distribution.
15aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
166ddf65c1Sis  *    may be used to endorse or promote products derived from this software
176ddf65c1Sis  *    without specific prior written permission.
186ddf65c1Sis  *
196ddf65c1Sis  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
206ddf65c1Sis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
216ddf65c1Sis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
226ddf65c1Sis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
236ddf65c1Sis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
246ddf65c1Sis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
256ddf65c1Sis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
266ddf65c1Sis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
276ddf65c1Sis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
286ddf65c1Sis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
296ddf65c1Sis  * SUCH DAMAGE.
306ddf65c1Sis  *
316ddf65c1Sis  *	@(#)printf.c	8.1 (Berkeley) 6/11/93
326ddf65c1Sis  */
336ddf65c1Sis 
34*df7f595eScegger /*	From: $NetBSD: twiddle.c,v 1.5 2009/03/18 10:22:23 cegger Exp $	*/
356ddf65c1Sis 
36e63501d2Sjunyoung #include <lib/libsa/stand.h>
376ddf65c1Sis 
386ddf65c1Sis const static char chars[4] = {'|', '/', '-', '\\'};
396ddf65c1Sis 
406ddf65c1Sis void
twiddle(void)41*df7f595eScegger twiddle(void)
426ddf65c1Sis {
436ddf65c1Sis 	static short int pos;
446ddf65c1Sis 
456ddf65c1Sis 	putchar(chars[pos++ & 3]);
466ddf65c1Sis 	putchar('\b');
476ddf65c1Sis }
48