1 #ifdef RCSID
2 static char RCSid[] =
3 "$Header: d:/cvsroot/tads/tads3/vmres.cpp,v 1.3 1999/07/11 00:46:59 MJRoberts Exp $";
4 #endif
5 
6 /*
7  *   Copyright (c) 1999, 2002 Michael J. Roberts.  All Rights Reserved.
8  *
9  *   Please see the accompanying license file, LICENSE.TXT, for information
10  *   on using and copying this software.
11  */
12 /*
13 Name
14   vmres.cpp - VM resource class
15 Function
16 
17 Notes
18 
19 Modified
20   04/03/99 MJRoberts  - Creation
21 */
22 
23 #include "vmres.h"
24 
25 /*
26  *   Allocate the resource.
27  */
CVmResource(long seek_pos,uint32 len,size_t name_len)28 CVmResource::CVmResource(long seek_pos, uint32 len, size_t name_len)
29 {
30     /* store the seek and length information */
31     seek_pos_ = seek_pos;
32     len_ = len;
33 
34     /* allocate space for the name */
35     name_ = (char *)t3malloc(name_len + 1);
36     name_[0] = '\0';
37 
38     /* nothing else in the list yet */
39     nxt_ = 0;
40 }
41 
42 /*
43  *   Delete the resource
44  */
~CVmResource()45 CVmResource::~CVmResource()
46 {
47     /* delete the name */
48     t3free(name_);
49 }
50 
51