-
Notifications
You must be signed in to change notification settings - Fork 0
/
HELPERFUNCS.h
71 lines (63 loc) · 1.3 KB
/
HELPERFUNCS.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef _HELPERFUNCS_H_
#define _HELPERFUNCS_H_
typedef unsigned char uint8;
/**
* Struct SimpleDB
*
* is structure for students database that contain
* uint8 ID
* uint8 Year
* uint8 subjects_id[3] that hold the 3 subjects IDs
*uint8 subjects_grade[3] that hold 3 the subject grades
*/
typedef struct SimpleDb
{
uint8 ID;
uint8 Year;
uint8 subjects_id[3];
uint8 subjects_grade[3];
struct SimpleDb *next;
} SimpleDb;
SimpleDb *start = NULL;
SimpleDb *new = NULL;
SimpleDb *current = NULL;
SimpleDb *prev = NULL;
uint8 SDB_counter = 0;
/**
* Function: menuIndentation
*
* used for indentation the menu
*
* return void
*/
void menuIndentation(int);
/**
* Function: menu
*
* ask user for select a statment
*
* return void
*/
uint8 menu(void);
/**
*Function: Int_checker
*
*check every char in the string and compare it with alph bet letters
*
* char string[] is the var which will be checked
*
* return 0 if the string not pure int // 0114_KHALED_3325016
* return 1 if the string is pure int // 01143325016
*/
uint8 Int_checker(char string[]);
/**
* Function: stringToint
*
* convert the string to int
*
* char string[] is the array of chars that will convert into int num
*
* return the number after convertion
*/
uint8 stringToint(char string[]);
#endif