-
Notifications
You must be signed in to change notification settings - Fork 0
/
packing.h
48 lines (31 loc) · 825 Bytes
/
packing.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
//
// packing.h
// ece368pa3
//
// Created by Jack Hammons on 10/22/13.
// Copyright (c) 2013 Jack Hammons. All rights reserved.
//
#ifndef ece368pa3_packing_h
#define ece368pa3_packing_h
#include <stdio.h>
typedef struct node {
long thisnode;
double width;
double height;
int parnode;
int lcnode;
int rcnode;
double xcoord;
double ycoord;
char cutline;
struct node *leftnode;
struct node *rightnode;
} Node;
Node *Load_File(char *Filename, int* numBlocks, int* numNodes);
void addNodes(Node *head, Node * * nodePointers);
int sumWidth(Node * head);
int sumHeight(Node * head);
int Save_File(char *Filename, Node * head, int numberOfBlocks);
void printerHelper(Node *head, Node **nodePointers);
int determineCoordinates(Node *head, double x, double y);
#endif