Make shutdown functions callable by OS image's exec methods.

This commit is contained in:
Michael Brown
2007-01-14 00:16:41 +00:00
parent c088ecf042
commit c2708df14a
3 changed files with 42 additions and 353 deletions

View File

@@ -94,32 +94,6 @@ void interruptible_sleep(int secs)
sleep(secs);
}
/**************************************************************************
TWIDDLE
**************************************************************************/
void twiddle(void)
{
#ifdef BAR_PROGRESS
static int count=0;
static const char tiddles[]="-\\|/";
static unsigned long lastticks = 0;
unsigned long ticks;
#endif
if ( ! as_main_program ) return;
#ifdef BAR_PROGRESS
/* Limit the maximum rate at which characters are printed */
ticks = currticks();
if ((lastticks + (TICKS_PER_SEC/18)) > ticks)
return;
lastticks = ticks;
putchar(tiddles[(count++)&3]);
putchar('\b');
#else
putchar('.');
#endif /* BAR_PROGRESS */
}
/**************************************************************************
STRCASECMP (not entirely correct, but this will do for our purposes)
**************************************************************************/