//This file contains function declarations and implementations for all non-file handling related functions //used by main.c #define USAGE "timec [OPTION] [ARGUMENT]... (The time is entered in 24-hour clock)\n" #define INVALID_OPTION "The option you provided is invalid, type \"timec -h\" for help\n" #define TIME_LENGTH 6 #define HELP "Enter \"typec -h\" for help\n" typedef struct { int hour; int minute; } Time; //parseTime() function is used to parse time from a string and put the parsed hour and minute //into the members of the provided Time struct using its pointer void parseTime(char* str,Time* time); //putTime function is used to convert Time struc into a string void putTime(char* str,Time* time); //calcDiffH() is used to calculate the difference between two given hours int calcDiffH(Time* start,Time* end); //calcDiffM() is used to calculate the difference between two given minutes int...
Comments
Post a Comment