Skip to content
Snippets Groups Projects
Commit 7c3d7d36 authored by T.Wadi's avatar T.Wadi
Browse files

Bug fix

parent fd049200
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@
#define NUMBER_OF_MENU_ITEMS 7
void main()
int main()
{
int choice;
char* menuTitle = "CD-Verwaltung Deluxe";
......@@ -17,8 +17,7 @@ void main()
"Sortieren", "Auflisten", "Programm beenden"};
printLogo();
delay(2);
clearScreen();
delay(3);
do
{
......@@ -51,11 +50,10 @@ void main()
break;
}
} while (choice != 7);
return 0;
}
......@@ -9,6 +9,7 @@ int getMenu(char *menuTitle, char **menuItems, unsigned short numberOfMenuItems)
{
clearScreen();
puts(menuTitle);
printLine('=',50);
for(unsigned int i = 0; i < numberOfMenuItems; ++i)
{
printf("%d. %s\n",(1+i), *(menuItems + i));
......
No preview for this file type
......@@ -56,10 +56,10 @@ void printLogo ()
{
while(!feof(titel)){
fgets(output,150,titel);
printf("%s",output);
printf("%s",output);
}
puts("\n");
free(titel);
fclose(titel);
}
else {
puts("Logo not found\n");
......@@ -72,10 +72,10 @@ void delay(unsigned int number_of_seconds)
{
// Converting time into milli_seconds
int milli_seconds = 1000 * number_of_seconds;
// Storing start time
clock_t start_time = clock();
// looping till required time is not achieved
while (clock() < start_time + milli_seconds)
;
......@@ -89,4 +89,6 @@ void printLine(char zeichen, unsigned int limit)
printf("%c",zeichen);
}
puts("\n");
}
\ No newline at end of file
}
/**********************************************************/
/**********************************************************/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment