Page 1 of 1

rebooting code please help

Posted: Sat Aug 21, 2004 11:00 pm
by deus_the_programmer
hi i want this code to refresh on the same line only instead of showing the count down on seperate lines,i want to count down on the same line, please help


#include <conio.h>
#include <dos.h>

int reboot_msg(void);
int system_reboot(void);
int reboot_msg_2(void);

char reboot_time;

int main (void)
{
extern char reboot_time;
reboot_time = 10;
reboot_msg();
system_reboot();
return 0;
}

/*************************************************************************/
int reboot_msg(void)
{
cprintf("\r\n\nSystem Reboot In Progress, Standby...");
return 0;
}


int system_reboot(void)
{
extern char reboot_time;
reboot_time = reboot_time --;
reboot_msg_2();
delay(1000);
if(reboot_time == 0)
{
}
else
{
system_reboot();
}
return 0;
}



int reboot_msg_2(void)
{
cprintf("\r\n\nSystem Rebooting In %d Seconds ",reboot_time);
return 0;
}


hi i want this code to refresh on the same line only instead of showing the count down on seperate lines,i want to count down on the same line, please help