Diff of /memAlloc.h [68cdf8] .. [ed05d7] Maximize Restore

  Switch to unified view

a/memAlloc.h b/memAlloc.h
1
#ifndef MEMALLOC_H
2
#define MEMALLOC_H
3
4
// PTLens, Copyright (C) 2004, Thomas Niemann
5
// email: thomasn@epaperpress.com, subject=ptlens
6
// 
7
// This program is free software; you can redistribute 
1
// This program is free software; you can redistribute 
8
// it and/or modify it under the terms of the GNU
2
// it and/or modify it under the terms of the GNU
9
// General Public License as published by the Free 
3
// General Public License as published by the Free 
10
// Software Foundation; either version 2 of the 
4
// Software Foundation; either version 2 of the 
11
// License, or (at your option) any later version. 
5
// License, or (at your option) any later version. 
...
...
19
// You should have received a copy of the GNU General 
13
// You should have received a copy of the GNU General 
20
// Public License along with this program; if not, 
14
// Public License along with this program; if not, 
21
// write to the Free Software Foundation, Inc., 675 
15
// write to the Free Software Foundation, Inc., 675 
22
// Mass Ave, Cambridge, MA 02139, USA.
16
// Mass Ave, Cambridge, MA 02139, USA.
23
17
18
/**
19
* @file memAlloc.h
20
* This file is included in all four plug-ins (PTAdjust, PTCorrect, PTPerspect, and PTRemap)
21
* Used for allocating, freeing, locking, and unlocking memmory.
22
* @date January 2007
23
*/
24
25
#ifndef MEMALLOC_H
26
#define MEMALLOC_H
27
24
#define MAX_STACK 20
28
#define MAX_STACK 20
25
29
30
/**
31
* buffer for Handle
32
*/
26
typedef struct {
33
typedef struct 
34
{
27
    void *mem;          // pointer to first byte in handle
35
    void     *mem;           //< pointer to first byte in handle
28
    BufferID id;        // handle
36
    BufferID  id;            //< handle
29
} bufHandle;
37
} bufHandle;
30
38
39
40
/**
31
// static variables for Alloc.c
41
* static variables for Alloc.c
42
*/
32
typedef struct {
43
typedef struct
44
{
33
    bufHandle stack[MAX_STACK];
45
    bufHandle stack[MAX_STACK];   //< the stac
34
  int32 tos;
46
  int32     tos;                //< the tos
35
} MemData;
47
} MemData;
36
48
37
enum MemType { memStatic, memDynamic };
49
enum MemType { memStatic, memDynamic };
38
50
39
void memInit(MemType);
51
void memInit(MemType);