-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
65 lines (56 loc) · 1.19 KB
/
main.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
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define FALSE 0
#define TRUE 1
#define BOOL int
#define HIGHTOLOW 1
#define LOWTOHIGH 2
#define N 7
#pragma once
/*Structs*/
typedef struct date {
short int day;
short int month;
short int year;
}Date;
/*Aprt Structs*/
typedef struct apartment {
short int code;
char * adress;
int price;
short int rooms;
struct date enter_date;
struct date added_date;
}Aprtment;
typedef struct aptnode {
struct apartment aprt;
struct aptnode* next;
}AptNode;
typedef struct aptlist
{
AptNode* head;
AptNode* tail;
int TotalIndex;
}AptList;
/*Stock Structs*/
typedef struct listnode {
char* commands;
int index;
struct listnode* next;
}ListNode;
typedef struct list
{
ListNode* head;
ListNode* tail;
int TotalIndex;
}List;
//main functions
BOOL userInput(char * command, AptList *FullAprts, char ** stockA, List*stockB, int * index);
char * getCommands();
/*Empty functions*/
void emptyStocks(char ** stockA, List * stockB);
void emptyAprts(AptList * FullAprts);
/*Free functions*/
void freeApp(char ** stockA, List * stockB, AptList * FullAprts);