Line | |
---|
1 | /* |
---|
2 | |
---|
3 | Brian Curless |
---|
4 | |
---|
5 | Computer Graphics Laboratory |
---|
6 | Stanford University |
---|
7 | |
---|
8 | --------------------------------------------------------------------- |
---|
9 | |
---|
10 | Copyright (1997) The Board of Trustees of the Leland Stanford Junior |
---|
11 | University. Except for commercial resale, lease, license or other |
---|
12 | commercial transactions, permission is hereby given to use, copy, |
---|
13 | modify this software for academic purposes only. No part of this |
---|
14 | software or any derivatives thereof may be used in the production of |
---|
15 | computer models for resale or for use in a commercial |
---|
16 | product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND |
---|
17 | CONCERNING THIS SOFTWARE. No support is implied or provided. |
---|
18 | |
---|
19 | */ |
---|
20 | |
---|
21 | |
---|
22 | #include "ChunkLink.h" |
---|
23 | |
---|
24 | #include <stdio.h> |
---|
25 | #include <unistd.h> |
---|
26 | #ifdef LINUX |
---|
27 | #include <stdlib.h> |
---|
28 | #endif |
---|
29 | |
---|
30 | ChunkLink::ChunkLink() |
---|
31 | { |
---|
32 | this->size = 0; |
---|
33 | this->chunk = NULL; |
---|
34 | this->next = NULL; |
---|
35 | } |
---|
36 | |
---|
37 | |
---|
38 | ChunkLink::ChunkLink(int size) |
---|
39 | { |
---|
40 | this->size = size; |
---|
41 | this->chunk = new uchar[size]; |
---|
42 | if (this->chunk == NULL) { |
---|
43 | fprintf(stderr, "ChunkLink::ChunkLink() : not enough memory.\n"); |
---|
44 | exit(1); |
---|
45 | } |
---|
46 | this->next = NULL; |
---|
47 | } |
---|
48 | |
---|
49 | |
---|
50 | ChunkLink::~ChunkLink() |
---|
51 | { |
---|
52 | delete [] chunk; |
---|
53 | } |
---|
54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.