rebooting code please help

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
deus_the_programmer

rebooting code please help

Post 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
Post Reply