-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataFormat.h
58 lines (55 loc) · 2.07 KB
/
dataFormat.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/***********************************************************
*
* dataFormat.h
* header file that will be the standard type of data to transfer
* over every .c files
* Created by ERROR404
* 21/11/2013
*
***********************************************************
*/
/* create EVENT_T structure to use between functions */
typedef struct
{
char eventCode[32];
char date[32];
char typeOfEvent[16];
char investDate[32];
char reportPerson[32];
char phoneNumber[32];
char address[128];
char district[32];
char result[16];
}EVENT_T;
/* function that call to show current event */
int showEvent (EVENT_T test);
/* function that check the correction of the name */
int checkName (char *name);
/* function that check the correction of the phone number */
int checkPhoneNumber (char *phone);
/* function that check the correction of the address and district */
int checkAddreas (char *addreas,char *distrcit);
/* function that check the correction of the district */
int checkDistrict (char *district);
/* function that check the correction of the date and time of the event */
int checkDateTimeEvent (char *date);
/* function that check the correction of the date and time of the investigation */
int checkDateTimeInvestigation (char *dateInvestigation,char *dateEvent);
/* function that check the correction of the result */
int checkResult (char *result);
/* function that check the correction of the event */
int checkEventType (char *eventType);
/* function that will check all input data */
int inputAllOfEvent (EVENT_T *event,int index);
/* function that call to search data */
int searchRecord (EVENT_T *allData,int count);
/* function that call to save event */
int saveEvent(EVENT_T *event,int count);
/* function that call to load amount of event */
int loadCountEvent();
/* function that call to load all record of event */
int loadEventRecord(EVENT_T *event,int count);
/* function that call to delete record */
int deleteEvent(EVENT_T* event,int *count,int deletePos);
/* function that call to get integer input from user */
int integerInput(char *displayMessage,int min, int max);